forked from sent/waves
16 lines
5.7 KiB
JavaScript
16 lines
5.7 KiB
JavaScript
/**
|
|
* @license
|
|
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
|
* Build: `lodash include="set,get"`
|
|
*/
|
|
;(function(){function t(){}function e(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function o(t,e){for(var n=t.length;n--;)if(h(t[n][0],e))return n;return-1}function i(t){if(null==t)return t===g?"[object Undefined]":"[object Null]";if(G&&G in Object(t)){var e=k.call(t,G),n=t[G];
|
|
try{t[G]=g;var r=true}catch(t){}var o=I.call(t);r&&(e?t[G]=n:delete t[G]),t=o}else t=I.call(t);return t}function u(t){if(typeof t=="string")return t;if(D(t)){for(var e=-1,n=null==t?0:t.length,r=Array(n);++e<n;)r[e]=u(t[e],e,t);return r+""}return d(t)?V?V.call(t):"":(e=t+"","0"==e&&1/t==-j?"-0":e)}function a(t,e){if(D(t))return t;var n;return D(t)?n=false:(n=typeof t,n=!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!d(t))||(O.test(t)||!m.test(t)||null!=e&&t in Object(e))),n?[t]:B(v(t))}function c(t,e){
|
|
var n=t.__data__,r=typeof e;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?n[typeof e=="string"?"string":"hash"]:n.map}function l(t,e){var n,r=null==t?g:t[e];return n=!(!y(r)||R&&R in r)&&(_(r)?N:S).test(f(r)),n?r:g}function s(t){if(typeof t=="string"||d(t))return t;var e=t+"";return"0"==e&&1/t==-j?"-0":e}function f(t){if(null!=t){try{return C.call(t)}catch(t){}return t+""}return""}function p(t,e){if(typeof t!="function"||null!=e&&typeof e!="function")throw new TypeError("Expected a function");
|
|
var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;return i.has(o)?i.get(o):(r=t.apply(this,r),n.cache=i.set(o,r)||i,r)};return n.cache=new(p.Cache||r),n}function h(t,e){return t===e||t!==t&&e!==e}function _(t){return!!y(t)&&(t=i(t),"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function y(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function b(t){return null!=t&&typeof t=="object"}function d(t){return typeof t=="symbol"||b(t)&&"[object Symbol]"==i(t);
|
|
}function v(t){return null==t?"":u(t)}var g,j=1/0,m=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/,z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/\\(\\)?/g,S=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,x=typeof self=="object"&&self&&self.Object===Object&&self,x=typeof global=="object"&&global&&global.Object===Object&&global||x||Function("return this")(),A=typeof exports=="object"&&exports&&!exports.nodeType&&exports,F=A&&typeof module=="object"&&module&&!module.nodeType&&module,E=Array.prototype,P=Object.prototype,T=x["__core-js_shared__"],C=Function.prototype.toString,k=P.hasOwnProperty,R=function(){
|
|
var t=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),I=P.toString,N=RegExp("^"+C.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=x.Symbol,q=E.splice,G=P?P.toStringTag:g,L=function(){try{var t=l(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),M=l(x,"Map"),U=l(Object,"create"),V=(E=P?P.prototype:g)?E.toString:g;e.prototype.clear=function(){this.__data__=U?U(null):{},this.size=0;
|
|
},e.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},e.prototype.get=function(t){var e=this.__data__;return U?(t=e[t],"__lodash_hash_undefined__"===t?g:t):k.call(e,t)?e[t]:g},e.prototype.has=function(t){var e=this.__data__;return U?e[t]!==g:k.call(e,t)},e.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=U&&e===g?"__lodash_hash_undefined__":e,this},n.prototype.clear=function(){this.__data__=[],this.size=0},n.prototype.delete=function(t){
|
|
var e=this.__data__;return t=o(e,t),!(0>t)&&(t==e.length-1?e.pop():q.call(e,t,1),--this.size,true)},n.prototype.get=function(t){var e=this.__data__;return t=o(e,t),0>t?g:e[t][1]},n.prototype.has=function(t){return-1<o(this.__data__,t)},n.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return 0>r?(++this.size,n.push([t,e])):n[r][1]=e,this},r.prototype.clear=function(){this.size=0,this.__data__={hash:new e,map:new(M||n),string:new e}},r.prototype.delete=function(t){return t=c(this,t).delete(t),
|
|
this.size-=t?1:0,t},r.prototype.get=function(t){return c(this,t).get(t)},r.prototype.has=function(t){return c(this,t).has(t)},r.prototype.set=function(t,e){var n=c(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var B=function(t){t=p(t,function(t){return 500===e.size&&e.clear(),t});var e=t.cache;return t}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(z,function(t,n,r,o){e.push(r?o.replace(w,"$1"):n||t)}),e});p.Cache=r;var D=Array.isArray;t.memoize=p,t.set=function(t,e,n){
|
|
if(null!=t&&y(t)){e=a(e,t);for(var r=-1,o=e.length,i=o-1,u=t;null!=u&&++r<o;){var c=s(e[r]),l=n;if(r!=i){var f=u[c],l=g;if(l===g){if(!y(f))var f=e[r+1],l=void 0,p=typeof f,f=(l=null==l?9007199254740991:l)&&("number"==p||"symbol"!=p&&$.test(f))&&-1<f&&0==f%1&&f<l?[]:{};l=f}}var p=u,f=c,_=p[f];k.call(p,f)&&h(_,l)&&(l!==g||f in p)||("__proto__"==f&&L?L(p,f,{configurable:true,enumerable:true,value:l,writable:true}):p[f]=l),u=u[c]}}return t},t.eq=h,t.get=function(t,e,n){if(null==t)t=g;else{e=a(e,t);for(var r=0,o=e.length;null!=t&&r<o;)t=t[s(e[r++])];
|
|
t=r&&r==o?t:g}return t===g?n:t},t.isArray=D,t.isFunction=_,t.isObject=y,t.isObjectLike=b,t.isSymbol=d,t.toString=v,t.VERSION="4.17.5",typeof define=="function"&&typeof define.amd=="object"&&define.amd?(x._=t, define(function(){return t})):F?((F.exports=t)._=t,A._=t):x._=t}).call(this); |