collect.js
Advanced tools
Comparing version 4.9.0 to 4.12.2
@@ -1,1 +0,1 @@ | ||
var collect=function(e){var n={};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=n,i.d=function(t,r,e){i.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},i.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(r,"a",r),r},i.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},i.p="",i(i.s=8)}([function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(r){var e=[];return Array.isArray(r)?e.push.apply(e,n(r)):"Collection"===r.constructor.name?e.push.apply(e,n(r.all())):Object.keys(r).forEach(function(t){return e.push(r[t])}),e}},function(t,r,e){"use strict";t.exports=function(t,r){try{return r.split(".").reduce(function(t,r){return t[r]},t)}catch(t){return null}}},function(t,r,e){"use strict";t.exports=function(t){return Array.isArray(t[0])?t[0]:t}},function(t,r,e){"use strict";t.exports=function(t){return void 0===t?this.sum()/this.items.length:new this.constructor(this.items).pluck(t).sum()/this.items.length}},function(t,r,e){"use strict";t.exports=function(r){var t,e=void 0;Array.isArray(r)?(t=e=[]).push.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(r)):(e={},Object.keys(r).forEach(function(t){e[t]=r[t]}));return e}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e,r){if(void 0!==r)return Array.isArray(this.items)?0<this.items.filter(function(t){return void 0!==t[e]&&t[e]===r}).length:void 0!==this.items[e]&&this.items[e]===r;if("function"==typeof e)return 0<this.items.filter(function(t,r){return e(t,r)}).length;if(Array.isArray(this.items))return-1!==this.items.indexOf(e);var t=n(this.items);return t.push.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(Object.keys(this.items))),-1!==t.indexOf(e)}},function(t,r,e){"use strict";t.exports=function(t,r){if(Array.isArray(this.items)&&this.items.length)return t(this);if(Object.keys(this.items).length)return t(this);if(void 0!==r){if(Array.isArray(this.items)&&!this.items.length)return r(this);if(!Object.keys(this.items).length)return r(this)}return this}},function(t,r,e){"use strict";t.exports=function(t,r){if(Array.isArray(this.items)&&!this.items.length)return t(this);if(!Object.keys(this.items).length)return t(this);if(void 0!==r){if(Array.isArray(this.items)&&this.items.length)return r(this);if(Object.keys(this.items).length)return r(this)}return this}},function(t,r,e){"use strict";function n(t){this.items=t||[]}var i=e(9);"undefined"!=typeof Symbol&&(n.prototype[Symbol.iterator]=i),n.prototype.all=e(10),n.prototype.average=e(3),n.prototype.avg=e(3),n.prototype.chunk=e(11),n.prototype.collapse=e(12),n.prototype.combine=e(13),n.prototype.concat=e(14),n.prototype.contains=e(5),n.prototype.count=e(15),n.prototype.countBy=e(16),n.prototype.crossJoin=e(17),n.prototype.dd=e(18),n.prototype.diff=e(20),n.prototype.diffAssoc=e(21),n.prototype.diffKeys=e(22),n.prototype.dump=e(23),n.prototype.duplicates=e(24),n.prototype.each=e(25),n.prototype.eachSpread=e(26),n.prototype.every=e(27),n.prototype.except=e(28),n.prototype.filter=e(29),n.prototype.first=e(30),n.prototype.firstWhere=e(31),n.prototype.flatMap=e(32),n.prototype.flatten=e(33),n.prototype.flip=e(34),n.prototype.forPage=e(35),n.prototype.forget=e(36),n.prototype.get=e(37),n.prototype.groupBy=e(38),n.prototype.has=e(39),n.prototype.implode=e(40),n.prototype.intersect=e(41),n.prototype.intersectByKeys=e(42),n.prototype.isEmpty=e(43),n.prototype.isNotEmpty=e(44),n.prototype.keyBy=e(45),n.prototype.keys=e(46),n.prototype.last=e(47),n.prototype.macro=e(48),n.prototype.map=e(49),n.prototype.mapSpread=e(50),n.prototype.mapToDictionary=e(51),n.prototype.mapInto=e(52),n.prototype.mapToGroups=e(53),n.prototype.mapWithKeys=e(54),n.prototype.max=e(55),n.prototype.median=e(56),n.prototype.merge=e(57),n.prototype.min=e(58),n.prototype.mode=e(59),n.prototype.nth=e(60),n.prototype.only=e(61),n.prototype.pad=e(62),n.prototype.partition=e(63),n.prototype.pipe=e(64),n.prototype.pluck=e(65),n.prototype.pop=e(66),n.prototype.prepend=e(67),n.prototype.pull=e(68),n.prototype.push=e(69),n.prototype.put=e(70),n.prototype.random=e(71),n.prototype.reduce=e(72),n.prototype.reject=e(73),n.prototype.reverse=e(74),n.prototype.search=e(75),n.prototype.shift=e(76),n.prototype.shuffle=e(77),n.prototype.slice=e(78),n.prototype.some=e(5),n.prototype.sort=e(79),n.prototype.sortBy=e(80),n.prototype.sortByDesc=e(81),n.prototype.splice=e(82),n.prototype.split=e(83),n.prototype.sum=e(84),n.prototype.take=e(85),n.prototype.tap=e(86),n.prototype.times=e(87),n.prototype.toArray=e(88),n.prototype.toJson=e(89),n.prototype.transform=e(90),n.prototype.unless=e(91),n.prototype.unlessEmpty=e(6),n.prototype.unlessNotEmpty=e(7),n.prototype.union=e(92),n.prototype.unique=e(93),n.prototype.unwrap=e(94),n.prototype.values=e(95),n.prototype.when=e(96),n.prototype.whenEmpty=e(7),n.prototype.whenNotEmpty=e(6),n.prototype.where=e(97),n.prototype.whereBetween=e(98),n.prototype.whereIn=e(99),n.prototype.whereInstanceOf=e(100),n.prototype.whereNotBetween=e(101),n.prototype.whereNotIn=e(102),n.prototype.wrap=e(103),n.prototype.zip=e(104);var o=function(t){return new n(t)};t.exports=o,t.exports.default=o},function(t,r,e){"use strict";t.exports=function(){var t=this,r=-1;return{next:function(){return r+=1,{value:t.items[r],done:r>=t.items.length}}}}},function(t,r,e){"use strict";t.exports=function(){return this.items}},function(t,r,e){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(e){var n=this,i=[],o=0;if(Array.isArray(this.items))do{var t=this.items.slice(o,o+e),r=new this.constructor(t);i.push(r),o+=e}while(o<this.items.length);else if("object"===c(this.items))for(var s=Object.keys(this.items),u=function(){var t=s.slice(o,o+e),r=new n.constructor({});t.forEach(function(t){return r.put(t,n.items[t])}),i.push(r),o+=e};u(),o<s.length;);else i.push(new this.constructor([this.items]));return new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(){var t;return new this.constructor((t=[]).concat.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(this.items)))}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=this,n=t;n instanceof this.constructor&&(n=t.all());var i={};return Array.isArray(this.items)&&Array.isArray(n)?this.items.forEach(function(t,r){i[t]=n[r]}):"object"===o(this.items)&&"object"===(void 0===n?"undefined":o(n))?Object.keys(this.items).forEach(function(t,r){i[e.items[t]]=n[Object.keys(n)[r]]}):Array.isArray(this.items)?i[this.items[0]]=n:"string"==typeof this.items&&Array.isArray(n)?i[this.items]=n[0]:"string"==typeof this.items&&(i[this.items]=n),new this.constructor(i)}},function(t,r,e){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=e(4);t.exports=function(r){var e=r;r instanceof this.constructor?e=r.all():"object"===(void 0===r?"undefined":i(r))&&(e=[],Object.keys(r).forEach(function(t){e.push(r[t])}));var n=o(this.items);return e.forEach(function(r){"object"===(void 0===r?"undefined":i(r))?Object.keys(r).forEach(function(t){return n.push(r[t])}):n.push(r)}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){var t=0;return Array.isArray(this.items)&&(t=this.items.length),Math.max(Object.keys(this.items).length,t)}},function(t,r,e){"use strict";t.exports=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(t){return t};return new this.constructor(this.items).groupBy(t).map(function(t){return t.count()})}},function(t,r,e){"use strict";t.exports=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return new this.constructor(function t(r,e,n){var i=n[0];i instanceof e&&(i=i.all());for(var o=n.slice(1),s=!o.length,u=[],c=0;c<i.length;c+=1){var f=r.slice();f.push(i[c]),s?u.push(f):u=u.concat(t(f,e,o))}return u}([],this.constructor,[].concat([this.items],r)))}},function(r,t,e){"use strict";(function(t){r.exports=function(){this.dump(),void 0!==t&&t.exit(1)}}).call(t,e(19))},function(t,r){var e,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(r){if(e===setTimeout)return setTimeout(r,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(r,0);try{return e(r,0)}catch(t){try{return e.call(null,r,0)}catch(t){return e.call(this,r,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var c,f=[],h=!1,a=-1;function p(){h&&c&&(h=!1,c.length?f=c.concat(f):a=-1,f.length&&y())}function y(){if(!h){var t=u(p);h=!0;for(var r=f.length;r;){for(c=f,f=[];++a<r;)c&&c[a].run();a=-1,r=f.length}c=null,h=!1,function(r){if(n===clearTimeout)return clearTimeout(r);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(r);try{n(r)}catch(t){try{return n.call(null,r)}catch(t){return n.call(this,r)}}}(t)}}function l(t,r){this.fun=t,this.array=r}function m(){}i.nextTick=function(t){var r=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];f.push(new l(t,r)),1!==f.length||h||u(y)},l.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var e=this.items.filter(function(t){return-1===r.indexOf(t)});return new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=this,e=t;t instanceof this.constructor&&(e=t.all());var n={};return Object.keys(this.items).forEach(function(t){void 0!==e[t]&&e[t]===r.items[t]||(n[t]=r.items[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var e=Object.keys(r),n=Object.keys(this.items).filter(function(t){return-1===e.indexOf(t)});return new this.constructor(this.items).only(n)}},function(t,r,e){"use strict";t.exports=function(){return console.log(this),this}},function(t,r,e){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){var e=this,n=[],i={},o=function(t){return Array.isArray(t)||"object"===(void 0===t?"undefined":s(t))?JSON.stringify(t):t};return Array.isArray(this.items)?this.items.forEach(function(t,r){var e=o(t);-1===n.indexOf(e)?n.push(e):i[r]=t}):"object"===s(this.items)&&Object.keys(this.items).forEach(function(t){var r=o(e.items[t]);-1===n.indexOf(r)?n.push(r):i[t]=e.items[t]}),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(n){var r=this,i=!1;return Array.isArray(this.items)?this.items.forEach(function(t,r,e){i||!1===n(t,r,e)&&(i=!0)}):Object.keys(this.items).forEach(function(t){i||!1===n(r.items[t],t,r.items)&&(i=!0)}),this}},function(t,r,e){"use strict";t.exports=function(e){return this.each(function(t,r){e.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(t).concat([r]))}),this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e){return-1===n(this.items).map(function(t,r){return e(t,r)}).indexOf(!1)}},function(t,r,e){"use strict";var u=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=u(e);if(Array.isArray(this.items)){var o=this.items.filter(function(t){return-1===i.indexOf(t)});return new this.constructor(o)}var s={};return Object.keys(this.items).forEach(function(t){-1===i.indexOf(t)&&(s[t]=r.items[t])}),new this.constructor(s)}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function s(t){if(Array.isArray(t)){if(t.length)return!1}else if(null!=t&&"object"===(void 0===t?"undefined":n(t))){if(Object.keys(t).length)return!1}else if(t)return!1;return!0}t.exports=function(t){var r,e,n,i=t||!1,o=null;return o=Array.isArray(this.items)?function(t,r){if(t)return r.filter(t);for(var e=[],n=0;n<r.length;n+=1){var i=r[n];s(i)||e.push(i)}return e}(i,this.items):(r=i,e=this.items,n={},Object.keys(e).forEach(function(t){r?r(e[t],t)&&(n[t]=e[t]):s(e[t])||(n[t]=e[t])}),n),new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(t,r){if("function"==typeof t){for(var e=0,n=this.items.length;e<n;e+=1){var i=this.items[e];if(t(i))return i}return"function"==typeof r?r():r}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];var o=Object.keys(this.items)[0];return this.items[o]}return"function"==typeof r?r():r}},function(t,r,e){"use strict";t.exports=function(t,r){return this.where(t,r).first()||null}},function(t,r,e){"use strict";t.exports=function(t){return this.map(t).collapse()}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=t||1/0,n=!1,i=[],r=function(r){i=[],Array.isArray(r)?r.forEach(function(r){"string"==typeof r?i.push(r):Array.isArray(r)?i=i.concat(r):Object.keys(r).forEach(function(t){i=i.concat(r[t])})}):Object.keys(r).forEach(function(t){"string"==typeof r[t]?i.push(r[t]):Array.isArray(r[t])?i=i.concat(r[t]):Object.keys(r).forEach(function(t){i=i.concat(r[t])})}),n=0===(n=i.filter(function(t){return"object"===(void 0===t?"undefined":o(t))})).length,e-=1};for(r(this.items);!n&&0<e;)r(i);return new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(){var r=this,e={};return Array.isArray(this.items)?Object.keys(this.items).forEach(function(t){e[r.items[t]]=Number(t)}):Object.keys(this.items).forEach(function(t){e[r.items[t]]=t}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this,n={};return Array.isArray(this.items)?n=this.items.slice(t*r-r,t*r):Object.keys(this.items).slice(t*r-r,t*r).forEach(function(t){n[t]=e.items[t]}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){return Array.isArray(this.items)?this.items.splice(t,1):delete this.items[t],this}},function(t,r,e){"use strict";t.exports=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return void 0!==this.items[t]?this.items[t]:"function"==typeof r?r():null!==r?r:null}},function(t,r,e){"use strict";var s=e(1);t.exports=function(n){var i=this,o={};return this.items.forEach(function(t,r){var e=void 0;e="function"==typeof n?n(t,r):s(t,n)||0===s(t,n)?s(t,n):"",void 0===o[e]&&(o[e]=new i.constructor([])),o[e].push(t)}),new this.constructor(o)}},function(t,r,e){"use strict";var o=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=o(e);return i.filter(function(t){return r.items[t]}).length===i.length}},function(t,r,e){"use strict";t.exports=function(t,r){return void 0===r?this.items.join(t):new this.constructor(this.items).pluck(t).all().join(r)}},function(t,r,e){"use strict";t.exports=function(t){var r=t;t instanceof this.constructor&&(r=t.all());var e=this.items.filter(function(t){return-1!==r.indexOf(t)});return new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=this,e=Object.keys(t);t instanceof this.constructor&&(e=Object.keys(t.all()));var n={};return Object.keys(this.items).forEach(function(t){-1!==e.indexOf(t)&&(n[t]=r.items[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){return!this.items.length}},function(t,r,e){"use strict";t.exports=function(){return!!this.items.length}},function(t,r,e){"use strict";var i=e(1);t.exports=function(e){var n={};return"function"==typeof e?this.items.forEach(function(t){n[e(t)]=t}):this.items.forEach(function(t){var r=i(t,e);n[r||""]=t}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){var t=Object.keys(this.items);return Array.isArray(this.items)&&(t=t.map(Number)),new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items;if("function"==typeof t&&(e=this.filter(t).all()),Array.isArray(e)&&!e.length||!Object.keys(e).length)return"function"==typeof r?r():r;if(Array.isArray(e))return e[e.length-1];var n=Object.keys(e);return e[n[n.length-1]]}},function(t,r,e){"use strict";t.exports=function(t,r){this.constructor.prototype[t]=r}},function(t,r,e){"use strict";t.exports=function(r){var e=this;if(Array.isArray(this.items))return new this.constructor(this.items.map(r));var n={};return Object.keys(this.items).forEach(function(t){n[t]=r(e.items[t],t)}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(e){return this.map(function(t,r){return e.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(t).concat([r]))})}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(s){var u={};return this.items.forEach(function(t,r){var e=s(t,r),n=c(e,2),i=n[0],o=n[1];void 0===u[i]?u[i]=[o]:u[i].push(o)}),new this.constructor(u)}},function(t,r,e){"use strict";t.exports=function(e){return this.map(function(t,r){return new e(t,r)})}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(s){var u={};return this.items.forEach(function(t,r){var e=s(t,r),n=c(e,2),i=n[0],o=n[1];void 0===u[i]?u[i]=[o]:u[i].push(o)}),new this.constructor(u)}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(o){var s=this,u={};return Array.isArray(this.items)?this.items.forEach(function(t){var r=o(t),e=c(r,2),n=e[0],i=e[1];u[n]=i}):Object.keys(this.items).forEach(function(t){var r=o(s.items[t]),e=c(r,2),n=e[0],i=e[1];u[n]=i}),new this.constructor(u)}},function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(t){return"string"==typeof t?Math.max.apply(Math,n(this.pluck(t).all())):Math.max.apply(Math,n(this.items))}},function(t,r,e){"use strict";t.exports=function(t){var r=this.items.length;return void 0===t?r%2==0?(this.items[r/2-1]+this.items[r/2])/2:this.items[Math.floor(r/2)]:r%2==0?(this.items[r/2-1][t]+this.items[r/2][t])/2:this.items[Math.floor(r/2)][t]}},function(t,r,e){"use strict";t.exports=function(t){var r=t;if("string"==typeof r&&(r=[r]),Array.isArray(this.items)&&Array.isArray(r))return new this.constructor(this.items.concat(r));var e=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){e[t]=r[t]}),new this.constructor(e)}},function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(t){return void 0!==t?Math.min.apply(Math,n(this.pluck(t).all())):Math.min.apply(Math,n(this.items))}},function(t,r,e){"use strict";t.exports=function(n){var i=[],o=1;return this.items.length?(this.items.forEach(function(r){var t=i.filter(function(t){return void 0!==n?t.key===r[n]:t.key===r});if(t.length){t[0].count+=1;var e=t[0].count;o<e&&(o=e)}else void 0!==n?i.push({key:r[n],count:1}):i.push({key:r,count:1})}),i.filter(function(t){return t.count===o}).map(function(t){return t.key})):null}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=n(this.items).slice(t).filter(function(t,r){return r%e==0});return new this.constructor(r)}},function(t,r,e){"use strict";var u=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=u(e);if(Array.isArray(this.items)){var o=this.items.filter(function(t){return-1!==i.indexOf(t)});return new this.constructor(o)}var s={};return Object.keys(this.items).forEach(function(t){-1!==i.indexOf(t)&&(s[t]=r.items[t])}),new this.constructor(s)}},function(t,r,e){"use strict";var f=e(4);t.exports=function(t,r){var e=Math.abs(t),n=this.count();if(e<=n)return this;for(var i=e-n,o=f(this.items),s=Array.isArray(this.items),u=t<0,c=0;c<i;)s?u?o.unshift(r):o.push(r):void 0!==o[c]?i+=1:o[c]=r,c+=1;return new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(e){var n=this,i=void 0;return Array.isArray(this.items)?(i=[new this.constructor([]),new this.constructor([])],this.items.forEach(function(t){!0===e(t)?i[0].push(t):i[1].push(t)})):(i=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach(function(t){var r=n.items[t];!0===e(r)?i[0].put(t,r):i[1].put(t,r)})),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(t){return t(this)}},function(t,r,e){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=e(1);t.exports=function(r,e){if(-1!==r.indexOf("*")){var n=(t=this.items,a={},t.forEach(function(t,r){!function r(e,n){"object"===(void 0===e?"undefined":y(e))&&Object.keys(e).forEach(function(t){r(e[t],n+"."+t)}),a[n]=e}(t,r)}),a),i=[];if(void 0!==e){var o=new RegExp("0."+e,"g"),s=("0."+e).split(".").length;Object.keys(n).forEach(function(t){var r=t.match(o);if(r){var e=r[0];e.split(".").length===s&&i.push(n[e])}})}var u=[],c=new RegExp("0."+r,"g"),f=("0."+r).split(".").length;if(Object.keys(n).forEach(function(t){var r=t.match(c);if(r){var e=r[0];e.split(".").length===f&&u.push(n[e])}}),void 0===e)return new this.constructor([u]);var h={};return this.items.forEach(function(t,r){h[i[r]||""]=u}),new this.constructor(h)}var t,a;if(void 0===e)return this.map(function(t){return void 0!==l(t,r)?l(t,r):null});var p={};return this.items.forEach(function(t){void 0!==l(t,r)?p[t[e]||""]=l(t,r):p[t[e]||""]=null}),new this.constructor(p)}},function(t,r,e){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.pop();var t=Object.keys(this.items),r=t[t.length-1],e=this.items[r];return delete this.items[r],e}},function(t,r,e){"use strict";t.exports=function(t,r){return void 0!==r?this.put(r,t):(this.items.unshift(t),this)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items[t]||null;return e||void 0===r||(e="function"==typeof r?r():r),delete this.items[t],e}},function(t,r,e){"use strict";t.exports=function(){var t;return(t=this.items).push.apply(t,arguments),this}},function(t,r,e){"use strict";t.exports=function(t,r){return this.items[t]=r,this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=n(this.items),e=new this.constructor(r).shuffle();return t!==parseInt(t,10)?e.first():e.take(t)}},function(t,r,e){"use strict";t.exports=function(r,t){var e=this,n=null;return void 0!==t&&(n=t),Array.isArray(this.items)?this.items.forEach(function(t){n=r(n,t)}):Object.keys(this.items).forEach(function(t){n=r(n,e.items[t],t)}),n}},function(t,r,e){"use strict";t.exports=function(r){return new this.constructor(this.items).filter(function(t){return!r(t)})}},function(t,r,e){"use strict";t.exports=function(){var t=[].concat(this.items).reverse();return new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(e,r){var n=this,i=e;"function"==typeof e&&(i=this.items.filter(function(t,r){return e(t,r)})[0]);var t=!1;if(!Array.isArray(this.items))return Object.keys(this.items).filter(function(t){return!0===r?n.items[t]===i:n.items[t]===Number(i)||n.items[t]===i.toString()})[0]||!1;var o=this.items.filter(function(t){return!0===r?t===i:t===Number(i)||t===String(i)})[0];return-1!==(t=this.items.indexOf(o))&&t}},function(t,r,e){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.shift();var t=Object.keys(this.items)[0],r=this.items[t]||null;return delete this.items[t],r}},function(t,r,e){"use strict";var i=e(0);t.exports=function(){var t=i(this.items),r=void 0,e=void 0,n=void 0;for(n=t.length;n;n-=1)r=Math.floor(Math.random()*n),e=t[n-1],t[n-1]=t[r],t[r]=e;return this.items=t,this}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items.slice(t);return void 0!==r&&(e=e.slice(0,r)),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=[].concat(this.items);return void 0===t?this.every(function(t){return"number"==typeof t})?r.sort(function(t,r){return t-r}):r.sort():r.sort(t),new this.constructor(r)}},function(t,r,e){"use strict";t.exports=function(e){var t=[].concat(this.items);return"function"==typeof e?t.sort(function(t,r){return e(t)<e(r)?-1:e(t)>e(r)?1:0}):t.sort(function(t,r){return t[e]<r[e]?-1:t[e]>r[e]?1:0}),new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(t){return this.sortBy(t).reverse()}},function(t,r,e){"use strict";t.exports=function(t,r,e){var n=this.slice(t,r);if(this.items=this.diff(n.all()).all(),Array.isArray(e))for(var i=0,o=e.length;i<o;i+=1)this.items.splice(t+i,0,e[i]);return n}},function(t,r,e){"use strict";t.exports=function(t){for(var r=Math.round(this.items.length/t),e=JSON.parse(JSON.stringify(this.items)),n=[],i=0;i<t;i+=1)n.push(new this.constructor(e.splice(0,r)));return new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=0;if(void 0===t)for(var e=0,n=this.items.length;e<n;e+=1)r+=this.items[e];else if("function"==typeof t)for(var i=0,o=this.items.length;i<o;i+=1)r+=t(this.items[i]);else for(var s=0,u=this.items.length;s<u;s+=1)r+=this.items[s][t];return r}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this;if(Array.isArray(this.items)||"object"!==o(this.items))return t<0?new this.constructor(this.items.slice(t)):new this.constructor(this.items.slice(0,t));var e=Object.keys(this.items),n=void 0;n=t<0?e.slice(t):e.slice(0,t);var i={};return e.forEach(function(t){-1!==n.indexOf(t)&&(i[t]=r.items[t])}),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(t){return t(this),this}},function(t,r,e){"use strict";t.exports=function(t,r){for(var e=1;e<=t;e+=1)this.items.push(r(e));return this}},function(t,r,e){"use strict";t.exports=function(){var i=this.constructor;if(Array.isArray(this.items)){var r=[];return this.items.forEach(function(t){!function r(t,e){var n=[];t instanceof i?(t.items.forEach(function(t){return r(t,n)}),e.push(n)):Array.isArray(t)?(t.forEach(function(t){return r(t,n)}),e.push(n)):e.push(t)}(t,r)}),r}return this.values().all()}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){return"object"!==n(this.items)||Array.isArray(this.items)?JSON.stringify(this.toArray()):JSON.stringify(this.all())}},function(t,r,e){"use strict";t.exports=function(r){var e=this;if(Array.isArray(this.items))this.items=this.items.map(r);else{var n={};Object.keys(this.items).forEach(function(t){n[t]=r(e.items[t],t)}),this.items=n}return this}},function(t,r,e){"use strict";t.exports=function(t,r,e){t?e(this):r(this)}},function(t,r,e){"use strict";t.exports=function(r){var e=this,n=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){void 0===e.items[t]&&(n[t]=r[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;if(void 0===t)r=this.items.filter(function(t,r,e){return e.indexOf(t)===r});else{r=[];for(var e=[],n=0,i=this.items.length;n<i;n+=1){var o=void 0;o="function"==typeof t?t(this.items[n]):this.items[n][t],-1===e.indexOf(o)&&(r.push(this.items[n]),e.push(o))}}return new this.constructor(r)}},function(t,r,e){"use strict";t.exports=function(t){return t instanceof this.constructor?t.all():t}},function(t,r,e){"use strict";t.exports=function(){var r=this,e=[];return Object.keys(this.items).forEach(function(t){e.push(r.items[t])}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r,e){return t?r(this,t):e?e(this,t):this}},function(t,r,e){"use strict";var s=e(0),u=e(1);t.exports=function(r,t,e){var n=t,i=e;void 0===e&&(i=t,n="===");var o=s(this.items).filter(function(t){switch(n){case"==":return u(t,r)===Number(i)||u(t,r)===i.toString();default:case"===":return u(t,r)===i;case"!=":case"<>":return u(t,r)!==Number(i)&&u(t,r)!==i.toString();case"!==":return u(t,r)!==i;case"<":return u(t,r)<i;case"<=":return u(t,r)<=i;case">":return u(t,r)>i;case">=":return u(t,r)>=i}});return new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(t,r){return this.where(t,">=",r[0]).where(t,"<=",r[r.length-1])}},function(t,r,e){"use strict";var i=e(0),o=e(1);t.exports=function(r,t){var e=i(t),n=this.items.filter(function(t){return-1!==e.indexOf(o(t,r))});return new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(r){return this.filter(function(t){return t instanceof r})}},function(t,r,e){"use strict";var n=e(1);t.exports=function(r,e){return this.filter(function(t){return n(t,r)<e[0]||n(t,r)>e[e.length-1]})}},function(t,r,e){"use strict";var i=e(0),o=e(1);t.exports=function(r,t){var e=i(t),n=this.items.filter(function(t){return-1===e.indexOf(o(t,r))});return new this.constructor(n)}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return t instanceof this.constructor?t:"object"===(void 0===t?"undefined":n(t))?new this.constructor(t):new this.constructor([t])}},function(t,r,e){"use strict";t.exports=function(t){var e=this,n=t;n instanceof this.constructor&&(n=n.all());var r=this.items.map(function(t,r){return new e.constructor([t,n[r]])});return new this.constructor(r)}}]); | ||
var collect=function(e){var n={};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=n,i.d=function(t,r,e){i.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},i.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(r,"a",r),r},i.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},i.p="",i(i.s=8)}([function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(r){var e=[];return Array.isArray(r)?e.push.apply(e,n(r)):"Collection"===r.constructor.name?e.push.apply(e,n(r.all())):Object.keys(r).forEach(function(t){return e.push(r[t])}),e}},function(t,r,e){"use strict";t.exports=function(t,r){try{return r.split(".").reduce(function(t,r){return t[r]},t)}catch(t){return null}}},function(t,r,e){"use strict";t.exports=function(t){return Array.isArray(t[0])?t[0]:t}},function(t,r,e){"use strict";t.exports=function(t){return void 0===t?this.sum()/this.items.length:new this.constructor(this.items).pluck(t).sum()/this.items.length}},function(t,r,e){"use strict";t.exports=function(r){var t,e=void 0;Array.isArray(r)?(t=e=[]).push.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(r)):(e={},Object.keys(r).forEach(function(t){e[t]=r[t]}));return e}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e,r){if(void 0!==r)return Array.isArray(this.items)?0<this.items.filter(function(t){return void 0!==t[e]&&t[e]===r}).length:void 0!==this.items[e]&&this.items[e]===r;if("function"==typeof e)return 0<this.items.filter(function(t,r){return e(t,r)}).length;if(Array.isArray(this.items))return-1!==this.items.indexOf(e);var t=n(this.items);return t.push.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(Object.keys(this.items))),-1!==t.indexOf(e)}},function(t,r,e){"use strict";t.exports=function(t,r){if(Array.isArray(this.items)&&this.items.length)return t(this);if(Object.keys(this.items).length)return t(this);if(void 0!==r){if(Array.isArray(this.items)&&!this.items.length)return r(this);if(!Object.keys(this.items).length)return r(this)}return this}},function(t,r,e){"use strict";t.exports=function(t,r){if(Array.isArray(this.items)&&!this.items.length)return t(this);if(!Object.keys(this.items).length)return t(this);if(void 0!==r){if(Array.isArray(this.items)&&this.items.length)return r(this);if(Object.keys(this.items).length)return r(this)}return this}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(t){void 0===t||Array.isArray(t)||"object"===(void 0===t?"undefined":n(t))?t instanceof this.constructor?this.items=t.all():this.items=t||[]:this.items=[t]}var o=e(9);"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=o),i.prototype.all=e(10),i.prototype.average=e(3),i.prototype.avg=e(3),i.prototype.chunk=e(11),i.prototype.collapse=e(12),i.prototype.combine=e(13),i.prototype.concat=e(14),i.prototype.contains=e(5),i.prototype.count=e(15),i.prototype.countBy=e(16),i.prototype.crossJoin=e(17),i.prototype.dd=e(18),i.prototype.diff=e(20),i.prototype.diffAssoc=e(21),i.prototype.diffKeys=e(22),i.prototype.dump=e(23),i.prototype.duplicates=e(24),i.prototype.each=e(25),i.prototype.eachSpread=e(26),i.prototype.every=e(27),i.prototype.except=e(28),i.prototype.filter=e(29),i.prototype.first=e(30),i.prototype.firstWhere=e(31),i.prototype.flatMap=e(32),i.prototype.flatten=e(33),i.prototype.flip=e(34),i.prototype.forPage=e(35),i.prototype.forget=e(36),i.prototype.get=e(37),i.prototype.groupBy=e(38),i.prototype.has=e(39),i.prototype.implode=e(40),i.prototype.intersect=e(41),i.prototype.intersectByKeys=e(42),i.prototype.isEmpty=e(43),i.prototype.isNotEmpty=e(44),i.prototype.join=e(45),i.prototype.keyBy=e(46),i.prototype.keys=e(47),i.prototype.last=e(48),i.prototype.macro=e(49),i.prototype.make=e(50),i.prototype.map=e(51),i.prototype.mapSpread=e(52),i.prototype.mapToDictionary=e(53),i.prototype.mapInto=e(54),i.prototype.mapToGroups=e(55),i.prototype.mapWithKeys=e(56),i.prototype.max=e(57),i.prototype.median=e(58),i.prototype.merge=e(59),i.prototype.min=e(60),i.prototype.mode=e(61),i.prototype.nth=e(62),i.prototype.only=e(63),i.prototype.pad=e(64),i.prototype.partition=e(65),i.prototype.pipe=e(66),i.prototype.pluck=e(67),i.prototype.pop=e(68),i.prototype.prepend=e(69),i.prototype.pull=e(70),i.prototype.push=e(71),i.prototype.put=e(72),i.prototype.random=e(73),i.prototype.reduce=e(74),i.prototype.reject=e(75),i.prototype.reverse=e(76),i.prototype.search=e(77),i.prototype.shift=e(78),i.prototype.shuffle=e(79),i.prototype.slice=e(80),i.prototype.some=e(5),i.prototype.sort=e(81),i.prototype.sortBy=e(82),i.prototype.sortByDesc=e(83),i.prototype.sortKeys=e(84),i.prototype.splice=e(85),i.prototype.split=e(86),i.prototype.sum=e(87),i.prototype.take=e(88),i.prototype.tap=e(89),i.prototype.times=e(90),i.prototype.toArray=e(91),i.prototype.toJson=e(92),i.prototype.transform=e(93),i.prototype.unless=e(94),i.prototype.unlessEmpty=e(6),i.prototype.unlessNotEmpty=e(7),i.prototype.union=e(95),i.prototype.unique=e(96),i.prototype.unwrap=e(97),i.prototype.values=e(98),i.prototype.when=e(99),i.prototype.whenEmpty=e(7),i.prototype.whenNotEmpty=e(6),i.prototype.where=e(100),i.prototype.whereBetween=e(101),i.prototype.whereIn=e(102),i.prototype.whereInstanceOf=e(103),i.prototype.whereNotBetween=e(104),i.prototype.whereNotIn=e(105),i.prototype.wrap=e(106),i.prototype.zip=e(107);var s=function(t){return new i(t)};t.exports=s,t.exports.default=s},function(t,r,e){"use strict";t.exports=function(){var t=this,r=-1;return{next:function(){return r+=1,{value:t.items[r],done:r>=t.items.length}}}}},function(t,r,e){"use strict";t.exports=function(){return this.items}},function(t,r,e){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(e){var n=this,i=[],o=0;if(Array.isArray(this.items))do{var t=this.items.slice(o,o+e),r=new this.constructor(t);i.push(r),o+=e}while(o<this.items.length);else if("object"===c(this.items))for(var s=Object.keys(this.items),u=function(){var t=s.slice(o,o+e),r=new n.constructor({});t.forEach(function(t){return r.put(t,n.items[t])}),i.push(r),o+=e};u(),o<s.length;);else i.push(new this.constructor([this.items]));return new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(){var t;return new this.constructor((t=[]).concat.apply(t,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(this.items)))}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=this,n=t;n instanceof this.constructor&&(n=t.all());var i={};return Array.isArray(this.items)&&Array.isArray(n)?this.items.forEach(function(t,r){i[t]=n[r]}):"object"===o(this.items)&&"object"===(void 0===n?"undefined":o(n))?Object.keys(this.items).forEach(function(t,r){i[e.items[t]]=n[Object.keys(n)[r]]}):Array.isArray(this.items)?i[this.items[0]]=n:"string"==typeof this.items&&Array.isArray(n)?i[this.items]=n[0]:"string"==typeof this.items&&(i[this.items]=n),new this.constructor(i)}},function(t,r,e){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=e(4);t.exports=function(r){var e=r;r instanceof this.constructor?e=r.all():"object"===(void 0===r?"undefined":i(r))&&(e=[],Object.keys(r).forEach(function(t){e.push(r[t])}));var n=o(this.items);return e.forEach(function(r){"object"===(void 0===r?"undefined":i(r))?Object.keys(r).forEach(function(t){return n.push(r[t])}):n.push(r)}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){var t=0;return Array.isArray(this.items)&&(t=this.items.length),Math.max(Object.keys(this.items).length,t)}},function(t,r,e){"use strict";t.exports=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(t){return t};return new this.constructor(this.items).groupBy(t).map(function(t){return t.count()})}},function(t,r,e){"use strict";t.exports=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return new this.constructor(function t(r,e,n){var i=n[0];i instanceof e&&(i=i.all());for(var o=n.slice(1),s=!o.length,u=[],c=0;c<i.length;c+=1){var f=r.slice();f.push(i[c]),s?u.push(f):u=u.concat(t(f,e,o))}return u}([],this.constructor,[].concat([this.items],r)))}},function(r,t,e){"use strict";(function(t){r.exports=function(){this.dump(),void 0!==t&&t.exit(1)}}).call(t,e(19))},function(t,r){var e,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(r){if(e===setTimeout)return setTimeout(r,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(r,0);try{return e(r,0)}catch(t){try{return e.call(null,r,0)}catch(t){return e.call(this,r,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var c,f=[],a=!1,h=-1;function p(){a&&c&&(a=!1,c.length?f=c.concat(f):h=-1,f.length&&y())}function y(){if(!a){var t=u(p);a=!0;for(var r=f.length;r;){for(c=f,f=[];++h<r;)c&&c[h].run();h=-1,r=f.length}c=null,a=!1,function(r){if(n===clearTimeout)return clearTimeout(r);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(r);try{n(r)}catch(t){try{return n.call(null,r)}catch(t){return n.call(this,r)}}}(t)}}function l(t,r){this.fun=t,this.array=r}function m(){}i.nextTick=function(t){var r=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];f.push(new l(t,r)),1!==f.length||a||u(y)},l.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var e=this.items.filter(function(t){return-1===r.indexOf(t)});return new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=this,e=t;t instanceof this.constructor&&(e=t.all());var n={};return Object.keys(this.items).forEach(function(t){void 0!==e[t]&&e[t]===r.items[t]||(n[t]=r.items[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;r=t instanceof this.constructor?t.all():t;var e=Object.keys(r),n=Object.keys(this.items).filter(function(t){return-1===e.indexOf(t)});return new this.constructor(this.items).only(n)}},function(t,r,e){"use strict";t.exports=function(){return console.log(this),this}},function(t,r,e){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){var e=this,n=[],i={},o=function(t){return Array.isArray(t)||"object"===(void 0===t?"undefined":s(t))?JSON.stringify(t):t};return Array.isArray(this.items)?this.items.forEach(function(t,r){var e=o(t);-1===n.indexOf(e)?n.push(e):i[r]=t}):"object"===s(this.items)&&Object.keys(this.items).forEach(function(t){var r=o(e.items[t]);-1===n.indexOf(r)?n.push(r):i[t]=e.items[t]}),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(n){var r=this,i=!1;return Array.isArray(this.items)?this.items.forEach(function(t,r,e){i||!1===n(t,r,e)&&(i=!0)}):Object.keys(this.items).forEach(function(t){i||!1===n(r.items[t],t,r.items)&&(i=!0)}),this}},function(t,r,e){"use strict";t.exports=function(e){return this.each(function(t,r){e.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(t).concat([r]))}),this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e){return-1===n(this.items).map(function(t,r){return e(t,r)}).indexOf(!1)}},function(t,r,e){"use strict";var u=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=u(e);if(Array.isArray(this.items)){var o=this.items.filter(function(t){return-1===i.indexOf(t)});return new this.constructor(o)}var s={};return Object.keys(this.items).forEach(function(t){-1===i.indexOf(t)&&(s[t]=r.items[t])}),new this.constructor(s)}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function s(t){if(Array.isArray(t)){if(t.length)return!1}else if(null!=t&&"object"===(void 0===t?"undefined":n(t))){if(Object.keys(t).length)return!1}else if(t)return!1;return!0}t.exports=function(t){var r,e,n,i=t||!1,o=null;return o=Array.isArray(this.items)?function(t,r){if(t)return r.filter(t);for(var e=[],n=0;n<r.length;n+=1){var i=r[n];s(i)||e.push(i)}return e}(i,this.items):(r=i,e=this.items,n={},Object.keys(e).forEach(function(t){r?r(e[t],t)&&(n[t]=e[t]):s(e[t])||(n[t]=e[t])}),n),new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(t,r){if("function"==typeof t){for(var e=0,n=this.items.length;e<n;e+=1){var i=this.items[e];if(t(i))return i}return"function"==typeof r?r():r}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];var o=Object.keys(this.items)[0];return this.items[o]}return"function"==typeof r?r():r}},function(t,r,e){"use strict";t.exports=function(t,r){return this.where(t,r).first()||null}},function(t,r,e){"use strict";t.exports=function(t){return this.map(t).collapse()}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=t||1/0,n=!1,i=[],r=function(r){i=[],Array.isArray(r)?r.forEach(function(r){"string"==typeof r?i.push(r):Array.isArray(r)?i=i.concat(r):Object.keys(r).forEach(function(t){i=i.concat(r[t])})}):Object.keys(r).forEach(function(t){"string"==typeof r[t]?i.push(r[t]):Array.isArray(r[t])?i=i.concat(r[t]):Object.keys(r).forEach(function(t){i=i.concat(r[t])})}),n=0===(n=i.filter(function(t){return"object"===(void 0===t?"undefined":o(t))})).length,e-=1};for(r(this.items);!n&&0<e;)r(i);return new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(){var r=this,e={};return Array.isArray(this.items)?Object.keys(this.items).forEach(function(t){e[r.items[t]]=Number(t)}):Object.keys(this.items).forEach(function(t){e[r.items[t]]=t}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this,n={};return Array.isArray(this.items)?n=this.items.slice(t*r-r,t*r):Object.keys(this.items).slice(t*r-r,t*r).forEach(function(t){n[t]=e.items[t]}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){return Array.isArray(this.items)?this.items.splice(t,1):delete this.items[t],this}},function(t,r,e){"use strict";t.exports=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return void 0!==this.items[t]?this.items[t]:"function"==typeof r?r():null!==r?r:null}},function(t,r,e){"use strict";var s=e(1);t.exports=function(n){var i=this,o={};return this.items.forEach(function(t,r){var e=void 0;e="function"==typeof n?n(t,r):s(t,n)||0===s(t,n)?s(t,n):"",void 0===o[e]&&(o[e]=new i.constructor([])),o[e].push(t)}),new this.constructor(o)}},function(t,r,e){"use strict";var o=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=o(e);return i.filter(function(t){return r.items[t]}).length===i.length}},function(t,r,e){"use strict";t.exports=function(t,r){return void 0===r?this.items.join(t):new this.constructor(this.items).pluck(t).all().join(r)}},function(t,r,e){"use strict";t.exports=function(t){var r=t;t instanceof this.constructor&&(r=t.all());var e=this.items.filter(function(t){return-1!==r.indexOf(t)});return new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=this,e=Object.keys(t);t instanceof this.constructor&&(e=Object.keys(t.all()));var n={};return Object.keys(this.items).forEach(function(t){-1!==e.indexOf(t)&&(n[t]=r.items[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){return!this.items.length}},function(t,r,e){"use strict";t.exports=function(){return!!this.items.length}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.values();if(void 0===r)return e.implode(t);var n=e.count();if(0===n)return"";if(1===n)return e.last();var i=e.pop();return e.implode(t)+r+i}},function(t,r,e){"use strict";var i=e(1);t.exports=function(e){var n={};return"function"==typeof e?this.items.forEach(function(t){n[e(t)]=t}):this.items.forEach(function(t){var r=i(t,e);n[r||""]=t}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(){var t=Object.keys(this.items);return Array.isArray(this.items)&&(t=t.map(Number)),new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items;if("function"==typeof t&&(e=this.filter(t).all()),Array.isArray(e)&&!e.length||!Object.keys(e).length)return"function"==typeof r?r():r;if(Array.isArray(e))return e[e.length-1];var n=Object.keys(e);return e[n[n.length-1]]}},function(t,r,e){"use strict";t.exports=function(t,r){this.constructor.prototype[t]=r}},function(t,r,e){"use strict";t.exports=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(r){var e=this;if(Array.isArray(this.items))return new this.constructor(this.items.map(r));var n={};return Object.keys(this.items).forEach(function(t){n[t]=r(e.items[t],t)}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(e){return this.map(function(t,r){return e.apply(void 0,function(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}(t).concat([r]))})}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(s){var u={};return this.items.forEach(function(t,r){var e=s(t,r),n=c(e,2),i=n[0],o=n[1];void 0===u[i]?u[i]=[o]:u[i].push(o)}),new this.constructor(u)}},function(t,r,e){"use strict";t.exports=function(e){return this.map(function(t,r){return new e(t,r)})}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(s){var u={};return this.items.forEach(function(t,r){var e=s(t,r),n=c(e,2),i=n[0],o=n[1];void 0===u[i]?u[i]=[o]:u[i].push(o)}),new this.constructor(u)}},function(t,r,e){"use strict";var c=function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,r){var e=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(e.push(s.value),!r||e.length!==r);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e}(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.exports=function(o){var s=this,u={};return Array.isArray(this.items)?this.items.forEach(function(t){var r=o(t),e=c(r,2),n=e[0],i=e[1];u[n]=i}):Object.keys(this.items).forEach(function(t){var r=o(s.items[t]),e=c(r,2),n=e[0],i=e[1];u[n]=i}),new this.constructor(u)}},function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(t){return"string"==typeof t?Math.max.apply(Math,n(this.pluck(t).all())):Math.max.apply(Math,n(this.items))}},function(t,r,e){"use strict";t.exports=function(t){var r=this.items.length;return void 0===t?r%2==0?(this.items[r/2-1]+this.items[r/2])/2:this.items[Math.floor(r/2)]:r%2==0?(this.items[r/2-1][t]+this.items[r/2][t])/2:this.items[Math.floor(r/2)][t]}},function(t,r,e){"use strict";t.exports=function(t){var r=t;if("string"==typeof r&&(r=[r]),Array.isArray(this.items)&&Array.isArray(r))return new this.constructor(this.items.concat(r));var e=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){e[t]=r[t]}),new this.constructor(e)}},function(t,r,e){"use strict";function n(t){if(Array.isArray(t)){for(var r=0,e=Array(t.length);r<t.length;r++)e[r]=t[r];return e}return Array.from(t)}t.exports=function(t){return void 0!==t?Math.min.apply(Math,n(this.pluck(t).all())):Math.min.apply(Math,n(this.items))}},function(t,r,e){"use strict";t.exports=function(n){var i=[],o=1;return this.items.length?(this.items.forEach(function(r){var t=i.filter(function(t){return void 0!==n?t.key===r[n]:t.key===r});if(t.length){t[0].count+=1;var e=t[0].count;o<e&&(o=e)}else void 0!==n?i.push({key:r[n],count:1}):i.push({key:r,count:1})}),i.filter(function(t){return t.count===o}).map(function(t){return t.key})):null}},function(t,r,e){"use strict";var n=e(0);t.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=n(this.items).slice(t).filter(function(t,r){return r%e==0});return new this.constructor(r)}},function(t,r,e){"use strict";var u=e(2);t.exports=function(){for(var r=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=u(e);if(Array.isArray(this.items)){var o=this.items.filter(function(t){return-1!==i.indexOf(t)});return new this.constructor(o)}var s={};return Object.keys(this.items).forEach(function(t){-1!==i.indexOf(t)&&(s[t]=r.items[t])}),new this.constructor(s)}},function(t,r,e){"use strict";var f=e(4);t.exports=function(t,r){var e=Math.abs(t),n=this.count();if(e<=n)return this;for(var i=e-n,o=f(this.items),s=Array.isArray(this.items),u=t<0,c=0;c<i;)s?u?o.unshift(r):o.push(r):void 0!==o[c]?i+=1:o[c]=r,c+=1;return new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(e){var n=this,i=void 0;return Array.isArray(this.items)?(i=[new this.constructor([]),new this.constructor([])],this.items.forEach(function(t){!0===e(t)?i[0].push(t):i[1].push(t)})):(i=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach(function(t){var r=n.items[t];!0===e(r)?i[0].put(t,r):i[1].put(t,r)})),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(t){return t(this)}},function(t,r,e){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=e(1);t.exports=function(r,e){if(-1!==r.indexOf("*")){var n=(t=this.items,h={},t.forEach(function(t,r){!function r(e,n){"object"===(void 0===e?"undefined":y(e))&&Object.keys(e).forEach(function(t){r(e[t],n+"."+t)}),h[n]=e}(t,r)}),h),i=[];if(void 0!==e){var o=new RegExp("0."+e,"g"),s=("0."+e).split(".").length;Object.keys(n).forEach(function(t){var r=t.match(o);if(r){var e=r[0];e.split(".").length===s&&i.push(n[e])}})}var u=[],c=new RegExp("0."+r,"g"),f=("0."+r).split(".").length;if(Object.keys(n).forEach(function(t){var r=t.match(c);if(r){var e=r[0];e.split(".").length===f&&u.push(n[e])}}),void 0===e)return new this.constructor([u]);var a={};return this.items.forEach(function(t,r){a[i[r]||""]=u}),new this.constructor(a)}var t,h;if(void 0===e)return this.map(function(t){return void 0!==l(t,r)?l(t,r):null});var p={};return this.items.forEach(function(t){void 0!==l(t,r)?p[t[e]||""]=l(t,r):p[t[e]||""]=null}),new this.constructor(p)}},function(t,r,e){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.pop();var t=Object.keys(this.items),r=t[t.length-1],e=this.items[r];return delete this.items[r],e}},function(t,r,e){"use strict";t.exports=function(t,r){return void 0!==r?this.put(r,t):(this.items.unshift(t),this)}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items[t]||null;return e||void 0===r||(e="function"==typeof r?r():r),delete this.items[t],e}},function(t,r,e){"use strict";t.exports=function(){var t;return(t=this.items).push.apply(t,arguments),this}},function(t,r,e){"use strict";t.exports=function(t,r){return this.items[t]=r,this}},function(t,r,e){"use strict";var n=e(0);t.exports=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=n(this.items),e=new this.constructor(r).shuffle();return t!==parseInt(t,10)?e.first():e.take(t)}},function(t,r,e){"use strict";t.exports=function(r,t){var e=this,n=null;return void 0!==t&&(n=t),Array.isArray(this.items)?this.items.forEach(function(t){n=r(n,t)}):Object.keys(this.items).forEach(function(t){n=r(n,e.items[t],t)}),n}},function(t,r,e){"use strict";t.exports=function(r){return new this.constructor(this.items).filter(function(t){return!r(t)})}},function(t,r,e){"use strict";t.exports=function(){var t=[].concat(this.items).reverse();return new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(e,r){var n=this,i=e;"function"==typeof e&&(i=this.items.filter(function(t,r){return e(t,r)})[0]);var t=!1;if(!Array.isArray(this.items))return Object.keys(this.items).filter(function(t){return!0===r?n.items[t]===i:n.items[t]===Number(i)||n.items[t]===i.toString()})[0]||!1;var o=this.items.filter(function(t){return!0===r?t===i:t===Number(i)||t===String(i)})[0];return-1!==(t=this.items.indexOf(o))&&t}},function(t,r,e){"use strict";t.exports=function(){if(Array.isArray(this.items))return this.items.shift();var t=Object.keys(this.items)[0],r=this.items[t]||null;return delete this.items[t],r}},function(t,r,e){"use strict";var i=e(0);t.exports=function(){var t=i(this.items),r=void 0,e=void 0,n=void 0;for(n=t.length;n;n-=1)r=Math.floor(Math.random()*n),e=t[n-1],t[n-1]=t[r],t[r]=e;return this.items=t,this}},function(t,r,e){"use strict";t.exports=function(t,r){var e=this.items.slice(t);return void 0!==r&&(e=e.slice(0,r)),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t){var r=[].concat(this.items);return void 0===t?this.every(function(t){return"number"==typeof t})?r.sort(function(t,r){return t-r}):r.sort():r.sort(t),new this.constructor(r)}},function(t,r,e){"use strict";t.exports=function(e){var t=[].concat(this.items);return"function"==typeof e?t.sort(function(t,r){return e(t)<e(r)?-1:e(t)>e(r)?1:0}):t.sort(function(t,r){return t[e]<r[e]?-1:t[e]>r[e]?1:0}),new this.constructor(t)}},function(t,r,e){"use strict";t.exports=function(t){return this.sortBy(t).reverse()}},function(t,r,e){"use strict";t.exports=function(){var r=this,e={};return Object.keys(this.items).sort().forEach(function(t){e[t]=r.items[t]}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r,e){var n=this.slice(t,r);if(this.items=this.diff(n.all()).all(),Array.isArray(e))for(var i=0,o=e.length;i<o;i+=1)this.items.splice(t+i,0,e[i]);return n}},function(t,r,e){"use strict";t.exports=function(t){for(var r=Math.round(this.items.length/t),e=JSON.parse(JSON.stringify(this.items)),n=[],i=0;i<t;i+=1)n.push(new this.constructor(e.splice(0,r)));return new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=0;if(void 0===t)for(var e=0,n=this.items.length;e<n;e+=1)r+=this.items[e];else if("function"==typeof t)for(var i=0,o=this.items.length;i<o;i+=1)r+=t(this.items[i]);else for(var s=0,u=this.items.length;s<u;s+=1)r+=this.items[s][t];return r}},function(t,r,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var r=this;if(Array.isArray(this.items)||"object"!==o(this.items))return t<0?new this.constructor(this.items.slice(t)):new this.constructor(this.items.slice(0,t));var e=Object.keys(this.items),n=void 0;n=t<0?e.slice(t):e.slice(0,t);var i={};return e.forEach(function(t){-1!==n.indexOf(t)&&(i[t]=r.items[t])}),new this.constructor(i)}},function(t,r,e){"use strict";t.exports=function(t){return t(this),this}},function(t,r,e){"use strict";t.exports=function(t,r){for(var e=1;e<=t;e+=1)this.items.push(r(e));return this}},function(t,r,e){"use strict";t.exports=function(){var i=this.constructor;if(Array.isArray(this.items)){var r=[];return this.items.forEach(function(t){!function r(t,e){var n=[];t instanceof i?(t.items.forEach(function(t){return r(t,n)}),e.push(n)):Array.isArray(t)?(t.forEach(function(t){return r(t,n)}),e.push(n)):e.push(t)}(t,r)}),r}return this.values().all()}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){return"object"!==n(this.items)||Array.isArray(this.items)?JSON.stringify(this.toArray()):JSON.stringify(this.all())}},function(t,r,e){"use strict";t.exports=function(r){var e=this;if(Array.isArray(this.items))this.items=this.items.map(r);else{var n={};Object.keys(this.items).forEach(function(t){n[t]=r(e.items[t],t)}),this.items=n}return this}},function(t,r,e){"use strict";t.exports=function(t,r,e){t?e(this):r(this)}},function(t,r,e){"use strict";t.exports=function(r){var e=this,n=JSON.parse(JSON.stringify(this.items));return Object.keys(r).forEach(function(t){void 0===e.items[t]&&(n[t]=r[t])}),new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(t){var r=void 0;if(void 0===t)r=this.items.filter(function(t,r,e){return e.indexOf(t)===r});else{r=[];for(var e=[],n=0,i=this.items.length;n<i;n+=1){var o=void 0;o="function"==typeof t?t(this.items[n]):this.items[n][t],-1===e.indexOf(o)&&(r.push(this.items[n]),e.push(o))}}return new this.constructor(r)}},function(t,r,e){"use strict";t.exports=function(t){return t instanceof this.constructor?t.all():t}},function(t,r,e){"use strict";t.exports=function(){var r=this,e=[];return Object.keys(this.items).forEach(function(t){e.push(r.items[t])}),new this.constructor(e)}},function(t,r,e){"use strict";t.exports=function(t,r,e){return t?r(this,t):e?e(this,t):this}},function(t,r,e){"use strict";var s=e(0),u=e(1);t.exports=function(r,t,e){var n=t,i=e;void 0===e&&(i=t,n="===");var o=s(this.items).filter(function(t){switch(n){case"==":return u(t,r)===Number(i)||u(t,r)===i.toString();default:case"===":return u(t,r)===i;case"!=":case"<>":return u(t,r)!==Number(i)&&u(t,r)!==i.toString();case"!==":return u(t,r)!==i;case"<":return u(t,r)<i;case"<=":return u(t,r)<=i;case">":return u(t,r)>i;case">=":return u(t,r)>=i}});return new this.constructor(o)}},function(t,r,e){"use strict";t.exports=function(t,r){return this.where(t,">=",r[0]).where(t,"<=",r[r.length-1])}},function(t,r,e){"use strict";var i=e(0),o=e(1);t.exports=function(r,t){var e=i(t),n=this.items.filter(function(t){return-1!==e.indexOf(o(t,r))});return new this.constructor(n)}},function(t,r,e){"use strict";t.exports=function(r){return this.filter(function(t){return t instanceof r})}},function(t,r,e){"use strict";var n=e(1);t.exports=function(r,e){return this.filter(function(t){return n(t,r)<e[0]||n(t,r)>e[e.length-1]})}},function(t,r,e){"use strict";var i=e(0),o=e(1);t.exports=function(r,t){var e=i(t),n=this.items.filter(function(t){return-1===e.indexOf(o(t,r))});return new this.constructor(n)}},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return t instanceof this.constructor?t:"object"===(void 0===t?"undefined":n(t))?new this.constructor(t):new this.constructor([t])}},function(t,r,e){"use strict";t.exports=function(t){var e=this,n=t;n instanceof this.constructor&&(n=n.all());var r=this.items.map(function(t,r){return new e.constructor([t,n[r]])});return new this.constructor(r)}}]); |
@@ -0,1 +1,18 @@ | ||
# 4.12.0 | ||
## Breaking changes | ||
## Collection | ||
#### ``collect()`` | ||
- A collection instance made from an empty string is no longer recognized as an empty collection ``collect('')`` | ||
```js | ||
// Before 4.12.0 | ||
collect('').isEmpty(); | ||
//=> true | ||
// After 4.12.0 | ||
collect('').isEmpty(); | ||
//=> false | ||
``` | ||
# 4.4.0 | ||
@@ -2,0 +19,0 @@ |
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
function Collection(collection) { | ||
this.items = collection || []; | ||
if (collection !== undefined && !Array.isArray(collection) && (typeof collection === 'undefined' ? 'undefined' : _typeof(collection)) !== 'object') { | ||
this.items = [collection]; | ||
} else if (collection instanceof this.constructor) { | ||
this.items = collection.all(); | ||
} else { | ||
this.items = collection || []; | ||
} | ||
} | ||
@@ -50,2 +58,3 @@ | ||
Collection.prototype.isNotEmpty = require('./methods/isNotEmpty'); | ||
Collection.prototype.join = require('./methods/join'); | ||
Collection.prototype.keyBy = require('./methods/keyBy'); | ||
@@ -55,2 +64,3 @@ Collection.prototype.keys = require('./methods/keys'); | ||
Collection.prototype.macro = require('./methods/macro'); | ||
Collection.prototype.make = require('./methods/make'); | ||
Collection.prototype.map = require('./methods/map'); | ||
@@ -90,2 +100,3 @@ Collection.prototype.mapSpread = require('./methods/mapSpread'); | ||
Collection.prototype.sortByDesc = require('./methods/sortByDesc'); | ||
Collection.prototype.sortKeys = require('./methods/sortKeys'); | ||
Collection.prototype.splice = require('./methods/splice'); | ||
@@ -92,0 +103,0 @@ Collection.prototype.split = require('./methods/split'); |
{ | ||
"name": "collect.js", | ||
"version": "4.9.0", | ||
"version": "4.12.2", | ||
"description": "Convenient and dependency free wrapper for working with arrays and objects.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -74,2 +74,3 @@ # <img src="https://raw.githubusercontent.com/ecrmnn/collect.js/master/collectjs.jpg" alt="collect.js"> | ||
- [isNotEmpty](#isnotempty) | ||
- [join](#join) | ||
- [keyBy](#keyby) | ||
@@ -79,2 +80,3 @@ - [keys](#keys) | ||
- [macro](#macro) | ||
- [make](#make) | ||
- [map](#map) | ||
@@ -114,2 +116,3 @@ - [mapInto](#mapinto) | ||
- [sortByDesc](#sortbydesc) | ||
- [sortKeys](#sortkeys) | ||
- [splice](#splice) | ||
@@ -940,2 +943,22 @@ - [split](#split) | ||
#### ``join()`` | ||
The join method joins the collection's values with a string: | ||
```js | ||
collect(['a', 'b', 'c']).join(', '); | ||
//=> 'a, b, c' | ||
collect(['a', 'b', 'c']).join(', ', ', and '); | ||
//=> 'a, b, and c' | ||
collect(['a', 'b']).join(', ', ' and '); | ||
//=> 'a and b' | ||
collect(['a']).join(', ', ' and '); | ||
//=> 'a' | ||
collect([]).join(', ', ' and '); | ||
//=> '' | ||
``` | ||
#### ``keyBy()`` | ||
@@ -1039,2 +1062,7 @@ The keyBy method keys the collection by the given key. If multiple items have the same key, only the last one will appear in the new collection: | ||
#### ``make()`` | ||
The make method creates a new collection instance. | ||
> This is only added to adhere to the Laravel collection API, when using Collect.js it's recommended to use ``collect()`` directly when creating a new collection. | ||
#### ``map()`` | ||
@@ -1742,2 +1770,22 @@ The map method iterates through the collection and passes each value to the given callback. The callback is free to modify the item and return it, thus forming a new collection of modified items: | ||
#### ``sortKeys()`` | ||
The sortKeys method sorts the collection by the keys of the underlying associative array: | ||
```js | ||
const collection = collect({ | ||
id: 10, | ||
first: 'Sadio', | ||
last: 'Mané', | ||
}); | ||
const sorted = collection.sortKeys(); | ||
sorted.all(); | ||
//=> { | ||
//=> first: 'Sadio', | ||
//=> id: 10, | ||
//=> last: 'Mané', | ||
//=> } | ||
``` | ||
#### ``splice()`` | ||
@@ -1744,0 +1792,0 @@ The splice method removes and returns a slice of items starting at the specified index: |
'use strict'; | ||
function Collection(collection) { | ||
this.items = collection || []; | ||
if (collection !== undefined && !Array.isArray(collection) && typeof collection !== 'object') { | ||
this.items = [collection]; | ||
} else if (collection instanceof this.constructor) { | ||
this.items = collection.all(); | ||
} else { | ||
this.items = collection || []; | ||
} | ||
} | ||
@@ -50,2 +56,3 @@ | ||
Collection.prototype.isNotEmpty = require('./methods/isNotEmpty'); | ||
Collection.prototype.join = require('./methods/join'); | ||
Collection.prototype.keyBy = require('./methods/keyBy'); | ||
@@ -55,2 +62,3 @@ Collection.prototype.keys = require('./methods/keys'); | ||
Collection.prototype.macro = require('./methods/macro'); | ||
Collection.prototype.make = require('./methods/make'); | ||
Collection.prototype.map = require('./methods/map'); | ||
@@ -90,2 +98,3 @@ Collection.prototype.mapSpread = require('./methods/mapSpread'); | ||
Collection.prototype.sortByDesc = require('./methods/sortByDesc'); | ||
Collection.prototype.sortKeys = require('./methods/sortKeys'); | ||
Collection.prototype.splice = require('./methods/splice'); | ||
@@ -92,0 +101,0 @@ Collection.prototype.split = require('./methods/split'); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
407463
225
5880
2379