check-types-mini 8.0.10 → 8.0.12

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.
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name check-types-mini
3
3
  * @fileoverview Validate options object
4
- * @version 8.0.10
4
+ * @version 8.0.12
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/check-types-mini/}
8
8
  */
9
9
 
10
- import i from"type-detect";import{traverse as w}from"ast-monkey-traverse";import k from"lodash.intersection";import{arrayiffy as N}from"arrayiffy-if-string";import E from"object-path";import{isMatch as S}from"matcher";import{isPlainObject as m,pullAll as h}from"codsen-utils";var j="8.0.10";var M=j,v={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function T(a,r,p){function y(s){return s!=null}function b(s,l){return typeof l=="string"&&(l=N(l)),Array.from(s).filter(n=>!l.some(t=>S(n,t,{caseSensitive:!0})))}let V=Object.prototype.hasOwnProperty,D=["any","anything","every","everything","all","whatever","whatevs"];if(!y(a))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let e={...v,...p};if(typeof e.ignoreKeys=="string"&&(e.ignoreKeys=[e.ignoreKeys]),typeof e.ignorePaths=="string"&&(e.ignorePaths=[e.ignorePaths]),typeof e.acceptArraysIgnore=="string"&&(e.acceptArraysIgnore=[e.acceptArraysIgnore]),e.msg=`${e.msg}`.trim(),e.msg[e.msg.length-1]===":"&&(e.msg=e.msg.slice(0,e.msg.length-1).trim()),m(e.schema))Object.keys(e.schema).forEach(s=>{if(m(e.schema[s])){let l={};w(e.schema[s],(n,t,$)=>{let u=t!==void 0?t:n;return!Array.isArray(u)&&!m(u)&&(l[`${s}.${$.path}`]=u),u}),delete e.schema[s],e.schema={...e.schema,...l}}}),Object.keys(e.schema).forEach(s=>{Array.isArray(e.schema[s])||(e.schema[s]=[e.schema[s]]),e.schema[s]=e.schema[s].map(l=>`${l}`.toLowerCase().trim())});else if(e.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(e.schema,null,0)} which is not object but ${typeof e.schema}`);if(y(r)||(r={}),e.enforceStrictKeyset)if(y(e.schema)&&Object.keys(e.schema).length){if(r&&b(h(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema))),e.ignoreKeys).length){let s=h(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema)));throw new TypeError(`${e.msg}: ${e.optsVarName}.enforceStrictKeyset is on and the following key${s.length>1?"s":""} ${s.length>1?"are":"is"} not covered by schema and/or reference objects: ${s.join(", ")}`)}}else if(m(r)&&Object.keys(r).length){if(b(h(Object.keys(a),Object.keys(r)),e.ignoreKeys).length!==0){let s=h(Object.keys(a),Object.keys(r));throw new TypeError(`${e.msg}: The input object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not covered by the reference object: ${s.join(", ")}`)}else if(b(h(Object.keys(r),Object.keys(a)),e.ignoreKeys).length!==0){let s=h(Object.keys(r),Object.keys(a));throw new TypeError(`${e.msg}: The reference object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not present in the input object: ${s.join(", ")}`)}}else throw new TypeError(`${e.msg}: Both ${e.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via resolvedOpts.enforceStrictKeyset!`);let g=[];w(a,(s,l,n)=>{let t=l,$=s;if(n.parentType==="array"&&($=void 0,t=s),Array.isArray(g)&&g.length&&g.some(o=>n.path.startsWith(o))||$&&e.ignoreKeys.some(o=>$&&S($,o))||e.ignorePaths.some(o=>S(n.path,o)))return t;let u=!(!m(t)&&!Array.isArray(t)&&Array.isArray(n.parent)),f=!1;m(e.schema)&&V.call(e.schema,n.path)&&(f=!0);let d=!1;if(m(r)&&E.has(r,n.path)&&(d=!0),e.enforceStrictKeyset&&u&&!f&&!d)throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} is neither covered by reference object (second input argument), nor ${e.optsVarName}.schema! To stop this error, turn off ${e.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${e.optsVarName}.schema).
10
+ import i from"type-detect";import{traverse as w}from"ast-monkey-traverse";import{intersection as k}from"lodash-es";import{arrayiffy as N}from"arrayiffy-if-string";import E from"object-path";import{isMatch as S}from"matcher";import{isPlainObject as m,pullAll as h}from"codsen-utils";var j="8.0.12";var M=j,v={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function T(a,r,p){function y(s){return s!=null}function b(s,l){return typeof l=="string"&&(l=N(l)),Array.from(s).filter(n=>!l.some(t=>S(n,t,{caseSensitive:!0})))}let V=Object.prototype.hasOwnProperty,A=["any","anything","every","everything","all","whatever","whatevs"];if(!y(a))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let e={...v,...p};if(typeof e.ignoreKeys=="string"&&(e.ignoreKeys=[e.ignoreKeys]),typeof e.ignorePaths=="string"&&(e.ignorePaths=[e.ignorePaths]),typeof e.acceptArraysIgnore=="string"&&(e.acceptArraysIgnore=[e.acceptArraysIgnore]),e.msg=`${e.msg}`.trim(),e.msg[e.msg.length-1]===":"&&(e.msg=e.msg.slice(0,e.msg.length-1).trim()),m(e.schema))Object.keys(e.schema).forEach(s=>{if(m(e.schema[s])){let l={};w(e.schema[s],(n,t,$)=>{let u=t!==void 0?t:n;return!Array.isArray(u)&&!m(u)&&(l[`${s}.${$.path}`]=u),u}),delete e.schema[s],e.schema={...e.schema,...l}}}),Object.keys(e.schema).forEach(s=>{Array.isArray(e.schema[s])||(e.schema[s]=[e.schema[s]]),e.schema[s]=e.schema[s].map(l=>`${l}`.toLowerCase().trim())});else if(e.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(e.schema,null,0)} which is not object but ${typeof e.schema}`);if(y(r)||(r={}),e.enforceStrictKeyset)if(y(e.schema)&&Object.keys(e.schema).length){if(r&&b(h(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema))),e.ignoreKeys).length){let s=h(Object.keys(a),Object.keys(r).concat(Object.keys(e.schema)));throw new TypeError(`${e.msg}: ${e.optsVarName}.enforceStrictKeyset is on and the following key${s.length>1?"s":""} ${s.length>1?"are":"is"} not covered by schema and/or reference objects: ${s.join(", ")}`)}}else if(m(r)&&Object.keys(r).length){if(b(h(Object.keys(a),Object.keys(r)),e.ignoreKeys).length!==0){let s=h(Object.keys(a),Object.keys(r));throw new TypeError(`${e.msg}: The input object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not covered by the reference object: ${s.join(", ")}`)}else if(b(h(Object.keys(r),Object.keys(a)),e.ignoreKeys).length!==0){let s=h(Object.keys(r),Object.keys(a));throw new TypeError(`${e.msg}: The reference object has key${s.length>1?"s":""} which ${s.length>1?"are":"is"} not present in the input object: ${s.join(", ")}`)}}else throw new TypeError(`${e.msg}: Both ${e.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via resolvedOpts.enforceStrictKeyset!`);let g=[];w(a,(s,l,n)=>{let t=l,$=s;if(n.parentType==="array"&&($=void 0,t=s),Array.isArray(g)&&g.length&&g.some(o=>n.path.startsWith(o))||$&&e.ignoreKeys.some(o=>$&&S($,o))||e.ignorePaths.some(o=>S(n.path,o)))return t;let u=!(!m(t)&&!Array.isArray(t)&&Array.isArray(n.parent)),f=!1;m(e.schema)&&V.call(e.schema,n.path)&&(f=!0);let d=!1;if(m(r)&&E.has(r,n.path)&&(d=!0),e.enforceStrictKeyset&&u&&!f&&!d)throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} is neither covered by reference object (second input argument), nor ${e.optsVarName}.schema! To stop this error, turn off ${e.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${e.optsVarName}.schema).
11
11
 
12
12
  Debug info:
13
13
 
@@ -21,4 +21,4 @@ resolvedOpts = ${JSON.stringify(e,null,4)}
21
21
 
22
22
  current = ${JSON.stringify(t,null,4)}
23
23
 
24
- `);if(f){let o=N(e.schema[n.path]).map(c=>`${c}`.toLowerCase());if(E.set(e.schema,n.path,o),k(o,D).length)g.push(n.path);else if(t!==!0&&t!==!1&&!o.includes(i(t).toLowerCase())||(t===!0||t===!1)&&!o.includes(String(t))&&!o.includes("boolean"))if(Array.isArray(t)&&e.acceptArrays){for(let c=0,O=t.length;c<O;c++)if(!o.includes(i(t[c]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path}.${c}, the ${c}th element (equal to ${JSON.stringify(t[c],null,0)}) is of a type ${i(t[c]).toLowerCase()}, but only the following are allowed by the ${e.optsVarName}.schema: ${o.join(", ")}`)}else throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t)!=="string"?'"':""}${JSON.stringify(t,null,0)}${i(t)!=="string"?'"':""} (type: ${i(t).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(r&&m(r)&&d){let o=E.get(r,n.path);if(e.acceptArrays&&Array.isArray(t)&&!e.acceptArraysIgnore.includes(s)){if(!t.every(O=>i(O).toLowerCase()===i(r[s]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to be array, but not all of its elements are ${i(r[s]).toLowerCase()}-type`)}else if(i(t)!==i(o))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t).toLowerCase()==="string"?"":'"'}${JSON.stringify(t,null,0)}${i(t).toLowerCase()==="string"?"":'"'} which is not ${i(o).toLowerCase()} but ${i(t).toLowerCase()}`)}return t})}function F(a,r,p){T(a,r,p)}export{F as checkTypesMini,v as defaults,M as version};
24
+ `);if(f){let o=N(e.schema[n.path]).map(c=>`${c}`.toLowerCase());if(E.set(e.schema,n.path,o),k(o,A).length)g.push(n.path);else if(t!==!0&&t!==!1&&!o.includes(i(t).toLowerCase())||(t===!0||t===!1)&&!o.includes(String(t))&&!o.includes("boolean"))if(Array.isArray(t)&&e.acceptArrays){for(let c=0,O=t.length;c<O;c++)if(!o.includes(i(t[c]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path}.${c}, the ${c}th element (equal to ${JSON.stringify(t[c],null,0)}) is of a type ${i(t[c]).toLowerCase()}, but only the following are allowed by the ${e.optsVarName}.schema: ${o.join(", ")}`)}else throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t)!=="string"?'"':""}${JSON.stringify(t,null,0)}${i(t)!=="string"?'"':""} (type: ${i(t).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(r&&m(r)&&d){let o=E.get(r,n.path);if(e.acceptArrays&&Array.isArray(t)&&!e.acceptArraysIgnore.includes(s)){if(!t.every(O=>i(O).toLowerCase()===i(r[s]).toLowerCase()))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to be array, but not all of its elements are ${i(r[s]).toLowerCase()}-type`)}else if(i(t)!==i(o))throw new TypeError(`${e.msg}: ${e.optsVarName}.${n.path} was customised to ${i(t).toLowerCase()==="string"?"":'"'}${JSON.stringify(t,null,0)}${i(t).toLowerCase()==="string"?"":'"'} which is not ${i(o).toLowerCase()} but ${i(t).toLowerCase()}`)}return t})}function F(a,r,p){T(a,r,p)}export{F as checkTypesMini,v as defaults,M as version};
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name check-types-mini
3
3
  * @fileoverview Validate options object
4
- * @version 8.0.10
4
+ * @version 8.0.12
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/check-types-mini/}
8
8
  */
9
9
 
10
- "use strict";var checkTypesMini=(()=>{var Wt=Object.create;var J=Object.defineProperty,qt=Object.defineProperties,Qt=Object.getOwnPropertyDescriptor,Yt=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,Xt=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable;var Le=(e,t,r)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))Me.call(t,r)&&Le(e,r,t[r]);if(ke)for(var r of ke(t))zt.call(t,r)&&Le(e,r,t[r]);return e},R=(e,t)=>qt(e,Yt(t));var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),er=(e,t)=>{for(var r in t)J(e,r,{get:t[r],enumerable:!0})},Ke=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of Zt(t))!Me.call(e,f)&&f!==r&&J(e,f,{get:()=>t[f],enumerable:!(n=Qt(t,f))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?Wt(Xt(e)):{},Ke(t||!e||!e.__esModule?J(r,"default",{value:e,enumerable:!0}):r,e)),tr=e=>Ke(J({},"__esModule",{value:!0}),e);var He=W((le,fe)=>{(function(e,t){typeof le=="object"&&typeof fe<"u"?fe.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(le,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,r=typeof Symbol<"u",n=typeof Map<"u",f=typeof Set<"u",h=typeof WeakMap<"u",g=typeof WeakSet<"u",i=typeof DataView<"u",y=r&&typeof Symbol.iterator<"u",u=r&&typeof Symbol.toStringTag<"u",a=f&&typeof Set.prototype.entries=="function",s=n&&typeof Map.prototype.entries=="function",p=a&&Object.getPrototypeOf(new Set().entries()),m=s&&Object.getPrototypeOf(new Map().entries()),b=y&&typeof Array.prototype[Symbol.iterator]=="function",v=b&&Object.getPrototypeOf([][Symbol.iterator]()),l=y&&typeof String.prototype[Symbol.iterator]=="function",o=l&&Object.getPrototypeOf(""[Symbol.iterator]()),c=8,d=-1;function O(w){var Ie=typeof w;if(Ie!=="object")return Ie;if(w===null)return"null";if(w===t)return"global";if(Array.isArray(w)&&(u===!1||!(Symbol.toStringTag in w)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&w===window.location)return"Location";if(typeof window.document=="object"&&w===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&w===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&w===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&w instanceof window.HTMLElement){if(w.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(w.tagName==="TD")return"HTMLTableDataCellElement";if(w.tagName==="TH")return"HTMLTableHeaderCellElement"}}var Ve=u&&w[Symbol.toStringTag];if(typeof Ve=="string")return Ve;var _=Object.getPrototypeOf(w);return _===RegExp.prototype?"RegExp":_===Date.prototype?"Date":e&&_===Promise.prototype?"Promise":f&&_===Set.prototype?"Set":n&&_===Map.prototype?"Map":g&&_===WeakSet.prototype?"WeakSet":h&&_===WeakMap.prototype?"WeakMap":i&&_===DataView.prototype?"DataView":n&&_===m?"Map Iterator":f&&_===p?"Set Iterator":b&&_===v?"Array Iterator":l&&_===o?"String Iterator":_===null?"Object":Object.prototype.toString.call(w).slice(c,d)}return O})});var Tt=W((F,V)=>{var rr=200,Xe="__lodash_hash_undefined__",ze=9007199254740991,$e="[object Arguments]",nr="[object Array]",et="[object Boolean]",tt="[object Date]",ir="[object Error]",we="[object Function]",rt="[object GeneratorFunction]",Q="[object Map]",nt="[object Number]",Oe="[object Object]",Je="[object Promise]",it="[object RegExp]",Y="[object Set]",ot="[object String]",st="[object Symbol]",he="[object WeakMap]",at="[object ArrayBuffer]",Z="[object DataView]",ct="[object Float32Array]",ut="[object Float64Array]",lt="[object Int8Array]",ft="[object Int16Array]",pt="[object Int32Array]",ht="[object Uint8Array]",gt="[object Uint8ClampedArray]",yt="[object Uint16Array]",dt="[object Uint32Array]",or=/[\\^$.*+?()[\]{}|]/g,sr=/\w*$/,ar=/^\[object .+?Constructor\]$/,cr=/^(?:0|[1-9]\d*)$/,$={};$[$e]=$[nr]=$[at]=$[Z]=$[et]=$[tt]=$[ct]=$[ut]=$[lt]=$[ft]=$[pt]=$[Q]=$[nt]=$[Oe]=$[it]=$[Y]=$[ot]=$[st]=$[ht]=$[gt]=$[yt]=$[dt]=!0;$[ir]=$[we]=$[he]=!1;var ur=typeof global=="object"&&global&&global.Object===Object&&global,lr=typeof self=="object"&&self&&self.Object===Object&&self,x=ur||lr||Function("return this")(),mt=typeof F=="object"&&F&&!F.nodeType&&F,Re=mt&&typeof V=="object"&&V&&!V.nodeType&&V,fr=Re&&Re.exports===mt;function pr(e,t){return e.set(t[0],t[1]),e}function hr(e,t){return e.add(t),e}function gr(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function yr(e,t){for(var r=-1,n=t.length,f=e.length;++r<n;)e[f+r]=t[r];return e}function bt(e,t,r,n){var f=-1,h=e?e.length:0;for(n&&h&&(r=e[++f]);++f<h;)r=t(r,e[f],f,e);return r}function dr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function mr(e,t){return e==null?void 0:e[t]}function $t(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Fe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,f){r[++t]=[f,n]}),r}function Se(e,t){return function(r){return e(t(r))}}function Be(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var br=Array.prototype,$r=Function.prototype,X=Object.prototype,pe=x["__core-js_shared__"],Ge=function(){var e=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wt=$r.toString,C=X.hasOwnProperty,z=X.toString,wr=RegExp("^"+wt.call(C).replace(or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=fr?x.Buffer:void 0,We=x.Symbol,qe=x.Uint8Array,Or=Se(Object.getPrototypeOf,Object),Sr=Object.create,vr=X.propertyIsEnumerable,_r=br.splice,Qe=Object.getOwnPropertySymbols,Ar=Ue?Ue.isBuffer:void 0,Er=Se(Object.keys,Object),ge=M(x,"DataView"),B=M(x,"Map"),ye=M(x,"Promise"),de=M(x,"Set"),me=M(x,"WeakMap"),G=M(Object,"create"),xr=N(ge),Tr=N(B),Cr=N(ye),jr=N(de),Dr=N(me),Ye=We?We.prototype:void 0,Ze=Ye?Ye.valueOf:void 0;function D(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Nr(){this.__data__=G?G(null):{}}function Pr(e){return this.has(e)&&delete this.__data__[e]}function Ir(e){var t=this.__data__;if(G){var r=t[e];return r===Xe?void 0:r}return C.call(t,e)?t[e]:void 0}function Vr(e){var t=this.__data__;return G?t[e]!==void 0:C.call(t,e)}function kr(e,t){var r=this.__data__;return r[e]=G&&t===void 0?Xe:t,this}D.prototype.clear=Nr;D.prototype.delete=Pr;D.prototype.get=Ir;D.prototype.has=Vr;D.prototype.set=kr;function T(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Lr(){this.__data__=[]}function Mr(e){var t=this.__data__,r=ee(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():_r.call(t,r,1),!0}function Kr(e){var t=this.__data__,r=ee(t,e);return r<0?void 0:t[r][1]}function Hr(e){return ee(this.__data__,e)>-1}function Jr(e,t){var r=this.__data__,n=ee(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}T.prototype.clear=Lr;T.prototype.delete=Mr;T.prototype.get=Kr;T.prototype.has=Hr;T.prototype.set=Jr;function k(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Rr(){this.__data__={hash:new D,map:new(B||T),string:new D}}function Fr(e){return te(this,e).delete(e)}function Br(e){return te(this,e).get(e)}function Gr(e){return te(this,e).has(e)}function Ur(e,t){return te(this,e).set(e,t),this}k.prototype.clear=Rr;k.prototype.delete=Fr;k.prototype.get=Br;k.prototype.has=Gr;k.prototype.set=Ur;function L(e){this.__data__=new T(e)}function Wr(){this.__data__=new T}function qr(e){return this.__data__.delete(e)}function Qr(e){return this.__data__.get(e)}function Yr(e){return this.__data__.has(e)}function Zr(e,t){var r=this.__data__;if(r instanceof T){var n=r.__data__;if(!B||n.length<rr-1)return n.push([e,t]),this;r=this.__data__=new k(n)}return r.set(e,t),this}L.prototype.clear=Wr;L.prototype.delete=qr;L.prototype.get=Qr;L.prototype.has=Yr;L.prototype.set=Zr;function Xr(e,t){var r=_e(e)||vn(e)?dr(e.length,String):[],n=r.length,f=!!n;for(var h in e)(t||C.call(e,h))&&!(f&&(h=="length"||$n(h,n)))&&r.push(h);return r}function Ot(e,t,r){var n=e[t];(!(C.call(e,t)&&At(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function ee(e,t){for(var r=e.length;r--;)if(At(e[r][0],t))return r;return-1}function zr(e,t){return e&&St(t,Ae(t),e)}function be(e,t,r,n,f,h,g){var i;if(n&&(i=h?n(e,f,h,g):n(e)),i!==void 0)return i;if(!re(e))return e;var y=_e(e);if(y){if(i=dn(e),!t)return hn(e,i)}else{var u=j(e),a=u==we||u==rt;if(An(e))return sn(e,t);if(u==Oe||u==$e||a&&!h){if($t(e))return h?e:{};if(i=mn(a?{}:e),!t)return gn(e,zr(i,e))}else{if(!$[u])return h?e:{};i=bn(e,u,be,t)}}g||(g=new L);var s=g.get(e);if(s)return s;if(g.set(e,i),!y)var p=r?yn(e):Ae(e);return gr(p||e,function(m,b){p&&(b=m,m=e[b]),Ot(i,b,be(m,t,r,n,b,e,g))}),i}function en(e){return re(e)?Sr(e):{}}function tn(e,t,r){var n=t(e);return _e(e)?n:yr(n,r(e))}function rn(e){return z.call(e)}function nn(e){if(!re(e)||On(e))return!1;var t=xt(e)||$t(e)?wr:ar;return t.test(N(e))}function on(e){if(!_t(e))return Er(e);var t=[];for(var r in Object(e))C.call(e,r)&&r!="constructor"&&t.push(r);return t}function sn(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function ve(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function an(e,t){var r=t?ve(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function cn(e,t,r){var n=t?r(Fe(e),!0):Fe(e);return bt(n,pr,new e.constructor)}function un(e){var t=new e.constructor(e.source,sr.exec(e));return t.lastIndex=e.lastIndex,t}function ln(e,t,r){var n=t?r(Be(e),!0):Be(e);return bt(n,hr,new e.constructor)}function fn(e){return Ze?Object(Ze.call(e)):{}}function pn(e,t){var r=t?ve(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function hn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function St(e,t,r,n){r||(r={});for(var f=-1,h=t.length;++f<h;){var g=t[f],i=n?n(r[g],e[g],g,r,e):void 0;Ot(r,g,i===void 0?e[g]:i)}return r}function gn(e,t){return St(e,vt(e),t)}function yn(e){return tn(e,Ae,vt)}function te(e,t){var r=e.__data__;return wn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function M(e,t){var r=mr(e,t);return nn(r)?r:void 0}var vt=Qe?Se(Qe,Object):Tn,j=rn;(ge&&j(new ge(new ArrayBuffer(1)))!=Z||B&&j(new B)!=Q||ye&&j(ye.resolve())!=Je||de&&j(new de)!=Y||me&&j(new me)!=he)&&(j=function(e){var t=z.call(e),r=t==Oe?e.constructor:void 0,n=r?N(r):void 0;if(n)switch(n){case xr:return Z;case Tr:return Q;case Cr:return Je;case jr:return Y;case Dr:return he}return t});function dn(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&C.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function mn(e){return typeof e.constructor=="function"&&!_t(e)?en(Or(e)):{}}function bn(e,t,r,n){var f=e.constructor;switch(t){case at:return ve(e);case et:case tt:return new f(+e);case Z:return an(e,n);case ct:case ut:case lt:case ft:case pt:case ht:case gt:case yt:case dt:return pn(e,n);case Q:return cn(e,n,r);case nt:case ot:return new f(e);case it:return un(e);case Y:return ln(e,n,r);case st:return fn(e)}}function $n(e,t){return t=t==null?ze:t,!!t&&(typeof e=="number"||cr.test(e))&&e>-1&&e%1==0&&e<t}function wn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function On(e){return!!Ge&&Ge in e}function _t(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X;return e===r}function N(e){if(e!=null){try{return wt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Sn(e){return be(e,!0,!0)}function At(e,t){return e===t||e!==e&&t!==t}function vn(e){return _n(e)&&C.call(e,"callee")&&(!vr.call(e,"callee")||z.call(e)==$e)}var _e=Array.isArray;function Et(e){return e!=null&&En(e.length)&&!xt(e)}function _n(e){return xn(e)&&Et(e)}var An=Ar||Cn;function xt(e){var t=re(e)?z.call(e):"";return t==we||t==rt}function En(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ze}function re(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function xn(e){return!!e&&typeof e=="object"}function Ae(e){return Et(e)?Xr(e):on(e)}function Tn(){return[]}function Cn(){return!1}V.exports=Sn});var Ht=W((Bi,Kt)=>{var Ce="__lodash_hash_undefined__",Dn=9007199254740991,Nn="[object Function]",Pn="[object GeneratorFunction]",In=/[\\^$.*+?()[\]{}|]/g,Vn=/^\[object .+?Constructor\]$/,kn=typeof global=="object"&&global&&global.Object===Object&&global,Ln=typeof self=="object"&&self&&self.Object===Object&&self,Nt=kn||Ln||Function("return this")();function Mn(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Kn(e,t){var r=e?e.length:0;return!!r&&Rn(e,t,0)>-1}function Hn(e,t,r){for(var n=-1,f=e?e.length:0;++n<f;)if(r(t,e[n]))return!0;return!1}function Pt(e,t){for(var r=-1,n=e?e.length:0,f=Array(n);++r<n;)f[r]=t(e[r],r,e);return f}function Jn(e,t,r,n){for(var f=e.length,h=r+(n?1:-1);n?h--:++h<f;)if(t(e[h],h,e))return h;return-1}function Rn(e,t,r){if(t!==t)return Jn(e,Fn,r);for(var n=r-1,f=e.length;++n<f;)if(e[n]===t)return n;return-1}function Fn(e){return e!==e}function Bn(e){return function(t){return e(t)}}function Ct(e,t){return e.has(t)}function Gn(e,t){return e==null?void 0:e[t]}function Un(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}var Wn=Array.prototype,qn=Function.prototype,It=Object.prototype,Te=Nt["__core-js_shared__"],jt=function(){var e=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Vt=qn.toString,je=It.hasOwnProperty,Qn=It.toString,Yn=RegExp("^"+Vt.call(je).replace(In,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zn=Wn.splice,Dt=Math.max,Xn=Math.min,zn=kt(Nt,"Map"),U=kt(Object,"create");function I(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ei(){this.__data__=U?U(null):{}}function ti(e){return this.has(e)&&delete this.__data__[e]}function ri(e){var t=this.__data__;if(U){var r=t[e];return r===Ce?void 0:r}return je.call(t,e)?t[e]:void 0}function ni(e){var t=this.__data__;return U?t[e]!==void 0:je.call(t,e)}function ii(e,t){var r=this.__data__;return r[e]=U&&t===void 0?Ce:t,this}I.prototype.clear=ei;I.prototype.delete=ti;I.prototype.get=ri;I.prototype.has=ni;I.prototype.set=ii;function K(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oi(){this.__data__=[]}function si(e){var t=this.__data__,r=oe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Zn.call(t,r,1),!0}function ai(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]}function ci(e){return oe(this.__data__,e)>-1}function ui(e,t){var r=this.__data__,n=oe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}K.prototype.clear=oi;K.prototype.delete=si;K.prototype.get=ai;K.prototype.has=ci;K.prototype.set=ui;function H(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function li(){this.__data__={hash:new I,map:new(zn||K),string:new I}}function fi(e){return se(this,e).delete(e)}function pi(e){return se(this,e).get(e)}function hi(e){return se(this,e).has(e)}function gi(e,t){return se(this,e).set(e,t),this}H.prototype.clear=li;H.prototype.delete=fi;H.prototype.get=pi;H.prototype.has=hi;H.prototype.set=gi;function ie(e){var t=-1,r=e?e.length:0;for(this.__data__=new H;++t<r;)this.add(e[t])}function yi(e){return this.__data__.set(e,Ce),this}function di(e){return this.__data__.has(e)}ie.prototype.add=ie.prototype.push=yi;ie.prototype.has=di;function oe(e,t){for(var r=e.length;r--;)if(Ai(e[r][0],t))return r;return-1}function mi(e,t,r){for(var n=r?Hn:Kn,f=e[0].length,h=e.length,g=h,i=Array(h),y=1/0,u=[];g--;){var a=e[g];g&&t&&(a=Pt(a,Bn(t))),y=Xn(a.length,y),i[g]=!r&&(t||f>=120&&a.length>=120)?new ie(g&&a):void 0}a=e[0];var s=-1,p=i[0];e:for(;++s<f&&u.length<y;){var m=a[s],b=t?t(m):m;if(m=r||m!==0?m:0,!(p?Ct(p,b):n(u,b,r))){for(g=h;--g;){var v=i[g];if(!(v?Ct(v,b):n(e[g],b,r)))continue e}p&&p.push(b),u.push(m)}}return u}function bi(e){if(!Mt(e)||Si(e))return!1;var t=Lt(e)||Un(e)?Yn:Vn;return t.test(vi(e))}function $i(e,t){return t=Dt(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,f=Dt(r.length-t,0),h=Array(f);++n<f;)h[n]=r[t+n];n=-1;for(var g=Array(t+1);++n<t;)g[n]=r[n];return g[t]=h,Mn(e,this,g)}}function wi(e){return xi(e)?e:[]}function se(e,t){var r=e.__data__;return Oi(t)?r[typeof t=="string"?"string":"hash"]:r.map}function kt(e,t){var r=Gn(e,t);return bi(r)?r:void 0}function Oi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Si(e){return!!jt&&jt in e}function vi(e){if(e!=null){try{return Vt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var _i=$i(function(e){var t=Pt(e,wi);return t.length&&t[0]===e[0]?mi(t):[]});function Ai(e,t){return e===t||e!==e&&t!==t}function Ei(e){return e!=null&&Ti(e.length)&&!Lt(e)}function xi(e){return Ci(e)&&Ei(e)}function Lt(e){var t=Mt(e)?Qn.call(e):"";return t==Nn||t==Pn}function Ti(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dn}function Mt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ci(e){return!!e&&typeof e=="object"}Kt.exports=_i});var Rt=W((Jt,ae)=>{(function(e,t){"use strict";typeof ae=="object"&&typeof ae.exports=="object"?ae.exports=t():typeof define=="function"&&define.amd?define([],t):e.objectPath=t()})(Jt,function(){"use strict";var e=Object.prototype.toString;function t(a,s){return a==null?!1:Object.prototype.hasOwnProperty.call(a,s)}function r(a){if(!a||h(a)&&a.length===0)return!0;if(typeof a!="string"){for(var s in a)if(t(a,s))return!1;return!0}return!1}function n(a){return e.call(a)}function f(a){return typeof a=="object"&&n(a)==="[object Object]"}var h=Array.isArray||function(a){return e.call(a)==="[object Array]"};function g(a){return typeof a=="boolean"||n(a)==="[object Boolean]"}function i(a){var s=parseInt(a);return s.toString()===a?s:a}function y(a){a=a||{};var s=function(l){return Object.keys(s).reduce(function(o,c){return c==="create"||typeof s[c]=="function"&&(o[c]=s[c].bind(s,l)),o},{})},p;a.includeInheritedProps?p=function(){return!0}:p=function(l,o){return typeof o=="number"&&Array.isArray(l)||t(l,o)};function m(l,o){if(p(l,o))return l[o]}var b;a.includeInheritedProps?b=function(l,o){typeof o!="string"&&typeof o!="number"&&(o=String(o));var c=m(l,o);if(o==="__proto__"||o==="prototype"||o==="constructor"&&typeof c=="function")throw new Error("For security reasons, object's magic properties cannot be set");return c}:b=function(l,o){return m(l,o)};function v(l,o,c,d){if(typeof o=="number"&&(o=[o]),!o||o.length===0)return l;if(typeof o=="string")return v(l,o.split(".").map(i),c,d);var O=o[0],w=b(l,O);return o.length===1?((w===void 0||!d)&&(l[O]=c),w):(w===void 0&&(typeof o[1]=="number"?l[O]=[]:l[O]={}),v(l[O],o.slice(1),c,d))}return s.has=function(l,o){if(typeof o=="number"?o=[o]:typeof o=="string"&&(o=o.split(".")),!o||o.length===0)return!!l;for(var c=0;c<o.length;c++){var d=i(o[c]);if(typeof d=="number"&&h(l)&&d<l.length||(a.includeInheritedProps?d in Object(l):t(l,d)))l=l[d];else return!1}return!0},s.ensureExists=function(l,o,c){return v(l,o,c,!0)},s.set=function(l,o,c,d){return v(l,o,c,d)},s.insert=function(l,o,c,d){var O=s.get(l,o);d=~~d,h(O)||(O=[],s.set(l,o,O)),O.splice(d,0,c)},s.empty=function(l,o){if(!r(o)&&l!=null){var c,d;if(c=s.get(l,o)){if(typeof c=="string")return s.set(l,o,"");if(g(c))return s.set(l,o,!1);if(typeof c=="number")return s.set(l,o,0);if(h(c))c.length=0;else if(f(c))for(d in c)p(c,d)&&delete c[d];else return s.set(l,o,null)}}},s.push=function(l,o){var c=s.get(l,o);h(c)||(c=[],s.set(l,o,c)),c.push.apply(c,Array.prototype.slice.call(arguments,2))},s.coalesce=function(l,o,c){for(var d,O=0,w=o.length;O<w;O++)if((d=s.get(l,o[O]))!==void 0)return d;return c},s.get=function(l,o,c){if(typeof o=="number"&&(o=[o]),!o||o.length===0)return l;if(l==null)return c;if(typeof o=="string")return s.get(l,o.split("."),c);var d=i(o[0]),O=b(l,d);return O===void 0?c:o.length===1?O:s.get(l[d],o.slice(1),c)},s.del=function(o,c){if(typeof c=="number"&&(c=[c]),o==null||r(c))return o;if(typeof c=="string")return s.del(o,c.split("."));var d=i(c[0]);if(b(o,d),!p(o,d))return o;if(c.length===1)h(o)?o.splice(d,1):delete o[d];else return s.del(o[d],c.slice(1));return o},s}var u=y();return u.create=y,u.withInheritedProps=y({includeInheritedProps:!0}),u})});var ki={};er(ki,{checkTypesMini:()=>Vi,defaults:()=>Ut,version:()=>Pi});var S=q(He(),1);var ne=q(Tt(),1);function E(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function P(e=[],t=[]){return!e||!Array.isArray(e)||!e.length?[]:!t||!Array.isArray(t)||!t.length?e:e.filter(r=>!t.includes(r))}function jn(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let r=t-1;r--;)if(e[r]===".")return e.slice(r+1,t)}return null}var Ee=jn;function xe(e,t){let r={now:!1};function n(f,h,g,i){let y=(0,ne.default)(f),u,a=A({depth:-1,path:""},g);if(a.depth+=1,Array.isArray(y))for(let s=0,p=y.length;s<p&&!i.now;s++){let m=a.path?`${a.path}.${s}`:`${s}`;y[s]!==void 0?(a.parent=(0,ne.default)(y),a.parentType="array",a.parentKey=Ee(m),u=n(h(y[s],void 0,R(A({},a),{path:m}),i),h,R(A({},a),{path:m}),i),Number.isNaN(u)&&s<y.length?(y.splice(s,1),s-=1):y[s]=u):y.splice(s,1)}else if(E(y))for(let s in y){if(i.now&&s!=null)break;let p=a.path?`${a.path}.${s}`:s;a.depth===0&&s!=null&&(a.topmostKey=s),a.parent=(0,ne.default)(y),a.parentType="object",a.parentKey=Ee(p),u=n(h(s,y[s],R(A({},a),{path:p}),i),h,R(A({},a),{path:p}),i),Number.isNaN(u)?delete y[s]:y[s]=u}return y}return n(e,t,{},r)}var Gt=q(Ht(),1);function De(e){return typeof e!="string"?e:e.length?[e]:[]}var ue=q(Rt(),1);function Ne(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Pe=new Map,Ft=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},ji=(e,t)=>{t=A({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(Pe.has(r))return Pe.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=Ne(e).replace(/\\\*/g,"[\\s\\S]*");let f=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return f.negated=n,Pe.set(r,f),f},Di=(e,t,r,n)=>{if(e=Ft(e,"inputs"),t=Ft(t,"patterns"),t.length===0)return[];t=t.map(g=>ji(g,r));let{allPatterns:f}=r||{},h=[];for(let g of e){let i,y=[...t].fill(!1);for(let[u,a]of t.entries())if(a.test(g)&&(y[u]=!0,i=!a.negated,!i))break;if(!(i===!1||i===void 0&&t.some(u=>!u.negated)||f&&y.some((u,a)=>!u&&!t[a].negated))&&(h.push(g),n))break}return h};function ce(e,t,r){return Di(e,t,r,!0).length>0}var Bt="8.0.10";var Pi=Bt,Ut={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function Ii(e,t,r){function n(u){return u!=null}function f(u,a){return typeof a=="string"&&(a=De(a)),Array.from(u).filter(s=>!a.some(p=>ce(s,p,{caseSensitive:!0})))}let h=Object.prototype.hasOwnProperty,g=["any","anything","every","everything","all","whatever","whatevs"];if(!n(e))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let i=A(A({},Ut),r);if(typeof i.ignoreKeys=="string"&&(i.ignoreKeys=[i.ignoreKeys]),typeof i.ignorePaths=="string"&&(i.ignorePaths=[i.ignorePaths]),typeof i.acceptArraysIgnore=="string"&&(i.acceptArraysIgnore=[i.acceptArraysIgnore]),i.msg=`${i.msg}`.trim(),i.msg[i.msg.length-1]===":"&&(i.msg=i.msg.slice(0,i.msg.length-1).trim()),E(i.schema))Object.keys(i.schema).forEach(u=>{if(E(i.schema[u])){let a={};xe(i.schema[u],(s,p,m)=>{let b=p!==void 0?p:s;return!Array.isArray(b)&&!E(b)&&(a[`${u}.${m.path}`]=b),b}),delete i.schema[u],i.schema=A(A({},i.schema),a)}}),Object.keys(i.schema).forEach(u=>{Array.isArray(i.schema[u])||(i.schema[u]=[i.schema[u]]),i.schema[u]=i.schema[u].map(a=>`${a}`.toLowerCase().trim())});else if(i.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(i.schema,null,0)} which is not object but ${typeof i.schema}`);if(n(t)||(t={}),i.enforceStrictKeyset)if(n(i.schema)&&Object.keys(i.schema).length){if(t&&f(P(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema))),i.ignoreKeys).length){let u=P(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema)));throw new TypeError(`${i.msg}: ${i.optsVarName}.enforceStrictKeyset is on and the following key${u.length>1?"s":""} ${u.length>1?"are":"is"} not covered by schema and/or reference objects: ${u.join(", ")}`)}}else if(E(t)&&Object.keys(t).length){if(f(P(Object.keys(e),Object.keys(t)),i.ignoreKeys).length!==0){let u=P(Object.keys(e),Object.keys(t));throw new TypeError(`${i.msg}: The input object has key${u.length>1?"s":""} which ${u.length>1?"are":"is"} not covered by the reference object: ${u.join(", ")}`)}else if(f(P(Object.keys(t),Object.keys(e)),i.ignoreKeys).length!==0){let u=P(Object.keys(t),Object.keys(e));throw new TypeError(`${i.msg}: The reference object has key${u.length>1?"s":""} which ${u.length>1?"are":"is"} not present in the input object: ${u.join(", ")}`)}}else throw new TypeError(`${i.msg}: Both ${i.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via resolvedOpts.enforceStrictKeyset!`);let y=[];xe(e,(u,a,s)=>{let p=a,m=u;if(s.parentType==="array"&&(m=void 0,p=u),Array.isArray(y)&&y.length&&y.some(o=>s.path.startsWith(o))||m&&i.ignoreKeys.some(o=>m&&ce(m,o))||i.ignorePaths.some(o=>ce(s.path,o)))return p;let b=!(!E(p)&&!Array.isArray(p)&&Array.isArray(s.parent)),v=!1;E(i.schema)&&h.call(i.schema,s.path)&&(v=!0);let l=!1;if(E(t)&&ue.default.has(t,s.path)&&(l=!0),i.enforceStrictKeyset&&b&&!v&&!l)throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path} is neither covered by reference object (second input argument), nor ${i.optsVarName}.schema! To stop this error, turn off ${i.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${i.optsVarName}.schema).
10
+ "use strict";var checkTypesMini=(()=>{var At=Object.create;var L=Object.defineProperty,Et=Object.defineProperties,Dt=Object.getOwnPropertyDescriptor,jt=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertyNames,pe=Object.getOwnPropertySymbols,It=Object.getPrototypeOf,ce=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var me=(e,t,o)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(e,t)=>{for(var o in t||(t={}))ce.call(t,o)&&me(e,o,t[o]);if(pe)for(var o of pe(t))Tt.call(t,o)&&me(e,o,t[o]);return e},k=(e,t)=>Et(e,jt(t));var q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ct=(e,t)=>{for(var o in t)L(e,o,{get:t[o],enumerable:!0})},de=(e,t,o,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nt(t))!ce.call(e,i)&&i!==o&&L(e,i,{get:()=>t[i],enumerable:!(l=Dt(t,i))||l.enumerable});return e};var Q=(e,t,o)=>(o=e!=null?At(It(e)):{},de(t||!e||!e.__esModule?L(o,"default",{value:e,enumerable:!0}):o,e)),Pt=e=>de(L({},"__esModule",{value:!0}),e);var he=q((Y,Z)=>{(function(e,t){typeof Y=="object"&&typeof Z<"u"?Z.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(Y,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,o=typeof Symbol<"u",l=typeof Map<"u",i=typeof Set<"u",h=typeof WeakMap<"u",u=typeof WeakSet<"u",r=typeof DataView<"u",c=o&&typeof Symbol.iterator<"u",n=o&&typeof Symbol.toStringTag<"u",s=i&&typeof Set.prototype.entries=="function",f=l&&typeof Map.prototype.entries=="function",m=s&&Object.getPrototypeOf(new Set().entries()),x=f&&Object.getPrototypeOf(new Map().entries()),b=c&&typeof Array.prototype[Symbol.iterator]=="function",w=b&&Object.getPrototypeOf([][Symbol.iterator]()),d=c&&typeof String.prototype[Symbol.iterator]=="function",a=d&&Object.getPrototypeOf(""[Symbol.iterator]()),p=8,y=-1;function $(g){var le=typeof g;if(le!=="object")return le;if(g===null)return"null";if(g===t)return"global";if(Array.isArray(g)&&(n===!1||!(Symbol.toStringTag in g)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&g===window.location)return"Location";if(typeof window.document=="object"&&g===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&g===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&g===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&g instanceof window.HTMLElement){if(g.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(g.tagName==="TD")return"HTMLTableDataCellElement";if(g.tagName==="TH")return"HTMLTableHeaderCellElement"}}var ue=n&&g[Symbol.toStringTag];if(typeof ue=="string")return ue;var O=Object.getPrototypeOf(g);return O===RegExp.prototype?"RegExp":O===Date.prototype?"Date":e&&O===Promise.prototype?"Promise":i&&O===Set.prototype?"Set":l&&O===Map.prototype?"Map":u&&O===WeakSet.prototype?"WeakSet":h&&O===WeakMap.prototype?"WeakMap":r&&O===DataView.prototype?"DataView":l&&O===x?"Map Iterator":i&&O===m?"Set Iterator":b&&O===w?"Array Iterator":d&&O===a?"String Iterator":O===null?"Object":Object.prototype.toString.call(g).slice(p,y)}return $})});var xe=q((_o,ye)=>{"use strict";ye.exports=_t;function I(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function _t(e){if(e=e||{},e.circles)return Mt(e);return e.proto?l:o;function t(i,h){for(var u=Object.keys(i),r=new Array(u.length),c=0;c<u.length;c++){var n=u[c],s=i[n];typeof s!="object"||s===null?r[n]=s:s instanceof Date?r[n]=new Date(s):ArrayBuffer.isView(s)?r[n]=I(s):r[n]=h(s)}return r}function o(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,o);if(i instanceof Map)return new Map(t(Array.from(i),o));if(i instanceof Set)return new Set(t(Array.from(i),o));var h={};for(var u in i)if(Object.hasOwnProperty.call(i,u)!==!1){var r=i[u];typeof r!="object"||r===null?h[u]=r:r instanceof Date?h[u]=new Date(r):r instanceof Map?h[u]=new Map(t(Array.from(r),o)):r instanceof Set?h[u]=new Set(t(Array.from(r),o)):ArrayBuffer.isView(r)?h[u]=I(r):h[u]=o(r)}return h}function l(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,l);if(i instanceof Map)return new Map(t(Array.from(i),l));if(i instanceof Set)return new Set(t(Array.from(i),l));var h={};for(var u in i){var r=i[u];typeof r!="object"||r===null?h[u]=r:r instanceof Date?h[u]=new Date(r):r instanceof Map?h[u]=new Map(t(Array.from(r),l)):r instanceof Set?h[u]=new Set(t(Array.from(r),l)):ArrayBuffer.isView(r)?h[u]=I(r):h[u]=l(r)}return h}}function Mt(e){var t=[],o=[];return e.proto?h:i;function l(u,r){for(var c=Object.keys(u),n=new Array(c.length),s=0;s<c.length;s++){var f=c[s],m=u[f];if(typeof m!="object"||m===null)n[f]=m;else if(m instanceof Date)n[f]=new Date(m);else if(ArrayBuffer.isView(m))n[f]=I(m);else{var x=t.indexOf(m);x!==-1?n[f]=o[x]:n[f]=r(m)}}return n}function i(u){if(typeof u!="object"||u===null)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return l(u,i);if(u instanceof Map)return new Map(l(Array.from(u),i));if(u instanceof Set)return new Set(l(Array.from(u),i));var r={};t.push(u),o.push(r);for(var c in u)if(Object.hasOwnProperty.call(u,c)!==!1){var n=u[c];if(typeof n!="object"||n===null)r[c]=n;else if(n instanceof Date)r[c]=new Date(n);else if(n instanceof Map)r[c]=new Map(l(Array.from(n),i));else if(n instanceof Set)r[c]=new Set(l(Array.from(n),i));else if(ArrayBuffer.isView(n))r[c]=I(n);else{var s=t.indexOf(n);s!==-1?r[c]=o[s]:r[c]=i(n)}}return t.pop(),o.pop(),r}function h(u){if(typeof u!="object"||u===null)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return l(u,h);if(u instanceof Map)return new Map(l(Array.from(u),h));if(u instanceof Set)return new Set(l(Array.from(u),h));var r={};t.push(u),o.push(r);for(var c in u){var n=u[c];if(typeof n!="object"||n===null)r[c]=n;else if(n instanceof Date)r[c]=new Date(n);else if(n instanceof Map)r[c]=new Map(l(Array.from(n),h));else if(n instanceof Set)r[c]=new Set(l(Array.from(n),h));else if(ArrayBuffer.isView(n))r[c]=I(n);else{var s=t.indexOf(n);s!==-1?r[c]=o[s]:r[c]=h(n)}}return t.pop(),o.pop(),r}}});var vt=q(($t,z)=>{(function(e,t){"use strict";typeof z=="object"&&typeof z.exports=="object"?z.exports=t():typeof define=="function"&&define.amd?define([],t):e.objectPath=t()})($t,function(){"use strict";var e=Object.prototype.toString;function t(s,f){return s==null?!1:Object.prototype.hasOwnProperty.call(s,f)}function o(s){if(!s||h(s)&&s.length===0)return!0;if(typeof s!="string"){for(var f in s)if(t(s,f))return!1;return!0}return!1}function l(s){return e.call(s)}function i(s){return typeof s=="object"&&l(s)==="[object Object]"}var h=Array.isArray||function(s){return e.call(s)==="[object Array]"};function u(s){return typeof s=="boolean"||l(s)==="[object Boolean]"}function r(s){var f=parseInt(s);return f.toString()===s?f:s}function c(s){s=s||{};var f=function(d){return Object.keys(f).reduce(function(a,p){return p==="create"||typeof f[p]=="function"&&(a[p]=f[p].bind(f,d)),a},{})},m;s.includeInheritedProps?m=function(){return!0}:m=function(d,a){return typeof a=="number"&&Array.isArray(d)||t(d,a)};function x(d,a){if(m(d,a))return d[a]}var b;s.includeInheritedProps?b=function(d,a){typeof a!="string"&&typeof a!="number"&&(a=String(a));var p=x(d,a);if(a==="__proto__"||a==="prototype"||a==="constructor"&&typeof p=="function")throw new Error("For security reasons, object's magic properties cannot be set");return p}:b=function(d,a){return x(d,a)};function w(d,a,p,y){if(typeof a=="number"&&(a=[a]),!a||a.length===0)return d;if(typeof a=="string")return w(d,a.split(".").map(r),p,y);var $=a[0],g=b(d,$);return a.length===1?((g===void 0||!y)&&(d[$]=p),g):(g===void 0&&(typeof a[1]=="number"?d[$]=[]:d[$]={}),w(d[$],a.slice(1),p,y))}return f.has=function(d,a){if(typeof a=="number"?a=[a]:typeof a=="string"&&(a=a.split(".")),!a||a.length===0)return!!d;for(var p=0;p<a.length;p++){var y=r(a[p]);if(typeof y=="number"&&h(d)&&y<d.length||(s.includeInheritedProps?y in Object(d):t(d,y)))d=d[y];else return!1}return!0},f.ensureExists=function(d,a,p){return w(d,a,p,!0)},f.set=function(d,a,p,y){return w(d,a,p,y)},f.insert=function(d,a,p,y){var $=f.get(d,a);y=~~y,h($)||($=[],f.set(d,a,$)),$.splice(y,0,p)},f.empty=function(d,a){if(!o(a)&&d!=null){var p,y;if(p=f.get(d,a)){if(typeof p=="string")return f.set(d,a,"");if(u(p))return f.set(d,a,!1);if(typeof p=="number")return f.set(d,a,0);if(h(p))p.length=0;else if(i(p))for(y in p)m(p,y)&&delete p[y];else return f.set(d,a,null)}}},f.push=function(d,a){var p=f.get(d,a);h(p)||(p=[],f.set(d,a,p)),p.push.apply(p,Array.prototype.slice.call(arguments,2))},f.coalesce=function(d,a,p){for(var y,$=0,g=a.length;$<g;$++)if((y=f.get(d,a[$]))!==void 0)return y;return p},f.get=function(d,a,p){if(typeof a=="number"&&(a=[a]),!a||a.length===0)return d;if(d==null)return p;if(typeof a=="string")return f.get(d,a.split("."),p);var y=r(a[0]),$=b(d,y);return $===void 0?p:a.length===1?$:f.get(d[y],a.slice(1),p)},f.del=function(a,p){if(typeof p=="number"&&(p=[p]),a==null||o(p))return a;if(typeof p=="string")return f.del(a,p.split("."));var y=r(p[0]);if(b(a,y),!m(a,y))return a;if(p.length===1)h(a)?a.splice(y,1):delete a[y];else return f.del(a[y],p.slice(1));return a},f}var n=c();return n.create=c,n.withInheritedProps=c({includeInheritedProps:!0}),n})});var Co={};Ct(Co,{checkTypesMini:()=>To,defaults:()=>St,version:()=>No});var v=Q(he(),1);var ge=Q(xe(),1);function A(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function N(e=[],t=[]){return!e||!Array.isArray(e)||!e.length?[]:!t||!Array.isArray(t)||!t.length?e:e.filter(o=>!t.includes(o))}function Vt(e){if(e.includes(".")){let t=e.lastIndexOf(".");if(!e.slice(0,t).includes("."))return e.slice(0,t);for(let o=t-1;o--;)if(e[o]===".")return e.slice(o+1,t)}return null}var X=Vt;var ee=(0,ge.default)();function te(e,t){let o={now:!1};function l(i,h,u,r){let c=ee(i),n,s=S({depth:-1,path:""},u);if(s.depth+=1,Array.isArray(c))for(let f=0,m=c.length;f<m&&!r.now;f++){let x=s.path?`${s.path}.${f}`:`${f}`;c[f]!==void 0?(s.parent=ee(c),s.parentType="array",s.parentKey=X(x),n=l(h(c[f],void 0,k(S({},s),{path:x}),r),h,k(S({},s),{path:x}),r),Number.isNaN(n)&&f<c.length?(c.splice(f,1),f-=1):c[f]=n):c.splice(f,1)}else if(A(c))for(let f in c){if(r.now&&f!=null)break;let m=s.path?`${s.path}.${f}`:f;s.depth===0&&f!=null&&(s.topmostKey=f),s.parent=ee(c),s.parentType="object",s.parentKey=X(m),n=l(h(f,c[f],k(S({},s),{path:m}),r),h,k(S({},s),{path:m}),r),Number.isNaN(n)?delete c[f]:c[f]=n}return c}return l(e,t,{},o)}var Lt=typeof global=="object"&&global&&global.Object===Object&&global,be=Lt;var kt=typeof self=="object"&&self&&self.Object===Object&&self,Bt=be||kt||Function("return this")(),T=Bt;var Rt=T.Symbol,C=Rt;var $e=Object.prototype,Ht=$e.hasOwnProperty,Kt=$e.toString,B=C?C.toStringTag:void 0;function Jt(e){var t=Ht.call(e,B),o=e[B];try{e[B]=void 0;var l=!0}catch(h){}var i=Kt.call(e);return l&&(t?e[B]=o:delete e[B]),i}var ve=Jt;var Ft=Object.prototype,Wt=Ft.toString;function zt(e){return Wt.call(e)}var we=zt;var Ut="[object Null]",Gt="[object Undefined]",Oe=C?C.toStringTag:void 0;function qt(e){return e==null?e===void 0?Gt:Ut:Oe&&Oe in Object(e)?ve(e):we(e)}var Se=qt;function Qt(e){return e!=null&&typeof e=="object"}var Ae=Qt;function Yt(e,t){for(var o=-1,l=e==null?0:e.length,i=Array(l);++o<l;)i[o]=t(e[o],o,e);return i}var R=Yt;function Zt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var H=Zt;function Xt(e){return e}var K=Xt;var er="[object AsyncFunction]",tr="[object Function]",rr="[object GeneratorFunction]",or="[object Proxy]";function ar(e){if(!H(e))return!1;var t=Se(e);return t==tr||t==rr||t==er||t==or}var J=ar;var nr=T["__core-js_shared__"],F=nr;var Ee=function(){var e=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sr(e){return!!Ee&&Ee in e}var De=sr;var fr=Function.prototype,ir=fr.toString;function lr(e){if(e!=null){try{return ir.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var je=lr;var ur=/[\\^$.*+?()[\]{}|]/g,pr=/^\[object .+?Constructor\]$/,mr=Function.prototype,cr=Object.prototype,dr=mr.toString,hr=cr.hasOwnProperty,yr=RegExp("^"+dr.call(hr).replace(ur,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xr(e){if(!H(e)||De(e))return!1;var t=J(e)?yr:pr;return t.test(je(e))}var Ne=xr;function gr(e,t){return e==null?void 0:e[t]}var Ie=gr;function br(e,t){var o=Ie(e,t);return Ne(o)?o:void 0}var P=br;function $r(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}var Te=$r;var vr=800,wr=16,Or=Date.now;function Sr(e){var t=0,o=0;return function(){var l=Or(),i=wr-(l-o);if(o=l,i>0){if(++t>=vr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ce=Sr;function Ar(e){return function(){return e}}var Pe=Ar;var Er=function(){try{var e=P(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),re=Er;var Dr=re?function(e,t){return re(e,"toString",{configurable:!0,enumerable:!1,value:Pe(t),writable:!0})}:K,_e=Dr;var jr=Ce(_e),Me=jr;function Nr(e,t,o,l){for(var i=e.length,h=o+(l?1:-1);l?h--:++h<i;)if(t(e[h],h,e))return h;return-1}var Ve=Nr;function Ir(e){return e!==e}var Le=Ir;function Tr(e,t,o){for(var l=o-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}var ke=Tr;function Cr(e,t,o){return t===t?ke(e,t,o):Ve(e,Le,o)}var Be=Cr;function Pr(e,t){var o=e==null?0:e.length;return!!o&&Be(e,t,0)>-1}var Re=Pr;function _r(e,t){return e===t||e!==e&&t!==t}var He=_r;var Ke=Math.max;function Mr(e,t,o){return t=Ke(t===void 0?e.length-1:t,0),function(){for(var l=arguments,i=-1,h=Ke(l.length-t,0),u=Array(h);++i<h;)u[i]=l[t+i];i=-1;for(var r=Array(t+1);++i<t;)r[i]=l[i];return r[t]=o(u),Te(e,this,r)}}var Je=Mr;function Vr(e,t){return Me(Je(e,t,K),e+"")}var Fe=Vr;var Lr=9007199254740991;function kr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lr}var We=kr;function Br(e){return e!=null&&We(e.length)&&!J(e)}var ze=Br;function Rr(e){return function(t){return e(t)}}var Ue=Rr;var Hr=P(Object,"create"),E=Hr;function Kr(){this.__data__=E?E(null):{},this.size=0}var Ge=Kr;function Jr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qe=Jr;var Fr="__lodash_hash_undefined__",Wr=Object.prototype,zr=Wr.hasOwnProperty;function Ur(e){var t=this.__data__;if(E){var o=t[e];return o===Fr?void 0:o}return zr.call(t,e)?t[e]:void 0}var Qe=Ur;var Gr=Object.prototype,qr=Gr.hasOwnProperty;function Qr(e){var t=this.__data__;return E?t[e]!==void 0:qr.call(t,e)}var Ye=Qr;var Yr="__lodash_hash_undefined__";function Zr(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=E&&t===void 0?Yr:t,this}var Ze=Zr;function _(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var l=e[t];this.set(l[0],l[1])}}_.prototype.clear=Ge;_.prototype.delete=qe;_.prototype.get=Qe;_.prototype.has=Ye;_.prototype.set=Ze;var oe=_;function Xr(){this.__data__=[],this.size=0}var Xe=Xr;function eo(e,t){for(var o=e.length;o--;)if(He(e[o][0],t))return o;return-1}var D=eo;var to=Array.prototype,ro=to.splice;function oo(e){var t=this.__data__,o=D(t,e);if(o<0)return!1;var l=t.length-1;return o==l?t.pop():ro.call(t,o,1),--this.size,!0}var et=oo;function ao(e){var t=this.__data__,o=D(t,e);return o<0?void 0:t[o][1]}var tt=ao;function no(e){return D(this.__data__,e)>-1}var rt=no;function so(e,t){var o=this.__data__,l=D(o,e);return l<0?(++this.size,o.push([e,t])):o[l][1]=t,this}var ot=so;function M(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var l=e[t];this.set(l[0],l[1])}}M.prototype.clear=Xe;M.prototype.delete=et;M.prototype.get=tt;M.prototype.has=rt;M.prototype.set=ot;var at=M;var fo=P(T,"Map"),nt=fo;function io(){this.size=0,this.__data__={hash:new oe,map:new(nt||at),string:new oe}}var st=io;function lo(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ft=lo;function uo(e,t){var o=e.__data__;return ft(t)?o[typeof t=="string"?"string":"hash"]:o.map}var j=uo;function po(e){var t=j(this,e).delete(e);return this.size-=t?1:0,t}var it=po;function mo(e){return j(this,e).get(e)}var lt=mo;function co(e){return j(this,e).has(e)}var ut=co;function ho(e,t){var o=j(this,e),l=o.size;return o.set(e,t),this.size+=o.size==l?0:1,this}var pt=ho;function V(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var l=e[t];this.set(l[0],l[1])}}V.prototype.clear=st;V.prototype.delete=it;V.prototype.get=lt;V.prototype.has=ut;V.prototype.set=pt;var mt=V;var yo="__lodash_hash_undefined__";function xo(e){return this.__data__.set(e,yo),this}var ct=xo;function go(e){return this.__data__.has(e)}var dt=go;function W(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new mt;++t<o;)this.add(e[t])}W.prototype.add=W.prototype.push=ct;W.prototype.has=dt;var ht=W;function bo(e,t){return e.has(t)}var ae=bo;function $o(e){return Ae(e)&&ze(e)}var yt=$o;function vo(e,t,o){for(var l=-1,i=e==null?0:e.length;++l<i;)if(o(t,e[l]))return!0;return!1}var xt=vo;var wo=Math.min;function Oo(e,t,o){for(var l=o?xt:Re,i=e[0].length,h=e.length,u=h,r=Array(h),c=1/0,n=[];u--;){var s=e[u];u&&t&&(s=R(s,Ue(t))),c=wo(s.length,c),r[u]=!o&&(t||i>=120&&s.length>=120)?new ht(u&&s):void 0}s=e[0];var f=-1,m=r[0];e:for(;++f<i&&n.length<c;){var x=s[f],b=t?t(x):x;if(x=o||x!==0?x:0,!(m?ae(m,b):l(n,b,o))){for(u=h;--u;){var w=r[u];if(!(w?ae(w,b):l(e[u],b,o)))continue e}m&&m.push(b),n.push(x)}}return n}var gt=Oo;function So(e){return yt(e)?e:[]}var bt=So;var Ao=Fe(function(e){var t=R(e,bt);return t.length&&t[0]===e[0]?gt(t):[]}),ne=Ao;function se(e){return typeof e!="string"?e:e.length?[e]:[]}var G=Q(vt(),1);function fe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ie=new Map,wt=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(o=>{if(typeof o!="string"){if(typeof o>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof o}' in the array`)}return!0})},Eo=(e,t)=>{t=S({caseSensitive:!1},t);let o=e+JSON.stringify(t);if(ie.has(o))return ie.get(o);let l=e[0]==="!";l&&(e=e.slice(1)),e=fe(e).replace(/\\\*/g,"[\\s\\S]*");let i=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return i.negated=l,ie.set(o,i),i},Do=(e,t,o,l)=>{if(e=wt(e,"inputs"),t=wt(t,"patterns"),t.length===0)return[];t=t.map(u=>Eo(u,o));let{allPatterns:i}=o||{},h=[];for(let u of e){let r,c=[...t].fill(!1);for(let[n,s]of t.entries())if(s.test(u)&&(c[n]=!0,r=!s.negated,!r))break;if(!(r===!1||r===void 0&&t.some(n=>!n.negated)||i&&c.some((n,s)=>!n&&!t[s].negated))&&(h.push(u),l))break}return h};function U(e,t,o){return Do(e,t,o,!0).length>0}var Ot="8.0.12";var No=Ot,St={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function Io(e,t,o){function l(n){return n!=null}function i(n,s){return typeof s=="string"&&(s=se(s)),Array.from(n).filter(f=>!s.some(m=>U(f,m,{caseSensitive:!0})))}let h=Object.prototype.hasOwnProperty,u=["any","anything","every","everything","all","whatever","whatevs"];if(!l(e))throw new Error("check-types-mini: [THROW_ID_01] First argument is missing!");let r=S(S({},St),o);if(typeof r.ignoreKeys=="string"&&(r.ignoreKeys=[r.ignoreKeys]),typeof r.ignorePaths=="string"&&(r.ignorePaths=[r.ignorePaths]),typeof r.acceptArraysIgnore=="string"&&(r.acceptArraysIgnore=[r.acceptArraysIgnore]),r.msg=`${r.msg}`.trim(),r.msg[r.msg.length-1]===":"&&(r.msg=r.msg.slice(0,r.msg.length-1).trim()),A(r.schema))Object.keys(r.schema).forEach(n=>{if(A(r.schema[n])){let s={};te(r.schema[n],(f,m,x)=>{let b=m!==void 0?m:f;return!Array.isArray(b)&&!A(b)&&(s[`${n}.${x.path}`]=b),b}),delete r.schema[n],r.schema=S(S({},r.schema),s)}}),Object.keys(r.schema).forEach(n=>{Array.isArray(r.schema[n])||(r.schema[n]=[r.schema[n]]),r.schema[n]=r.schema[n].map(s=>`${s}`.toLowerCase().trim())});else if(r.schema!=null)throw new Error(`check-types-mini: opts.schema was customised to ${JSON.stringify(r.schema,null,0)} which is not object but ${typeof r.schema}`);if(l(t)||(t={}),r.enforceStrictKeyset)if(l(r.schema)&&Object.keys(r.schema).length){if(t&&i(N(Object.keys(e),Object.keys(t).concat(Object.keys(r.schema))),r.ignoreKeys).length){let n=N(Object.keys(e),Object.keys(t).concat(Object.keys(r.schema)));throw new TypeError(`${r.msg}: ${r.optsVarName}.enforceStrictKeyset is on and the following key${n.length>1?"s":""} ${n.length>1?"are":"is"} not covered by schema and/or reference objects: ${n.join(", ")}`)}}else if(A(t)&&Object.keys(t).length){if(i(N(Object.keys(e),Object.keys(t)),r.ignoreKeys).length!==0){let n=N(Object.keys(e),Object.keys(t));throw new TypeError(`${r.msg}: The input object has key${n.length>1?"s":""} which ${n.length>1?"are":"is"} not covered by the reference object: ${n.join(", ")}`)}else if(i(N(Object.keys(t),Object.keys(e)),r.ignoreKeys).length!==0){let n=N(Object.keys(t),Object.keys(e));throw new TypeError(`${r.msg}: The reference object has key${n.length>1?"s":""} which ${n.length>1?"are":"is"} not present in the input object: ${n.join(", ")}`)}}else throw new TypeError(`${r.msg}: Both ${r.optsVarName}.schema and reference objects are missing! We don't have anything to match the keys as you requested via resolvedOpts.enforceStrictKeyset!`);let c=[];te(e,(n,s,f)=>{let m=s,x=n;if(f.parentType==="array"&&(x=void 0,m=n),Array.isArray(c)&&c.length&&c.some(a=>f.path.startsWith(a))||x&&r.ignoreKeys.some(a=>x&&U(x,a))||r.ignorePaths.some(a=>U(f.path,a)))return m;let b=!(!A(m)&&!Array.isArray(m)&&Array.isArray(f.parent)),w=!1;A(r.schema)&&h.call(r.schema,f.path)&&(w=!0);let d=!1;if(A(t)&&G.default.has(t,f.path)&&(d=!0),r.enforceStrictKeyset&&b&&!w&&!d)throw new TypeError(`${r.msg}: ${r.optsVarName}.${f.path} is neither covered by reference object (second input argument), nor ${r.optsVarName}.schema! To stop this error, turn off ${r.optsVarName}.enforceStrictKeyset or provide some type reference (2nd argument or ${r.optsVarName}.schema).
11
11
 
12
12
  Debug info:
13
13
 
@@ -15,17 +15,17 @@ obj = ${JSON.stringify(e,null,4)}
15
15
 
16
16
  ref = ${JSON.stringify(t,null,4)}
17
17
 
18
- innerObj = ${JSON.stringify(s,null,4)}
18
+ innerObj = ${JSON.stringify(f,null,4)}
19
19
 
20
- resolvedOpts = ${JSON.stringify(i,null,4)}
20
+ resolvedOpts = ${JSON.stringify(r,null,4)}
21
21
 
22
- current = ${JSON.stringify(p,null,4)}
22
+ current = ${JSON.stringify(m,null,4)}
23
23
 
24
- `);if(v){let o=De(i.schema[s.path]).map(c=>`${c}`.toLowerCase());if(ue.default.set(i.schema,s.path,o),(0,Gt.default)(o,g).length)y.push(s.path);else if(p!==!0&&p!==!1&&!o.includes((0,S.default)(p).toLowerCase())||(p===!0||p===!1)&&!o.includes(String(p))&&!o.includes("boolean"))if(Array.isArray(p)&&i.acceptArrays){for(let c=0,d=p.length;c<d;c++)if(!o.includes((0,S.default)(p[c]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path}.${c}, the ${c}th element (equal to ${JSON.stringify(p[c],null,0)}) is of a type ${(0,S.default)(p[c]).toLowerCase()}, but only the following are allowed by the ${i.optsVarName}.schema: ${o.join(", ")}`)}else throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path} was customised to ${(0,S.default)(p)!=="string"?'"':""}${JSON.stringify(p,null,0)}${(0,S.default)(p)!=="string"?'"':""} (type: ${(0,S.default)(p).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(t&&E(t)&&l){let o=ue.default.get(t,s.path);if(i.acceptArrays&&Array.isArray(p)&&!i.acceptArraysIgnore.includes(u)){if(!p.every(d=>(0,S.default)(d).toLowerCase()===(0,S.default)(t[u]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path} was customised to be array, but not all of its elements are ${(0,S.default)(t[u]).toLowerCase()}-type`)}else if((0,S.default)(p)!==(0,S.default)(o))throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path} was customised to ${(0,S.default)(p).toLowerCase()==="string"?"":'"'}${JSON.stringify(p,null,0)}${(0,S.default)(p).toLowerCase()==="string"?"":'"'} which is not ${(0,S.default)(o).toLowerCase()} but ${(0,S.default)(p).toLowerCase()}`)}return p})}function Vi(e,t,r){Ii(e,t,r)}return tr(ki);})();
24
+ `);if(w){let a=se(r.schema[f.path]).map(p=>`${p}`.toLowerCase());if(G.default.set(r.schema,f.path,a),ne(a,u).length)c.push(f.path);else if(m!==!0&&m!==!1&&!a.includes((0,v.default)(m).toLowerCase())||(m===!0||m===!1)&&!a.includes(String(m))&&!a.includes("boolean"))if(Array.isArray(m)&&r.acceptArrays){for(let p=0,y=m.length;p<y;p++)if(!a.includes((0,v.default)(m[p]).toLowerCase()))throw new TypeError(`${r.msg}: ${r.optsVarName}.${f.path}.${p}, the ${p}th element (equal to ${JSON.stringify(m[p],null,0)}) is of a type ${(0,v.default)(m[p]).toLowerCase()}, but only the following are allowed by the ${r.optsVarName}.schema: ${a.join(", ")}`)}else throw new TypeError(`${r.msg}: ${r.optsVarName}.${f.path} was customised to ${(0,v.default)(m)!=="string"?'"':""}${JSON.stringify(m,null,0)}${(0,v.default)(m)!=="string"?'"':""} (type: ${(0,v.default)(m).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(a,null,0)})`)}else if(t&&A(t)&&d){let a=G.default.get(t,f.path);if(r.acceptArrays&&Array.isArray(m)&&!r.acceptArraysIgnore.includes(n)){if(!m.every(y=>(0,v.default)(y).toLowerCase()===(0,v.default)(t[n]).toLowerCase()))throw new TypeError(`${r.msg}: ${r.optsVarName}.${f.path} was customised to be array, but not all of its elements are ${(0,v.default)(t[n]).toLowerCase()}-type`)}else if((0,v.default)(m)!==(0,v.default)(a))throw new TypeError(`${r.msg}: ${r.optsVarName}.${f.path} was customised to ${(0,v.default)(m).toLowerCase()==="string"?"":'"'}${JSON.stringify(m,null,0)}${(0,v.default)(m).toLowerCase()==="string"?"":'"'} which is not ${(0,v.default)(a).toLowerCase()} but ${(0,v.default)(m).toLowerCase()}`)}return m})}function To(e,t,o){Io(e,t,o)}return Pt(Co);})();
25
25
  /**
26
26
  * @name codsen-utils
27
27
  * @fileoverview Various utility functions
28
- * @version 1.3.1
28
+ * @version 1.5.0
29
29
  * @author Roy Revelt, Codsen Ltd
30
30
  * @license MIT
31
31
  * {@link https://codsen.com/os/codsen-utils/}
@@ -33,7 +33,7 @@ current = ${JSON.stringify(p,null,4)}
33
33
  /**
34
34
  * @name ast-monkey-util
35
35
  * @fileoverview Utility library of AST helper functions
36
- * @version 3.0.5
36
+ * @version 3.0.6
37
37
  * @author Roy Revelt, Codsen Ltd
38
38
  * @license MIT
39
39
  * {@link https://codsen.com/os/ast-monkey-util/}
@@ -41,7 +41,7 @@ current = ${JSON.stringify(p,null,4)}
41
41
  /**
42
42
  * @name ast-monkey-traverse
43
43
  * @fileoverview Utility library to traverse AST
44
- * @version 4.0.8
44
+ * @version 4.0.10
45
45
  * @author Roy Revelt, Codsen Ltd
46
46
  * @license MIT
47
47
  * {@link https://codsen.com/os/ast-monkey-traverse/}
@@ -54,3 +54,16 @@ current = ${JSON.stringify(p,null,4)}
54
54
  * @license MIT
55
55
  * {@link https://codsen.com/os/arrayiffy-if-string/}
56
56
  */
57
+ /*! Bundled license information:
58
+
59
+ lodash-es/lodash.js:
60
+ (**
61
+ * @license
62
+ * Lodash (Custom Build) <https://lodash.com/>
63
+ * Build: `lodash modularize exports="es" -o ./`
64
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
65
+ * Released under MIT license <https://lodash.com/license>
66
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
67
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
68
+ *)
69
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "check-types-mini",
3
- "version": "8.0.10",
3
+ "version": "8.0.12",
4
4
  "description": "Validate options object",
5
5
  "keywords": [
6
6
  "compare",
@@ -72,15 +72,13 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
+ "@types/lodash-es": "^4.17.7",
75
76
  "arrayiffy-if-string": "^5.0.5",
76
- "ast-monkey-traverse": "^4.0.8",
77
- "codsen-utils": "^1.3.1",
78
- "lodash.intersection": "^4.4.0",
77
+ "ast-monkey-traverse": "^4.0.10",
78
+ "codsen-utils": "^1.5.0",
79
+ "lodash-es": "^4.17.21",
79
80
  "matcher": "^5.0.0",
80
81
  "object-path": "^0.11.8",
81
82
  "type-detect": "^4.0.8"
82
- },
83
- "devDependencies": {
84
- "@types/lodash.intersection": "^4.4.7"
85
83
  }
86
84
  }