forked from Stock-control-supervisors/awesome-go
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
6070-533f60fcfc5885ee.js.download
1 lines (1 loc) · 10.9 KB
/
6070-533f60fcfc5885ee.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6070],{16070:function(e,r){Object.defineProperty(r,"__esModule",{value:!0});let t=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],n=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...t],a=["null","undefined","string","number","bigint","boolean","symbol"];function i(e){return r=>typeof r===e}let{toString:o}=Object.prototype,y=e=>{let r=o.call(e).slice(8,-1);return/HTML\w+Element/.test(r)&&u.domElement(e)?"HTMLElement":n.includes(r)?r:void 0},l=e=>r=>y(r)===e;function u(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(u.observable(e))return"Observable";if(u.array(e))return"Array";if(u.buffer(e))return"Buffer";let r=y(e);if(r)return r;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw TypeError("Please don't use object wrappers for primitive types");return"Object"}u.undefined=i("undefined"),u.string=i("string");let s=i("number");u.number=e=>s(e)&&!u.nan(e),u.bigint=i("bigint"),u.function_=i("function"),u.null_=e=>null===e,u.class_=e=>u.function_(e)&&e.toString().startsWith("class "),u.boolean=e=>!0===e||!1===e,u.symbol=i("symbol"),u.numericString=e=>u.string(e)&&!u.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),u.array=(e,r)=>!!Array.isArray(e)&&(!u.function_(r)||e.every(r)),u.buffer=e=>{var r,t,n;return null!==(n=null===(t=null===(r=null==e?void 0:e.constructor)||void 0===r?void 0:r.isBuffer)||void 0===t?void 0:t.call(r,e))&&void 0!==n&&n},u.blob=e=>l("Blob")(e),u.nullOrUndefined=e=>u.null_(e)||u.undefined(e),u.object=e=>!u.null_(e)&&("object"==typeof e||u.function_(e)),u.iterable=e=>u.function_(null==e?void 0:e[Symbol.iterator]),u.asyncIterable=e=>u.function_(null==e?void 0:e[Symbol.asyncIterator]),u.generator=e=>u.iterable(e)&&u.function_(null==e?void 0:e.next)&&u.function_(null==e?void 0:e.throw),u.asyncGenerator=e=>u.asyncIterable(e)&&u.function_(e.next)&&u.function_(e.throw),u.nativePromise=e=>l("Promise")(e);let c=e=>u.function_(null==e?void 0:e.then)&&u.function_(null==e?void 0:e.catch);u.promise=e=>u.nativePromise(e)||c(e),u.generatorFunction=l("GeneratorFunction"),u.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===y(e),u.asyncFunction=e=>"AsyncFunction"===y(e),u.boundFunction=e=>u.function_(e)&&!e.hasOwnProperty("prototype"),u.regExp=l("RegExp"),u.date=l("Date"),u.error=l("Error"),u.map=e=>l("Map")(e),u.set=e=>l("Set")(e),u.weakMap=e=>l("WeakMap")(e),u.weakSet=e=>l("WeakSet")(e),u.int8Array=l("Int8Array"),u.uint8Array=l("Uint8Array"),u.uint8ClampedArray=l("Uint8ClampedArray"),u.int16Array=l("Int16Array"),u.uint16Array=l("Uint16Array"),u.int32Array=l("Int32Array"),u.uint32Array=l("Uint32Array"),u.float32Array=l("Float32Array"),u.float64Array=l("Float64Array"),u.bigInt64Array=l("BigInt64Array"),u.bigUint64Array=l("BigUint64Array"),u.arrayBuffer=l("ArrayBuffer"),u.sharedArrayBuffer=l("SharedArrayBuffer"),u.dataView=l("DataView"),u.enumCase=(e,r)=>Object.values(r).includes(e),u.directInstanceOf=(e,r)=>Object.getPrototypeOf(e)===r.prototype,u.urlInstance=e=>l("URL")(e),u.urlString=e=>{if(!u.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},u.truthy=e=>!!e,u.falsy=e=>!e,u.nan=e=>Number.isNaN(e),u.primitive=e=>u.null_(e)||a.includes(typeof e),u.integer=e=>Number.isInteger(e),u.safeInteger=e=>Number.isSafeInteger(e),u.plainObject=e=>{if("[object Object]"!==o.call(e))return!1;let r=Object.getPrototypeOf(e);return null===r||r===Object.getPrototypeOf({})},u.typedArray=e=>{var r;return r=y(e),t.includes(r)};let p=e=>u.safeInteger(e)&&e>=0;u.arrayLike=e=>!u.nullOrUndefined(e)&&!u.function_(e)&&p(e.length),u.inRange=(e,r)=>{if(u.number(r))return e>=Math.min(0,r)&&e<=Math.max(r,0);if(u.array(r)&&2===r.length)return e>=Math.min(...r)&&e<=Math.max(...r);throw TypeError("Invalid range: ".concat(JSON.stringify(r)))};let m=["innerHTML","ownerDocument","style","attributes","nodeValue"];u.domElement=e=>u.object(e)&&1===e.nodeType&&u.string(e.nodeName)&&!u.plainObject(e)&&m.every(r=>r in e),u.observable=e=>{var r,t;return!!e&&(e===(null===(r=e[Symbol.observable])||void 0===r?void 0:r.call(e))||e===(null===(t=e["@@observable"])||void 0===t?void 0:t.call(e)))},u.nodeStream=e=>u.object(e)&&u.function_(e.pipe)&&!u.observable(e),u.infinite=e=>e===1/0||e===-1/0;let f=e=>r=>u.integer(r)&&Math.abs(r%2)===e;u.evenInteger=f(0),u.oddInteger=f(1),u.emptyArray=e=>u.array(e)&&0===e.length,u.nonEmptyArray=e=>u.array(e)&&e.length>0,u.emptyString=e=>u.string(e)&&0===e.length;let b=e=>u.string(e)&&!/\S/.test(e);u.emptyStringOrWhitespace=e=>u.emptyString(e)||b(e),u.nonEmptyString=e=>u.string(e)&&e.length>0,u.nonEmptyStringAndNotWhitespace=e=>u.string(e)&&!u.emptyStringOrWhitespace(e),u.emptyObject=e=>u.object(e)&&!u.map(e)&&!u.set(e)&&0===Object.keys(e).length,u.nonEmptyObject=e=>u.object(e)&&!u.map(e)&&!u.set(e)&&Object.keys(e).length>0,u.emptySet=e=>u.set(e)&&0===e.size,u.nonEmptySet=e=>u.set(e)&&e.size>0,u.emptyMap=e=>u.map(e)&&0===e.size,u.nonEmptyMap=e=>u.map(e)&&e.size>0,u.propertyKey=e=>u.any([u.string,u.number,u.symbol],e),u.formData=e=>l("FormData")(e),u.urlSearchParams=e=>l("URLSearchParams")(e);let g=(e,r,t)=>{if(!u.function_(r))throw TypeError("Invalid predicate: ".concat(JSON.stringify(r)));if(0===t.length)throw TypeError("Invalid number of values");return e.call(t,r)};u.any=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return(u.array(e)?e:[e]).some(e=>g(Array.prototype.some,e,t))},u.all=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return g(Array.prototype.every,e,t)};let d=function(e,r,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e){let{multipleValues:e}=n,a=e?"received values of types ".concat([...new Set(t.map(e=>"`".concat(u(e),"`")))].join(", ")):"received value of type `".concat(u(t),"`");throw TypeError("Expected value which is `".concat(r,"`, ").concat(a,"."))}};r.assert={undefined:e=>d(u.undefined(e),"undefined",e),string:e=>d(u.string(e),"string",e),number:e=>d(u.number(e),"number",e),bigint:e=>d(u.bigint(e),"bigint",e),function_:e=>d(u.function_(e),"Function",e),null_:e=>d(u.null_(e),"null",e),class_:e=>d(u.class_(e),"Class",e),boolean:e=>d(u.boolean(e),"boolean",e),symbol:e=>d(u.symbol(e),"symbol",e),numericString:e=>d(u.numericString(e),"string with a number",e),array:(e,r)=>{d(u.array(e),"Array",e),r&&e.forEach(r)},buffer:e=>d(u.buffer(e),"Buffer",e),blob:e=>d(u.blob(e),"Blob",e),nullOrUndefined:e=>d(u.nullOrUndefined(e),"null or undefined",e),object:e=>d(u.object(e),"Object",e),iterable:e=>d(u.iterable(e),"Iterable",e),asyncIterable:e=>d(u.asyncIterable(e),"AsyncIterable",e),generator:e=>d(u.generator(e),"Generator",e),asyncGenerator:e=>d(u.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>d(u.nativePromise(e),"native Promise",e),promise:e=>d(u.promise(e),"Promise",e),generatorFunction:e=>d(u.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>d(u.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>d(u.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>d(u.boundFunction(e),"Function",e),regExp:e=>d(u.regExp(e),"RegExp",e),date:e=>d(u.date(e),"Date",e),error:e=>d(u.error(e),"Error",e),map:e=>d(u.map(e),"Map",e),set:e=>d(u.set(e),"Set",e),weakMap:e=>d(u.weakMap(e),"WeakMap",e),weakSet:e=>d(u.weakSet(e),"WeakSet",e),int8Array:e=>d(u.int8Array(e),"Int8Array",e),uint8Array:e=>d(u.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>d(u.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>d(u.int16Array(e),"Int16Array",e),uint16Array:e=>d(u.uint16Array(e),"Uint16Array",e),int32Array:e=>d(u.int32Array(e),"Int32Array",e),uint32Array:e=>d(u.uint32Array(e),"Uint32Array",e),float32Array:e=>d(u.float32Array(e),"Float32Array",e),float64Array:e=>d(u.float64Array(e),"Float64Array",e),bigInt64Array:e=>d(u.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>d(u.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>d(u.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>d(u.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>d(u.dataView(e),"DataView",e),enumCase:(e,r)=>d(u.enumCase(e,r),"EnumCase",e),urlInstance:e=>d(u.urlInstance(e),"URL",e),urlString:e=>d(u.urlString(e),"string with a URL",e),truthy:e=>d(u.truthy(e),"truthy",e),falsy:e=>d(u.falsy(e),"falsy",e),nan:e=>d(u.nan(e),"NaN",e),primitive:e=>d(u.primitive(e),"primitive",e),integer:e=>d(u.integer(e),"integer",e),safeInteger:e=>d(u.safeInteger(e),"integer",e),plainObject:e=>d(u.plainObject(e),"plain object",e),typedArray:e=>d(u.typedArray(e),"TypedArray",e),arrayLike:e=>d(u.arrayLike(e),"array-like",e),domElement:e=>d(u.domElement(e),"HTMLElement",e),observable:e=>d(u.observable(e),"Observable",e),nodeStream:e=>d(u.nodeStream(e),"Node.js Stream",e),infinite:e=>d(u.infinite(e),"infinite number",e),emptyArray:e=>d(u.emptyArray(e),"empty array",e),nonEmptyArray:e=>d(u.nonEmptyArray(e),"non-empty array",e),emptyString:e=>d(u.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>d(u.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>d(u.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>d(u.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>d(u.emptyObject(e),"empty object",e),nonEmptyObject:e=>d(u.nonEmptyObject(e),"non-empty object",e),emptySet:e=>d(u.emptySet(e),"empty set",e),nonEmptySet:e=>d(u.nonEmptySet(e),"non-empty set",e),emptyMap:e=>d(u.emptyMap(e),"empty map",e),nonEmptyMap:e=>d(u.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>d(u.propertyKey(e),"PropertyKey",e),formData:e=>d(u.formData(e),"FormData",e),urlSearchParams:e=>d(u.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>d(u.evenInteger(e),"even integer",e),oddInteger:e=>d(u.oddInteger(e),"odd integer",e),directInstanceOf:(e,r)=>d(u.directInstanceOf(e,r),"T",e),inRange:(e,r)=>d(u.inRange(e,r),"in range",e),any:function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return d(u.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0})},all:function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return d(u.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})}},Object.defineProperties(u,{class:{value:u.class_},function:{value:u.function_},null:{value:u.null_}}),Object.defineProperties(r.assert,{class:{value:r.assert.class_},function:{value:r.assert.function_},null:{value:r.assert.null_}}),r.default=u,e.exports=u,e.exports.default=u,e.exports.assert=r.assert}}]);