object-fill-missing-keys 9.0.5 → 9.0.11
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/LICENSE +1 -1
- package/README.md +4 -5
- package/dist/object-fill-missing-keys.esm.js +3 -102
- package/dist/object-fill-missing-keys.umd.js +23 -22
- package/examples/_quickTake.js +1 -0
- package/examples/do-not-fill.js +1 -0
- package/examples/truncation.js +1 -0
- package/examples/useNullAsExplicitFalse.js +1 -0
- package/examples/using-placeholder-true.js +1 -0
- package/package.json +27 -83
- package/types/index.d.ts +9 -5
- package/examples/api.json +0 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2022 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/README.md
CHANGED
|
@@ -26,18 +26,17 @@
|
|
|
26
26
|
|
|
27
27
|
## Install
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
The latest version is **ESM only**: Node 12+ is needed to use it and it must be `import`ed instead of `require`d. If your project is not on ESM yet and you want to use `require`, use an older version of this program, `8.1.0`.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm i object-fill-missing-keys
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
If you need a legacy version which works with `require`, use version 8.1.0
|
|
36
|
-
|
|
37
35
|
## Quick Take
|
|
38
36
|
|
|
39
37
|
```js
|
|
40
38
|
import { strict as assert } from "assert";
|
|
39
|
+
|
|
41
40
|
import { fillMissing } from "object-fill-missing-keys";
|
|
42
41
|
|
|
43
42
|
// deleting key 'c', with value 'd'
|
|
@@ -65,7 +64,7 @@ assert.deepEqual(
|
|
|
65
64
|
|
|
66
65
|
## Documentation
|
|
67
66
|
|
|
68
|
-
Please [visit codsen.com](https://codsen.com/os/object-fill-missing-keys/) for a full description of the API
|
|
67
|
+
Please [visit codsen.com](https://codsen.com/os/object-fill-missing-keys/) for a full description of the API.
|
|
69
68
|
|
|
70
69
|
## Contributing
|
|
71
70
|
|
|
@@ -75,6 +74,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
75
74
|
|
|
76
75
|
MIT License
|
|
77
76
|
|
|
78
|
-
Copyright (c) 2010-
|
|
77
|
+
Copyright (c) 2010-2022 Roy Revelt and other contributors
|
|
79
78
|
|
|
80
79
|
<img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
|
|
@@ -1,110 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-fill-missing-keys
|
|
3
3
|
* @fileoverview Add missing keys into plain objects, according to a reference object
|
|
4
|
-
* @version 9.0.
|
|
4
|
+
* @version 9.0.11
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-fill-missing-keys/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
import { arrayiffy } from 'arrayiffy-if-string';
|
|
13
|
-
import { allEq } from 'object-all-values-equal-to';
|
|
14
|
-
import isObj from 'lodash.isplainobject';
|
|
15
|
-
|
|
16
|
-
var version$1 = "9.0.5";
|
|
17
|
-
|
|
18
|
-
const version = version$1;
|
|
19
|
-
const defaults = {
|
|
20
|
-
placeholder: false,
|
|
21
|
-
doNotFillThesePathsIfTheyContainPlaceholders: [],
|
|
22
|
-
useNullAsExplicitFalse: true
|
|
23
|
-
};
|
|
24
|
-
function typ(something) {
|
|
25
|
-
if (isObj(something)) {
|
|
26
|
-
return "plain object";
|
|
27
|
-
}
|
|
28
|
-
if (Array.isArray(something)) {
|
|
29
|
-
return "array";
|
|
30
|
-
}
|
|
31
|
-
return typeof something;
|
|
32
|
-
}
|
|
33
|
-
function isStr(something) {
|
|
34
|
-
return typeof something === "string";
|
|
35
|
-
}
|
|
36
|
-
function existy(x) {
|
|
37
|
-
return x != null;
|
|
38
|
-
}
|
|
39
|
-
function fillMissingKeys(incompleteOriginal, schema, opts, path = "") {
|
|
40
|
-
const incomplete = clone(incompleteOriginal);
|
|
41
|
-
if (existy(incomplete) || !(path.length && opts.doNotFillThesePathsIfTheyContainPlaceholders.includes(path) && allEq(incomplete, opts.placeholder))) {
|
|
42
|
-
if (isObj(schema) && isObj(incomplete)) {
|
|
43
|
-
Object.keys(schema).forEach(key => {
|
|
44
|
-
const currentPath = `${path ? `${path}.` : ""}${key}`;
|
|
45
|
-
if (opts.doNotFillThesePathsIfTheyContainPlaceholders.includes(currentPath)) {
|
|
46
|
-
if (existy(incomplete[key])) {
|
|
47
|
-
if (allEq(incomplete[key], opts.placeholder)) {
|
|
48
|
-
incomplete[key] = opts.placeholder;
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
incomplete[key] = opts.placeholder;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (!existy(incomplete[key]) || !(opts.doNotFillThesePathsIfTheyContainPlaceholders.includes(currentPath) && allEq(incomplete[key], opts.placeholder))) {
|
|
55
|
-
incomplete[key] = fillMissingKeys(incomplete[key], schema[key], opts, currentPath);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
} else if (Array.isArray(schema) && Array.isArray(incomplete)) {
|
|
59
|
-
if (incomplete.length === 0) {
|
|
60
|
-
return schema;
|
|
61
|
-
}
|
|
62
|
-
if (schema.length > 0) {
|
|
63
|
-
for (let i = incomplete.length; i--;) {
|
|
64
|
-
const currentPath = `${path ? `${path}.` : ""}0`;
|
|
65
|
-
if (isObj(schema[0]) || Array.isArray(schema[0])) {
|
|
66
|
-
incomplete[i] = fillMissingKeys(incomplete[i], schema[0], opts, currentPath);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
return mergeAdvanced(schema, incomplete, {
|
|
72
|
-
useNullAsExplicitFalse: opts.useNullAsExplicitFalse
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return incomplete;
|
|
77
|
-
}
|
|
78
|
-
function fillMissing(originalIncompleteWrapper, originalSchemaWrapper, originalOptsWrapper) {
|
|
79
|
-
if (arguments.length === 0) {
|
|
80
|
-
throw new Error("object-fill-missing-keys: [THROW_ID_01] All arguments are missing!");
|
|
81
|
-
}
|
|
82
|
-
if (!isObj(originalIncompleteWrapper)) {
|
|
83
|
-
throw new Error(`object-fill-missing-keys: [THROW_ID_02] First argument, input object must be a plain object. Currently it's type is "${typ(originalIncompleteWrapper)}" and it's equal to: ${JSON.stringify(originalIncompleteWrapper, null, 4)}`);
|
|
84
|
-
}
|
|
85
|
-
if (!isObj(originalSchemaWrapper)) {
|
|
86
|
-
throw new Error(`object-fill-missing-keys: [THROW_ID_03] Second argument, schema object, must be a plain object. Currently it's type is "${typ(originalSchemaWrapper)}" and it's equal to: ${JSON.stringify(originalSchemaWrapper, null, 4)}`);
|
|
87
|
-
}
|
|
88
|
-
if (originalOptsWrapper && !isObj(originalOptsWrapper)) {
|
|
89
|
-
throw new Error(`object-fill-missing-keys: [THROW_ID_04] Third argument, schema object, must be a plain object. Currently it's type is "${typ(originalOptsWrapper)}" and it's equal to: ${JSON.stringify(originalOptsWrapper, null, 4)}`);
|
|
90
|
-
}
|
|
91
|
-
const opts = { ...defaults,
|
|
92
|
-
...(originalOptsWrapper || {})
|
|
93
|
-
};
|
|
94
|
-
opts.doNotFillThesePathsIfTheyContainPlaceholders = arrayiffy(opts.doNotFillThesePathsIfTheyContainPlaceholders);
|
|
95
|
-
let culpritsVal = null;
|
|
96
|
-
let culpritsIndex = null;
|
|
97
|
-
if (opts.doNotFillThesePathsIfTheyContainPlaceholders.length > 0 && !opts.doNotFillThesePathsIfTheyContainPlaceholders.every((key, idx) => {
|
|
98
|
-
if (!isStr(key)) {
|
|
99
|
-
culpritsVal = key;
|
|
100
|
-
culpritsIndex = idx;
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
return true;
|
|
104
|
-
})) {
|
|
105
|
-
throw new Error(`object-fill-missing-keys: [THROW_ID_06] opts.doNotFillThesePathsIfTheyContainPlaceholders element with an index number "${culpritsIndex}" is not a string! It's ${typ(culpritsVal)}, equal to:\n${JSON.stringify(culpritsVal, null, 4)}`);
|
|
106
|
-
}
|
|
107
|
-
return fillMissingKeys(clone(originalIncompleteWrapper), clone(originalSchemaWrapper), opts);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { fillMissing, version };
|
|
10
|
+
import c from"lodash.clonedeep";import{mergeAdvanced as p}from"object-merge-advanced";import{arrayiffy as m}from"arrayiffy-if-string";import{allEq as d}from"object-all-values-equal-to";import o from"lodash.isplainobject";var y="9.0.11";var I=y,j={placeholder:!1,doNotFillThesePathsIfTheyContainPlaceholders:[],useNullAsExplicitFalse:!0};function a(i){return o(i)?"plain object":Array.isArray(i)?"array":typeof i}function g(i){return typeof i=="string"}function u(i){return i!=null}function f(i,l,t,n=""){let e=c(i);if(u(e)||!(n.length&&t.doNotFillThesePathsIfTheyContainPlaceholders.includes(n)&&d(e,t.placeholder)))if(o(l)&&o(e))Object.keys(l).forEach(s=>{let r=`${n?`${n}.`:""}${s}`;t.doNotFillThesePathsIfTheyContainPlaceholders.includes(r)&&(u(e[s])?d(e[s],t.placeholder)&&(e[s]=t.placeholder):e[s]=t.placeholder),(!u(e[s])||!(t.doNotFillThesePathsIfTheyContainPlaceholders.includes(r)&&d(e[s],t.placeholder)))&&(e[s]=f(e[s],l[s],t,r))});else if(Array.isArray(l)&&Array.isArray(e)){if(e.length===0)return l;if(l.length>0)for(let s=e.length;s--;){let r=`${n?`${n}.`:""}0`;(o(l[0])||Array.isArray(l[0]))&&(e[s]=f(e[s],l[0],t,r))}}else return p(l,e,{useNullAsExplicitFalse:t.useNullAsExplicitFalse});return e}function w(i,l,t){if(arguments.length===0)throw new Error("object-fill-missing-keys: [THROW_ID_01] All arguments are missing!");if(!o(i))throw new Error(`object-fill-missing-keys: [THROW_ID_02] First argument, input object must be a plain object. Currently it's type is "${a(i)}" and it's equal to: ${JSON.stringify(i,null,4)}`);if(!o(l))throw new Error(`object-fill-missing-keys: [THROW_ID_03] Second argument, schema object, must be a plain object. Currently it's type is "${a(l)}" and it's equal to: ${JSON.stringify(l,null,4)}`);if(t&&!o(t))throw new Error(`object-fill-missing-keys: [THROW_ID_04] Third argument, schema object, must be a plain object. Currently it's type is "${a(t)}" and it's equal to: ${JSON.stringify(t,null,4)}`);let n={...j,...t||{}};n.doNotFillThesePathsIfTheyContainPlaceholders=m(n.doNotFillThesePathsIfTheyContainPlaceholders);let e=null,s=null;if(n.doNotFillThesePathsIfTheyContainPlaceholders.length>0&&!n.doNotFillThesePathsIfTheyContainPlaceholders.every((r,h)=>g(r)?!0:(e=r,s=h,!1)))throw new Error(`object-fill-missing-keys: [THROW_ID_06] opts.doNotFillThesePathsIfTheyContainPlaceholders element with an index number "${s}" is not a string! It's ${a(e)}, equal to:
|
|
11
|
+
${JSON.stringify(e,null,4)}`);return f(c(i),c(l),n)}export{w as fillMissing,I as version};
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-fill-missing-keys
|
|
3
3
|
* @fileoverview Add missing keys into plain objects, according to a reference object
|
|
4
|
-
* @version 9.0.
|
|
4
|
+
* @version 9.0.11
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-fill-missing-keys/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).objectFillMissingKeys={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={exports:{}};!function(t,r){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",c="[object Date]",u="[object Function]",s="[object GeneratorFunction]",f="[object Map]",l="[object Number]",p="[object Object]",y="[object Promise]",h="[object RegExp]",b="[object Set]",_="[object String]",g="[object Symbol]",d="[object WeakMap]",v="[object ArrayBuffer]",j="[object DataView]",O="[object Float32Array]",k="[object Float64Array]",w="[object Int8Array]",m="[object Int16Array]",A="[object Int32Array]",S="[object Uint8Array]",$="[object Uint8ClampedArray]",T="[object Uint16Array]",E="[object Uint32Array]",x=/\w*$/,P=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,M={};M[i]=M["[object Array]"]=M[v]=M[j]=M[a]=M[c]=M[O]=M[k]=M[w]=M[m]=M[A]=M[f]=M[l]=M[p]=M[h]=M[b]=M[_]=M[g]=M[S]=M[$]=M[T]=M[E]=!0,M["[object Error]"]=M[u]=M[d]=!1;var I="object"==typeof self&&self&&self.Object===Object&&self,N="object"==typeof e&&e&&e.Object===Object&&e||I||Function("return this")(),z=r&&!r.nodeType&&r,C=z&&t&&!t.nodeType&&t,K=C&&C.exports===z;function R(t,e){return t.set(e[0],e[1]),t}function B(t,e){return t.add(e),t}function D(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function W(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function U(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function H(t,e){return function(r){return t(e(r))}}function q(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var V,L=Array.prototype,J=Function.prototype,G=Object.prototype,Q=N["__core-js_shared__"],X=(V=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",Y=J.toString,Z=G.hasOwnProperty,tt=G.toString,et=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=K?N.Buffer:void 0,nt=N.Symbol,ot=N.Uint8Array,it=H(Object.getPrototypeOf,Object),at=Object.create,ct=G.propertyIsEnumerable,ut=L.splice,st=Object.getOwnPropertySymbols,ft=rt?rt.isBuffer:void 0,lt=H(Object.keys,Object),pt=Ct(N,"DataView"),yt=Ct(N,"Map"),ht=Ct(N,"Promise"),bt=Ct(N,"Set"),_t=Ct(N,"WeakMap"),gt=Ct(Object,"create"),dt=Wt(pt),vt=Wt(yt),jt=Wt(ht),Ot=Wt(bt),kt=Wt(_t),wt=nt?nt.prototype:void 0,mt=wt?wt.valueOf:void 0;function At(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function St(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $t(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Tt(t){this.__data__=new St(t)}function Et(t,e){var r=Ht(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&qt(t)}(t)&&Z.call(t,"callee")&&(!ct.call(t,"callee")||tt.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var a in t)!e&&!Z.call(t,a)||o&&("length"==a||Bt(a,n))||r.push(a);return r}function xt(t,e,r){var n=t[e];Z.call(t,e)&&Ut(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Pt(t,e){for(var r=t.length;r--;)if(Ut(t[r][0],e))return r;return-1}function Ft(t,e,r,n,o,y,d){var P;if(n&&(P=y?n(t,o,y,d):n(t)),void 0!==P)return P;if(!Jt(t))return t;var F=Ht(t);if(F){if(P=function(t){var e=t.length,r=t.constructor(e);e&&"string"==typeof t[0]&&Z.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!e)return function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(t,P)}else{var I=Rt(t),N=I==u||I==s;if(Vt(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(I==p||I==i||N&&!y){if(W(t))return y?t:{};if(P=function(t){return"function"!=typeof t.constructor||Dt(t)?{}:(e=it(t),Jt(e)?at(e):{});var e}(N?{}:t),!e)return function(t,e){return Nt(t,Kt(t),e)}(t,function(t,e){return t&&Nt(e,Gt(e),t)}(P,t))}else{if(!M[I])return y?t:{};P=function(t,e,r,n){var o=t.constructor;switch(e){case v:return It(t);case a:case c:return new o(+t);case j:return function(t,e){var r=e?It(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case O:case k:case w:case m:case A:case S:case $:case T:case E:return function(t,e){var r=e?It(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case f:return function(t,e,r){return D(e?r(U(t),!0):U(t),R,new t.constructor)}(t,n,r);case l:case _:return new o(t);case h:return function(t){var e=new t.constructor(t.source,x.exec(t));return e.lastIndex=t.lastIndex,e}(t);case b:return function(t,e,r){return D(e?r(q(t),!0):q(t),B,new t.constructor)}(t,n,r);case g:return i=t,mt?Object(mt.call(i)):{}}var i}(t,I,Ft,e)}}d||(d=new Tt);var z=d.get(t);if(z)return z;if(d.set(t,P),!F)var C=r?function(t){return function(t,e,r){var n=e(t);return Ht(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Gt,Kt)}(t):Gt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r,t););}(C||t,(function(o,i){C&&(o=t[i=o]),xt(P,i,Ft(o,e,r,n,i,t,d))})),P}function Mt(t){return!(!Jt(t)||(e=t,X&&X in e))&&(Lt(t)||W(t)?et:P).test(Wt(t));var e}function It(t){var e=new t.constructor(t.byteLength);return new ot(e).set(new ot(t)),e}function Nt(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o<i;){var a=e[o],c=n?n(r[a],t[a],a,r,t):void 0;xt(r,a,void 0===c?t[a]:c)}return r}function zt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Ct(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Mt(r)?r:void 0}At.prototype.clear=function(){this.__data__=gt?gt(null):{}},At.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},At.prototype.get=function(t){var e=this.__data__;if(gt){var r=e[t];return r===n?void 0:r}return Z.call(e,t)?e[t]:void 0},At.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:Z.call(e,t)},At.prototype.set=function(t,e){return this.__data__[t]=gt&&void 0===e?n:e,this},St.prototype.clear=function(){this.__data__=[]},St.prototype.delete=function(t){var e=this.__data__,r=Pt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ut.call(e,r,1),!0)},St.prototype.get=function(t){var e=this.__data__,r=Pt(e,t);return r<0?void 0:e[r][1]},St.prototype.has=function(t){return Pt(this.__data__,t)>-1},St.prototype.set=function(t,e){var r=this.__data__,n=Pt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},$t.prototype.clear=function(){this.__data__={hash:new At,map:new(yt||St),string:new At}},$t.prototype.delete=function(t){return zt(this,t).delete(t)},$t.prototype.get=function(t){return zt(this,t).get(t)},$t.prototype.has=function(t){return zt(this,t).has(t)},$t.prototype.set=function(t,e){return zt(this,t).set(t,e),this},Tt.prototype.clear=function(){this.__data__=new St},Tt.prototype.delete=function(t){return this.__data__.delete(t)},Tt.prototype.get=function(t){return this.__data__.get(t)},Tt.prototype.has=function(t){return this.__data__.has(t)},Tt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof St){var n=r.__data__;if(!yt||n.length<199)return n.push([t,e]),this;r=this.__data__=new $t(n)}return r.set(t,e),this};var Kt=st?H(st,Object):function(){return[]},Rt=function(t){return tt.call(t)};function Bt(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||F.test(t))&&t>-1&&t%1==0&&t<e}function Dt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||G)}function Wt(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ut(t,e){return t===e||t!=t&&e!=e}(pt&&Rt(new pt(new ArrayBuffer(1)))!=j||yt&&Rt(new yt)!=f||ht&&Rt(ht.resolve())!=y||bt&&Rt(new bt)!=b||_t&&Rt(new _t)!=d)&&(Rt=function(t){var e=tt.call(t),r=e==p?t.constructor:void 0,n=r?Wt(r):void 0;if(n)switch(n){case dt:return j;case vt:return f;case jt:return y;case Ot:return b;case kt:return d}return e});var Ht=Array.isArray;function qt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!Lt(t)}var Vt=ft||function(){return!1};function Lt(t){var e=Jt(t)?tt.call(t):"";return e==u||e==s}function Jt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Gt(t){return qt(t)?Et(t):function(t){if(!Dt(t))return lt(t);var e=[];for(var r in Object(t))Z.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Ft(t,!0,!0)}}(r,r.exports);var n=r.exports,o=1/0,i=9007199254740991,a=17976931348623157e292,c=NaN,u="[object Arguments]",s="[object Function]",f="[object GeneratorFunction]",l="[object String]",p="[object Symbol]",y=/^\s+|\s+$/g,h=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,_=/^0o[0-7]+$/i,g=/^(?:0|[1-9]\d*)$/,d=parseInt;function v(t){return t!=t}function j(t,e){return function(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}(e,(function(e){return t[e]}))}var O,k,w=Object.prototype,m=w.hasOwnProperty,A=w.toString,S=w.propertyIsEnumerable,$=(O=Object.keys,k=Object,function(t){return O(k(t))}),T=Math.max;function E(t,e){var r=F(t)||function(t){return function(t){return N(t)&&M(t)}(t)&&m.call(t,"callee")&&(!S.call(t,"callee")||A.call(t)==u)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!m.call(t,i)||o&&("length"==i||P(i,n))||r.push(i);return r}function x(t){if((e=t)!==("function"==typeof(r=e&&e.constructor)&&r.prototype||w))return $(t);var e,r,n=[];for(var o in Object(t))m.call(t,o)&&"constructor"!=o&&n.push(o);return n}function P(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||g.test(t))&&t>-1&&t%1==0&&t<e}var F=Array.isArray;function M(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}(t.length)&&!function(t){var e=I(t)?A.call(t):"";return e==s||e==f}(t)}function I(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function N(t){return!!t&&"object"==typeof t}var z=function(t,e,r,n){var i;t=M(t)?t:(i=t)?j(i,function(t){return M(t)?E(t):x(t)}(i)):[],r=r&&!n?function(t){var e=function(t){if(!t)return 0===t?t:0;if((t=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||N(t)&&A.call(t)==p}(t))return c;if(I(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=I(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(y,"");var r=b.test(t);return r||_.test(t)?d(t.slice(2),r?2:8):h.test(t)?c:+t}(t))===o||t===-1/0){return(t<0?-1:1)*a}return t==t?t:0}(t),r=e%1;return e==e?r?e-r:e:0}(r):0;var u=t.length;return r<0&&(r=T(u+r,0)),function(t){return"string"==typeof t||!F(t)&&N(t)&&A.call(t)==l}(t)?r<=u&&t.indexOf(e,r)>-1:!!u&&function(t,e,r){if(e!=e)return function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,v,r);for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e,r)>-1},C="__lodash_hash_undefined__",K="[object Function]",R="[object GeneratorFunction]",B=/^\[object .+?Constructor\]$/,D="object"==typeof self&&self&&self.Object===Object&&self,W="object"==typeof e&&e&&e.Object===Object&&e||D||Function("return this")();function U(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var o=t.length,i=r+(n?1:-1);for(;n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,q,r);var n=r-1,o=t.length;for(;++n<o;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function H(t,e,r){for(var n=-1,o=t?t.length:0;++n<o;)if(r(e,t[n]))return!0;return!1}function q(t){return t!=t}function V(t,e){return t.has(e)}function L(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var J,G=Array.prototype,Q=Function.prototype,X=Object.prototype,Y=W["__core-js_shared__"],Z=(J=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",tt=Q.toString,et=X.hasOwnProperty,rt=X.toString,nt=RegExp("^"+tt.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=G.splice,it=_t(W,"Map"),at=_t(W,"Set"),ct=_t(Object,"create");function ut(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function st(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ft(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function lt(t){var e=-1,r=t?t.length:0;for(this.__data__=new ft;++e<r;)this.add(t[e])}function pt(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function yt(t){if(!gt(t)||function(t){return!!Z&&Z in t}(t))return!1;var e=function(t){var e=gt(t)?rt.call(t):"";return e==K||e==R}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?nt:B;return e.test(function(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}ut.prototype.clear=function(){this.__data__=ct?ct(null):{}},ut.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},ut.prototype.get=function(t){var e=this.__data__;if(ct){var r=e[t];return r===C?void 0:r}return et.call(e,t)?e[t]:void 0},ut.prototype.has=function(t){var e=this.__data__;return ct?void 0!==e[t]:et.call(e,t)},ut.prototype.set=function(t,e){return this.__data__[t]=ct&&void 0===e?C:e,this},st.prototype.clear=function(){this.__data__=[]},st.prototype.delete=function(t){var e=this.__data__,r=pt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),!0)},st.prototype.get=function(t){var e=this.__data__,r=pt(e,t);return r<0?void 0:e[r][1]},st.prototype.has=function(t){return pt(this.__data__,t)>-1},st.prototype.set=function(t,e){var r=this.__data__,n=pt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},ft.prototype.clear=function(){this.__data__={hash:new ut,map:new(it||st),string:new ut}},ft.prototype.delete=function(t){return bt(this,t).delete(t)},ft.prototype.get=function(t){return bt(this,t).get(t)},ft.prototype.has=function(t){return bt(this,t).has(t)},ft.prototype.set=function(t,e){return bt(this,t).set(t,e),this},lt.prototype.add=lt.prototype.push=function(t){return this.__data__.set(t,C),this},lt.prototype.has=function(t){return this.__data__.has(t)};var ht=at&&1/L(new at([,-0]))[1]==1/0?function(t){return new at(t)}:function(){};function bt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function _t(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(r)?r:void 0}function gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var dt=function(t){return t&&t.length?function(t,e,r){var n=-1,o=U,i=t.length,a=!0,c=[],u=c;if(r)a=!1,o=H;else if(i>=200){var s=e?null:ht(t);if(s)return L(s);a=!1,o=V,u=new lt}else u=e?[]:c;t:for(;++n<i;){var f=t[n],l=e?e(f):f;if(f=r||0!==f?f:0,a&&l==l){for(var p=u.length;p--;)if(u[p]===l)continue t;e&&u.push(l),c.push(f)}else o(u,l,r)||(u!==c&&u.push(l),c.push(f))}return c}(t):[]};var vt=Object.prototype,jt=Function.prototype.toString,Ot=vt.hasOwnProperty,kt=jt.call(Object),wt=vt.toString,mt=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object);var At=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=wt.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=mt(t);if(null===e)return!0;var r=Ot.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&jt.call(r)==kt},St={exports:{}};!function(t,r){var n=r&&!r.nodeType&&r,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n&&("object"==typeof e&&e&&e.Object===Object&&e).process,a=function(){try{return i&&i.binding("util")}catch(t){}}(),c=a&&a.isDate;var u=Object.prototype.toString;var s=c?function(t){return function(e){return t(e)}}(c):function(t){return function(t){return!!t&&"object"==typeof t}(t)&&"[object Date]"==u.call(t)};t.exports=s}(St,St.exports);var $t=St.exports;const Tt=new Map,Et=(t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter((t=>{if("string"!=typeof t){if(void 0===t)return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0}))},xt=(t,e)=>{e={caseSensitive:!1,...e};const r=t+JSON.stringify(e);if(Tt.has(r))return Tt.get(r);const n="!"===t[0];n&&(t=t.slice(1)),t=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t).replace(/\\\*/g,"[\\s\\S]*");const o=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return o.negated=n,Tt.set(r,o),o};function Pt(t,e,r){return((t,e,r,n)=>{if(t=Et(t,"inputs"),0===(e=Et(e,"patterns")).length)return[];e=e.map((t=>xt(t,r)));const{allPatterns:o}=r||{},i=[];for(const r of t){let t;const a=[...e].fill(!1);for(const[n,o]of e.entries())if(o.test(r)&&(a[n]=!0,t=!o.negated,!t))break;if(!(!1===t||void 0===t&&e.some((t=>!t.negated))||o&&a.some(((t,r)=>!t&&!e[r].negated)))&&(i.push(r),n))break}return i})(t,e,r,!0).length>0}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @fileoverview Is the input (plain object, array, string or whatever) not empty?
|
|
14
|
-
* @version 4.0.5
|
|
15
|
-
* @author Roy Revelt, Codsen Ltd
|
|
16
|
-
* @license MIT
|
|
17
|
-
* {@link https://codsen.com/os/util-nonempty/}
|
|
18
|
-
*/function Ft(t){return null!=t&&(Array.isArray(t)||"string"==typeof t?!!t.length:At(t)?!!Object.keys(t).length:"number"==typeof t)}
|
|
19
|
-
/**
|
|
20
|
-
* @name object-merge-advanced
|
|
21
|
-
* @fileoverview Recursively, deeply merge of anything (objects, arrays, strings or nested thereof), which weighs contents by type hierarchy to ensure the maximum content is retained
|
|
22
|
-
* @version 13.0.5
|
|
23
|
-
* @author Roy Revelt, Codsen Ltd
|
|
24
|
-
* @license MIT
|
|
25
|
-
* {@link https://codsen.com/os/object-merge-advanced/}
|
|
26
|
-
*/const Mt={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function It(t,e,r){if(!t.length||!e.length)return!1;const n={...Mt,...r},o="string"==typeof t?[t]:Array.from(t);return"string"==typeof e?o.some((t=>Pt(t,e,{caseSensitive:n.caseSensitive}))):"any"===n.arrayVsArrayAllMustBeFound?e.some((t=>o.some((e=>Pt(e,t,{caseSensitive:n.caseSensitive}))))):e.every((t=>o.some((e=>Pt(e,t,{caseSensitive:n.caseSensitive})))))}function Nt(t){return"string"==typeof t}function zt(t){return"boolean"==typeof t}const Ct=Array.isArray;function Kt(t){return!!t&&t.some((t=>"string"==typeof t))}function Rt(t,e){return 0===Object.keys(t).length||0===Object.keys(e).length||Object.keys(t).every((t=>Object.keys(e).includes(t)))||Object.keys(e).every((e=>Object.keys(t).includes(e)))}function Bt(t){return null===t?"null":$t(t)?"date":At(t)?"object":Ct(t)?"array":typeof t}const Dt={cb:null,mergeObjectsOnlyWhenKeysetMatches:!0,ignoreKeys:[],hardMergeKeys:[],hardArrayConcatKeys:[],mergeArraysContainingStringsToBeEmpty:!1,oneToManyArrayObjectMerge:!1,hardMergeEverything:!1,hardArrayConcat:!1,ignoreEverything:!1,concatInsteadOfMerging:!0,dedupeStringsInArrayValues:!1,mergeBoolsUsingOrNotAnd:!0,useNullAsExplicitFalse:!1};function Wt(t,e,r,o){const i={...Dt,...o};let a;if("string"==typeof i.ignoreKeys&&(i.ignoreKeys=[i.ignoreKeys]),"string"==typeof i.hardMergeKeys&&(i.hardMergeKeys=[i.hardMergeKeys]),i.hardMergeKeys.includes("*")&&(i.hardMergeEverything=!0),i.ignoreKeys.includes("*")&&(i.ignoreEverything=!0),i.useNullAsExplicitFalse&&(null===e||null===r))return"function"==typeof i.cb?i.cb(e,r,null,{path:t.path,key:t.key,type:t.type}):null;let c=Ct(e)||At(e)?n(e):e;const u=Ct(r)||At(r)?n(r):r;let s;i.ignoreEverything?s=c:i.hardMergeEverything&&(s=u);const f=i.hardMergeEverything||i.ignoreEverything;if(!Ct(c)){if(At(c)){if(Ft(c)){if(Ct(u)){if(Ft(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}if(At(u)){Object.keys(u).forEach((e=>{a=t.path&&t.path.length?`${t.path}.${e}`:`${e}`,c[e]=c.hasOwnProperty(e)?It(e,i.ignoreKeys)?Wt({path:a,key:e,type:[Bt(c),Bt(u)]},c[e],u[e],{...i,ignoreEverything:!0}):It(e,i.hardMergeKeys)?Wt({path:a,key:e,type:[Bt(c),Bt(u)]},c[e],u[e],{...i,hardMergeEverything:!0}):It(e,i.hardArrayConcatKeys)?Wt({path:a,key:e,type:[Bt(c),Bt(u)]},c[e],u[e],{...i,hardArrayConcat:!0}):Wt({path:a,key:e,type:[Bt(c[e]),Bt(u[e])]},c[e],u[e],i):u[e]}));const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):c}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if(Ct(u)||At(u)||Ft(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if($t(c)){if(isFinite(c)){if($t(u)){if(isFinite(u)){const o=f?s:c>u?c:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:u||c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if($t(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if(Nt(c)){if(Ft(c)){if((Ct(u)||At(u)||Nt(u))&&Ft(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if(null!=u&&!zt(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if("number"==typeof c){if(Ft(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if(zt(c)){if(zt(u)){if(i.mergeBoolsUsingOrNotAnd){const o=f?s:c||u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c&&u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if(null!=u){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}if(null===c){if(null!=u){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}{const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:t.path,key:t.key,type:t.type}):o}}if(!Ft(c)){if(Ft(u)){const o=f?s:u;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}if(!Ct(u)||!Ft(u)){const o=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}{if(i.mergeArraysContainingStringsToBeEmpty&&(Kt(c)||Kt(u))){const o=f?s:[];return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}if(i.hardArrayConcat){const o=f?s:c.concat(u);return"function"==typeof i.cb?i.cb(n(e),n(r),o,{path:a,key:t.key,type:t.type}):o}let o=[];for(let e=0,r=Math.max(c.length,u.length);e<r;e++)a=t.path&&t.path.length?`${t.path}.${e}`:`${e}`,At(c[e])&&At(u[e])&&(i.mergeObjectsOnlyWhenKeysetMatches&&Rt(c[e],u[e])||!i.mergeObjectsOnlyWhenKeysetMatches)?o.push(Wt({path:a,key:t.key,type:[Bt(c),Bt(u)]},c[e],u[e],i)):!i.oneToManyArrayObjectMerge||1!==c.length&&1!==u.length?i.concatInsteadOfMerging?(e<c.length&&o.push(c[e]),e<u.length&&o.push(u[e])):(e<c.length&&o.push(c[e]),e<u.length&&!z(c,u[e])&&o.push(u[e])):o.push(1===c.length?Wt({path:a,key:t.key,type:[Bt(c),Bt(u)]},c[0],u[e],i):Wt({path:a,key:t.key,type:[Bt(c),Bt(u)]},c[e],u[0],i));i.dedupeStringsInArrayValues&&o.every((t=>Nt(t)))&&(o=dt(o).sort()),c=n(o)}const l=f?s:c;return"function"==typeof i.cb?i.cb(n(e),n(r),l,{path:t.path,key:t.key,type:t.type}):l}
|
|
10
|
+
var objectFillMissingKeys=(()=>{var zn=Object.create;var rt=Object.defineProperty,Jn=Object.defineProperties,Wn=Object.getOwnPropertyDescriptor,Xn=Object.getOwnPropertyDescriptors,Yn=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,Vn=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable;var Ge=(t,e,r)=>e in t?rt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,m=(t,e)=>{for(var r in e||(e={}))Le.call(e,r)&&Ge(t,r,e[r]);if(Ke)for(var r of Ke(e))Zn.call(e,r)&&Ge(t,r,e[r]);return t},bt=(t,e)=>Jn(t,Xn(e)),Be=t=>rt(t,"__esModule",{value:!0});var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qn=(t,e)=>{for(var r in e)rt(t,r,{get:e[r],enumerable:!0})},Ue=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Yn(e))!Le.call(t,i)&&(r||i!=="default")&&rt(t,i,{get:()=>e[i],enumerable:!(n=Wn(e,i))||n.enumerable});return t},A=(t,e)=>Ue(Be(rt(t!=null?zn(Vn(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),ti=(t=>(e,r)=>t&&t.get(e)||(r=Ue(Be({}),e,1),t&&t.set(e,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var oe=D((at,X)=>{var ei=200,qe="__lodash_hash_undefined__",ze=9007199254740991,zt="[object Arguments]",ri="[object Array]",Je="[object Boolean]",We="[object Date]",ni="[object Error]",Jt="[object Function]",Xe="[object GeneratorFunction]",_t="[object Map]",Ye="[object Number]",Wt="[object Object]",Ve="[object Promise]",Ze="[object RegExp]",vt="[object Set]",Qe="[object String]",tr="[object Symbol]",Xt="[object WeakMap]",er="[object ArrayBuffer]",mt="[object DataView]",rr="[object Float32Array]",nr="[object Float64Array]",ir="[object Int8Array]",ar="[object Int16Array]",or="[object Int32Array]",sr="[object Uint8Array]",fr="[object Uint8ClampedArray]",cr="[object Uint16Array]",ur="[object Uint32Array]",ii=/[\\^$.*+?()[\]{}|]/g,ai=/\w*$/,oi=/^\[object .+?Constructor\]$/,si=/^(?:0|[1-9]\d*)$/,d={};d[zt]=d[ri]=d[er]=d[mt]=d[Je]=d[We]=d[rr]=d[nr]=d[ir]=d[ar]=d[or]=d[_t]=d[Ye]=d[Wt]=d[Ze]=d[vt]=d[Qe]=d[tr]=d[sr]=d[fr]=d[cr]=d[ur]=!0;d[ni]=d[Jt]=d[Xt]=!1;var fi=typeof global=="object"&&global&&global.Object===Object&&global,ci=typeof self=="object"&&self&&self.Object===Object&&self,S=fi||ci||Function("return this")(),lr=typeof at=="object"&&at&&!at.nodeType&&at,pr=lr&&typeof X=="object"&&X&&!X.nodeType&&X,ui=pr&&pr.exports===lr;function li(t,e){return t.set(e[0],e[1]),t}function pi(t,e){return t.add(e),t}function hi(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function yi(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function hr(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function gi(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function di(t,e){return t==null?void 0:t[e]}function yr(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function gr(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function Yt(t,e){return function(r){return t(e(r))}}function dr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var bi=Array.prototype,_i=Function.prototype,Tt=Object.prototype,Vt=S["__core-js_shared__"],br=function(){var t=/[^.]+$/.exec(Vt&&Vt.keys&&Vt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),_r=_i.toString,I=Tt.hasOwnProperty,At=Tt.toString,vi=RegExp("^"+_r.call(I).replace(ii,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=ui?S.Buffer:void 0,mr=S.Symbol,Tr=S.Uint8Array,mi=Yt(Object.getPrototypeOf,Object),Ti=Object.create,Ai=Tt.propertyIsEnumerable,ji=bi.splice,Ar=Object.getOwnPropertySymbols,Oi=vr?vr.isBuffer:void 0,wi=Yt(Object.keys,Object),Zt=W(S,"DataView"),nt=W(S,"Map"),Qt=W(S,"Promise"),te=W(S,"Set"),ee=W(S,"WeakMap"),it=W(Object,"create"),Si=K(Zt),xi=K(nt),Ci=K(Qt),Ei=K(te),Ii=K(ee),jr=mr?mr.prototype:void 0,Or=jr?jr.valueOf:void 0;function R(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Pi(){this.__data__=it?it(null):{}}function Mi(t){return this.has(t)&&delete this.__data__[t]}function Ni(t){var e=this.__data__;if(it){var r=e[t];return r===qe?void 0:r}return I.call(e,t)?e[t]:void 0}function Fi(t){var e=this.__data__;return it?e[t]!==void 0:I.call(e,t)}function $i(t,e){var r=this.__data__;return r[t]=it&&e===void 0?qe:e,this}R.prototype.clear=Pi;R.prototype.delete=Mi;R.prototype.get=Ni;R.prototype.has=Fi;R.prototype.set=$i;function x(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ki(){this.__data__=[]}function Di(t){var e=this.__data__,r=jt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ji.call(e,r,1),!0}function Ri(t){var e=this.__data__,r=jt(e,t);return r<0?void 0:e[r][1]}function Hi(t){return jt(this.__data__,t)>-1}function Ki(t,e){var r=this.__data__,n=jt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}x.prototype.clear=ki;x.prototype.delete=Di;x.prototype.get=Ri;x.prototype.has=Hi;x.prototype.set=Ki;function z(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Li(){this.__data__={hash:new R,map:new(nt||x),string:new R}}function Gi(t){return Ot(this,t).delete(t)}function Bi(t){return Ot(this,t).get(t)}function Ui(t){return Ot(this,t).has(t)}function qi(t,e){return Ot(this,t).set(t,e),this}z.prototype.clear=Li;z.prototype.delete=Gi;z.prototype.get=Bi;z.prototype.has=Ui;z.prototype.set=qi;function J(t){this.__data__=new x(t)}function zi(){this.__data__=new x}function Ji(t){return this.__data__.delete(t)}function Wi(t){return this.__data__.get(t)}function Xi(t){return this.__data__.has(t)}function Yi(t,e){var r=this.__data__;if(r instanceof x){var n=r.__data__;if(!nt||n.length<ei-1)return n.push([t,e]),this;r=this.__data__=new z(n)}return r.set(t,e),this}J.prototype.clear=zi;J.prototype.delete=Ji;J.prototype.get=Wi;J.prototype.has=Xi;J.prototype.set=Yi;function Vi(t,e){var r=ie(t)||Ta(t)?gi(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||I.call(t,o))&&!(i&&(o=="length"||ba(o,n)))&&r.push(o);return r}function wr(t,e,r){var n=t[e];(!(I.call(t,e)&&Er(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function jt(t,e){for(var r=t.length;r--;)if(Er(t[r][0],e))return r;return-1}function Zi(t,e){return t&&Sr(e,ae(e),t)}function re(t,e,r,n,i,o,a){var s;if(n&&(s=o?n(t,i,o,a):n(t)),s!==void 0)return s;if(!wt(t))return t;var u=ie(t);if(u){if(s=ya(t),!e)return la(t,s)}else{var c=H(t),g=c==Jt||c==Xe;if(ja(t))return ia(t,e);if(c==Wt||c==zt||g&&!o){if(yr(t))return o?t:{};if(s=ga(g?{}:t),!e)return pa(t,Zi(s,t))}else{if(!d[c])return o?t:{};s=da(t,c,re,e)}}a||(a=new J);var _=a.get(t);if(_)return _;if(a.set(t,s),!u)var p=r?ha(t):ae(t);return hi(p||t,function(f,y){p&&(y=f,f=t[y]),wr(s,y,re(f,e,r,n,y,t,a))}),s}function Qi(t){return wt(t)?Ti(t):{}}function ta(t,e,r){var n=e(t);return ie(t)?n:yi(n,r(t))}function ea(t){return At.call(t)}function ra(t){if(!wt(t)||va(t))return!1;var e=Pr(t)||yr(t)?vi:oi;return e.test(K(t))}function na(t){if(!Cr(t))return wi(t);var e=[];for(var r in Object(t))I.call(t,r)&&r!="constructor"&&e.push(r);return e}function ia(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ne(t){var e=new t.constructor(t.byteLength);return new Tr(e).set(new Tr(t)),e}function aa(t,e){var r=e?ne(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function oa(t,e,r){var n=e?r(gr(t),!0):gr(t);return hr(n,li,new t.constructor)}function sa(t){var e=new t.constructor(t.source,ai.exec(t));return e.lastIndex=t.lastIndex,e}function fa(t,e,r){var n=e?r(dr(t),!0):dr(t);return hr(n,pi,new t.constructor)}function ca(t){return Or?Object(Or.call(t)):{}}function ua(t,e){var r=e?ne(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function la(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Sr(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var a=e[i],s=n?n(r[a],t[a],a,r,t):void 0;wr(r,a,s===void 0?t[a]:s)}return r}function pa(t,e){return Sr(t,xr(t),e)}function ha(t){return ta(t,ae,xr)}function Ot(t,e){var r=t.__data__;return _a(e)?r[typeof e=="string"?"string":"hash"]:r.map}function W(t,e){var r=di(t,e);return ra(r)?r:void 0}var xr=Ar?Yt(Ar,Object):Sa,H=ea;(Zt&&H(new Zt(new ArrayBuffer(1)))!=mt||nt&&H(new nt)!=_t||Qt&&H(Qt.resolve())!=Ve||te&&H(new te)!=vt||ee&&H(new ee)!=Xt)&&(H=function(t){var e=At.call(t),r=e==Wt?t.constructor:void 0,n=r?K(r):void 0;if(n)switch(n){case Si:return mt;case xi:return _t;case Ci:return Ve;case Ei:return vt;case Ii:return Xt}return e});function ya(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&I.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function ga(t){return typeof t.constructor=="function"&&!Cr(t)?Qi(mi(t)):{}}function da(t,e,r,n){var i=t.constructor;switch(e){case er:return ne(t);case Je:case We:return new i(+t);case mt:return aa(t,n);case rr:case nr:case ir:case ar:case or:case sr:case fr:case cr:case ur:return ua(t,n);case _t:return oa(t,n,r);case Ye:case Qe:return new i(t);case Ze:return sa(t);case vt:return fa(t,n,r);case tr:return ca(t)}}function ba(t,e){return e=e==null?ze:e,!!e&&(typeof t=="number"||si.test(t))&&t>-1&&t%1==0&&t<e}function _a(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function va(t){return!!br&&br in t}function Cr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Tt;return t===r}function K(t){if(t!=null){try{return _r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ma(t){return re(t,!0,!0)}function Er(t,e){return t===e||t!==t&&e!==e}function Ta(t){return Aa(t)&&I.call(t,"callee")&&(!Ai.call(t,"callee")||At.call(t)==zt)}var ie=Array.isArray;function Ir(t){return t!=null&&Oa(t.length)&&!Pr(t)}function Aa(t){return wa(t)&&Ir(t)}var ja=Oi||xa;function Pr(t){var e=wt(t)?At.call(t):"";return e==Jt||e==Xe}function Oa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ze}function wt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function wa(t){return!!t&&typeof t=="object"}function ae(t){return Ir(t)?Vi(t):na(t)}function Sa(){return[]}function xa(){return!1}X.exports=ma});var Dr=D((Ac,kr)=>{var Mr=1/0,Nr=9007199254740991,Ca=17976931348623157e292,Fr=0/0,Ea="[object Arguments]",Ia="[object Function]",Pa="[object GeneratorFunction]",Ma="[object String]",Na="[object Symbol]",Fa=/^\s+|\s+$/g,$a=/^[-+]0x[0-9a-f]+$/i,ka=/^0b[01]+$/i,Da=/^0o[0-7]+$/i,Ra=/^(?:0|[1-9]\d*)$/,Ha=parseInt;function Ka(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function La(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ga(t,e,r){if(e!==e)return La(t,Ba,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function Ba(t){return t!==t}function Ua(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function qa(t,e){return Ka(e,function(r){return t[r]})}function za(t,e){return function(r){return t(e(r))}}var St=Object.prototype,se=St.hasOwnProperty,xt=St.toString,Ja=St.propertyIsEnumerable,Wa=za(Object.keys,Object),Xa=Math.max;function Ya(t,e){var r=$r(t)||eo(t)?Ua(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||se.call(t,o))&&!(i&&(o=="length"||Za(o,n)))&&r.push(o);return r}function Va(t){if(!Qa(t))return Wa(t);var e=[];for(var r in Object(t))se.call(t,r)&&r!="constructor"&&e.push(r);return e}function Za(t,e){return e=e==null?Nr:e,!!e&&(typeof t=="number"||Ra.test(t))&&t>-1&&t%1==0&&t<e}function Qa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||St;return t===r}function to(t,e,r,n){t=fe(t)?t:lo(t),r=r&&!n?fo(r):0;var i=t.length;return r<0&&(r=Xa(i+r,0)),ao(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ga(t,e,r)>-1}function eo(t){return ro(t)&&se.call(t,"callee")&&(!Ja.call(t,"callee")||xt.call(t)==Ea)}var $r=Array.isArray;function fe(t){return t!=null&&io(t.length)&&!no(t)}function ro(t){return ue(t)&&fe(t)}function no(t){var e=ce(t)?xt.call(t):"";return e==Ia||e==Pa}function io(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Nr}function ce(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ue(t){return!!t&&typeof t=="object"}function ao(t){return typeof t=="string"||!$r(t)&&ue(t)&&xt.call(t)==Ma}function oo(t){return typeof t=="symbol"||ue(t)&&xt.call(t)==Na}function so(t){if(!t)return t===0?t:0;if(t=co(t),t===Mr||t===-Mr){var e=t<0?-1:1;return e*Ca}return t===t?t:0}function fo(t){var e=so(t),r=e%1;return e===e?r?e-r:e:0}function co(t){if(typeof t=="number")return t;if(oo(t))return Fr;if(ce(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ce(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Fa,"");var r=ka.test(t);return r||Da.test(t)?Ha(t.slice(2),r?2:8):$a.test(t)?Fr:+t}function uo(t){return fe(t)?Ya(t):Va(t)}function lo(t){return t?qa(t,uo(t)):[]}kr.exports=to});var Ur=D((jc,Br)=>{var po=200,le="__lodash_hash_undefined__",ho=1/0,yo="[object Function]",go="[object GeneratorFunction]",bo=/[\\^$.*+?()[\]{}|]/g,_o=/^\[object .+?Constructor\]$/,vo=typeof global=="object"&&global&&global.Object===Object&&global,mo=typeof self=="object"&&self&&self.Object===Object&&self,pe=vo||mo||Function("return this")();function To(t,e){var r=t?t.length:0;return!!r&&Oo(t,e,0)>-1}function Ao(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function jo(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Oo(t,e,r){if(e!==e)return jo(t,wo,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function wo(t){return t!==t}function So(t,e){return t.has(e)}function xo(t,e){return t==null?void 0:t[e]}function Co(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Rr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Eo=Array.prototype,Io=Function.prototype,Hr=Object.prototype,he=pe["__core-js_shared__"],Kr=function(){var t=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Lr=Io.toString,ye=Hr.hasOwnProperty,Po=Hr.toString,Mo=RegExp("^"+Lr.call(ye).replace(bo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),No=Eo.splice,Fo=de(pe,"Map"),ge=de(pe,"Set"),ot=de(Object,"create");function L(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $o(){this.__data__=ot?ot(null):{}}function ko(t){return this.has(t)&&delete this.__data__[t]}function Do(t){var e=this.__data__;if(ot){var r=e[t];return r===le?void 0:r}return ye.call(e,t)?e[t]:void 0}function Ro(t){var e=this.__data__;return ot?e[t]!==void 0:ye.call(e,t)}function Ho(t,e){var r=this.__data__;return r[t]=ot&&e===void 0?le:e,this}L.prototype.clear=$o;L.prototype.delete=ko;L.prototype.get=Do;L.prototype.has=Ro;L.prototype.set=Ho;function Y(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ko(){this.__data__=[]}function Lo(t){var e=this.__data__,r=Et(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():No.call(e,r,1),!0}function Go(t){var e=this.__data__,r=Et(e,t);return r<0?void 0:e[r][1]}function Bo(t){return Et(this.__data__,t)>-1}function Uo(t,e){var r=this.__data__,n=Et(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Y.prototype.clear=Ko;Y.prototype.delete=Lo;Y.prototype.get=Go;Y.prototype.has=Bo;Y.prototype.set=Uo;function V(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qo(){this.__data__={hash:new L,map:new(Fo||Y),string:new L}}function zo(t){return It(this,t).delete(t)}function Jo(t){return It(this,t).get(t)}function Wo(t){return It(this,t).has(t)}function Xo(t,e){return It(this,t).set(t,e),this}V.prototype.clear=qo;V.prototype.delete=zo;V.prototype.get=Jo;V.prototype.has=Wo;V.prototype.set=Xo;function Ct(t){var e=-1,r=t?t.length:0;for(this.__data__=new V;++e<r;)this.add(t[e])}function Yo(t){return this.__data__.set(t,le),this}function Vo(t){return this.__data__.has(t)}Ct.prototype.add=Ct.prototype.push=Yo;Ct.prototype.has=Vo;function Et(t,e){for(var r=t.length;r--;)if(as(t[r][0],e))return r;return-1}function Zo(t){if(!Gr(t)||rs(t))return!1;var e=os(t)||Co(t)?Mo:_o;return e.test(ns(t))}function Qo(t,e,r){var n=-1,i=To,o=t.length,a=!0,s=[],u=s;if(r)a=!1,i=Ao;else if(o>=po){var c=e?null:ts(t);if(c)return Rr(c);a=!1,i=So,u=new Ct}else u=e?[]:s;t:for(;++n<o;){var g=t[n],_=e?e(g):g;if(g=r||g!==0?g:0,a&&_===_){for(var p=u.length;p--;)if(u[p]===_)continue t;e&&u.push(_),s.push(g)}else i(u,_,r)||(u!==s&&u.push(_),s.push(g))}return s}var ts=ge&&1/Rr(new ge([,-0]))[1]==ho?function(t){return new ge(t)}:ss;function It(t,e){var r=t.__data__;return es(e)?r[typeof e=="string"?"string":"hash"]:r.map}function de(t,e){var r=xo(t,e);return Zo(r)?r:void 0}function es(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function rs(t){return!!Kr&&Kr in t}function ns(t){if(t!=null){try{return Lr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function is(t){return t&&t.length?Qo(t):[]}function as(t,e){return t===e||t!==t&&e!==e}function os(t){var e=Gr(t)?Po.call(t):"";return e==yo||e==go}function Gr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ss(){}Br.exports=is});var st=D((Oc,Jr)=>{var fs="[object Object]";function cs(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function us(t,e){return function(r){return t(e(r))}}var ls=Function.prototype,qr=Object.prototype,zr=ls.toString,ps=qr.hasOwnProperty,hs=zr.call(Object),ys=qr.toString,gs=us(Object.getPrototypeOf,Object);function ds(t){return!!t&&typeof t=="object"}function bs(t){if(!ds(t)||ys.call(t)!=fs||cs(t))return!1;var e=gs(t);if(e===null)return!0;var r=ps.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&zr.call(r)==hs}Jr.exports=bs});var Qr=D((ft,Z)=>{var _s="[object Date]",vs=typeof global=="object"&&global&&global.Object===Object&&global,Wr=typeof ft=="object"&&ft&&!ft.nodeType&&ft,Xr=Wr&&typeof Z=="object"&&Z&&!Z.nodeType&&Z,ms=Xr&&Xr.exports===Wr,Yr=ms&&vs.process,Vr=function(){try{return Yr&&Yr.binding("util")}catch(t){}}(),Zr=Vr&&Vr.isDate;function Ts(t){return function(e){return t(e)}}var As=Object.prototype,js=As.toString;function Os(t){return Ss(t)&&js.call(t)==_s}var ws=Zr?Ts(Zr):Os;function Ss(t){return!!t&&typeof t=="object"}Z.exports=ws});var en=D((wc,tn)=>{var xs=typeof global=="object"&&global&&global.Object===Object&&global,Cs=typeof self=="object"&&self&&self.Object===Object&&self,Es=xs||Cs||Function("return this")(),Is=Es.isFinite;function Ps(t){return typeof t=="number"&&Is(t)}tn.exports=Ps});var Un=D((yt,et)=>{var Rs=200,je="__lodash_hash_undefined__",Mt=1,un=2,ln=9007199254740991,Nt="[object Arguments]",Oe="[object Array]",Hs="[object AsyncFunction]",pn="[object Boolean]",hn="[object Date]",yn="[object Error]",gn="[object Function]",Ks="[object GeneratorFunction]",Ft="[object Map]",dn="[object Number]",Ls="[object Null]",Q="[object Object]",bn="[object Promise]",Gs="[object Proxy]",_n="[object RegExp]",$t="[object Set]",vn="[object String]",Bs="[object Symbol]",Us="[object Undefined]",we="[object WeakMap]",mn="[object ArrayBuffer]",kt="[object DataView]",qs="[object Float32Array]",zs="[object Float64Array]",Js="[object Int8Array]",Ws="[object Int16Array]",Xs="[object Int32Array]",Ys="[object Uint8Array]",Vs="[object Uint8ClampedArray]",Zs="[object Uint16Array]",Qs="[object Uint32Array]",tf=/[\\^$.*+?()[\]{}|]/g,ef=/^\[object .+?Constructor\]$/,rf=/^(?:0|[1-9]\d*)$/,b={};b[qs]=b[zs]=b[Js]=b[Ws]=b[Xs]=b[Ys]=b[Vs]=b[Zs]=b[Qs]=!0;b[Nt]=b[Oe]=b[mn]=b[pn]=b[kt]=b[hn]=b[yn]=b[gn]=b[Ft]=b[dn]=b[Q]=b[_n]=b[$t]=b[vn]=b[we]=!1;var Tn=typeof global=="object"&&global&&global.Object===Object&&global,nf=typeof self=="object"&&self&&self.Object===Object&&self,C=Tn||nf||Function("return this")(),An=typeof yt=="object"&&yt&&!yt.nodeType&&yt,jn=An&&typeof et=="object"&&et&&!et.nodeType&&et,On=jn&&jn.exports===An,Se=On&&Tn.process,wn=function(){try{return Se&&Se.binding&&Se.binding("util")}catch(t){}}(),Sn=wn&&wn.isTypedArray;function af(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function of(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function sf(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function ff(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function cf(t){return function(e){return t(e)}}function uf(t,e){return t.has(e)}function lf(t,e){return t==null?void 0:t[e]}function pf(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function hf(t,e){return function(r){return t(e(r))}}function yf(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var gf=Array.prototype,df=Function.prototype,Dt=Object.prototype,xe=C["__core-js_shared__"],xn=df.toString,w=Dt.hasOwnProperty,Cn=function(){var t=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),En=Dt.toString,bf=RegExp("^"+xn.call(w).replace(tf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),In=On?C.Buffer:void 0,Rt=C.Symbol,Pn=C.Uint8Array,Mn=Dt.propertyIsEnumerable,_f=gf.splice,G=Rt?Rt.toStringTag:void 0,Nn=Object.getOwnPropertySymbols,vf=In?In.isBuffer:void 0,mf=hf(Object.keys,Object),Ce=tt(C,"DataView"),ut=tt(C,"Map"),Ee=tt(C,"Promise"),Ie=tt(C,"Set"),Pe=tt(C,"WeakMap"),lt=tt(Object,"create"),Tf=q(Ce),Af=q(ut),jf=q(Ee),Of=q(Ie),wf=q(Pe),Fn=Rt?Rt.prototype:void 0,Me=Fn?Fn.valueOf:void 0;function B(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Sf(){this.__data__=lt?lt(null):{},this.size=0}function xf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Cf(t){var e=this.__data__;if(lt){var r=e[t];return r===je?void 0:r}return w.call(e,t)?e[t]:void 0}function Ef(t){var e=this.__data__;return lt?e[t]!==void 0:w.call(e,t)}function If(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=lt&&e===void 0?je:e,this}B.prototype.clear=Sf;B.prototype.delete=xf;B.prototype.get=Cf;B.prototype.has=Ef;B.prototype.set=If;function E(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Pf(){this.__data__=[],this.size=0}function Mf(t){var e=this.__data__,r=Kt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():_f.call(e,r,1),--this.size,!0}function Nf(t){var e=this.__data__,r=Kt(e,t);return r<0?void 0:e[r][1]}function Ff(t){return Kt(this.__data__,t)>-1}function $f(t,e){var r=this.__data__,n=Kt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}E.prototype.clear=Pf;E.prototype.delete=Mf;E.prototype.get=Nf;E.prototype.has=Ff;E.prototype.set=$f;function U(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function kf(){this.size=0,this.__data__={hash:new B,map:new(ut||E),string:new B}}function Df(t){var e=Lt(this,t).delete(t);return this.size-=e?1:0,e}function Rf(t){return Lt(this,t).get(t)}function Hf(t){return Lt(this,t).has(t)}function Kf(t,e){var r=Lt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}U.prototype.clear=kf;U.prototype.delete=Df;U.prototype.get=Rf;U.prototype.has=Hf;U.prototype.set=Kf;function Ht(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new U;++e<r;)this.add(t[e])}function Lf(t){return this.__data__.set(t,je),this}function Gf(t){return this.__data__.has(t)}Ht.prototype.add=Ht.prototype.push=Lf;Ht.prototype.has=Gf;function N(t){var e=this.__data__=new E(t);this.size=e.size}function Bf(){this.__data__=new E,this.size=0}function Uf(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function qf(t){return this.__data__.get(t)}function zf(t){return this.__data__.has(t)}function Jf(t,e){var r=this.__data__;if(r instanceof E){var n=r.__data__;if(!ut||n.length<Rs-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new U(n)}return r.set(t,e),this.size=r.size,this}N.prototype.clear=Bf;N.prototype.delete=Uf;N.prototype.get=qf;N.prototype.has=zf;N.prototype.set=Jf;function Wf(t,e){var r=Gt(t),n=!r&&cc(t),i=!r&&!n&&Ne(t),o=!r&&!n&&!i&&Bn(t),a=r||n||i||o,s=a?ff(t.length,String):[],u=s.length;for(var c in t)(e||w.call(t,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ic(c,u)))&&s.push(c);return s}function Kt(t,e){for(var r=t.length;r--;)if(Hn(t[r][0],e))return r;return-1}function Xf(t,e,r){var n=e(t);return Gt(t)?n:of(n,r(t))}function pt(t){return t==null?t===void 0?Us:Ls:G&&G in Object(t)?rc(t):fc(t)}function $n(t){return ht(t)&&pt(t)==Nt}function kn(t,e,r,n,i){return t===e?!0:t==null||e==null||!ht(t)&&!ht(e)?t!==t&&e!==e:Yf(t,e,r,n,kn,i)}function Yf(t,e,r,n,i,o){var a=Gt(t),s=Gt(e),u=a?Oe:F(t),c=s?Oe:F(e);u=u==Nt?Q:u,c=c==Nt?Q:c;var g=u==Q,_=c==Q,p=u==c;if(p&&Ne(t)){if(!Ne(e))return!1;a=!0,g=!1}if(p&&!g)return o||(o=new N),a||Bn(t)?Dn(t,e,r,n,i,o):tc(t,e,u,r,n,i,o);if(!(r&Mt)){var f=g&&w.call(t,"__wrapped__"),y=_&&w.call(e,"__wrapped__");if(f||y){var h=f?t.value():t,T=y?e.value():e;return o||(o=new N),i(h,T,r,n,o)}}return p?(o||(o=new N),ec(t,e,r,n,i,o)):!1}function Vf(t){if(!Gn(t)||oc(t))return!1;var e=Kn(t)?bf:ef;return e.test(q(t))}function Zf(t){return ht(t)&&Ln(t.length)&&!!b[pt(t)]}function Qf(t){if(!sc(t))return mf(t);var e=[];for(var r in Object(t))w.call(t,r)&&r!="constructor"&&e.push(r);return e}function Dn(t,e,r,n,i,o){var a=r&Mt,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var g=-1,_=!0,p=r&un?new Ht:void 0;for(o.set(t,e),o.set(e,t);++g<s;){var f=t[g],y=e[g];if(n)var h=a?n(y,f,g,e,t,o):n(f,y,g,t,e,o);if(h!==void 0){if(h)continue;_=!1;break}if(p){if(!sf(e,function(T,k){if(!uf(p,k)&&(f===T||i(f,T,r,n,o)))return p.push(k)})){_=!1;break}}else if(!(f===y||i(f,y,r,n,o))){_=!1;break}}return o.delete(t),o.delete(e),_}function tc(t,e,r,n,i,o,a){switch(r){case kt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case mn:return!(t.byteLength!=e.byteLength||!o(new Pn(t),new Pn(e)));case pn:case hn:case dn:return Hn(+t,+e);case yn:return t.name==e.name&&t.message==e.message;case _n:case vn:return t==e+"";case Ft:var s=pf;case $t:var u=n&Mt;if(s||(s=yf),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;n|=un,a.set(t,e);var g=Dn(s(t),s(e),n,i,o,a);return a.delete(t),g;case Bs:if(Me)return Me.call(t)==Me.call(e)}return!1}function ec(t,e,r,n,i,o){var a=r&Mt,s=Rn(t),u=s.length,c=Rn(e),g=c.length;if(u!=g&&!a)return!1;for(var _=u;_--;){var p=s[_];if(!(a?p in e:w.call(e,p)))return!1}var f=o.get(t);if(f&&o.get(e))return f==e;var y=!0;o.set(t,e),o.set(e,t);for(var h=a;++_<u;){p=s[_];var T=t[p],k=e[p];if(n)var He=a?n(k,T,p,e,t,o):n(T,k,p,t,e,o);if(!(He===void 0?T===k||i(T,k,r,n,o):He)){y=!1;break}h||(h=p=="constructor")}if(y&&!h){var gt=t.constructor,dt=e.constructor;gt!=dt&&"constructor"in t&&"constructor"in e&&!(typeof gt=="function"&> instanceof gt&&typeof dt=="function"&&dt instanceof dt)&&(y=!1)}return o.delete(t),o.delete(e),y}function Rn(t){return Xf(t,pc,nc)}function Lt(t,e){var r=t.__data__;return ac(e)?r[typeof e=="string"?"string":"hash"]:r.map}function tt(t,e){var r=lf(t,e);return Vf(r)?r:void 0}function rc(t){var e=w.call(t,G),r=t[G];try{t[G]=void 0;var n=!0}catch(o){}var i=En.call(t);return n&&(e?t[G]=r:delete t[G]),i}var nc=Nn?function(t){return t==null?[]:(t=Object(t),af(Nn(t),function(e){return Mn.call(t,e)}))}:hc,F=pt;(Ce&&F(new Ce(new ArrayBuffer(1)))!=kt||ut&&F(new ut)!=Ft||Ee&&F(Ee.resolve())!=bn||Ie&&F(new Ie)!=$t||Pe&&F(new Pe)!=we)&&(F=function(t){var e=pt(t),r=e==Q?t.constructor:void 0,n=r?q(r):"";if(n)switch(n){case Tf:return kt;case Af:return Ft;case jf:return bn;case Of:return $t;case wf:return we}return e});function ic(t,e){return e=e==null?ln:e,!!e&&(typeof t=="number"||rf.test(t))&&t>-1&&t%1==0&&t<e}function ac(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function oc(t){return!!Cn&&Cn in t}function sc(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Dt;return t===r}function fc(t){return En.call(t)}function q(t){if(t!=null){try{return xn.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Hn(t,e){return t===e||t!==t&&e!==e}var cc=$n(function(){return arguments}())?$n:function(t){return ht(t)&&w.call(t,"callee")&&!Mn.call(t,"callee")},Gt=Array.isArray;function uc(t){return t!=null&&Ln(t.length)&&!Kn(t)}var Ne=vf||yc;function lc(t,e){return kn(t,e)}function Kn(t){if(!Gn(t))return!1;var e=pt(t);return e==gn||e==Ks||e==Hs||e==Gs}function Ln(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ln}function Gn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ht(t){return t!=null&&typeof t=="object"}var Bn=Sn?cf(Sn):Zf;function pc(t){return uc(t)?Wf(t):Qf(t)}function hc(){return[]}function yc(){return!1}et.exports=lc});var mc={};Qn(mc,{fillMissing:()=>vc,version:()=>dc});var Ut=A(oe(),1);var l=A(oe(),1),an=A(Dr(),1),on=A(Ur(),1),O=A(st(),1),ct=A(Qr(),1),ve=A(en(),1);var rn=A(st(),1);function j(t){return t==null?!1:Array.isArray(t)||typeof t=="string"?!!t.length:(0,rn.default)(t)?!!Object.keys(t).length:typeof t=="number"}function be(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var _e=new Map,nn=(t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter(r=>{if(typeof r!="string"){if(typeof r=="undefined")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},Ms=(t,e)=>{e=m({caseSensitive:!1},e);let r=t+JSON.stringify(e);if(_e.has(r))return _e.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=be(t).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return i.negated=n,_e.set(r,i),i},Ns=(t,e,r,n)=>{if(t=nn(t,"inputs"),e=nn(e,"patterns"),e.length===0)return[];e=e.map(a=>Ms(a,r));let{allPatterns:i}=r||{},o=[];for(let a of t){let s,u=[...e].fill(!1);for(let[c,g]of e.entries())if(g.test(a)&&(u[c]=!0,s=!g.negated,!s))break;if(!(s===!1||s===void 0&&e.some(c=>!c.negated)||i&&u.some((c,g)=>!c&&!e[g].negated))&&(o.push(a),n))break}return o};function Pt(t,e,r){return Ns(t,e,r,!0).length>0}var Fs={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function me(t,e,r){if(!t.length||!e.length)return!1;let n=m(m({},Fs),r),i=typeof t=="string"?[t]:Array.from(t);return typeof e=="string"?i.some(o=>Pt(o,e,{caseSensitive:n.caseSensitive})):n.arrayVsArrayAllMustBeFound==="any"?e.some(o=>i.some(a=>Pt(a,o,{caseSensitive:n.caseSensitive}))):e.every(o=>i.some(a=>Pt(a,o,{caseSensitive:n.caseSensitive})))}function Te(t){return typeof t=="string"}function $s(t){return typeof t=="number"}function Ae(t){return typeof t=="boolean"}var P=Array.isArray;function sn(t){return!!t&&t.some(e=>typeof e=="string")}function ks(t,e){return Object.keys(t).length===0||Object.keys(e).length===0||Object.keys(t).every(r=>Object.keys(e).includes(r))||Object.keys(e).every(r=>Object.keys(t).includes(r))}function v(t){return t===null?"null":(0,ct.default)(t)?"date":(0,O.default)(t)?"object":P(t)?"array":typeof t}var Ds={cb:null,mergeObjectsOnlyWhenKeysetMatches:!0,ignoreKeys:[],hardMergeKeys:[],hardArrayConcatKeys:[],mergeArraysContainingStringsToBeEmpty:!1,oneToManyArrayObjectMerge:!1,hardMergeEverything:!1,hardArrayConcat:!1,ignoreEverything:!1,concatInsteadOfMerging:!0,dedupeStringsInArrayValues:!1,mergeBoolsUsingOrNotAnd:!0,useNullAsExplicitFalse:!1};function M(t,e,r,n){var _;let i=m(m({},Ds),n);typeof i.ignoreKeys=="string"&&(i.ignoreKeys=[i.ignoreKeys]),typeof i.hardMergeKeys=="string"&&(i.hardMergeKeys=[i.hardMergeKeys]),i.hardMergeKeys.includes("*")&&(i.hardMergeEverything=!0),i.ignoreKeys.includes("*")&&(i.ignoreEverything=!0);let o;if(i.useNullAsExplicitFalse&&(e===null||r===null))return typeof i.cb=="function"?i.cb(e,r,null,{path:t.path,key:t.key,type:t.type}):null;let a=P(e)||(0,O.default)(e)?(0,l.default)(e):e,s=P(r)||(0,O.default)(r)?(0,l.default)(r):r,u;i.ignoreEverything?u=a:i.hardMergeEverything&&(u=s);let c=i.hardMergeEverything||i.ignoreEverything;if(P(a))if(j(a))if(P(s)&&j(s)){if(i.mergeArraysContainingStringsToBeEmpty&&(sn(a)||sn(s))){let f=c?u:[];return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:o,key:t.key,type:t.type}):f}if(i.hardArrayConcat){let f=c?u:a.concat(s);return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:o,key:t.key,type:t.type}):f}let p=[];for(let f=0,y=Math.max(a.length,s.length);f<y;f++)o=((_=t.path)==null?void 0:_.length)?`${t.path}.${f}`:`${f}`,(0,O.default)(a[f])&&(0,O.default)(s[f])&&(i.mergeObjectsOnlyWhenKeysetMatches&&ks(a[f],s[f])||!i.mergeObjectsOnlyWhenKeysetMatches)?p.push(M({path:o,key:t.key,type:[v(a),v(s)]},a[f],s[f],i)):i.oneToManyArrayObjectMerge&&(a.length===1||s.length===1)?p.push(a.length===1?M({path:o,key:t.key,type:[v(a),v(s)]},a[0],s[f],i):M({path:o,key:t.key,type:[v(a),v(s)]},a[f],s[0],i)):i.concatInsteadOfMerging?(f<a.length&&p.push(a[f]),f<s.length&&p.push(s[f])):(f<a.length&&p.push(a[f]),f<s.length&&!(0,an.default)(a,s[f])&&p.push(s[f]));i.dedupeStringsInArrayValues&&p.every(f=>Te(f))&&(p=(0,on.default)(p).sort()),a=(0,l.default)(p)}else{let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:o,key:t.key,type:t.type}):p}else{if(j(s)){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:o,key:t.key,type:t.type}):f}let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:o,key:t.key,type:t.type}):p}else if((0,O.default)(a)){if(j(a)){if(P(s)){if(j(s)){let h=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),h,{path:o,key:t.key,type:t.type}):h}let y=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),y,{path:o,key:t.key,type:t.type}):y}if((0,O.default)(s)){Object.keys(s).forEach(h=>{var T;o=((T=t.path)==null?void 0:T.length)?`${t.path}.${h}`:`${h}`,a.hasOwnProperty(h)?me(h,i.ignoreKeys)?a[h]=M({path:o,key:h,type:[v(a),v(s)]},a[h],s[h],bt(m({},i),{ignoreEverything:!0})):me(h,i.hardMergeKeys)?a[h]=M({path:o,key:h,type:[v(a),v(s)]},a[h],s[h],bt(m({},i),{hardMergeEverything:!0})):me(h,i.hardArrayConcatKeys)?a[h]=M({path:o,key:h,type:[v(a),v(s)]},a[h],s[h],bt(m({},i),{hardArrayConcat:!0})):a[h]=M({path:o,key:h,type:[v(a[h]),v(s[h])]},a[h],s[h],i):a[h]=s[h]});let y=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),y,{path:t.path,key:t.key,type:t.type}):a}let f=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}if(P(s)||(0,O.default)(s)||j(s)){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}else if((0,ct.default)(a)){if((0,ve.default)(+a)){if((0,ct.default)(s)){if((0,ve.default)(+s)){let h=c?u:a>s?a:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),h,{path:t.path,key:t.key,type:t.type}):h}let y=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),y,{path:t.path,key:t.key,type:t.type}):y}let f=c?u:s||a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}if((0,ct.default)(s)){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}let p=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}else if(Te(a)){if(j(a)){if((P(s)||(0,O.default)(s)||Te(s))&&j(s)){let y=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),y,{path:t.path,key:t.key,type:t.type}):y}let f=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}if(s!=null&&!Ae(s)){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}else if($s(a)){if(j(s)){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}else if(Ae(a)){if(Ae(s)){if(i.mergeBoolsUsingOrNotAnd){let y=c?u:a||s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),y,{path:t.path,key:t.key,type:t.type}):y}let f=c?u:a&&s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}if(s!=null){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}else if(a===null){if(s!=null){let f=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),f,{path:t.path,key:t.key,type:t.type}):f}let p=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}else{let p=c?u:s;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),p,{path:t.path,key:t.key,type:t.type}):p}let g=c?u:a;return typeof i.cb=="function"?i.cb((0,l.default)(e),(0,l.default)(r),g,{path:t.path,key:t.key,type:t.type}):g}function fn(t,e,r){if(!arguments.length)throw new TypeError("object-merge-advanced/mergeAdvanced(): [THROW_ID_01] Both inputs are missing");return M({key:null,path:"",type:[v(t),v(e)]},t,e,r)}function cn(t){return typeof t=="string"?t.length?[t]:[]:t}var Fe=A(st(),1),$e=A(Un(),1);function ke(t,e,r){if(Array.isArray(t)){if(t.length===0)return!0;if(r.arraysMustNotContainPlaceholders&&t.length>0&&t.some(n=>(0,$e.default)(n,e)))return!1;for(let n=t.length;n--;)if(!ke(t[n],e,r))return!1;return!0}if((0,Fe.default)(t)){let n=Object.keys(t);if(n.length===0)return!0;for(let i=n.length;i--;)if(!ke(t[n[i]],e,r))return!1;return!0}return(0,$e.default)(t,e)}function Bt(t,e,r){if(t===void 0)throw new Error("object-all-values-equal-to: [THROW_ID_01] The first input is undefined! Please provide the first argument.");if(e===void 0)throw new Error("object-all-values-equal-to: [THROW_ID_02] The second input is undefined! Please provide the second argument.");if(r&&!(0,Fe.default)(r))throw new Error(`object-all-values-equal-to: [THROW_ID_03] The third argument, options object, was given not as a plain object but as a ${typeof r}, equal to:
|
|
11
|
+
${JSON.stringify(r,null,4)}`);let n=m({arraysMustNotContainPlaceholders:!0},r);return ke(t,e,n)}var $=A(st(),1);var qn="9.0.11";var dc=qn,bc={placeholder:!1,doNotFillThesePathsIfTheyContainPlaceholders:[],useNullAsExplicitFalse:!0};function qt(t){return(0,$.default)(t)?"plain object":Array.isArray(t)?"array":typeof t}function _c(t){return typeof t=="string"}function De(t){return t!=null}function Re(t,e,r,n=""){let i=(0,Ut.default)(t);if(De(i)||!(n.length&&r.doNotFillThesePathsIfTheyContainPlaceholders.includes(n)&&Bt(i,r.placeholder)))if((0,$.default)(e)&&(0,$.default)(i))Object.keys(e).forEach(o=>{let a=`${n?`${n}.`:""}${o}`;r.doNotFillThesePathsIfTheyContainPlaceholders.includes(a)&&(De(i[o])?Bt(i[o],r.placeholder)&&(i[o]=r.placeholder):i[o]=r.placeholder),(!De(i[o])||!(r.doNotFillThesePathsIfTheyContainPlaceholders.includes(a)&&Bt(i[o],r.placeholder)))&&(i[o]=Re(i[o],e[o],r,a))});else if(Array.isArray(e)&&Array.isArray(i)){if(i.length===0)return e;if(e.length>0)for(let o=i.length;o--;){let a=`${n?`${n}.`:""}0`;((0,$.default)(e[0])||Array.isArray(e[0]))&&(i[o]=Re(i[o],e[0],r,a))}}else return fn(e,i,{useNullAsExplicitFalse:r.useNullAsExplicitFalse});return i}function vc(t,e,r){if(arguments.length===0)throw new Error("object-fill-missing-keys: [THROW_ID_01] All arguments are missing!");if(!(0,$.default)(t))throw new Error(`object-fill-missing-keys: [THROW_ID_02] First argument, input object must be a plain object. Currently it's type is "${qt(t)}" and it's equal to: ${JSON.stringify(t,null,4)}`);if(!(0,$.default)(e))throw new Error(`object-fill-missing-keys: [THROW_ID_03] Second argument, schema object, must be a plain object. Currently it's type is "${qt(e)}" and it's equal to: ${JSON.stringify(e,null,4)}`);if(r&&!(0,$.default)(r))throw new Error(`object-fill-missing-keys: [THROW_ID_04] Third argument, schema object, must be a plain object. Currently it's type is "${qt(r)}" and it's equal to: ${JSON.stringify(r,null,4)}`);let n=m(m({},bc),r||{});n.doNotFillThesePathsIfTheyContainPlaceholders=cn(n.doNotFillThesePathsIfTheyContainPlaceholders);let i=null,o=null;if(n.doNotFillThesePathsIfTheyContainPlaceholders.length>0&&!n.doNotFillThesePathsIfTheyContainPlaceholders.every((a,s)=>_c(a)?!0:(i=a,o=s,!1)))throw new Error(`object-fill-missing-keys: [THROW_ID_06] opts.doNotFillThesePathsIfTheyContainPlaceholders element with an index number "${o}" is not a string! It's ${qt(i)}, equal to:
|
|
12
|
+
${JSON.stringify(i,null,4)}`);return Re((0,Ut.default)(t),(0,Ut.default)(e),n)}return ti(mc);})();
|
|
27
13
|
/**
|
|
28
14
|
* @name arrayiffy-if-string
|
|
29
15
|
* @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
|
|
30
|
-
* @version 4.0.
|
|
16
|
+
* @version 4.0.11
|
|
31
17
|
* @author Roy Revelt, Codsen Ltd
|
|
32
18
|
* @license MIT
|
|
33
19
|
* {@link https://codsen.com/os/arrayiffy-if-string/}
|
|
34
20
|
*/
|
|
35
|
-
function Ut(t){return"string"==typeof t?t.length?[t]:[]:t}var Ht={exports:{}};!function(t,r){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",c="[object Boolean]",u="[object Date]",s="[object Error]",f="[object Function]",l="[object Map]",p="[object Number]",y="[object Object]",h="[object Promise]",b="[object RegExp]",_="[object Set]",g="[object String]",d="[object Symbol]",v="[object WeakMap]",j="[object ArrayBuffer]",O="[object DataView]",k=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[i]=m[a]=m[j]=m[c]=m[O]=m[u]=m[s]=m[f]=m[l]=m[p]=m[y]=m[b]=m[_]=m[g]=m[v]=!1;var A="object"==typeof e&&e&&e.Object===Object&&e,S="object"==typeof self&&self&&self.Object===Object&&self,$=A||S||Function("return this")(),T=r&&!r.nodeType&&r,E=T&&t&&!t.nodeType&&t,x=E&&E.exports===T,P=x&&A.process,F=function(){try{return P&&P.binding&&P.binding("util")}catch(t){}}(),M=F&&F.isTypedArray;function I(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function N(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function z(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var C=Array.prototype,K=Object.prototype,R=$["__core-js_shared__"],B=Function.prototype.toString,D=K.hasOwnProperty,W=function(){var t=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),U=K.toString,H=RegExp("^"+B.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=x?$.Buffer:void 0,V=$.Symbol,L=$.Uint8Array,J=K.propertyIsEnumerable,G=C.splice,Q=V?V.toStringTag:void 0,X=Object.getOwnPropertySymbols,Y=q?q.isBuffer:void 0,Z=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),tt=Tt($,"DataView"),et=Tt($,"Map"),rt=Tt($,"Promise"),nt=Tt($,"Set"),ot=Tt($,"WeakMap"),it=Tt(Object,"create"),at=Ft(tt),ct=Ft(et),ut=Ft(rt),st=Ft(nt),ft=Ft(ot),lt=V?V.prototype:void 0,pt=lt?lt.valueOf:void 0;function yt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ht(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function bt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function _t(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new bt;++e<r;)this.add(t[e])}function gt(t){var e=this.__data__=new ht(t);this.size=e.size}function dt(t,e){var r=Nt(t),n=!r&&It(t),o=!r&&!n&&zt(t),i=!r&&!n&&!o&&Dt(t),a=r||n||o||i,c=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],u=c.length;for(var s in t)!e&&!D.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Pt(s,u))||c.push(s);return c}function vt(t,e){for(var r=t.length;r--;)if(Mt(t[r][0],e))return r;return-1}function jt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Q&&Q in Object(t)?function(t){var e=D.call(t,Q),r=t[Q];try{t[Q]=void 0;var n=!0}catch(t){}var o=U.call(t);n&&(e?t[Q]=r:delete t[Q]);return o}(t):function(t){return U.call(t)}(t)}function Ot(t){return Bt(t)&&jt(t)==i}function kt(t,e,r,n,o){return t===e||(null==t||null==e||!Bt(t)&&!Bt(e)?t!=t&&e!=e:function(t,e,r,n,o,f){var h=Nt(t),v=Nt(e),k=h?a:xt(t),w=v?a:xt(e),m=(k=k==i?y:k)==y,A=(w=w==i?y:w)==y,S=k==w;if(S&&zt(t)){if(!zt(e))return!1;h=!0,m=!1}if(S&&!m)return f||(f=new gt),h||Dt(t)?At(t,e,r,n,o,f):function(t,e,r,n,o,i,a){switch(r){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case j:return!(t.byteLength!=e.byteLength||!i(new L(t),new L(e)));case c:case u:case p:return Mt(+t,+e);case s:return t.name==e.name&&t.message==e.message;case b:case g:return t==e+"";case l:var f=N;case _:if(f||(f=z),t.size!=e.size&&!(1&n))return!1;var y=a.get(t);if(y)return y==e;n|=2,a.set(t,e);var h=At(f(t),f(e),n,o,i,a);return a.delete(t),h;case d:if(pt)return pt.call(t)==pt.call(e)}return!1}(t,e,k,r,n,o,f);if(!(1&r)){var $=m&&D.call(t,"__wrapped__"),T=A&&D.call(e,"__wrapped__");if($||T){var E=$?t.value():t,x=T?e.value():e;return f||(f=new gt),o(E,x,r,n,f)}}if(!S)return!1;return f||(f=new gt),function(t,e,r,n,o,i){var a=1&r,c=St(t),u=c.length,s=St(e);if(u!=s.length&&!a)return!1;var f=u;for(;f--;){var l=c[f];if(!(a?l in e:D.call(e,l)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var y=!0;i.set(t,e),i.set(e,t);var h=a;for(;++f<u;){var b=t[l=c[f]],_=e[l];if(n)var g=a?n(_,b,l,e,t,i):n(b,_,l,t,e,i);if(!(void 0===g?b===_||o(b,_,r,n,i):g)){y=!1;break}h||(h="constructor"==l)}if(y&&!h){var d=t.constructor,v=e.constructor;d==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof d&&d instanceof d&&"function"==typeof v&&v instanceof v||(y=!1)}return i.delete(t),i.delete(e),y}(t,e,r,n,o,f)}(t,e,r,n,kt,o))}function wt(t){return!(!Rt(t)||function(t){return!!W&&W in t}(t))&&(Ct(t)?H:k).test(Ft(t))}function mt(t){if((e=t)!==("function"==typeof(r=e&&e.constructor)&&r.prototype||K))return Z(t);var e,r,n=[];for(var o in Object(t))D.call(t,o)&&"constructor"!=o&&n.push(o);return n}function At(t,e,r,n,o,i){var a=1&r,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var f=-1,l=!0,p=2&r?new _t:void 0;for(i.set(t,e),i.set(e,t);++f<c;){var y=t[f],h=e[f];if(n)var b=a?n(h,y,f,e,t,i):n(y,h,f,t,e,i);if(void 0!==b){if(b)continue;l=!1;break}if(p){if(!I(e,(function(t,e){if(!p.has(e)&&(y===t||o(y,t,r,n,i)))return p.push(e)}))){l=!1;break}}else if(y!==h&&!o(y,h,r,n,i)){l=!1;break}}return i.delete(t),i.delete(e),l}function St(t){return function(t,e,r){var n=e(t);return Nt(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Wt,Et)}function $t(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Tt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return wt(r)?r:void 0}yt.prototype.clear=function(){this.__data__=it?it(null):{},this.size=0},yt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},yt.prototype.get=function(t){var e=this.__data__;if(it){var r=e[t];return r===n?void 0:r}return D.call(e,t)?e[t]:void 0},yt.prototype.has=function(t){var e=this.__data__;return it?void 0!==e[t]:D.call(e,t)},yt.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=it&&void 0===e?n:e,this},ht.prototype.clear=function(){this.__data__=[],this.size=0},ht.prototype.delete=function(t){var e=this.__data__,r=vt(e,t);return!(r<0)&&(r==e.length-1?e.pop():G.call(e,r,1),--this.size,!0)},ht.prototype.get=function(t){var e=this.__data__,r=vt(e,t);return r<0?void 0:e[r][1]},ht.prototype.has=function(t){return vt(this.__data__,t)>-1},ht.prototype.set=function(t,e){var r=this.__data__,n=vt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},bt.prototype.clear=function(){this.size=0,this.__data__={hash:new yt,map:new(et||ht),string:new yt}},bt.prototype.delete=function(t){var e=$t(this,t).delete(t);return this.size-=e?1:0,e},bt.prototype.get=function(t){return $t(this,t).get(t)},bt.prototype.has=function(t){return $t(this,t).has(t)},bt.prototype.set=function(t,e){var r=$t(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},_t.prototype.add=_t.prototype.push=function(t){return this.__data__.set(t,n),this},_t.prototype.has=function(t){return this.__data__.has(t)},gt.prototype.clear=function(){this.__data__=new ht,this.size=0},gt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},gt.prototype.get=function(t){return this.__data__.get(t)},gt.prototype.has=function(t){return this.__data__.has(t)},gt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof ht){var n=r.__data__;if(!et||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bt(n)}return r.set(t,e),this.size=r.size,this};var Et=X?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}(X(t),(function(e){return J.call(t,e)})))}:function(){return[]},xt=jt;function Pt(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||w.test(t))&&t>-1&&t%1==0&&t<e}function Ft(t){if(null!=t){try{return B.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Mt(t,e){return t===e||t!=t&&e!=e}(tt&&xt(new tt(new ArrayBuffer(1)))!=O||et&&xt(new et)!=l||rt&&xt(rt.resolve())!=h||nt&&xt(new nt)!=_||ot&&xt(new ot)!=v)&&(xt=function(t){var e=jt(t),r=e==y?t.constructor:void 0,n=r?Ft(r):"";if(n)switch(n){case at:return O;case ct:return l;case ut:return h;case st:return _;case ft:return v}return e});var It=Ot(function(){return arguments}())?Ot:function(t){return Bt(t)&&D.call(t,"callee")&&!J.call(t,"callee")},Nt=Array.isArray;var zt=Y||function(){return!1};function Ct(t){if(!Rt(t))return!1;var e=jt(t);return e==f||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Kt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function Rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Bt(t){return null!=t&&"object"==typeof t}var Dt=M?function(t){return function(e){return t(e)}}(M):function(t){return Bt(t)&&Kt(t.length)&&!!m[jt(t)]};function Wt(t){return null!=(e=t)&&Kt(e.length)&&!Ct(e)?dt(t):mt(t);var e}t.exports=function(t,e){return kt(t,e)}}(Ht,Ht.exports);var qt=Ht.exports;
|
|
36
21
|
/**
|
|
37
22
|
* @name object-all-values-equal-to
|
|
38
23
|
* @fileoverview Does the AST/nested-plain-object/array/whatever contain only one kind of value?
|
|
39
|
-
* @version 3.0.
|
|
24
|
+
* @version 3.0.11
|
|
40
25
|
* @author Roy Revelt, Codsen Ltd
|
|
41
26
|
* @license MIT
|
|
42
27
|
* {@link https://codsen.com/os/object-all-values-equal-to/}
|
|
43
|
-
*/
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @name object-merge-advanced
|
|
31
|
+
* @fileoverview Recursively, deeply merge of anything (objects, arrays, strings or nested thereof), which weighs contents by type hierarchy to ensure the maximum content is retained
|
|
32
|
+
* @version 13.0.11
|
|
33
|
+
* @author Roy Revelt, Codsen Ltd
|
|
34
|
+
* @license MIT
|
|
35
|
+
* {@link https://codsen.com/os/object-merge-advanced/}
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* @name util-nonempty
|
|
39
|
+
* @fileoverview Is the input (plain object, array, string or whatever) not empty?
|
|
40
|
+
* @version 4.0.11
|
|
41
|
+
* @author Roy Revelt, Codsen Ltd
|
|
42
|
+
* @license MIT
|
|
43
|
+
* {@link https://codsen.com/os/util-nonempty/}
|
|
44
|
+
*/
|
package/examples/_quickTake.js
CHANGED
package/examples/do-not-fill.js
CHANGED
package/examples/truncation.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "object-fill-missing-keys",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.11",
|
|
4
4
|
"description": "Add missing keys into plain objects, according to a reference object",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"add",
|
|
@@ -37,103 +37,47 @@
|
|
|
37
37
|
},
|
|
38
38
|
"types": "types/index.d.ts",
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"tap": "tap",
|
|
55
|
-
"pretest": "npm run build",
|
|
56
|
-
"test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
|
|
57
|
-
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
58
|
-
"tsc": "tsc",
|
|
59
|
-
"unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
|
|
40
|
+
"build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
41
|
+
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
42
|
+
"dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
|
|
43
|
+
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
44
|
+
"lect": "node '../../ops/lect/lect.js'",
|
|
45
|
+
"letspublish": "yarn publish || :",
|
|
46
|
+
"lint": "eslint . --fix",
|
|
47
|
+
"perf": "node perf/check.js",
|
|
48
|
+
"prepare": "echo 'ready'",
|
|
49
|
+
"prettier": "prettier",
|
|
50
|
+
"prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
|
|
51
|
+
"pretest": "yarn run lect && yarn run build",
|
|
52
|
+
"test": "c8 yarn run unit && yarn run examples && yarn run lint",
|
|
53
|
+
"unit": "uvu test"
|
|
60
54
|
},
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"--no-warnings",
|
|
69
|
-
"--experimental-loader",
|
|
70
|
-
"@istanbuljs/esm-loader-hook"
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
57
|
+
},
|
|
58
|
+
"c8": {
|
|
59
|
+
"check-coverage": true,
|
|
60
|
+
"exclude": [
|
|
61
|
+
"**/test/**/*.*"
|
|
71
62
|
],
|
|
72
|
-
"
|
|
63
|
+
"lines": 100
|
|
73
64
|
},
|
|
74
65
|
"lect": {
|
|
75
66
|
"licence": {
|
|
76
67
|
"extras": [
|
|
77
68
|
""
|
|
78
69
|
]
|
|
79
|
-
},
|
|
80
|
-
"req": "{ fillMissing }",
|
|
81
|
-
"various": {
|
|
82
|
-
"devDependencies": [
|
|
83
|
-
"@types/lodash.clonedeep",
|
|
84
|
-
"@types/lodash.isplainobject"
|
|
85
|
-
]
|
|
86
70
|
}
|
|
87
71
|
},
|
|
88
72
|
"dependencies": {
|
|
89
|
-
"
|
|
90
|
-
"arrayiffy-if-string": "^4.0.5",
|
|
73
|
+
"arrayiffy-if-string": "^4.0.11",
|
|
91
74
|
"lodash.clonedeep": "^4.5.0",
|
|
92
75
|
"lodash.isplainobject": "^4.0.6",
|
|
93
|
-
"object-all-values-equal-to": "^3.0.
|
|
94
|
-
"object-merge-advanced": "^13.0.
|
|
76
|
+
"object-all-values-equal-to": "^3.0.11",
|
|
77
|
+
"object-merge-advanced": "^13.0.11"
|
|
95
78
|
},
|
|
96
79
|
"devDependencies": {
|
|
97
|
-
"@babel/cli": "^7.16.0",
|
|
98
|
-
"@babel/core": "^7.16.0",
|
|
99
|
-
"@babel/node": "^7.16.0",
|
|
100
|
-
"@babel/plugin-external-helpers": "^7.16.0",
|
|
101
|
-
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
102
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
103
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
|
104
|
-
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
105
|
-
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
106
|
-
"@babel/preset-env": "^7.16.0",
|
|
107
|
-
"@babel/preset-typescript": "^7.16.0",
|
|
108
|
-
"@babel/register": "^7.16.0",
|
|
109
|
-
"@istanbuljs/esm-loader-hook": "^0.1.2",
|
|
110
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
111
|
-
"@rollup/plugin-commonjs": "^21.0.1",
|
|
112
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
113
|
-
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
114
|
-
"@rollup/plugin-strip": "^2.1.0",
|
|
115
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
116
80
|
"@types/lodash.clonedeep": "^4.5.6",
|
|
117
|
-
"@types/lodash.isplainobject": "^4.0.6"
|
|
118
|
-
"@types/node": "^16.11.6",
|
|
119
|
-
"@types/tap": "^15.0.5",
|
|
120
|
-
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
|
121
|
-
"@typescript-eslint/parser": "^5.3.0",
|
|
122
|
-
"core-js": "^3.19.1",
|
|
123
|
-
"cross-env": "^7.0.3",
|
|
124
|
-
"eslint": "^8.2.0",
|
|
125
|
-
"lect": "^0.18.5",
|
|
126
|
-
"rollup": "^2.59.0",
|
|
127
|
-
"rollup-plugin-ascii": "^0.0.3",
|
|
128
|
-
"rollup-plugin-banner": "^0.2.1",
|
|
129
|
-
"rollup-plugin-cleanup": "^3.2.1",
|
|
130
|
-
"rollup-plugin-dts": "^4.0.1",
|
|
131
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
132
|
-
"tap": "^15.0.10",
|
|
133
|
-
"tslib": "^2.3.1",
|
|
134
|
-
"typescript": "^4.4.4"
|
|
135
|
-
},
|
|
136
|
-
"engines": {
|
|
137
|
-
"node": ">=12"
|
|
81
|
+
"@types/lodash.isplainobject": "^4.0.6"
|
|
138
82
|
}
|
|
139
83
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
declare const version: string;
|
|
2
2
|
interface Obj {
|
|
3
|
-
|
|
3
|
+
[key: string]: any;
|
|
4
4
|
}
|
|
5
5
|
interface Opts {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
placeholder: boolean;
|
|
7
|
+
doNotFillThesePathsIfTheyContainPlaceholders: string[];
|
|
8
|
+
useNullAsExplicitFalse: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare function fillMissing(
|
|
10
|
+
declare function fillMissing(
|
|
11
|
+
originalIncompleteWrapper: Obj,
|
|
12
|
+
originalSchemaWrapper: Obj,
|
|
13
|
+
originalOptsWrapper?: Opts
|
|
14
|
+
): Obj;
|
|
11
15
|
|
|
12
16
|
export { fillMissing, version };
|
package/examples/api.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport { fillMissing } from \"object-fill-missing-keys\";\n\n// deleting key 'c', with value 'd'\nassert.deepEqual(\n fillMissing(\n {\n // input object that could have came from JSON\n b: \"b\",\n },\n {\n // schema reference object\n a: false,\n b: false,\n c: false,\n }\n ),\n {\n // patched result\n a: false,\n b: \"b\",\n c: false,\n }\n);"},"do-not-fill.js":{"title":"An option to not fill the paths if they contain placeholders","content":"import { strict as assert } from \"assert\";\nimport { fillMissing } from \"object-fill-missing-keys\";\n\nassert.deepEqual(\n fillMissing(\n {\n // input object\n a: {\n b: false, // <---- we don't want to automatically normalise this key\n x: \"x\",\n },\n z: \"z\",\n },\n {\n // reference schema object\n a: {\n b: {\n c: false,\n d: false,\n },\n x: false,\n },\n z: false,\n },\n {\n doNotFillThesePathsIfTheyContainPlaceholders: [\"a.b\"],\n }\n ),\n {\n a: {\n b: false, // <---\n x: \"x\",\n },\n z: \"z\",\n }\n);"},"truncation.js":{"title":"Truncation upon request, to minimize the object footprint","content":"import { strict as assert } from \"assert\";\nimport { fillMissing } from \"object-fill-missing-keys\";\n\nassert.deepEqual(\n fillMissing(\n {\n // input object\n a: {\n b: {\n // this object in \"b\"'s value will be removed and set to placeholder \"false\"\n c: false,\n d: false,\n },\n x: {\n // this too\n y: false,\n },\n },\n z: \"z\",\n },\n {\n // schema object\n a: {\n b: {\n c: false,\n d: false,\n },\n x: false,\n },\n z: false,\n },\n {\n // settings\n doNotFillThesePathsIfTheyContainPlaceholders: [\"lalala\", \"a.b\", \"a.x\"],\n }\n ),\n {\n // result\n a: {\n b: false,\n x: false,\n },\n z: \"z\",\n }\n);"},"useNullAsExplicitFalse.js":{"title":"`opts.useNullAsExplicitFalse`","content":"import { strict as assert } from \"assert\";\nimport { fillMissing } from \"object-fill-missing-keys\";\n\n// on\nassert.deepEqual(\n fillMissing(\n {\n // object we're working on\n a: null,\n },\n {\n // reference schema\n a: [\"z\"],\n },\n {\n // options\n useNullAsExplicitFalse: true, // <--- !\n }\n ),\n {\n // result\n a: null,\n }\n);\n\n// off\nassert.deepEqual(\n fillMissing(\n {\n // object we're working on\n a: null,\n },\n {\n // reference schema\n a: [\"z\"],\n },\n {\n // options\n useNullAsExplicitFalse: false, // <--- !\n }\n ),\n {\n // result\n a: [\"z\"],\n }\n);"},"using-placeholder-true.js":{"title":"Using placeholder to cause the value population","content":"import { strict as assert } from \"assert\";\nimport { fillMissing } from \"object-fill-missing-keys\";\n\nassert.deepEqual(\n fillMissing(\n {\n // object we work upon\n a: {\n b: true, // <-- not placeholder but lower in data hierarchy (boolean)\n x: \"x\",\n },\n z: \"z\",\n },\n {\n // reference (schema) object\n a: {\n b: {\n c: false,\n d: false,\n },\n x: false,\n },\n z: false,\n },\n {\n doNotFillThesePathsIfTheyContainPlaceholders: [\"a.b\"],\n }\n ),\n {\n a: {\n b: {\n c: false, // <---- values added!\n d: false, // <---- values added!\n },\n x: \"x\",\n },\n z: \"z\",\n }\n);"}}
|