ast-compare 3.2.13 → 3.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -29,7 +29,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
29
29
 
30
30
  ### BREAKING CHANGES
31
31
 
32
- - programs now are in ES Modules and won't work with Common JS require()
32
+ - programs now are in ES Modules and won't work with Common JS `require()`
33
33
 
34
34
  ## 2.1.0 (2021-05-24)
35
35
 
@@ -47,7 +47,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
47
47
 
48
48
  ### Fixed
49
49
 
50
- - add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
50
+ - add `testStats` to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
51
51
 
52
52
  ## 2.0.0 (2021-01-23)
53
53
 
@@ -61,7 +61,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
61
61
 
62
62
  ## 1.14.0 (2020-11-28)
63
63
 
64
- Accidental version bump during migration to sourcehut. Sorry about that.
64
+ Accidental version bump during migration to SourceHut. Sorry about that.
65
65
 
66
66
  ## 1.13.0 (2020-01-26)
67
67
 
@@ -73,22 +73,22 @@ Accidental version bump during migration to sourcehut. Sorry about that.
73
73
 
74
74
  ### Performance Improvements
75
75
 
76
- - remove check-types-mini ([0503752](https://gitlab.com/codsen/codsen/commit/0503752))
76
+ - remove `check-types-mini` ([0503752](https://gitlab.com/codsen/codsen/commit/0503752))
77
77
 
78
78
  ## 1.12.0 (2019-06-29)
79
79
 
80
80
  ### Features
81
81
 
82
- - Add perf measurement, recording and historical comparison ([8266d21](https://gitlab.com/codsen/codsen/commit/8266d21))
82
+ - add perf measurement, recording and historical comparison ([8266d21](https://gitlab.com/codsen/codsen/commit/8266d21))
83
83
 
84
84
  ## 1.11.0 (2019-01-20)
85
85
 
86
- - Various documentation and setup tweaks after we migrated to monorepo
87
- - Setup refresh: updated dependencies and all config files using automated tools
86
+ - various documentation and setup tweaks after we migrated to monorepo
87
+ - updated dependencies and all config files using automated tools
88
88
 
89
89
  ## 1.7.0 (2018-12-26)
90
90
 
91
- - opts.useWildcards ([d541cab](https://gitlab.com/codsen/codsen/tree/master/packages/ast-compare/commits/d541cab))
91
+ - `opts.useWildcards` ([d541cab](https://gitlab.com/codsen/codsen/tree/master/packages/ast-compare/commits/d541cab))
92
92
 
93
93
  ## 1.6.0 (2018-10-12)
94
94
 
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @name ast-compare
3
3
  * @fileoverview Compare anything: AST, objects, arrays, strings and nested thereof
4
- * @version 3.2.13
4
+ * @version 3.2.14
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-compare/}
8
8
  */
9
9
 
10
- import a from"type-detect";import{empty as s}from"ast-contains-only-empty-space";import o from"lodash.isplainobject";import{isMatch as m}from"matcher";var f="3.2.13";var W=f;function O(e){return o(e)?!Object.keys(e).length:Array.isArray(e)||typeof e=="string"?!e.length:!1}var V={hungryForWhitespace:!1,matchStrictly:!1,verboseWhenMismatches:!1,useWildcards:!1};function d(e,t,b){let i,u,y,g=0,r={...V,...b};if(r.hungryForWhitespace&&r.matchStrictly&&o(e)&&s(e)&&o(t)&&!Object.keys(t).length)return!0;if((!r.hungryForWhitespace||r.hungryForWhitespace&&!s(e)&&s(t))&&o(e)&&Object.keys(e).length!==0&&o(t)&&Object.keys(t).length===0||a(e)!==a(t)&&(!r.hungryForWhitespace||r.hungryForWhitespace&&!s(e)))return!1;if(typeof e=="string"&&typeof t=="string")return r.hungryForWhitespace&&s(e)&&s(t)?!0:r.verboseWhenMismatches?e===t?!0:`Given string ${t} is not matched! We have ${e} on the other end.`:r.useWildcards?m(e,t,{caseSensitive:!0}):e===t;if(Array.isArray(e)&&Array.isArray(t)){if(r.hungryForWhitespace&&s(t)&&(!r.matchStrictly||r.matchStrictly&&e.length===t.length))return!0;if(!r.hungryForWhitespace&&t.length>e.length||r.matchStrictly&&t.length!==e.length)return r.verboseWhenMismatches?`The length of a given array, ${JSON.stringify(t,null,4)} is ${t.length} but the length of an array on the other end, ${JSON.stringify(e,null,4)} is ${e.length}`:!1;if(t.length===0)return e.length===0?!0:r.verboseWhenMismatches?`The given array has no elements, but the array on the other end, ${JSON.stringify(e,null,4)} does have some`:!1;for(let n=0,c=t.length;n<c;n++){y=!1;for(let l=g,h=e.length;l<h;l++)if(g+=1,d(e[l],t[n],r)===!0){y=!0;break}if(!y)return r.verboseWhenMismatches?`The given array ${JSON.stringify(t,null,4)} is not a subset of an array on the other end, ${JSON.stringify(e,null,4)}`:!1}}else if(o(e)&&o(t)){if(i=new Set(Object.keys(t)),u=new Set(Object.keys(e)),r.matchStrictly&&i.size!==u.size){if(!r.verboseWhenMismatches)return!1;let n=new Set([...i].filter(p=>!u.has(p))),c=n.size?` First object has unique keys: ${JSON.stringify(n,null,4)}.`:"",l=new Set([...u].filter(p=>!i.has(p))),h=l.size?` Second object has unique keys:
10
+ import a from"type-detect";import{empty as s}from"ast-contains-only-empty-space";import o from"lodash.isplainobject";import{isMatch as m}from"matcher";var f="3.2.14";var W=f;function O(e){return o(e)?!Object.keys(e).length:Array.isArray(e)||typeof e=="string"?!e.length:!1}var V={hungryForWhitespace:!1,matchStrictly:!1,verboseWhenMismatches:!1,useWildcards:!1};function d(e,t,b){let i,u,y,g=0,r={...V,...b};if(r.hungryForWhitespace&&r.matchStrictly&&o(e)&&s(e)&&o(t)&&!Object.keys(t).length)return!0;if((!r.hungryForWhitespace||r.hungryForWhitespace&&!s(e)&&s(t))&&o(e)&&Object.keys(e).length!==0&&o(t)&&Object.keys(t).length===0||a(e)!==a(t)&&(!r.hungryForWhitespace||r.hungryForWhitespace&&!s(e)))return!1;if(typeof e=="string"&&typeof t=="string")return r.hungryForWhitespace&&s(e)&&s(t)?!0:r.verboseWhenMismatches?e===t?!0:`Given string ${t} is not matched! We have ${e} on the other end.`:r.useWildcards?m(e,t,{caseSensitive:!0}):e===t;if(Array.isArray(e)&&Array.isArray(t)){if(r.hungryForWhitespace&&s(t)&&(!r.matchStrictly||r.matchStrictly&&e.length===t.length))return!0;if(!r.hungryForWhitespace&&t.length>e.length||r.matchStrictly&&t.length!==e.length)return r.verboseWhenMismatches?`The length of a given array, ${JSON.stringify(t,null,4)} is ${t.length} but the length of an array on the other end, ${JSON.stringify(e,null,4)} is ${e.length}`:!1;if(t.length===0)return e.length===0?!0:r.verboseWhenMismatches?`The given array has no elements, but the array on the other end, ${JSON.stringify(e,null,4)} does have some`:!1;for(let n=0,c=t.length;n<c;n++){y=!1;for(let l=g,h=e.length;l<h;l++)if(g+=1,d(e[l],t[n],r)===!0){y=!0;break}if(!y)return r.verboseWhenMismatches?`The given array ${JSON.stringify(t,null,4)} is not a subset of an array on the other end, ${JSON.stringify(e,null,4)}`:!1}}else if(o(e)&&o(t)){if(i=new Set(Object.keys(t)),u=new Set(Object.keys(e)),r.matchStrictly&&i.size!==u.size){if(!r.verboseWhenMismatches)return!1;let n=new Set([...i].filter(p=>!u.has(p))),c=n.size?` First object has unique keys: ${JSON.stringify(n,null,4)}.`:"",l=new Set([...u].filter(p=>!i.has(p))),h=l.size?` Second object has unique keys:
11
11
  ${JSON.stringify(l,null,4)}.`:"";return`When matching strictly, we found that both objects have different amount of keys.${c}${h}`}for(let n of i){if(!Object.prototype.hasOwnProperty.call(e,n))return!r.useWildcards||r.useWildcards&&!n.includes("*")?r.verboseWhenMismatches?`The given object has key "${n}" which the other-one does not have.`:!1:Object.keys(e).some(c=>m(c,n,{caseSensitive:!0}))?!0:r.verboseWhenMismatches?`The given object has key "${n}" which the other-one does not have.`:!1;if(e[n]!=null&&a(e[n])!==a(t[n])){if(!(s(e[n])&&s(t[n])&&r.hungryForWhitespace))return r.verboseWhenMismatches?`The given key ${n} is of a different type on both objects. On the first-one, it's ${a(t[n])}, on the second-one, it's ${a(e[n])}`:!1}else if(d(e[n],t[n],r)!==!0)return r.verboseWhenMismatches?`The given piece ${JSON.stringify(t[n],null,4)} and ${JSON.stringify(e[n],null,4)} don't match.`:!1}}else return r.hungryForWhitespace&&s(e)&&s(t)&&(!r.matchStrictly||r.matchStrictly&&O(t))?!0:e===t;return!0}export{d as compare,V as defaults,W as version};
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * @name ast-compare
3
3
  * @fileoverview Compare anything: AST, objects, arrays, strings and nested thereof
4
- * @version 3.2.13
4
+ * @version 3.2.14
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-compare/}
8
8
  */
9
9
 
10
- "use strict";var astCompare=(()=>{var _t=Object.create;var M=Object.defineProperty,$t=Object.defineProperties,xt=Object.getOwnPropertyDescriptor,At=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertyNames,ve=Object.getOwnPropertySymbols,Dt=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable;var Oe=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))Se.call(t,r)&&Oe(e,r,t[r]);if(ve)for(var r of ve(t))Vt.call(t,r)&&Oe(e,r,t[r]);return e},C=(e,t)=>$t(e,At(t));var U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=(e,t)=>{for(var r in t)M(e,r,{get:t[r],enumerable:!0})},we=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Tt(t))!Se.call(e,i)&&i!==r&&M(e,i,{get:()=>t[i],enumerable:!(n=xt(t,i))||n.enumerable});return e};var N=(e,t,r)=>(r=e!=null?_t(Dt(e)):{},we(t||!e||!e.__esModule?M(r,"default",{value:e,enumerable:!0}):r,e)),Ct=e=>we(M({},"__esModule",{value:!0}),e);var Ee=U((q,z)=>{(function(e,t){typeof q=="object"&&typeof z<"u"?z.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(q,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,r=typeof Symbol<"u",n=typeof Map<"u",i=typeof Set<"u",c=typeof WeakMap<"u",u=typeof WeakSet<"u",o=typeof DataView<"u",a=r&&typeof Symbol.iterator<"u",f=r&&typeof Symbol.toStringTag<"u",s=i&&typeof Set.prototype.entries=="function",l=n&&typeof Map.prototype.entries=="function",h=s&&Object.getPrototypeOf(new Set().entries()),m=l&&Object.getPrototypeOf(new Map().entries()),E=a&&typeof Array.prototype[Symbol.iterator]=="function",Ot=E&&Object.getPrototypeOf([][Symbol.iterator]()),de=a&&typeof String.prototype[Symbol.iterator]=="function",St=de&&Object.getPrototypeOf(""[Symbol.iterator]()),wt=8,Et=-1;function jt(y){var be=typeof y;if(be!=="object")return be;if(y===null)return"null";if(y===t)return"global";if(Array.isArray(y)&&(f===!1||!(Symbol.toStringTag in y)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&y===window.location)return"Location";if(typeof window.document=="object"&&y===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&y===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&y===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&y instanceof window.HTMLElement){if(y.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(y.tagName==="TD")return"HTMLTableDataCellElement";if(y.tagName==="TH")return"HTMLTableHeaderCellElement"}}var me=f&&y[Symbol.toStringTag];if(typeof me=="string")return me;var g=Object.getPrototypeOf(y);return g===RegExp.prototype?"RegExp":g===Date.prototype?"Date":e&&g===Promise.prototype?"Promise":i&&g===Set.prototype?"Set":n&&g===Map.prototype?"Map":u&&g===WeakSet.prototype?"WeakSet":c&&g===WeakMap.prototype?"WeakMap":o&&g===DataView.prototype?"DataView":n&&g===m?"Map Iterator":i&&g===h?"Set Iterator":E&&g===Ot?"Array Iterator":de&&g===St?"String Iterator":g===null?"Object":Object.prototype.toString.call(y).slice(wt,Et)}return jt})});var ft=U((P,A)=>{var Pt=200,We="__lodash_hash_undefined__",Ie=9007199254740991,ne="[object Arguments]",Wt="[object Array]",Ne="[object Boolean]",ke="[object Date]",It="[object Error]",oe="[object Function]",Le="[object GeneratorFunction]",k="[object Map]",Je="[object Number]",ae="[object Object]",je="[object Promise]",Ke="[object RegExp]",L="[object Set]",Fe="[object String]",Re="[object Symbol]",X="[object WeakMap]",He="[object ArrayBuffer]",J="[object DataView]",Be="[object Float32Array]",Ge="[object Float64Array]",Ue="[object Int8Array]",qe="[object Int16Array]",ze="[object Int32Array]",Qe="[object Uint8Array]",Xe="[object Uint8ClampedArray]",Ye="[object Uint16Array]",Ze="[object Uint32Array]",Nt=/[\\^$.*+?()[\]{}|]/g,kt=/\w*$/,Lt=/^\[object .+?Constructor\]$/,Jt=/^(?:0|[1-9]\d*)$/,p={};p[ne]=p[Wt]=p[He]=p[J]=p[Ne]=p[ke]=p[Be]=p[Ge]=p[Ue]=p[qe]=p[ze]=p[k]=p[Je]=p[ae]=p[Ke]=p[L]=p[Fe]=p[Re]=p[Qe]=p[Xe]=p[Ye]=p[Ze]=!0;p[It]=p[oe]=p[X]=!1;var Kt=typeof global=="object"&&global&&global.Object===Object&&global,Ft=typeof self=="object"&&self&&self.Object===Object&&self,v=Kt||Ft||Function("return this")(),et=typeof P=="object"&&P&&!P.nodeType&&P,_e=et&&typeof A=="object"&&A&&!A.nodeType&&A,Rt=_e&&_e.exports===et;function Ht(e,t){return e.set(t[0],t[1]),e}function Bt(e,t){return e.add(t),e}function Gt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Ut(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function tt(e,t,r,n){var i=-1,c=e?e.length:0;for(n&&c&&(r=e[++i]);++i<c;)r=t(r,e[i],i,e);return r}function qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function zt(e,t){return e==null?void 0:e[t]}function rt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function $e(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function ie(e,t){return function(r){return e(t(r))}}function xe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Qt=Array.prototype,Xt=Function.prototype,K=Object.prototype,Q=v["__core-js_shared__"],Ae=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nt=Xt.toString,S=K.hasOwnProperty,F=K.toString,Yt=RegExp("^"+nt.call(S).replace(Nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=Rt?v.Buffer:void 0,De=v.Symbol,Ve=v.Uint8Array,Zt=ie(Object.getPrototypeOf,Object),er=Object.create,tr=K.propertyIsEnumerable,rr=Qt.splice,Me=Object.getOwnPropertySymbols,nr=Te?Te.isBuffer:void 0,or=ie(Object.keys,Object),Y=V(v,"DataView"),W=V(v,"Map"),Z=V(v,"Promise"),ee=V(v,"Set"),te=V(v,"WeakMap"),I=V(Object,"create"),ar=$(Y),ir=$(W),sr=$(Z),cr=$(ee),lr=$(te),Ce=De?De.prototype:void 0,Pe=Ce?Ce.valueOf:void 0;function _(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ur(){this.__data__=I?I(null):{}}function fr(e){return this.has(e)&&delete this.__data__[e]}function pr(e){var t=this.__data__;if(I){var r=t[e];return r===We?void 0:r}return S.call(t,e)?t[e]:void 0}function yr(e){var t=this.__data__;return I?t[e]!==void 0:S.call(t,e)}function hr(e,t){var r=this.__data__;return r[e]=I&&t===void 0?We:t,this}_.prototype.clear=ur;_.prototype.delete=fr;_.prototype.get=pr;_.prototype.has=yr;_.prototype.set=hr;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function gr(){this.__data__=[]}function dr(e){var t=this.__data__,r=R(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rr.call(t,r,1),!0}function br(e){var t=this.__data__,r=R(t,e);return r<0?void 0:t[r][1]}function mr(e){return R(this.__data__,e)>-1}function vr(e,t){var r=this.__data__,n=R(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}O.prototype.clear=gr;O.prototype.delete=dr;O.prototype.get=br;O.prototype.has=mr;O.prototype.set=vr;function T(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Or(){this.__data__={hash:new _,map:new(W||O),string:new _}}function Sr(e){return H(this,e).delete(e)}function wr(e){return H(this,e).get(e)}function Er(e){return H(this,e).has(e)}function jr(e,t){return H(this,e).set(e,t),this}T.prototype.clear=Or;T.prototype.delete=Sr;T.prototype.get=wr;T.prototype.has=Er;T.prototype.set=jr;function D(e){this.__data__=new O(e)}function _r(){this.__data__=new O}function $r(e){return this.__data__.delete(e)}function xr(e){return this.__data__.get(e)}function Ar(e){return this.__data__.has(e)}function Tr(e,t){var r=this.__data__;if(r instanceof O){var n=r.__data__;if(!W||n.length<Pt-1)return n.push([e,t]),this;r=this.__data__=new T(n)}return r.set(e,t),this}D.prototype.clear=_r;D.prototype.delete=$r;D.prototype.get=xr;D.prototype.has=Ar;D.prototype.set=Tr;function Dr(e,t){var r=ce(e)||en(e)?qt(e.length,String):[],n=r.length,i=!!n;for(var c in e)(t||S.call(e,c))&&!(i&&(c=="length"||Qr(c,n)))&&r.push(c);return r}function ot(e,t,r){var n=e[t];(!(S.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function R(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}function Vr(e,t){return e&&at(t,le(t),e)}function re(e,t,r,n,i,c,u){var o;if(n&&(o=c?n(e,i,c,u):n(e)),o!==void 0)return o;if(!B(e))return e;var a=ce(e);if(a){if(o=Ur(e),!t)return Hr(e,o)}else{var f=j(e),s=f==oe||f==Le;if(rn(e))return Nr(e,t);if(f==ae||f==ne||s&&!c){if(rt(e))return c?e:{};if(o=qr(s?{}:e),!t)return Br(e,Vr(o,e))}else{if(!p[f])return c?e:{};o=zr(e,f,re,t)}}u||(u=new D);var l=u.get(e);if(l)return l;if(u.set(e,o),!a)var h=r?Gr(e):le(e);return Gt(h||e,function(m,E){h&&(E=m,m=e[E]),ot(o,E,re(m,t,r,n,E,e,u))}),o}function Mr(e){return B(e)?er(e):{}}function Cr(e,t,r){var n=t(e);return ce(e)?n:Ut(n,r(e))}function Pr(e){return F.call(e)}function Wr(e){if(!B(e)||Yr(e))return!1;var t=ut(e)||rt(e)?Yt:Lt;return t.test($(e))}function Ir(e){if(!st(e))return or(e);var t=[];for(var r in Object(e))S.call(e,r)&&r!="constructor"&&t.push(r);return t}function Nr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function se(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function kr(e,t){var r=t?se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Lr(e,t,r){var n=t?r($e(e),!0):$e(e);return tt(n,Ht,new e.constructor)}function Jr(e){var t=new e.constructor(e.source,kt.exec(e));return t.lastIndex=e.lastIndex,t}function Kr(e,t,r){var n=t?r(xe(e),!0):xe(e);return tt(n,Bt,new e.constructor)}function Fr(e){return Pe?Object(Pe.call(e)):{}}function Rr(e,t){var r=t?se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Hr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function at(e,t,r,n){r||(r={});for(var i=-1,c=t.length;++i<c;){var u=t[i],o=n?n(r[u],e[u],u,r,e):void 0;ot(r,u,o===void 0?e[u]:o)}return r}function Br(e,t){return at(e,it(e),t)}function Gr(e){return Cr(e,le,it)}function H(e,t){var r=e.__data__;return Xr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function V(e,t){var r=zt(e,t);return Wr(r)?r:void 0}var it=Me?ie(Me,Object):an,j=Pr;(Y&&j(new Y(new ArrayBuffer(1)))!=J||W&&j(new W)!=k||Z&&j(Z.resolve())!=je||ee&&j(new ee)!=L||te&&j(new te)!=X)&&(j=function(e){var t=F.call(e),r=t==ae?e.constructor:void 0,n=r?$(r):void 0;if(n)switch(n){case ar:return J;case ir:return k;case sr:return je;case cr:return L;case lr:return X}return t});function Ur(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&S.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function qr(e){return typeof e.constructor=="function"&&!st(e)?Mr(Zt(e)):{}}function zr(e,t,r,n){var i=e.constructor;switch(t){case He:return se(e);case Ne:case ke:return new i(+e);case J:return kr(e,n);case Be:case Ge:case Ue:case qe:case ze:case Qe:case Xe:case Ye:case Ze:return Rr(e,n);case k:return Lr(e,n,r);case Je:case Fe:return new i(e);case Ke:return Jr(e);case L:return Kr(e,n,r);case Re:return Fr(e)}}function Qr(e,t){return t=t==null?Ie:t,!!t&&(typeof e=="number"||Jt.test(e))&&e>-1&&e%1==0&&e<t}function Xr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yr(e){return!!Ae&&Ae in e}function st(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||K;return e===r}function $(e){if(e!=null){try{return nt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Zr(e){return re(e,!0,!0)}function ct(e,t){return e===t||e!==e&&t!==t}function en(e){return tn(e)&&S.call(e,"callee")&&(!tr.call(e,"callee")||F.call(e)==ne)}var ce=Array.isArray;function lt(e){return e!=null&&nn(e.length)&&!ut(e)}function tn(e){return on(e)&&lt(e)}var rn=nr||sn;function ut(e){var t=B(e)?F.call(e):"";return t==oe||t==Le}function nn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ie}function B(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function on(e){return!!e&&typeof e=="object"}function le(e){return lt(e)?Dr(e):Ir(e)}function an(){return[]}function sn(){return!1}A.exports=Zr});var ue=U(($n,ht)=>{var cn="[object Object]";function ln(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function un(e,t){return function(r){return e(t(r))}}var fn=Function.prototype,pt=Object.prototype,yt=fn.toString,pn=pt.hasOwnProperty,yn=yt.call(Object),hn=pt.toString,gn=un(Object.getPrototypeOf,Object);function dn(e){return!!e&&typeof e=="object"}function bn(e){if(!dn(e)||hn.call(e)!=cn||ln(e))return!1;var t=gn(e);if(t===null)return!0;var r=pn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&yt.call(r)==yn}ht.exports=bn});var jn={};Mt(jn,{compare:()=>ge,defaults:()=>vt,version:()=>wn});var x=N(Ee(),1);var G=N(ft(),1),gt=N(ue(),1);function mn(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let r=t-1;r--;)if(e[r]===".")return e.slice(r+1,t)}return null}var fe=mn;function dt(e,t){let r={now:!1};function n(i,c,u,o){let a=(0,G.default)(i),f,s=b({depth:-1,path:""},u);if(s.depth+=1,Array.isArray(a))for(let l=0,h=a.length;l<h&&!o.now;l++){let m=s.path?`${s.path}.${l}`:`${l}`;a[l]!==void 0?(s.parent=(0,G.default)(a),s.parentType="array",s.parentKey=fe(m),f=n(c(a[l],void 0,C(b({},s),{path:m}),o),c,C(b({},s),{path:m}),o),Number.isNaN(f)&&l<a.length?(a.splice(l,1),l-=1):a[l]=f):a.splice(l,1)}else if((0,gt.default)(a))for(let l in a){if(o.now&&l!=null)break;let h=s.path?`${s.path}.${l}`:l;s.depth===0&&l!=null&&(s.topmostKey=l),s.parent=(0,G.default)(a),s.parentType="object",s.parentKey=fe(h),f=n(c(l,a[l],C(b({},s),{path:h}),o),c,C(b({},s),{path:h}),o),Number.isNaN(f)?delete a[l]:a[l]=f}return a}return n(e,t,{},r)}function d(e){if(typeof e=="string")return!e.trim();if(!["object","string"].includes(typeof e)||!e)return!1;let t=!0;return e=dt(e,(r,n,i,c)=>{let u=n!==void 0?n:r;return typeof u=="string"&&u.trim()&&(t=!1,c.now=!0),u}),t}var w=N(ue(),1);function pe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ye=new Map,bt=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},vn=(e,t)=>{t=b({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(ye.has(r))return ye.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=pe(e).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return i.negated=n,ye.set(r,i),i},On=(e,t,r,n)=>{if(e=bt(e,"inputs"),t=bt(t,"patterns"),t.length===0)return[];t=t.map(u=>vn(u,r));let{allPatterns:i}=r||{},c=[];for(let u of e){let o,a=[...t].fill(!1);for(let[f,s]of t.entries())if(s.test(u)&&(a[f]=!0,o=!s.negated,!o))break;if(!(o===!1||o===void 0&&t.some(f=>!f.negated)||i&&a.some((f,s)=>!f&&!t[s].negated))&&(c.push(u),n))break}return c};function he(e,t,r){return On(e,t,r,!0).length>0}var mt="3.2.13";var wn=mt;function En(e){return(0,w.default)(e)?!Object.keys(e).length:Array.isArray(e)||typeof e=="string"?!e.length:!1}var vt={hungryForWhitespace:!1,matchStrictly:!1,verboseWhenMismatches:!1,useWildcards:!1};function ge(e,t,r){let n,i,c,u=0,o=b(b({},vt),r);if(o.hungryForWhitespace&&o.matchStrictly&&(0,w.default)(e)&&d(e)&&(0,w.default)(t)&&!Object.keys(t).length)return!0;if((!o.hungryForWhitespace||o.hungryForWhitespace&&!d(e)&&d(t))&&(0,w.default)(e)&&Object.keys(e).length!==0&&(0,w.default)(t)&&Object.keys(t).length===0||(0,x.default)(e)!==(0,x.default)(t)&&(!o.hungryForWhitespace||o.hungryForWhitespace&&!d(e)))return!1;if(typeof e=="string"&&typeof t=="string")return o.hungryForWhitespace&&d(e)&&d(t)?!0:o.verboseWhenMismatches?e===t?!0:`Given string ${t} is not matched! We have ${e} on the other end.`:o.useWildcards?he(e,t,{caseSensitive:!0}):e===t;if(Array.isArray(e)&&Array.isArray(t)){if(o.hungryForWhitespace&&d(t)&&(!o.matchStrictly||o.matchStrictly&&e.length===t.length))return!0;if(!o.hungryForWhitespace&&t.length>e.length||o.matchStrictly&&t.length!==e.length)return o.verboseWhenMismatches?`The length of a given array, ${JSON.stringify(t,null,4)} is ${t.length} but the length of an array on the other end, ${JSON.stringify(e,null,4)} is ${e.length}`:!1;if(t.length===0)return e.length===0?!0:o.verboseWhenMismatches?`The given array has no elements, but the array on the other end, ${JSON.stringify(e,null,4)} does have some`:!1;for(let a=0,f=t.length;a<f;a++){c=!1;for(let s=u,l=e.length;s<l;s++)if(u+=1,ge(e[s],t[a],o)===!0){c=!0;break}if(!c)return o.verboseWhenMismatches?`The given array ${JSON.stringify(t,null,4)} is not a subset of an array on the other end, ${JSON.stringify(e,null,4)}`:!1}}else if((0,w.default)(e)&&(0,w.default)(t)){if(n=new Set(Object.keys(t)),i=new Set(Object.keys(e)),o.matchStrictly&&n.size!==i.size){if(!o.verboseWhenMismatches)return!1;let a=new Set([...n].filter(h=>!i.has(h))),f=a.size?` First object has unique keys: ${JSON.stringify(a,null,4)}.`:"",s=new Set([...i].filter(h=>!n.has(h))),l=s.size?` Second object has unique keys:
11
- ${JSON.stringify(s,null,4)}.`:"";return`When matching strictly, we found that both objects have different amount of keys.${f}${l}`}for(let a of n){if(!Object.prototype.hasOwnProperty.call(e,a))return!o.useWildcards||o.useWildcards&&!a.includes("*")?o.verboseWhenMismatches?`The given object has key "${a}" which the other-one does not have.`:!1:Object.keys(e).some(f=>he(f,a,{caseSensitive:!0}))?!0:o.verboseWhenMismatches?`The given object has key "${a}" which the other-one does not have.`:!1;if(e[a]!=null&&(0,x.default)(e[a])!==(0,x.default)(t[a])){if(!(d(e[a])&&d(t[a])&&o.hungryForWhitespace))return o.verboseWhenMismatches?`The given key ${a} is of a different type on both objects. On the first-one, it's ${(0,x.default)(t[a])}, on the second-one, it's ${(0,x.default)(e[a])}`:!1}else if(ge(e[a],t[a],o)!==!0)return o.verboseWhenMismatches?`The given piece ${JSON.stringify(t[a],null,4)} and ${JSON.stringify(e[a],null,4)} don't match.`:!1}}else return o.hungryForWhitespace&&d(e)&&d(t)&&(!o.matchStrictly||o.matchStrictly&&En(t))?!0:e===t;return!0}return Ct(jn);})();
10
+ "use strict";var astCompare=(()=>{var _t=Object.create;var M=Object.defineProperty,xt=Object.defineProperties,$t=Object.getOwnPropertyDescriptor,At=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertyNames,ve=Object.getOwnPropertySymbols,Dt=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable;var Oe=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))Se.call(t,r)&&Oe(e,r,t[r]);if(ve)for(var r of ve(t))Vt.call(t,r)&&Oe(e,r,t[r]);return e},C=(e,t)=>xt(e,At(t));var U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=(e,t)=>{for(var r in t)M(e,r,{get:t[r],enumerable:!0})},we=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Tt(t))!Se.call(e,i)&&i!==r&&M(e,i,{get:()=>t[i],enumerable:!(n=$t(t,i))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?_t(Dt(e)):{},we(t||!e||!e.__esModule?M(r,"default",{value:e,enumerable:!0}):r,e)),Ct=e=>we(M({},"__esModule",{value:!0}),e);var Ee=U((q,z)=>{(function(e,t){typeof q=="object"&&typeof z<"u"?z.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(q,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,r=typeof Symbol<"u",n=typeof Map<"u",i=typeof Set<"u",c=typeof WeakMap<"u",u=typeof WeakSet<"u",o=typeof DataView<"u",a=r&&typeof Symbol.iterator<"u",f=r&&typeof Symbol.toStringTag<"u",s=i&&typeof Set.prototype.entries=="function",l=n&&typeof Map.prototype.entries=="function",h=s&&Object.getPrototypeOf(new Set().entries()),m=l&&Object.getPrototypeOf(new Map().entries()),E=a&&typeof Array.prototype[Symbol.iterator]=="function",Ot=E&&Object.getPrototypeOf([][Symbol.iterator]()),de=a&&typeof String.prototype[Symbol.iterator]=="function",St=de&&Object.getPrototypeOf(""[Symbol.iterator]()),wt=8,Et=-1;function jt(y){var be=typeof y;if(be!=="object")return be;if(y===null)return"null";if(y===t)return"global";if(Array.isArray(y)&&(f===!1||!(Symbol.toStringTag in y)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&y===window.location)return"Location";if(typeof window.document=="object"&&y===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&y===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&y===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&y instanceof window.HTMLElement){if(y.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(y.tagName==="TD")return"HTMLTableDataCellElement";if(y.tagName==="TH")return"HTMLTableHeaderCellElement"}}var me=f&&y[Symbol.toStringTag];if(typeof me=="string")return me;var g=Object.getPrototypeOf(y);return g===RegExp.prototype?"RegExp":g===Date.prototype?"Date":e&&g===Promise.prototype?"Promise":i&&g===Set.prototype?"Set":n&&g===Map.prototype?"Map":u&&g===WeakSet.prototype?"WeakSet":c&&g===WeakMap.prototype?"WeakMap":o&&g===DataView.prototype?"DataView":n&&g===m?"Map Iterator":i&&g===h?"Set Iterator":E&&g===Ot?"Array Iterator":de&&g===St?"String Iterator":g===null?"Object":Object.prototype.toString.call(y).slice(wt,Et)}return jt})});var ft=U((P,A)=>{var Pt=200,We="__lodash_hash_undefined__",Ie=9007199254740991,ne="[object Arguments]",Wt="[object Array]",ke="[object Boolean]",Ne="[object Date]",It="[object Error]",oe="[object Function]",Le="[object GeneratorFunction]",N="[object Map]",Je="[object Number]",ae="[object Object]",je="[object Promise]",Ke="[object RegExp]",L="[object Set]",Fe="[object String]",Re="[object Symbol]",X="[object WeakMap]",He="[object ArrayBuffer]",J="[object DataView]",Be="[object Float32Array]",Ge="[object Float64Array]",Ue="[object Int8Array]",qe="[object Int16Array]",ze="[object Int32Array]",Qe="[object Uint8Array]",Xe="[object Uint8ClampedArray]",Ye="[object Uint16Array]",Ze="[object Uint32Array]",kt=/[\\^$.*+?()[\]{}|]/g,Nt=/\w*$/,Lt=/^\[object .+?Constructor\]$/,Jt=/^(?:0|[1-9]\d*)$/,p={};p[ne]=p[Wt]=p[He]=p[J]=p[ke]=p[Ne]=p[Be]=p[Ge]=p[Ue]=p[qe]=p[ze]=p[N]=p[Je]=p[ae]=p[Ke]=p[L]=p[Fe]=p[Re]=p[Qe]=p[Xe]=p[Ye]=p[Ze]=!0;p[It]=p[oe]=p[X]=!1;var Kt=typeof global=="object"&&global&&global.Object===Object&&global,Ft=typeof self=="object"&&self&&self.Object===Object&&self,v=Kt||Ft||Function("return this")(),et=typeof P=="object"&&P&&!P.nodeType&&P,_e=et&&typeof A=="object"&&A&&!A.nodeType&&A,Rt=_e&&_e.exports===et;function Ht(e,t){return e.set(t[0],t[1]),e}function Bt(e,t){return e.add(t),e}function Gt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Ut(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function tt(e,t,r,n){var i=-1,c=e?e.length:0;for(n&&c&&(r=e[++i]);++i<c;)r=t(r,e[i],i,e);return r}function qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function zt(e,t){return e==null?void 0:e[t]}function rt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function xe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function ie(e,t){return function(r){return e(t(r))}}function $e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Qt=Array.prototype,Xt=Function.prototype,K=Object.prototype,Q=v["__core-js_shared__"],Ae=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nt=Xt.toString,S=K.hasOwnProperty,F=K.toString,Yt=RegExp("^"+nt.call(S).replace(kt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=Rt?v.Buffer:void 0,De=v.Symbol,Ve=v.Uint8Array,Zt=ie(Object.getPrototypeOf,Object),er=Object.create,tr=K.propertyIsEnumerable,rr=Qt.splice,Me=Object.getOwnPropertySymbols,nr=Te?Te.isBuffer:void 0,or=ie(Object.keys,Object),Y=V(v,"DataView"),W=V(v,"Map"),Z=V(v,"Promise"),ee=V(v,"Set"),te=V(v,"WeakMap"),I=V(Object,"create"),ar=x(Y),ir=x(W),sr=x(Z),cr=x(ee),lr=x(te),Ce=De?De.prototype:void 0,Pe=Ce?Ce.valueOf:void 0;function _(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ur(){this.__data__=I?I(null):{}}function fr(e){return this.has(e)&&delete this.__data__[e]}function pr(e){var t=this.__data__;if(I){var r=t[e];return r===We?void 0:r}return S.call(t,e)?t[e]:void 0}function yr(e){var t=this.__data__;return I?t[e]!==void 0:S.call(t,e)}function hr(e,t){var r=this.__data__;return r[e]=I&&t===void 0?We:t,this}_.prototype.clear=ur;_.prototype.delete=fr;_.prototype.get=pr;_.prototype.has=yr;_.prototype.set=hr;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function gr(){this.__data__=[]}function dr(e){var t=this.__data__,r=R(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rr.call(t,r,1),!0}function br(e){var t=this.__data__,r=R(t,e);return r<0?void 0:t[r][1]}function mr(e){return R(this.__data__,e)>-1}function vr(e,t){var r=this.__data__,n=R(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}O.prototype.clear=gr;O.prototype.delete=dr;O.prototype.get=br;O.prototype.has=mr;O.prototype.set=vr;function T(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Or(){this.__data__={hash:new _,map:new(W||O),string:new _}}function Sr(e){return H(this,e).delete(e)}function wr(e){return H(this,e).get(e)}function Er(e){return H(this,e).has(e)}function jr(e,t){return H(this,e).set(e,t),this}T.prototype.clear=Or;T.prototype.delete=Sr;T.prototype.get=wr;T.prototype.has=Er;T.prototype.set=jr;function D(e){this.__data__=new O(e)}function _r(){this.__data__=new O}function xr(e){return this.__data__.delete(e)}function $r(e){return this.__data__.get(e)}function Ar(e){return this.__data__.has(e)}function Tr(e,t){var r=this.__data__;if(r instanceof O){var n=r.__data__;if(!W||n.length<Pt-1)return n.push([e,t]),this;r=this.__data__=new T(n)}return r.set(e,t),this}D.prototype.clear=_r;D.prototype.delete=xr;D.prototype.get=$r;D.prototype.has=Ar;D.prototype.set=Tr;function Dr(e,t){var r=ce(e)||en(e)?qt(e.length,String):[],n=r.length,i=!!n;for(var c in e)(t||S.call(e,c))&&!(i&&(c=="length"||Qr(c,n)))&&r.push(c);return r}function ot(e,t,r){var n=e[t];(!(S.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function R(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}function Vr(e,t){return e&&at(t,le(t),e)}function re(e,t,r,n,i,c,u){var o;if(n&&(o=c?n(e,i,c,u):n(e)),o!==void 0)return o;if(!B(e))return e;var a=ce(e);if(a){if(o=Ur(e),!t)return Hr(e,o)}else{var f=j(e),s=f==oe||f==Le;if(rn(e))return kr(e,t);if(f==ae||f==ne||s&&!c){if(rt(e))return c?e:{};if(o=qr(s?{}:e),!t)return Br(e,Vr(o,e))}else{if(!p[f])return c?e:{};o=zr(e,f,re,t)}}u||(u=new D);var l=u.get(e);if(l)return l;if(u.set(e,o),!a)var h=r?Gr(e):le(e);return Gt(h||e,function(m,E){h&&(E=m,m=e[E]),ot(o,E,re(m,t,r,n,E,e,u))}),o}function Mr(e){return B(e)?er(e):{}}function Cr(e,t,r){var n=t(e);return ce(e)?n:Ut(n,r(e))}function Pr(e){return F.call(e)}function Wr(e){if(!B(e)||Yr(e))return!1;var t=ut(e)||rt(e)?Yt:Lt;return t.test(x(e))}function Ir(e){if(!st(e))return or(e);var t=[];for(var r in Object(e))S.call(e,r)&&r!="constructor"&&t.push(r);return t}function kr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function se(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Nr(e,t){var r=t?se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Lr(e,t,r){var n=t?r(xe(e),!0):xe(e);return tt(n,Ht,new e.constructor)}function Jr(e){var t=new e.constructor(e.source,Nt.exec(e));return t.lastIndex=e.lastIndex,t}function Kr(e,t,r){var n=t?r($e(e),!0):$e(e);return tt(n,Bt,new e.constructor)}function Fr(e){return Pe?Object(Pe.call(e)):{}}function Rr(e,t){var r=t?se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Hr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function at(e,t,r,n){r||(r={});for(var i=-1,c=t.length;++i<c;){var u=t[i],o=n?n(r[u],e[u],u,r,e):void 0;ot(r,u,o===void 0?e[u]:o)}return r}function Br(e,t){return at(e,it(e),t)}function Gr(e){return Cr(e,le,it)}function H(e,t){var r=e.__data__;return Xr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function V(e,t){var r=zt(e,t);return Wr(r)?r:void 0}var it=Me?ie(Me,Object):an,j=Pr;(Y&&j(new Y(new ArrayBuffer(1)))!=J||W&&j(new W)!=N||Z&&j(Z.resolve())!=je||ee&&j(new ee)!=L||te&&j(new te)!=X)&&(j=function(e){var t=F.call(e),r=t==ae?e.constructor:void 0,n=r?x(r):void 0;if(n)switch(n){case ar:return J;case ir:return N;case sr:return je;case cr:return L;case lr:return X}return t});function Ur(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&S.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function qr(e){return typeof e.constructor=="function"&&!st(e)?Mr(Zt(e)):{}}function zr(e,t,r,n){var i=e.constructor;switch(t){case He:return se(e);case ke:case Ne:return new i(+e);case J:return Nr(e,n);case Be:case Ge:case Ue:case qe:case ze:case Qe:case Xe:case Ye:case Ze:return Rr(e,n);case N:return Lr(e,n,r);case Je:case Fe:return new i(e);case Ke:return Jr(e);case L:return Kr(e,n,r);case Re:return Fr(e)}}function Qr(e,t){return t=t==null?Ie:t,!!t&&(typeof e=="number"||Jt.test(e))&&e>-1&&e%1==0&&e<t}function Xr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yr(e){return!!Ae&&Ae in e}function st(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||K;return e===r}function x(e){if(e!=null){try{return nt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Zr(e){return re(e,!0,!0)}function ct(e,t){return e===t||e!==e&&t!==t}function en(e){return tn(e)&&S.call(e,"callee")&&(!tr.call(e,"callee")||F.call(e)==ne)}var ce=Array.isArray;function lt(e){return e!=null&&nn(e.length)&&!ut(e)}function tn(e){return on(e)&&lt(e)}var rn=nr||sn;function ut(e){var t=B(e)?F.call(e):"";return t==oe||t==Le}function nn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ie}function B(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function on(e){return!!e&&typeof e=="object"}function le(e){return lt(e)?Dr(e):Ir(e)}function an(){return[]}function sn(){return!1}A.exports=Zr});var ue=U((xn,ht)=>{var cn="[object Object]";function ln(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function un(e,t){return function(r){return e(t(r))}}var fn=Function.prototype,pt=Object.prototype,yt=fn.toString,pn=pt.hasOwnProperty,yn=yt.call(Object),hn=pt.toString,gn=un(Object.getPrototypeOf,Object);function dn(e){return!!e&&typeof e=="object"}function bn(e){if(!dn(e)||hn.call(e)!=cn||ln(e))return!1;var t=gn(e);if(t===null)return!0;var r=pn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&yt.call(r)==yn}ht.exports=bn});var jn={};Mt(jn,{compare:()=>ge,defaults:()=>vt,version:()=>wn});var $=k(Ee(),1);var G=k(ft(),1),gt=k(ue(),1);function mn(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let r=t-1;r--;)if(e[r]===".")return e.slice(r+1,t)}return null}var fe=mn;function dt(e,t){let r={now:!1};function n(i,c,u,o){let a=(0,G.default)(i),f,s=b({depth:-1,path:""},u);if(s.depth+=1,Array.isArray(a))for(let l=0,h=a.length;l<h&&!o.now;l++){let m=s.path?`${s.path}.${l}`:`${l}`;a[l]!==void 0?(s.parent=(0,G.default)(a),s.parentType="array",s.parentKey=fe(m),f=n(c(a[l],void 0,C(b({},s),{path:m}),o),c,C(b({},s),{path:m}),o),Number.isNaN(f)&&l<a.length?(a.splice(l,1),l-=1):a[l]=f):a.splice(l,1)}else if((0,gt.default)(a))for(let l in a){if(o.now&&l!=null)break;let h=s.path?`${s.path}.${l}`:l;s.depth===0&&l!=null&&(s.topmostKey=l),s.parent=(0,G.default)(a),s.parentType="object",s.parentKey=fe(h),f=n(c(l,a[l],C(b({},s),{path:h}),o),c,C(b({},s),{path:h}),o),Number.isNaN(f)?delete a[l]:a[l]=f}return a}return n(e,t,{},r)}function d(e){if(typeof e=="string")return!e.trim();if(!["object","string"].includes(typeof e)||!e)return!1;let t=!0;return e=dt(e,(r,n,i,c)=>{let u=n!==void 0?n:r;return typeof u=="string"&&u.trim()&&(t=!1,c.now=!0),u}),t}var w=k(ue(),1);function pe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ye=new Map,bt=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},vn=(e,t)=>{t=b({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(ye.has(r))return ye.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=pe(e).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return i.negated=n,ye.set(r,i),i},On=(e,t,r,n)=>{if(e=bt(e,"inputs"),t=bt(t,"patterns"),t.length===0)return[];t=t.map(u=>vn(u,r));let{allPatterns:i}=r||{},c=[];for(let u of e){let o,a=[...t].fill(!1);for(let[f,s]of t.entries())if(s.test(u)&&(a[f]=!0,o=!s.negated,!o))break;if(!(o===!1||o===void 0&&t.some(f=>!f.negated)||i&&a.some((f,s)=>!f&&!t[s].negated))&&(c.push(u),n))break}return c};function he(e,t,r){return On(e,t,r,!0).length>0}var mt="3.2.14";var wn=mt;function En(e){return(0,w.default)(e)?!Object.keys(e).length:Array.isArray(e)||typeof e=="string"?!e.length:!1}var vt={hungryForWhitespace:!1,matchStrictly:!1,verboseWhenMismatches:!1,useWildcards:!1};function ge(e,t,r){let n,i,c,u=0,o=b(b({},vt),r);if(o.hungryForWhitespace&&o.matchStrictly&&(0,w.default)(e)&&d(e)&&(0,w.default)(t)&&!Object.keys(t).length)return!0;if((!o.hungryForWhitespace||o.hungryForWhitespace&&!d(e)&&d(t))&&(0,w.default)(e)&&Object.keys(e).length!==0&&(0,w.default)(t)&&Object.keys(t).length===0||(0,$.default)(e)!==(0,$.default)(t)&&(!o.hungryForWhitespace||o.hungryForWhitespace&&!d(e)))return!1;if(typeof e=="string"&&typeof t=="string")return o.hungryForWhitespace&&d(e)&&d(t)?!0:o.verboseWhenMismatches?e===t?!0:`Given string ${t} is not matched! We have ${e} on the other end.`:o.useWildcards?he(e,t,{caseSensitive:!0}):e===t;if(Array.isArray(e)&&Array.isArray(t)){if(o.hungryForWhitespace&&d(t)&&(!o.matchStrictly||o.matchStrictly&&e.length===t.length))return!0;if(!o.hungryForWhitespace&&t.length>e.length||o.matchStrictly&&t.length!==e.length)return o.verboseWhenMismatches?`The length of a given array, ${JSON.stringify(t,null,4)} is ${t.length} but the length of an array on the other end, ${JSON.stringify(e,null,4)} is ${e.length}`:!1;if(t.length===0)return e.length===0?!0:o.verboseWhenMismatches?`The given array has no elements, but the array on the other end, ${JSON.stringify(e,null,4)} does have some`:!1;for(let a=0,f=t.length;a<f;a++){c=!1;for(let s=u,l=e.length;s<l;s++)if(u+=1,ge(e[s],t[a],o)===!0){c=!0;break}if(!c)return o.verboseWhenMismatches?`The given array ${JSON.stringify(t,null,4)} is not a subset of an array on the other end, ${JSON.stringify(e,null,4)}`:!1}}else if((0,w.default)(e)&&(0,w.default)(t)){if(n=new Set(Object.keys(t)),i=new Set(Object.keys(e)),o.matchStrictly&&n.size!==i.size){if(!o.verboseWhenMismatches)return!1;let a=new Set([...n].filter(h=>!i.has(h))),f=a.size?` First object has unique keys: ${JSON.stringify(a,null,4)}.`:"",s=new Set([...i].filter(h=>!n.has(h))),l=s.size?` Second object has unique keys:
11
+ ${JSON.stringify(s,null,4)}.`:"";return`When matching strictly, we found that both objects have different amount of keys.${f}${l}`}for(let a of n){if(!Object.prototype.hasOwnProperty.call(e,a))return!o.useWildcards||o.useWildcards&&!a.includes("*")?o.verboseWhenMismatches?`The given object has key "${a}" which the other-one does not have.`:!1:Object.keys(e).some(f=>he(f,a,{caseSensitive:!0}))?!0:o.verboseWhenMismatches?`The given object has key "${a}" which the other-one does not have.`:!1;if(e[a]!=null&&(0,$.default)(e[a])!==(0,$.default)(t[a])){if(!(d(e[a])&&d(t[a])&&o.hungryForWhitespace))return o.verboseWhenMismatches?`The given key ${a} is of a different type on both objects. On the first-one, it's ${(0,$.default)(t[a])}, on the second-one, it's ${(0,$.default)(e[a])}`:!1}else if(ge(e[a],t[a],o)!==!0)return o.verboseWhenMismatches?`The given piece ${JSON.stringify(t[a],null,4)} and ${JSON.stringify(e[a],null,4)} don't match.`:!1}}else return o.hungryForWhitespace&&d(e)&&d(t)&&(!o.matchStrictly||o.matchStrictly&&En(t))?!0:e===t;return!0}return Ct(jn);})();
12
12
  /**
13
13
  * @name ast-contains-only-empty-space
14
14
  * @fileoverview Does AST contain only empty space?
15
- * @version 3.2.3
15
+ * @version 3.2.4
16
16
  * @author Roy Revelt, Codsen Ltd
17
17
  * @license MIT
18
18
  * {@link https://codsen.com/os/ast-contains-only-empty-space/}
@@ -20,7 +20,7 @@
20
20
  /**
21
21
  * @name ast-monkey-traverse
22
22
  * @fileoverview Utility library to traverse AST
23
- * @version 3.1.3
23
+ * @version 3.1.4
24
24
  * @author Roy Revelt, Codsen Ltd
25
25
  * @license MIT
26
26
  * {@link https://codsen.com/os/ast-monkey-traverse/}
@@ -28,7 +28,7 @@
28
28
  /**
29
29
  * @name ast-monkey-util
30
30
  * @fileoverview Utility library of AST helper functions
31
- * @version 2.1.3
31
+ * @version 2.1.4
32
32
  * @author Roy Revelt, Codsen Ltd
33
33
  * @license MIT
34
34
  * {@link https://codsen.com/os/ast-monkey-util/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ast-compare",
3
- "version": "3.2.13",
3
+ "version": "3.2.14",
4
4
  "description": "Compare anything: AST, objects, arrays, strings and nested thereof",
5
5
  "keywords": [
6
6
  "array",
@@ -48,7 +48,7 @@
48
48
  "examples": "node '../../ops/scripts/run-examples.js'",
49
49
  "lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
50
50
  "letspublish": "yarn publish || :",
51
- "lint": "eslint . --fix",
51
+ "lint": "eslint . --ext .js --ext .ts --fix",
52
52
  "perf": "node perf/check.js",
53
53
  "prepare": "echo 'ready'",
54
54
  "prettier": "prettier",
@@ -75,7 +75,7 @@
75
75
  }
76
76
  },
77
77
  "dependencies": {
78
- "ast-contains-only-empty-space": "^3.2.3",
78
+ "ast-contains-only-empty-space": "^3.2.4",
79
79
  "lodash.isplainobject": "^4.0.6",
80
80
  "matcher": "^5.0.0",
81
81
  "type-detect": "^4.0.8"
@@ -1,26 +0,0 @@
1
- // Quick Take
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- // Find out, does an object/array/string/nested-mix is a subset or equal to another input:
8
- assert.equal(
9
- compare(
10
- {
11
- a: {
12
- b: "d",
13
- c: [],
14
- e: "f",
15
- g: "h",
16
- },
17
- },
18
- {
19
- a: {
20
- b: "d",
21
- c: [],
22
- },
23
- }
24
- ),
25
- true
26
- );
@@ -1,20 +0,0 @@
1
- // Compare Arrays
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- assert.equal(compare(["a", "b", "c"], ["a", "b"]), true);
8
- // true, because second is a subset of first
9
-
10
- assert.equal(compare(["a", "b", "c"], ["b", "a"]), false);
11
- // => false, because order is wrong
12
-
13
- assert.equal(compare(["a", "b"], ["a", "b", "c"]), false);
14
- // => false, because second is not a subset of first (it's opposite)
15
-
16
- assert.equal(
17
- compare([{ a: "b" }, { c: "d" }, { e: "f" }], [{ a: "b" }, { c: "d" }]),
18
- true
19
- );
20
- // => plain objects nested in arrays
@@ -1,12 +0,0 @@
1
- // Compare Plain Objects
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- // Find out, does an object/array/string/nested-mix is a subset or equal to another input:
8
- assert.equal(compare({ a: "1", b: "2", c: "3" }, { a: "1", b: "2" }), true);
9
- // true, because second (smallObj) is subset of (or equal) first (bigObj).
10
-
11
- assert.equal(compare({ a: "1", b: "2" }, { a: "1", b: "2", c: "3" }), false);
12
- // => false, because second (smallObj) is not a subset (or equal) to first (bigObj).
@@ -1,9 +0,0 @@
1
- // Compare Strings
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- assert.equal(compare("a\nb", "a\nb"), true);
8
-
9
- assert.equal(compare("a", "b"), false);
@@ -1,47 +0,0 @@
1
- // `opts.hungryForWhitespace`
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- // by default, key values will be strictly matched using `===`
8
- assert.equal(
9
- compare(
10
- { a: "\n\n\n", b: "\t\t\t", c: "whatever" },
11
- { a: "\r\r\r", b: " " },
12
- {
13
- hungryForWhitespace: false,
14
- }
15
- ),
16
- false
17
- );
18
-
19
- // whitespace is matched leniently with the following option:
20
- assert.equal(
21
- compare(
22
- { a: "\n\n\n", b: "\t\t\t", c: "whatever" },
23
- { a: "\r\r\r", b: " " },
24
- {
25
- hungryForWhitespace: true,
26
- }
27
- ),
28
- true
29
- );
30
-
31
- // the fun doesn't stop here, any "empty" structures will be
32
- // reported as matching:
33
- assert.equal(
34
- compare(
35
- { a: { z: "\n\n\n" }, b: ["\t\t\t"], c: "whatever" },
36
- { a: [[[[["\r\r\r"]]]]], b: { c: { d: " " } } },
37
- {
38
- hungryForWhitespace: true, // <--- !
39
- }
40
- ),
41
- true // <--- !!!
42
- );
43
- // "empty" thing is:
44
- // - string that trims to zero-length
45
- // - array with zero or more whitespace strings only
46
- // - plain object with zero or more keys with "empty" values
47
- // (empty arrays, empty plain objects or empty strings)
@@ -1,26 +0,0 @@
1
- // `opts.useWildcards`
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- // by default, key values are matches as strings
8
- assert.equal(
9
- compare(
10
- { a: "1", b: "2a", c: "3" },
11
- { a: "1", b: "2*" },
12
- { useWildcards: false }
13
- ),
14
- false
15
- );
16
-
17
- // once enabled, strings are matched via https://www.npmjs.com/package/matcher
18
- // where "*" means any sequence of characters
19
- assert.equal(
20
- compare(
21
- { a: "1", b: "2a", c: "3" },
22
- { a: "1", b: "2*" },
23
- { useWildcards: true }
24
- ),
25
- true
26
- );
@@ -1,41 +0,0 @@
1
- // `opts.verboseWhenMismatches`
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { compare } from "../dist/ast-compare.esm.js";
6
-
7
- // by default, returns a boolean without explanation
8
- assert.equal(
9
- compare(
10
- { a: "1", b: "2" },
11
- { a: "1", b: "2", c: "3" },
12
- {
13
- verboseWhenMismatches: false, // <---
14
- }
15
- ),
16
- false
17
- );
18
-
19
- assert.equal(
20
- compare(
21
- { a: "1", b: "2" },
22
- { a: "1", b: "2", c: "3" },
23
- {
24
- verboseWhenMismatches: true, // <---
25
- }
26
- ),
27
- 'The given object has key "c" which the other-one does not have.'
28
- );
29
-
30
- // when opts.verboseWhenMismatches is enabled, a negative result is
31
- // string (explanation). A positive result is boolean "true".
32
- assert.equal(
33
- compare(
34
- { a: "1", b: "2" },
35
- { a: "1", b: "2" },
36
- {
37
- verboseWhenMismatches: true, // <---
38
- }
39
- ),
40
- true
41
- );