WordPress/wp-includes/js/dist/vendor/lodash.min.js

9 lines
69 KiB
JavaScript
Raw Normal View History

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}function e(n,t){for(var r=null==n?0:n.length;r--&&!1!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!(null==n||!n.length)&&g(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.match(Yn)||[]}function _(n,t,r){var e;return r(n,(function(n,r,u){if(t(n,r,u))return e=r,!1})),e}function v(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function g(n,t,r){return t==t?function(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}(n,t,r):v(n,d,r)}function y(n,t,r,e){for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function d(n){return n!=n}function b(n,t){var r=null==n?0:n.length;return r?j(n,t)/r:nn}function w(n){return function(t){return null==t?P:t[n]}}function m(n){return function(t){return null==n?P:n[t]}}function x(n,t,r,e,u){return u(n,(function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)})),r}function j(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==P&&(r=r===P?i:r+i)}return r}function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function k(n){return n?n.slice(0,F(n)+1).replace(Kn,""):n}function O(n){return function(t){return n(t)}}function I(n,t){return c(t,(function(t){return n[t]}))}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&g(t,n[r],0)>-1;);return r}function E(n,t){for(var r=n.length;r--&&g(t,n[r],0)>-1;);return r}function S(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function W(n){return"\\"+Jt[n]}function L(n){return qt.test(n)}function C(n){return Zt.test(n)}function U(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function B(n,t){return function(r){return n(t(r))}}function T(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==K||(n[r]=K,i[u++]=r)}return i}function $(n){var t=-1,r=Array(n.size);return n.forEach((function(n){r[++t]=n})),r}function D(n){return L(n)?function(n){for(var t=Nt.lastIndex=0;Nt.test(n);)++t;return t}(n):pr(n)}function M(n){return L(n)?function(n){return n.match(Nt)||[]}(n):function(n){return n.split("")}(n)}function F(n){for(var t=n.length;t--&&Vn.test(n.charAt(t)););return t}function N(n){return n.match(Pt)||[]}var P,q="Expected a function",Z="__lodash_hash_undefined__",K="__lodash_placeholder__",V=16,G=32,H=64,J=128,Y=256,Q=1/0,X=9007199254740991,nn=NaN,tn=4294967295,rn=[["ary",J],["bind",1],["bindKey",2],["curry",8],["curryRight",V],["flip",512],["partial",G],["partialRight",H],["rearg",Y]],en="[object Arguments]",un="[object Array]",on="[object Boolean]",fn="[object Date]",cn="[object Error]",an="[object Function]",ln="[object GeneratorFunction]",sn="[object Map]",hn="[object Number]",pn="[object Object]",_n="[object Promise]",vn="[object RegExp]",gn="[object Set]",yn="[object String]",dn="[object Symbol]",bn="[object WeakMap]",wn="[object ArrayBuffer]",mn="[object DataView]",xn="[object Float32Array]",jn="[object Float64Array]",An="[object Int8Array]",kn="[object Int16Array]",On="[object Int32Array]",In="[object Uint8Array]",Rn="[