check-types-mini 8.0.5 → 8.0.6
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.
|
|
4
|
+
* @version 8.0.6
|
|
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 h from"lodash.pullall";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}from"codsen-utils";var j="8.0.
|
|
10
|
+
import i from"type-detect";import h from"lodash.pullall";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}from"codsen-utils";var j="8.0.6";var F=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).
|
|
11
11
|
|
|
12
12
|
Debug info:
|
|
13
13
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name check-types-mini
|
|
3
3
|
* @fileoverview Validate options object
|
|
4
|
-
* @version 8.0.
|
|
4
|
+
* @version 8.0.6
|
|
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 Yt=Object.create;var J=Object.defineProperty,Xt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,tr=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty,rr=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,E=(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))rr.call(t,r)&&Le(e,r,t[r]);return e},R=(e,t)=>Xt(e,zt(t));var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nr=(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 c of er(t))!Me.call(e,c)&&c!==r&&J(e,c,{get:()=>t[c],enumerable:!(n=Zt(t,c))||n.enumerable});return e};var G=(e,t,r)=>(r=e!=null?Yt(tr(e)):{},Ke(t||!e||!e.__esModule?J(r,"default",{value:e,enumerable:!0}):r,e)),ir=e=>Ke(J({},"__esModule",{value:!0}),e);var He=F((ue,fe)=>{(function(e,t){typeof ue=="object"&&typeof fe<"u"?fe.exports=t():typeof define=="function"&&define.amd?define(t):e.typeDetect=t()})(ue,function(){"use strict";var e=typeof Promise=="function",t=typeof self=="object"?self:global,r=typeof Symbol<"u",n=typeof Map<"u",c=typeof Set<"u",p=typeof WeakMap<"u",y=typeof WeakSet<"u",i=typeof DataView<"u",g=r&&typeof Symbol.iterator<"u",u=r&&typeof Symbol.toStringTag<"u",a=c&&typeof Set.prototype.entries=="function",s=n&&typeof Map.prototype.entries=="function",h=a&&Object.getPrototypeOf(new Set().entries()),m=s&&Object.getPrototypeOf(new Map().entries()),b=g&&typeof Array.prototype[Symbol.iterator]=="function",S=b&&Object.getPrototypeOf([][Symbol.iterator]()),f=g&&typeof String.prototype[Symbol.iterator]=="function",o=f&&Object.getPrototypeOf(""[Symbol.iterator]()),l=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":c&&_===Set.prototype?"Set":n&&_===Map.prototype?"Map":y&&_===WeakSet.prototype?"WeakSet":p&&_===WeakMap.prototype?"WeakMap":i&&_===DataView.prototype?"DataView":n&&_===m?"Map Iterator":c&&_===h?"Set Iterator":b&&_===S?"Array Iterator":f&&_===o?"String Iterator":_===null?"Object":Object.prototype.toString.call(w).slice(l,d)}return O})});var Fe=F((Xi,Re)=>{function or(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function sr(e,t,r,n){for(var c=e.length,p=r+(n?1:-1);n?p--:++p<c;)if(t(e[p],p,e))return p;return-1}function ar(e,t,r){if(t!==t)return sr(e,lr,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function cr(e,t,r,n){for(var c=r-1,p=e.length;++c<p;)if(n(e[c],t))return c;return-1}function lr(e){return e!==e}function ur(e){return function(t){return e(t)}}var fr=Array.prototype,Je=fr.splice;function pr(e,t,r,n){var c=n?cr:ar,p=-1,y=t.length,i=e;for(e===t&&(t=hr(t)),r&&(i=or(e,ur(r)));++p<y;)for(var g=0,u=t[p],a=r?r(u):u;(g=c(i,a,g,n))>-1;)i!==e&&Je.call(i,g,1),Je.call(e,g,1);return e}function hr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function gr(e,t){return e&&e.length&&t&&t.length?pr(e,t):e}Re.exports=gr});var Dt=F((U,V)=>{var yr=200,tt="__lodash_hash_undefined__",rt=9007199254740991,$e="[object Arguments]",dr="[object Array]",nt="[object Boolean]",it="[object Date]",mr="[object Error]",we="[object Function]",ot="[object GeneratorFunction]",q="[object Map]",st="[object Number]",Oe="[object Object]",Ge="[object Promise]",at="[object RegExp]",Y="[object Set]",ct="[object String]",lt="[object Symbol]",he="[object WeakMap]",ut="[object ArrayBuffer]",X="[object DataView]",ft="[object Float32Array]",pt="[object Float64Array]",ht="[object Int8Array]",gt="[object Int16Array]",yt="[object Int32Array]",dt="[object Uint8Array]",mt="[object Uint8ClampedArray]",bt="[object Uint16Array]",$t="[object Uint32Array]",br=/[\\^$.*+?()[\]{}|]/g,$r=/\w*$/,wr=/^\[object .+?Constructor\]$/,Or=/^(?:0|[1-9]\d*)$/,$={};$[$e]=$[dr]=$[ut]=$[X]=$[nt]=$[it]=$[ft]=$[pt]=$[ht]=$[gt]=$[yt]=$[q]=$[st]=$[Oe]=$[at]=$[Y]=$[ct]=$[lt]=$[dt]=$[mt]=$[bt]=$[$t]=!0;$[mr]=$[we]=$[he]=!1;var vr=typeof global=="object"&&global&&global.Object===Object&&global,Sr=typeof self=="object"&&self&&self.Object===Object&&self,x=vr||Sr||Function("return this")(),wt=typeof U=="object"&&U&&!U.nodeType&&U,Ue=wt&&typeof V=="object"&&V&&!V.nodeType&&V,_r=Ue&&Ue.exports===wt;function Er(e,t){return e.set(t[0],t[1]),e}function Ar(e,t){return e.add(t),e}function xr(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Tr(e,t){for(var r=-1,n=t.length,c=e.length;++r<n;)e[c+r]=t[r];return e}function Ot(e,t,r,n){var c=-1,p=e?e.length:0;for(n&&p&&(r=e[++c]);++c<p;)r=t(r,e[c],c,e);return r}function jr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Cr(e,t){return e==null?void 0:e[t]}function vt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function We(e){var t=-1,r=Array(e.size);return e.forEach(function(n,c){r[++t]=[c,n]}),r}function ve(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 Dr=Array.prototype,Nr=Function.prototype,Z=Object.prototype,pe=x["__core-js_shared__"],Qe=function(){var e=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),St=Nr.toString,j=Z.hasOwnProperty,z=Z.toString,Pr=RegExp("^"+St.call(j).replace(br,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=_r?x.Buffer:void 0,Ye=x.Symbol,Xe=x.Uint8Array,Ir=ve(Object.getPrototypeOf,Object),Vr=Object.create,kr=Z.propertyIsEnumerable,Lr=Dr.splice,Ze=Object.getOwnPropertySymbols,Mr=qe?qe.isBuffer:void 0,Kr=ve(Object.keys,Object),ge=M(x,"DataView"),W=M(x,"Map"),ye=M(x,"Promise"),de=M(x,"Set"),me=M(x,"WeakMap"),B=M(Object,"create"),Hr=N(ge),Jr=N(W),Rr=N(ye),Fr=N(de),Gr=N(me),ze=Ye?Ye.prototype:void 0,et=ze?ze.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 Ur(){this.__data__=B?B(null):{}}function Wr(e){return this.has(e)&&delete this.__data__[e]}function Br(e){var t=this.__data__;if(B){var r=t[e];return r===tt?void 0:r}return j.call(t,e)?t[e]:void 0}function Qr(e){var t=this.__data__;return B?t[e]!==void 0:j.call(t,e)}function qr(e,t){var r=this.__data__;return r[e]=B&&t===void 0?tt:t,this}D.prototype.clear=Ur;D.prototype.delete=Wr;D.prototype.get=Br;D.prototype.has=Qr;D.prototype.set=qr;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 Yr(){this.__data__=[]}function Xr(e){var t=this.__data__,r=ee(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Lr.call(t,r,1),!0}function Zr(e){var t=this.__data__,r=ee(t,e);return r<0?void 0:t[r][1]}function zr(e){return ee(this.__data__,e)>-1}function en(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=Yr;T.prototype.delete=Xr;T.prototype.get=Zr;T.prototype.has=zr;T.prototype.set=en;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 tn(){this.__data__={hash:new D,map:new(W||T),string:new D}}function rn(e){return te(this,e).delete(e)}function nn(e){return te(this,e).get(e)}function on(e){return te(this,e).has(e)}function sn(e,t){return te(this,e).set(e,t),this}k.prototype.clear=tn;k.prototype.delete=rn;k.prototype.get=nn;k.prototype.has=on;k.prototype.set=sn;function L(e){this.__data__=new T(e)}function an(){this.__data__=new T}function cn(e){return this.__data__.delete(e)}function ln(e){return this.__data__.get(e)}function un(e){return this.__data__.has(e)}function fn(e,t){var r=this.__data__;if(r instanceof T){var n=r.__data__;if(!W||n.length<yr-1)return n.push([e,t]),this;r=this.__data__=new k(n)}return r.set(e,t),this}L.prototype.clear=an;L.prototype.delete=cn;L.prototype.get=ln;L.prototype.has=un;L.prototype.set=fn;function pn(e,t){var r=_e(e)||kn(e)?jr(e.length,String):[],n=r.length,c=!!n;for(var p in e)(t||j.call(e,p))&&!(c&&(p=="length"||Nn(p,n)))&&r.push(p);return r}function _t(e,t,r){var n=e[t];(!(j.call(e,t)&&Tt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function ee(e,t){for(var r=e.length;r--;)if(Tt(e[r][0],t))return r;return-1}function hn(e,t){return e&&Et(t,Ee(t),e)}function be(e,t,r,n,c,p,y){var i;if(n&&(i=p?n(e,c,p,y):n(e)),i!==void 0)return i;if(!re(e))return e;var g=_e(e);if(g){if(i=jn(e),!t)return An(e,i)}else{var u=C(e),a=u==we||u==ot;if(Mn(e))return $n(e,t);if(u==Oe||u==$e||a&&!p){if(vt(e))return p?e:{};if(i=Cn(a?{}:e),!t)return xn(e,hn(i,e))}else{if(!$[u])return p?e:{};i=Dn(e,u,be,t)}}y||(y=new L);var s=y.get(e);if(s)return s;if(y.set(e,i),!g)var h=r?Tn(e):Ee(e);return xr(h||e,function(m,b){h&&(b=m,m=e[b]),_t(i,b,be(m,t,r,n,b,e,y))}),i}function gn(e){return re(e)?Vr(e):{}}function yn(e,t,r){var n=t(e);return _e(e)?n:Tr(n,r(e))}function dn(e){return z.call(e)}function mn(e){if(!re(e)||In(e))return!1;var t=Ct(e)||vt(e)?Pr:wr;return t.test(N(e))}function bn(e){if(!xt(e))return Kr(e);var t=[];for(var r in Object(e))j.call(e,r)&&r!="constructor"&&t.push(r);return t}function $n(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Se(e){var t=new e.constructor(e.byteLength);return new Xe(t).set(new Xe(e)),t}function wn(e,t){var r=t?Se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function On(e,t,r){var n=t?r(We(e),!0):We(e);return Ot(n,Er,new e.constructor)}function vn(e){var t=new e.constructor(e.source,$r.exec(e));return t.lastIndex=e.lastIndex,t}function Sn(e,t,r){var n=t?r(Be(e),!0):Be(e);return Ot(n,Ar,new e.constructor)}function _n(e){return et?Object(et.call(e)):{}}function En(e,t){var r=t?Se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function An(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Et(e,t,r,n){r||(r={});for(var c=-1,p=t.length;++c<p;){var y=t[c],i=n?n(r[y],e[y],y,r,e):void 0;_t(r,y,i===void 0?e[y]:i)}return r}function xn(e,t){return Et(e,At(e),t)}function Tn(e){return yn(e,Ee,At)}function te(e,t){var r=e.__data__;return Pn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function M(e,t){var r=Cr(e,t);return mn(r)?r:void 0}var At=Ze?ve(Ze,Object):Jn,C=dn;(ge&&C(new ge(new ArrayBuffer(1)))!=X||W&&C(new W)!=q||ye&&C(ye.resolve())!=Ge||de&&C(new de)!=Y||me&&C(new me)!=he)&&(C=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 Hr:return X;case Jr:return q;case Rr:return Ge;case Fr:return Y;case Gr:return he}return t});function jn(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&j.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Cn(e){return typeof e.constructor=="function"&&!xt(e)?gn(Ir(e)):{}}function Dn(e,t,r,n){var c=e.constructor;switch(t){case ut:return Se(e);case nt:case it:return new c(+e);case X:return wn(e,n);case ft:case pt:case ht:case gt:case yt:case dt:case mt:case bt:case $t:return En(e,n);case q:return On(e,n,r);case st:case ct:return new c(e);case at:return vn(e);case Y:return Sn(e,n,r);case lt:return _n(e)}}function Nn(e,t){return t=t==null?rt:t,!!t&&(typeof e=="number"||Or.test(e))&&e>-1&&e%1==0&&e<t}function Pn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function In(e){return!!Qe&&Qe in e}function xt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Z;return e===r}function N(e){if(e!=null){try{return St.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Vn(e){return be(e,!0,!0)}function Tt(e,t){return e===t||e!==e&&t!==t}function kn(e){return Ln(e)&&j.call(e,"callee")&&(!kr.call(e,"callee")||z.call(e)==$e)}var _e=Array.isArray;function jt(e){return e!=null&&Kn(e.length)&&!Ct(e)}function Ln(e){return Hn(e)&&jt(e)}var Mn=Mr||Rn;function Ct(e){var t=re(e)?z.call(e):"";return t==we||t==ot}function Kn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rt}function re(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Hn(e){return!!e&&typeof e=="object"}function Ee(e){return jt(e)?pn(e):bn(e)}function Jn(){return[]}function Rn(){return!1}V.exports=Vn});var Ft=F((io,Rt)=>{var je="__lodash_hash_undefined__",Gn=9007199254740991,Un="[object Function]",Wn="[object GeneratorFunction]",Bn=/[\\^$.*+?()[\]{}|]/g,Qn=/^\[object .+?Constructor\]$/,qn=typeof global=="object"&&global&&global.Object===Object&&global,Yn=typeof self=="object"&&self&&self.Object===Object&&self,Vt=qn||Yn||Function("return this")();function Xn(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 Zn(e,t){var r=e?e.length:0;return!!r&&ti(e,t,0)>-1}function zn(e,t,r){for(var n=-1,c=e?e.length:0;++n<c;)if(r(t,e[n]))return!0;return!1}function kt(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function ei(e,t,r,n){for(var c=e.length,p=r+(n?1:-1);n?p--:++p<c;)if(t(e[p],p,e))return p;return-1}function ti(e,t,r){if(t!==t)return ei(e,ri,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function ri(e){return e!==e}function ni(e){return function(t){return e(t)}}function Nt(e,t){return e.has(t)}function ii(e,t){return e==null?void 0:e[t]}function oi(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}var si=Array.prototype,ai=Function.prototype,Lt=Object.prototype,Te=Vt["__core-js_shared__"],Pt=function(){var e=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Mt=ai.toString,Ce=Lt.hasOwnProperty,ci=Lt.toString,li=RegExp("^"+Mt.call(Ce).replace(Bn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ui=si.splice,It=Math.max,fi=Math.min,pi=Kt(Vt,"Map"),Q=Kt(Object,"create");function P(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 hi(){this.__data__=Q?Q(null):{}}function gi(e){return this.has(e)&&delete this.__data__[e]}function yi(e){var t=this.__data__;if(Q){var r=t[e];return r===je?void 0:r}return Ce.call(t,e)?t[e]:void 0}function di(e){var t=this.__data__;return Q?t[e]!==void 0:Ce.call(t,e)}function mi(e,t){var r=this.__data__;return r[e]=Q&&t===void 0?je:t,this}P.prototype.clear=hi;P.prototype.delete=gi;P.prototype.get=yi;P.prototype.has=di;P.prototype.set=mi;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 bi(){this.__data__=[]}function $i(e){var t=this.__data__,r=oe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ui.call(t,r,1),!0}function wi(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]}function Oi(e){return oe(this.__data__,e)>-1}function vi(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=bi;K.prototype.delete=$i;K.prototype.get=wi;K.prototype.has=Oi;K.prototype.set=vi;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 Si(){this.__data__={hash:new P,map:new(pi||K),string:new P}}function _i(e){return se(this,e).delete(e)}function Ei(e){return se(this,e).get(e)}function Ai(e){return se(this,e).has(e)}function xi(e,t){return se(this,e).set(e,t),this}H.prototype.clear=Si;H.prototype.delete=_i;H.prototype.get=Ei;H.prototype.has=Ai;H.prototype.set=xi;function ie(e){var t=-1,r=e?e.length:0;for(this.__data__=new H;++t<r;)this.add(e[t])}function Ti(e){return this.__data__.set(e,je),this}function ji(e){return this.__data__.has(e)}ie.prototype.add=ie.prototype.push=Ti;ie.prototype.has=ji;function oe(e,t){for(var r=e.length;r--;)if(Mi(e[r][0],t))return r;return-1}function Ci(e,t,r){for(var n=r?zn:Zn,c=e[0].length,p=e.length,y=p,i=Array(p),g=1/0,u=[];y--;){var a=e[y];y&&t&&(a=kt(a,ni(t))),g=fi(a.length,g),i[y]=!r&&(t||c>=120&&a.length>=120)?new ie(y&&a):void 0}a=e[0];var s=-1,h=i[0];e:for(;++s<c&&u.length<g;){var m=a[s],b=t?t(m):m;if(m=r||m!==0?m:0,!(h?Nt(h,b):n(u,b,r))){for(y=p;--y;){var S=i[y];if(!(S?Nt(S,b):n(e[y],b,r)))continue e}h&&h.push(b),u.push(m)}}return u}function Di(e){if(!Jt(e)||Vi(e))return!1;var t=Ht(e)||oi(e)?li:Qn;return t.test(ki(e))}function Ni(e,t){return t=It(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,c=It(r.length-t,0),p=Array(c);++n<c;)p[n]=r[t+n];n=-1;for(var y=Array(t+1);++n<t;)y[n]=r[n];return y[t]=p,Xn(e,this,y)}}function Pi(e){return Hi(e)?e:[]}function se(e,t){var r=e.__data__;return Ii(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kt(e,t){var r=ii(e,t);return Di(r)?r:void 0}function Ii(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vi(e){return!!Pt&&Pt in e}function ki(e){if(e!=null){try{return Mt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Li=Ni(function(e){var t=kt(e,Pi);return t.length&&t[0]===e[0]?Ci(t):[]});function Mi(e,t){return e===t||e!==e&&t!==t}function Ki(e){return e!=null&&Ji(e.length)&&!Ht(e)}function Hi(e){return Ri(e)&&Ki(e)}function Ht(e){var t=Jt(e)?ci.call(e):"";return t==Un||t==Wn}function Ji(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Gn}function Jt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ri(e){return!!e&&typeof e=="object"}Rt.exports=Li});var Ut=F((Gt,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()})(Gt,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||p(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 c(a){return typeof a=="object"&&n(a)==="[object Object]"}var p=Array.isArray||function(a){return e.call(a)==="[object Array]"};function y(a){return typeof a=="boolean"||n(a)==="[object Boolean]"}function i(a){var s=parseInt(a);return s.toString()===a?s:a}function g(a){a=a||{};var s=function(f){return Object.keys(s).reduce(function(o,l){return l==="create"||typeof s[l]=="function"&&(o[l]=s[l].bind(s,f)),o},{})},h;a.includeInheritedProps?h=function(){return!0}:h=function(f,o){return typeof o=="number"&&Array.isArray(f)||t(f,o)};function m(f,o){if(h(f,o))return f[o]}var b;a.includeInheritedProps?b=function(f,o){typeof o!="string"&&typeof o!="number"&&(o=String(o));var l=m(f,o);if(o==="__proto__"||o==="prototype"||o==="constructor"&&typeof l=="function")throw new Error("For security reasons, object's magic properties cannot be set");return l}:b=function(f,o){return m(f,o)};function S(f,o,l,d){if(typeof o=="number"&&(o=[o]),!o||o.length===0)return f;if(typeof o=="string")return S(f,o.split(".").map(i),l,d);var O=o[0],w=b(f,O);return o.length===1?((w===void 0||!d)&&(f[O]=l),w):(w===void 0&&(typeof o[1]=="number"?f[O]=[]:f[O]={}),S(f[O],o.slice(1),l,d))}return s.has=function(f,o){if(typeof o=="number"?o=[o]:typeof o=="string"&&(o=o.split(".")),!o||o.length===0)return!!f;for(var l=0;l<o.length;l++){var d=i(o[l]);if(typeof d=="number"&&p(f)&&d<f.length||(a.includeInheritedProps?d in Object(f):t(f,d)))f=f[d];else return!1}return!0},s.ensureExists=function(f,o,l){return S(f,o,l,!0)},s.set=function(f,o,l,d){return S(f,o,l,d)},s.insert=function(f,o,l,d){var O=s.get(f,o);d=~~d,p(O)||(O=[],s.set(f,o,O)),O.splice(d,0,l)},s.empty=function(f,o){if(!r(o)&&f!=null){var l,d;if(l=s.get(f,o)){if(typeof l=="string")return s.set(f,o,"");if(y(l))return s.set(f,o,!1);if(typeof l=="number")return s.set(f,o,0);if(p(l))l.length=0;else if(c(l))for(d in l)h(l,d)&&delete l[d];else return s.set(f,o,null)}}},s.push=function(f,o){var l=s.get(f,o);p(l)||(l=[],s.set(f,o,l)),l.push.apply(l,Array.prototype.slice.call(arguments,2))},s.coalesce=function(f,o,l){for(var d,O=0,w=o.length;O<w;O++)if((d=s.get(f,o[O]))!==void 0)return d;return l},s.get=function(f,o,l){if(typeof o=="number"&&(o=[o]),!o||o.length===0)return f;if(f==null)return l;if(typeof o=="string")return s.get(f,o.split("."),l);var d=i(o[0]),O=b(f,d);return O===void 0?l:o.length===1?O:s.get(f[d],o.slice(1),l)},s.del=function(o,l){if(typeof l=="number"&&(l=[l]),o==null||r(l))return o;if(typeof l=="string")return s.del(o,l.split("."));var d=i(l[0]);if(b(o,d),!h(o,d))return o;if(l.length===1)p(o)?o.splice(d,1):delete o[d];else return s.del(o[d],l.slice(1));return o},s}var u=g();return u.create=g,u.withInheritedProps=g({includeInheritedProps:!0}),u})});var qi={};nr(qi,{checkTypesMini:()=>Qi,defaults:()=>qt,version:()=>Wi});var v=G(He(),1),I=G(Fe(),1);var ne=G(Dt(),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 Fn(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 Ae=Fn;function xe(e,t){let r={now:!1};function n(c,p,y,i){let g=(0,ne.default)(c),u,a=E({depth:-1,path:""},y);if(a.depth+=1,Array.isArray(g))for(let s=0,h=g.length;s<h&&!i.now;s++){let m=a.path?`${a.path}.${s}`:`${s}`;g[s]!==void 0?(a.parent=(0,ne.default)(g),a.parentType="array",a.parentKey=Ae(m),u=n(p(g[s],void 0,R(E({},a),{path:m}),i),p,R(E({},a),{path:m}),i),Number.isNaN(u)&&s<g.length?(g.splice(s,1),s-=1):g[s]=u):g.splice(s,1)}else if(A(g))for(let s in g){if(i.now&&s!=null)break;let h=a.path?`${a.path}.${s}`:s;a.depth===0&&s!=null&&(a.topmostKey=s),a.parent=(0,ne.default)(g),a.parentType="object",a.parentKey=Ae(h),u=n(p(s,g[s],R(E({},a),{path:h}),i),p,R(E({},a),{path:h}),i),Number.isNaN(u)?delete g[s]:g[s]=u}return g}return n(e,t,{},r)}var Qt=G(Ft(),1);function De(e){return typeof e!="string"?e:e.length?[e]:[]}var le=G(Ut(),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,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(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})},Fi=(e,t)=>{t=E({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 c=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return c.negated=n,Pe.set(r,c),c},Gi=(e,t,r,n)=>{if(e=Wt(e,"inputs"),t=Wt(t,"patterns"),t.length===0)return[];t=t.map(y=>Fi(y,r));let{allPatterns:c}=r||{},p=[];for(let y of e){let i,g=[...t].fill(!1);for(let[u,a]of t.entries())if(a.test(y)&&(g[u]=!0,i=!a.negated,!i))break;if(!(i===!1||i===void 0&&t.some(u=>!u.negated)||c&&g.some((u,a)=>!u&&!t[a].negated))&&(p.push(y),n))break}return p};function ce(e,t,r){return Gi(e,t,r,!0).length>0}var Bt="8.0.5";var Wi=Bt,qt={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function Bi(e,t,r){function n(u){return u!=null}function c(u,a){return typeof a=="string"&&(a=De(a)),Array.from(u).filter(s=>!a.some(h=>ce(s,h,{caseSensitive:!0})))}let p=Object.prototype.hasOwnProperty,y=["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=E(E({},qt),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()),A(i.schema))Object.keys(i.schema).forEach(u=>{if(A(i.schema[u])){let a={};xe(i.schema[u],(s,h,m)=>{let b=h!==void 0?h:s;return!Array.isArray(b)&&!A(b)&&(a[`${u}.${m.path}`]=b),b}),delete i.schema[u],i.schema=E(E({},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&&c((0,I.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema))),i.ignoreKeys).length){let u=(0,I.default)(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(A(t)&&Object.keys(t).length){if(c((0,I.default)(Object.keys(e),Object.keys(t)),i.ignoreKeys).length!==0){let u=(0,I.default)(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(c((0,I.default)(Object.keys(t),Object.keys(e)),i.ignoreKeys).length!==0){let u=(0,I.default)(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 g=[];xe(e,(u,a,s)=>{let h=a,m=u;if(s.parentType==="array"&&(m=void 0,h=u),Array.isArray(g)&&g.length&&g.some(o=>s.path.startsWith(o))||m&&i.ignoreKeys.some(o=>m&&ce(m,o))||i.ignorePaths.some(o=>ce(s.path,o)))return h;let b=!(!A(h)&&!Array.isArray(h)&&Array.isArray(s.parent)),S=!1;A(i.schema)&&p.call(i.schema,s.path)&&(S=!0);let f=!1;if(A(t)&&le.default.has(t,s.path)&&(f=!0),i.enforceStrictKeyset&&b&&!S&&!f)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 Yt=Object.create;var J=Object.defineProperty,Zt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,tr=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable;var Me=(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={}))Le.call(t,r)&&Me(e,r,t[r]);if(ke)for(var r of ke(t))rr.call(t,r)&&Me(e,r,t[r]);return e},R=(e,t)=>Zt(e,zt(t));var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nr=(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 c of er(t))!Le.call(e,c)&&c!==r&&J(e,c,{get:()=>t[c],enumerable:!(n=Xt(t,c))||n.enumerable});return e};var B=(e,t,r)=>(r=e!=null?Yt(tr(e)):{},Ke(t||!e||!e.__esModule?J(r,"default",{value:e,enumerable:!0}):r,e)),ir=e=>Ke(J({},"__esModule",{value:!0}),e);var He=F((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",c=typeof Set<"u",p=typeof WeakMap<"u",y=typeof WeakSet<"u",i=typeof DataView<"u",g=r&&typeof Symbol.iterator<"u",l=r&&typeof Symbol.toStringTag<"u",a=c&&typeof Set.prototype.entries=="function",s=n&&typeof Map.prototype.entries=="function",h=a&&Object.getPrototypeOf(new Set().entries()),m=s&&Object.getPrototypeOf(new Map().entries()),b=g&&typeof Array.prototype[Symbol.iterator]=="function",v=b&&Object.getPrototypeOf([][Symbol.iterator]()),f=g&&typeof String.prototype[Symbol.iterator]=="function",o=f&&Object.getPrototypeOf(""[Symbol.iterator]()),u=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)&&(l===!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=l&&w[Symbol.toStringTag];if(typeof Ve=="string")return Ve;var _=Object.getPrototypeOf(w);return _===RegExp.prototype?"RegExp":_===Date.prototype?"Date":e&&_===Promise.prototype?"Promise":c&&_===Set.prototype?"Set":n&&_===Map.prototype?"Map":y&&_===WeakSet.prototype?"WeakSet":p&&_===WeakMap.prototype?"WeakMap":i&&_===DataView.prototype?"DataView":n&&_===m?"Map Iterator":c&&_===h?"Set Iterator":b&&_===v?"Array Iterator":f&&_===o?"String Iterator":_===null?"Object":Object.prototype.toString.call(w).slice(u,d)}return O})});var Fe=F((Zi,Re)=>{function or(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function sr(e,t,r,n){for(var c=e.length,p=r+(n?1:-1);n?p--:++p<c;)if(t(e[p],p,e))return p;return-1}function ar(e,t,r){if(t!==t)return sr(e,ur,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function cr(e,t,r,n){for(var c=r-1,p=e.length;++c<p;)if(n(e[c],t))return c;return-1}function ur(e){return e!==e}function lr(e){return function(t){return e(t)}}var fr=Array.prototype,Je=fr.splice;function pr(e,t,r,n){var c=n?cr:ar,p=-1,y=t.length,i=e;for(e===t&&(t=hr(t)),r&&(i=or(e,lr(r)));++p<y;)for(var g=0,l=t[p],a=r?r(l):l;(g=c(i,a,g,n))>-1;)i!==e&&Je.call(i,g,1),Je.call(e,g,1);return e}function hr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function gr(e,t){return e&&e.length&&t&&t.length?pr(e,t):e}Re.exports=gr});var Dt=F((G,V)=>{var yr=200,tt="__lodash_hash_undefined__",rt=9007199254740991,$e="[object Arguments]",dr="[object Array]",nt="[object Boolean]",it="[object Date]",mr="[object Error]",we="[object Function]",ot="[object GeneratorFunction]",q="[object Map]",st="[object Number]",Oe="[object Object]",Be="[object Promise]",at="[object RegExp]",Y="[object Set]",ct="[object String]",ut="[object Symbol]",he="[object WeakMap]",lt="[object ArrayBuffer]",Z="[object DataView]",ft="[object Float32Array]",pt="[object Float64Array]",ht="[object Int8Array]",gt="[object Int16Array]",yt="[object Int32Array]",dt="[object Uint8Array]",mt="[object Uint8ClampedArray]",bt="[object Uint16Array]",$t="[object Uint32Array]",br=/[\\^$.*+?()[\]{}|]/g,$r=/\w*$/,wr=/^\[object .+?Constructor\]$/,Or=/^(?:0|[1-9]\d*)$/,$={};$[$e]=$[dr]=$[lt]=$[Z]=$[nt]=$[it]=$[ft]=$[pt]=$[ht]=$[gt]=$[yt]=$[q]=$[st]=$[Oe]=$[at]=$[Y]=$[ct]=$[ut]=$[dt]=$[mt]=$[bt]=$[$t]=!0;$[mr]=$[we]=$[he]=!1;var Sr=typeof global=="object"&&global&&global.Object===Object&&global,vr=typeof self=="object"&&self&&self.Object===Object&&self,x=Sr||vr||Function("return this")(),wt=typeof G=="object"&&G&&!G.nodeType&&G,Ge=wt&&typeof V=="object"&&V&&!V.nodeType&&V,_r=Ge&&Ge.exports===wt;function Ar(e,t){return e.set(t[0],t[1]),e}function Er(e,t){return e.add(t),e}function xr(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Tr(e,t){for(var r=-1,n=t.length,c=e.length;++r<n;)e[c+r]=t[r];return e}function Ot(e,t,r,n){var c=-1,p=e?e.length:0;for(n&&p&&(r=e[++c]);++c<p;)r=t(r,e[c],c,e);return r}function Cr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function jr(e,t){return e==null?void 0:e[t]}function St(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ue(e){var t=-1,r=Array(e.size);return e.forEach(function(n,c){r[++t]=[c,n]}),r}function Se(e,t){return function(r){return e(t(r))}}function We(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Dr=Array.prototype,Nr=Function.prototype,X=Object.prototype,pe=x["__core-js_shared__"],Qe=function(){var e=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),vt=Nr.toString,C=X.hasOwnProperty,z=X.toString,Pr=RegExp("^"+vt.call(C).replace(br,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=_r?x.Buffer:void 0,Ye=x.Symbol,Ze=x.Uint8Array,Ir=Se(Object.getPrototypeOf,Object),Vr=Object.create,kr=X.propertyIsEnumerable,Mr=Dr.splice,Xe=Object.getOwnPropertySymbols,Lr=qe?qe.isBuffer:void 0,Kr=Se(Object.keys,Object),ge=L(x,"DataView"),U=L(x,"Map"),ye=L(x,"Promise"),de=L(x,"Set"),me=L(x,"WeakMap"),W=L(Object,"create"),Hr=N(ge),Jr=N(U),Rr=N(ye),Fr=N(de),Br=N(me),ze=Ye?Ye.prototype:void 0,et=ze?ze.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 Gr(){this.__data__=W?W(null):{}}function Ur(e){return this.has(e)&&delete this.__data__[e]}function Wr(e){var t=this.__data__;if(W){var r=t[e];return r===tt?void 0:r}return C.call(t,e)?t[e]:void 0}function Qr(e){var t=this.__data__;return W?t[e]!==void 0:C.call(t,e)}function qr(e,t){var r=this.__data__;return r[e]=W&&t===void 0?tt:t,this}D.prototype.clear=Gr;D.prototype.delete=Ur;D.prototype.get=Wr;D.prototype.has=Qr;D.prototype.set=qr;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 Yr(){this.__data__=[]}function Zr(e){var t=this.__data__,r=ee(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mr.call(t,r,1),!0}function Xr(e){var t=this.__data__,r=ee(t,e);return r<0?void 0:t[r][1]}function zr(e){return ee(this.__data__,e)>-1}function en(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=Yr;T.prototype.delete=Zr;T.prototype.get=Xr;T.prototype.has=zr;T.prototype.set=en;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 tn(){this.__data__={hash:new D,map:new(U||T),string:new D}}function rn(e){return te(this,e).delete(e)}function nn(e){return te(this,e).get(e)}function on(e){return te(this,e).has(e)}function sn(e,t){return te(this,e).set(e,t),this}k.prototype.clear=tn;k.prototype.delete=rn;k.prototype.get=nn;k.prototype.has=on;k.prototype.set=sn;function M(e){this.__data__=new T(e)}function an(){this.__data__=new T}function cn(e){return this.__data__.delete(e)}function un(e){return this.__data__.get(e)}function ln(e){return this.__data__.has(e)}function fn(e,t){var r=this.__data__;if(r instanceof T){var n=r.__data__;if(!U||n.length<yr-1)return n.push([e,t]),this;r=this.__data__=new k(n)}return r.set(e,t),this}M.prototype.clear=an;M.prototype.delete=cn;M.prototype.get=un;M.prototype.has=ln;M.prototype.set=fn;function pn(e,t){var r=_e(e)||kn(e)?Cr(e.length,String):[],n=r.length,c=!!n;for(var p in e)(t||C.call(e,p))&&!(c&&(p=="length"||Nn(p,n)))&&r.push(p);return r}function _t(e,t,r){var n=e[t];(!(C.call(e,t)&&Tt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function ee(e,t){for(var r=e.length;r--;)if(Tt(e[r][0],t))return r;return-1}function hn(e,t){return e&&At(t,Ae(t),e)}function be(e,t,r,n,c,p,y){var i;if(n&&(i=p?n(e,c,p,y):n(e)),i!==void 0)return i;if(!re(e))return e;var g=_e(e);if(g){if(i=Cn(e),!t)return En(e,i)}else{var l=j(e),a=l==we||l==ot;if(Ln(e))return $n(e,t);if(l==Oe||l==$e||a&&!p){if(St(e))return p?e:{};if(i=jn(a?{}:e),!t)return xn(e,hn(i,e))}else{if(!$[l])return p?e:{};i=Dn(e,l,be,t)}}y||(y=new M);var s=y.get(e);if(s)return s;if(y.set(e,i),!g)var h=r?Tn(e):Ae(e);return xr(h||e,function(m,b){h&&(b=m,m=e[b]),_t(i,b,be(m,t,r,n,b,e,y))}),i}function gn(e){return re(e)?Vr(e):{}}function yn(e,t,r){var n=t(e);return _e(e)?n:Tr(n,r(e))}function dn(e){return z.call(e)}function mn(e){if(!re(e)||In(e))return!1;var t=jt(e)||St(e)?Pr:wr;return t.test(N(e))}function bn(e){if(!xt(e))return Kr(e);var t=[];for(var r in Object(e))C.call(e,r)&&r!="constructor"&&t.push(r);return t}function $n(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 Ze(t).set(new Ze(e)),t}function wn(e,t){var r=t?ve(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function On(e,t,r){var n=t?r(Ue(e),!0):Ue(e);return Ot(n,Ar,new e.constructor)}function Sn(e){var t=new e.constructor(e.source,$r.exec(e));return t.lastIndex=e.lastIndex,t}function vn(e,t,r){var n=t?r(We(e),!0):We(e);return Ot(n,Er,new e.constructor)}function _n(e){return et?Object(et.call(e)):{}}function An(e,t){var r=t?ve(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function En(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function At(e,t,r,n){r||(r={});for(var c=-1,p=t.length;++c<p;){var y=t[c],i=n?n(r[y],e[y],y,r,e):void 0;_t(r,y,i===void 0?e[y]:i)}return r}function xn(e,t){return At(e,Et(e),t)}function Tn(e){return yn(e,Ae,Et)}function te(e,t){var r=e.__data__;return Pn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function L(e,t){var r=jr(e,t);return mn(r)?r:void 0}var Et=Xe?Se(Xe,Object):Jn,j=dn;(ge&&j(new ge(new ArrayBuffer(1)))!=Z||U&&j(new U)!=q||ye&&j(ye.resolve())!=Be||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 Hr:return Z;case Jr:return q;case Rr:return Be;case Fr:return Y;case Br:return he}return t});function Cn(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 jn(e){return typeof e.constructor=="function"&&!xt(e)?gn(Ir(e)):{}}function Dn(e,t,r,n){var c=e.constructor;switch(t){case lt:return ve(e);case nt:case it:return new c(+e);case Z:return wn(e,n);case ft:case pt:case ht:case gt:case yt:case dt:case mt:case bt:case $t:return An(e,n);case q:return On(e,n,r);case st:case ct:return new c(e);case at:return Sn(e);case Y:return vn(e,n,r);case ut:return _n(e)}}function Nn(e,t){return t=t==null?rt:t,!!t&&(typeof e=="number"||Or.test(e))&&e>-1&&e%1==0&&e<t}function Pn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function In(e){return!!Qe&&Qe in e}function xt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X;return e===r}function N(e){if(e!=null){try{return vt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Vn(e){return be(e,!0,!0)}function Tt(e,t){return e===t||e!==e&&t!==t}function kn(e){return Mn(e)&&C.call(e,"callee")&&(!kr.call(e,"callee")||z.call(e)==$e)}var _e=Array.isArray;function Ct(e){return e!=null&&Kn(e.length)&&!jt(e)}function Mn(e){return Hn(e)&&Ct(e)}var Ln=Lr||Rn;function jt(e){var t=re(e)?z.call(e):"";return t==we||t==ot}function Kn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rt}function re(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Hn(e){return!!e&&typeof e=="object"}function Ae(e){return Ct(e)?pn(e):bn(e)}function Jn(){return[]}function Rn(){return!1}V.exports=Vn});var Ft=F((io,Rt)=>{var Ce="__lodash_hash_undefined__",Bn=9007199254740991,Gn="[object Function]",Un="[object GeneratorFunction]",Wn=/[\\^$.*+?()[\]{}|]/g,Qn=/^\[object .+?Constructor\]$/,qn=typeof global=="object"&&global&&global.Object===Object&&global,Yn=typeof self=="object"&&self&&self.Object===Object&&self,Vt=qn||Yn||Function("return this")();function Zn(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 Xn(e,t){var r=e?e.length:0;return!!r&&ti(e,t,0)>-1}function zn(e,t,r){for(var n=-1,c=e?e.length:0;++n<c;)if(r(t,e[n]))return!0;return!1}function kt(e,t){for(var r=-1,n=e?e.length:0,c=Array(n);++r<n;)c[r]=t(e[r],r,e);return c}function ei(e,t,r,n){for(var c=e.length,p=r+(n?1:-1);n?p--:++p<c;)if(t(e[p],p,e))return p;return-1}function ti(e,t,r){if(t!==t)return ei(e,ri,r);for(var n=r-1,c=e.length;++n<c;)if(e[n]===t)return n;return-1}function ri(e){return e!==e}function ni(e){return function(t){return e(t)}}function Nt(e,t){return e.has(t)}function ii(e,t){return e==null?void 0:e[t]}function oi(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}var si=Array.prototype,ai=Function.prototype,Mt=Object.prototype,Te=Vt["__core-js_shared__"],Pt=function(){var e=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Lt=ai.toString,je=Mt.hasOwnProperty,ci=Mt.toString,ui=RegExp("^"+Lt.call(je).replace(Wn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),li=si.splice,It=Math.max,fi=Math.min,pi=Kt(Vt,"Map"),Q=Kt(Object,"create");function P(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 hi(){this.__data__=Q?Q(null):{}}function gi(e){return this.has(e)&&delete this.__data__[e]}function yi(e){var t=this.__data__;if(Q){var r=t[e];return r===Ce?void 0:r}return je.call(t,e)?t[e]:void 0}function di(e){var t=this.__data__;return Q?t[e]!==void 0:je.call(t,e)}function mi(e,t){var r=this.__data__;return r[e]=Q&&t===void 0?Ce:t,this}P.prototype.clear=hi;P.prototype.delete=gi;P.prototype.get=yi;P.prototype.has=di;P.prototype.set=mi;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 bi(){this.__data__=[]}function $i(e){var t=this.__data__,r=oe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():li.call(t,r,1),!0}function wi(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]}function Oi(e){return oe(this.__data__,e)>-1}function Si(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=bi;K.prototype.delete=$i;K.prototype.get=wi;K.prototype.has=Oi;K.prototype.set=Si;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 vi(){this.__data__={hash:new P,map:new(pi||K),string:new P}}function _i(e){return se(this,e).delete(e)}function Ai(e){return se(this,e).get(e)}function Ei(e){return se(this,e).has(e)}function xi(e,t){return se(this,e).set(e,t),this}H.prototype.clear=vi;H.prototype.delete=_i;H.prototype.get=Ai;H.prototype.has=Ei;H.prototype.set=xi;function ie(e){var t=-1,r=e?e.length:0;for(this.__data__=new H;++t<r;)this.add(e[t])}function Ti(e){return this.__data__.set(e,Ce),this}function Ci(e){return this.__data__.has(e)}ie.prototype.add=ie.prototype.push=Ti;ie.prototype.has=Ci;function oe(e,t){for(var r=e.length;r--;)if(Li(e[r][0],t))return r;return-1}function ji(e,t,r){for(var n=r?zn:Xn,c=e[0].length,p=e.length,y=p,i=Array(p),g=1/0,l=[];y--;){var a=e[y];y&&t&&(a=kt(a,ni(t))),g=fi(a.length,g),i[y]=!r&&(t||c>=120&&a.length>=120)?new ie(y&&a):void 0}a=e[0];var s=-1,h=i[0];e:for(;++s<c&&l.length<g;){var m=a[s],b=t?t(m):m;if(m=r||m!==0?m:0,!(h?Nt(h,b):n(l,b,r))){for(y=p;--y;){var v=i[y];if(!(v?Nt(v,b):n(e[y],b,r)))continue e}h&&h.push(b),l.push(m)}}return l}function Di(e){if(!Jt(e)||Vi(e))return!1;var t=Ht(e)||oi(e)?ui:Qn;return t.test(ki(e))}function Ni(e,t){return t=It(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,c=It(r.length-t,0),p=Array(c);++n<c;)p[n]=r[t+n];n=-1;for(var y=Array(t+1);++n<t;)y[n]=r[n];return y[t]=p,Zn(e,this,y)}}function Pi(e){return Hi(e)?e:[]}function se(e,t){var r=e.__data__;return Ii(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kt(e,t){var r=ii(e,t);return Di(r)?r:void 0}function Ii(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vi(e){return!!Pt&&Pt in e}function ki(e){if(e!=null){try{return Lt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Mi=Ni(function(e){var t=kt(e,Pi);return t.length&&t[0]===e[0]?ji(t):[]});function Li(e,t){return e===t||e!==e&&t!==t}function Ki(e){return e!=null&&Ji(e.length)&&!Ht(e)}function Hi(e){return Ri(e)&&Ki(e)}function Ht(e){var t=Jt(e)?ci.call(e):"";return t==Gn||t==Un}function Ji(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bn}function Jt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ri(e){return!!e&&typeof e=="object"}Rt.exports=Mi});var Gt=F((Bt,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()})(Bt,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||p(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 c(a){return typeof a=="object"&&n(a)==="[object Object]"}var p=Array.isArray||function(a){return e.call(a)==="[object Array]"};function y(a){return typeof a=="boolean"||n(a)==="[object Boolean]"}function i(a){var s=parseInt(a);return s.toString()===a?s:a}function g(a){a=a||{};var s=function(f){return Object.keys(s).reduce(function(o,u){return u==="create"||typeof s[u]=="function"&&(o[u]=s[u].bind(s,f)),o},{})},h;a.includeInheritedProps?h=function(){return!0}:h=function(f,o){return typeof o=="number"&&Array.isArray(f)||t(f,o)};function m(f,o){if(h(f,o))return f[o]}var b;a.includeInheritedProps?b=function(f,o){typeof o!="string"&&typeof o!="number"&&(o=String(o));var u=m(f,o);if(o==="__proto__"||o==="prototype"||o==="constructor"&&typeof u=="function")throw new Error("For security reasons, object's magic properties cannot be set");return u}:b=function(f,o){return m(f,o)};function v(f,o,u,d){if(typeof o=="number"&&(o=[o]),!o||o.length===0)return f;if(typeof o=="string")return v(f,o.split(".").map(i),u,d);var O=o[0],w=b(f,O);return o.length===1?((w===void 0||!d)&&(f[O]=u),w):(w===void 0&&(typeof o[1]=="number"?f[O]=[]:f[O]={}),v(f[O],o.slice(1),u,d))}return s.has=function(f,o){if(typeof o=="number"?o=[o]:typeof o=="string"&&(o=o.split(".")),!o||o.length===0)return!!f;for(var u=0;u<o.length;u++){var d=i(o[u]);if(typeof d=="number"&&p(f)&&d<f.length||(a.includeInheritedProps?d in Object(f):t(f,d)))f=f[d];else return!1}return!0},s.ensureExists=function(f,o,u){return v(f,o,u,!0)},s.set=function(f,o,u,d){return v(f,o,u,d)},s.insert=function(f,o,u,d){var O=s.get(f,o);d=~~d,p(O)||(O=[],s.set(f,o,O)),O.splice(d,0,u)},s.empty=function(f,o){if(!r(o)&&f!=null){var u,d;if(u=s.get(f,o)){if(typeof u=="string")return s.set(f,o,"");if(y(u))return s.set(f,o,!1);if(typeof u=="number")return s.set(f,o,0);if(p(u))u.length=0;else if(c(u))for(d in u)h(u,d)&&delete u[d];else return s.set(f,o,null)}}},s.push=function(f,o){var u=s.get(f,o);p(u)||(u=[],s.set(f,o,u)),u.push.apply(u,Array.prototype.slice.call(arguments,2))},s.coalesce=function(f,o,u){for(var d,O=0,w=o.length;O<w;O++)if((d=s.get(f,o[O]))!==void 0)return d;return u},s.get=function(f,o,u){if(typeof o=="number"&&(o=[o]),!o||o.length===0)return f;if(f==null)return u;if(typeof o=="string")return s.get(f,o.split("."),u);var d=i(o[0]),O=b(f,d);return O===void 0?u:o.length===1?O:s.get(f[d],o.slice(1),u)},s.del=function(o,u){if(typeof u=="number"&&(u=[u]),o==null||r(u))return o;if(typeof u=="string")return s.del(o,u.split("."));var d=i(u[0]);if(b(o,d),!h(o,d))return o;if(u.length===1)p(o)?o.splice(d,1):delete o[d];else return s.del(o[d],u.slice(1));return o},s}var l=g();return l.create=g,l.withInheritedProps=g({includeInheritedProps:!0}),l})});var qi={};nr(qi,{checkTypesMini:()=>Qi,defaults:()=>qt,version:()=>Ui});var S=B(He(),1),I=B(Fe(),1);var ne=B(Dt(),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 Fn(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=Fn;function xe(e,t){let r={now:!1};function n(c,p,y,i){let g=(0,ne.default)(c),l,a=A({depth:-1,path:""},y);if(a.depth+=1,Array.isArray(g))for(let s=0,h=g.length;s<h&&!i.now;s++){let m=a.path?`${a.path}.${s}`:`${s}`;g[s]!==void 0?(a.parent=(0,ne.default)(g),a.parentType="array",a.parentKey=Ee(m),l=n(p(g[s],void 0,R(A({},a),{path:m}),i),p,R(A({},a),{path:m}),i),Number.isNaN(l)&&s<g.length?(g.splice(s,1),s-=1):g[s]=l):g.splice(s,1)}else if(E(g))for(let s in g){if(i.now&&s!=null)break;let h=a.path?`${a.path}.${s}`:s;a.depth===0&&s!=null&&(a.topmostKey=s),a.parent=(0,ne.default)(g),a.parentType="object",a.parentKey=Ee(h),l=n(p(s,g[s],R(A({},a),{path:h}),i),p,R(A({},a),{path:h}),i),Number.isNaN(l)?delete g[s]:g[s]=l}return g}return n(e,t,{},r)}var Qt=B(Ft(),1);function De(e){return typeof e!="string"?e:e.length?[e]:[]}var ue=B(Gt(),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,Ut=(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})},Fi=(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 c=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return c.negated=n,Pe.set(r,c),c},Bi=(e,t,r,n)=>{if(e=Ut(e,"inputs"),t=Ut(t,"patterns"),t.length===0)return[];t=t.map(y=>Fi(y,r));let{allPatterns:c}=r||{},p=[];for(let y of e){let i,g=[...t].fill(!1);for(let[l,a]of t.entries())if(a.test(y)&&(g[l]=!0,i=!a.negated,!i))break;if(!(i===!1||i===void 0&&t.some(l=>!l.negated)||c&&g.some((l,a)=>!l&&!t[a].negated))&&(p.push(y),n))break}return p};function ce(e,t,r){return Bi(e,t,r,!0).length>0}var Wt="8.0.6";var Ui=Wt,qt={ignoreKeys:[],ignorePaths:[],acceptArrays:!1,acceptArraysIgnore:[],enforceStrictKeyset:!0,schema:{},msg:"check-types-mini",optsVarName:"opts"};function Wi(e,t,r){function n(l){return l!=null}function c(l,a){return typeof a=="string"&&(a=De(a)),Array.from(l).filter(s=>!a.some(h=>ce(s,h,{caseSensitive:!0})))}let p=Object.prototype.hasOwnProperty,y=["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({},qt),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(l=>{if(E(i.schema[l])){let a={};xe(i.schema[l],(s,h,m)=>{let b=h!==void 0?h:s;return!Array.isArray(b)&&!E(b)&&(a[`${l}.${m.path}`]=b),b}),delete i.schema[l],i.schema=A(A({},i.schema),a)}}),Object.keys(i.schema).forEach(l=>{Array.isArray(i.schema[l])||(i.schema[l]=[i.schema[l]]),i.schema[l]=i.schema[l].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&&c((0,I.default)(Object.keys(e),Object.keys(t).concat(Object.keys(i.schema))),i.ignoreKeys).length){let l=(0,I.default)(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${l.length>1?"s":""} ${l.length>1?"are":"is"} not covered by schema and/or reference objects: ${l.join(", ")}`)}}else if(E(t)&&Object.keys(t).length){if(c((0,I.default)(Object.keys(e),Object.keys(t)),i.ignoreKeys).length!==0){let l=(0,I.default)(Object.keys(e),Object.keys(t));throw new TypeError(`${i.msg}: The input object has key${l.length>1?"s":""} which ${l.length>1?"are":"is"} not covered by the reference object: ${l.join(", ")}`)}else if(c((0,I.default)(Object.keys(t),Object.keys(e)),i.ignoreKeys).length!==0){let l=(0,I.default)(Object.keys(t),Object.keys(e));throw new TypeError(`${i.msg}: The reference object has key${l.length>1?"s":""} which ${l.length>1?"are":"is"} not present in the input object: ${l.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 g=[];xe(e,(l,a,s)=>{let h=a,m=l;if(s.parentType==="array"&&(m=void 0,h=l),Array.isArray(g)&&g.length&&g.some(o=>s.path.startsWith(o))||m&&i.ignoreKeys.some(o=>m&&ce(m,o))||i.ignorePaths.some(o=>ce(s.path,o)))return h;let b=!(!E(h)&&!Array.isArray(h)&&Array.isArray(s.parent)),v=!1;E(i.schema)&&p.call(i.schema,s.path)&&(v=!0);let f=!1;if(E(t)&&ue.default.has(t,s.path)&&(f=!0),i.enforceStrictKeyset&&b&&!v&&!f)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).
|
|
11
11
|
|
|
12
12
|
Debug info:
|
|
13
13
|
|
|
@@ -21,11 +21,11 @@ resolvedOpts = ${JSON.stringify(i,null,4)}
|
|
|
21
21
|
|
|
22
22
|
current = ${JSON.stringify(h,null,4)}
|
|
23
23
|
|
|
24
|
-
`);if(
|
|
24
|
+
`);if(v){let o=De(i.schema[s.path]).map(u=>`${u}`.toLowerCase());if(ue.default.set(i.schema,s.path,o),(0,Qt.default)(o,y).length)g.push(s.path);else if(h!==!0&&h!==!1&&!o.includes((0,S.default)(h).toLowerCase())||(h===!0||h===!1)&&!o.includes(String(h))&&!o.includes("boolean"))if(Array.isArray(h)&&i.acceptArrays){for(let u=0,d=h.length;u<d;u++)if(!o.includes((0,S.default)(h[u]).toLowerCase()))throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path}.${u}, the ${u}th element (equal to ${JSON.stringify(h[u],null,0)}) is of a type ${(0,S.default)(h[u]).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)(h)!=="string"?'"':""}${JSON.stringify(h,null,0)}${(0,S.default)(h)!=="string"?'"':""} (type: ${(0,S.default)(h).toLowerCase()}) which is not among the allowed types in schema (which is equal to ${JSON.stringify(o,null,0)})`)}else if(t&&E(t)&&f){let o=ue.default.get(t,s.path);if(i.acceptArrays&&Array.isArray(h)&&!i.acceptArraysIgnore.includes(l)){if(!h.every(d=>(0,S.default)(d).toLowerCase()===(0,S.default)(t[l]).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[l]).toLowerCase()}-type`)}else if((0,S.default)(h)!==(0,S.default)(o))throw new TypeError(`${i.msg}: ${i.optsVarName}.${s.path} was customised to ${(0,S.default)(h).toLowerCase()==="string"?"":'"'}${JSON.stringify(h,null,0)}${(0,S.default)(h).toLowerCase()==="string"?"":'"'} which is not ${(0,S.default)(o).toLowerCase()} but ${(0,S.default)(h).toLowerCase()}`)}return h})}function Qi(e,t,r){Wi(e,t,r)}return ir(qi);})();
|
|
25
25
|
/**
|
|
26
26
|
* @name codsen-utils
|
|
27
27
|
* @fileoverview Various utility functions
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.2.0
|
|
29
29
|
* @author Roy Revelt, Codsen Ltd
|
|
30
30
|
* @license MIT
|
|
31
31
|
* {@link https://codsen.com/os/codsen-utils/}
|
|
@@ -41,7 +41,7 @@ current = ${JSON.stringify(h,null,4)}
|
|
|
41
41
|
/**
|
|
42
42
|
* @name ast-monkey-traverse
|
|
43
43
|
* @fileoverview Utility library to traverse AST
|
|
44
|
-
* @version 4.0.
|
|
44
|
+
* @version 4.0.6
|
|
45
45
|
* @author Roy Revelt, Codsen Ltd
|
|
46
46
|
* @license MIT
|
|
47
47
|
* {@link https://codsen.com/os/ast-monkey-traverse/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "check-types-mini",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.6",
|
|
4
4
|
"description": "Validate options object",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compare",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"arrayiffy-if-string": "^5.0.3",
|
|
76
|
-
"ast-monkey-traverse": "^4.0.
|
|
77
|
-
"codsen-utils": "^1.
|
|
76
|
+
"ast-monkey-traverse": "^4.0.6",
|
|
77
|
+
"codsen-utils": "^1.2.0",
|
|
78
78
|
"lodash.intersection": "^4.4.0",
|
|
79
79
|
"lodash.pullall": "^4.2.0",
|
|
80
80
|
"matcher": "^5.0.0",
|