PageRenderTime 53ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 1ms

/files/videojs/5.0.0-24/video.js

https://gitlab.com/Mirros/jsdelivr
JavaScript | 1600 lines | 577 code | 144 blank | 879 comment | 206 complexity | 27f830751e1f3ccff43c57df04aa53d9 MD5 | raw file
  1. /**
  2. * @license
  3. * Video.js 5.0.0-24 <http://videojs.com/>
  4. * Copyright Brightcove, Inc. <https://www.brightcove.com/>
  5. * Available under Apache License Version 2.0
  6. * <https://github.com/videojs/video.js/blob/master/LICENSE>
  7. *
  8. * Includes vtt.js <https://github.com/mozilla/vtt.js>
  9. * Available under Apache License Version 2.0
  10. * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
  11. */
  12. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
  13. (function (global){
  14. var topLevel = typeof global !== 'undefined' ? global :
  15. typeof window !== 'undefined' ? window : {}
  16. var minDoc = _dereq_('min-document');
  17. if (typeof document !== 'undefined') {
  18. module.exports = document;
  19. } else {
  20. var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
  21. if (!doccy) {
  22. doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
  23. }
  24. module.exports = doccy;
  25. }
  26. }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  27. },{"min-document":3}],2:[function(_dereq_,module,exports){
  28. (function (global){
  29. if (typeof window !== "undefined") {
  30. module.exports = window;
  31. } else if (typeof global !== "undefined") {
  32. module.exports = global;
  33. } else if (typeof self !== "undefined"){
  34. module.exports = self;
  35. } else {
  36. module.exports = {};
  37. }
  38. }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  39. },{}],3:[function(_dereq_,module,exports){
  40. },{}],4:[function(_dereq_,module,exports){
  41. /**
  42. * lodash 3.0.2 (Custom Build) <https://lodash.com/>
  43. * Build: `lodash modern modularize exports="npm" -o ./`
  44. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  45. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  46. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  47. * Available under MIT license <https://lodash.com/license>
  48. */
  49. var baseFor = _dereq_('lodash._basefor'),
  50. isNative = _dereq_('lodash.isnative'),
  51. keysIn = _dereq_('lodash.keysin');
  52. /** `Object#toString` result references. */
  53. var objectTag = '[object Object]';
  54. /**
  55. * Checks if `value` is object-like.
  56. *
  57. * @private
  58. * @param {*} value The value to check.
  59. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  60. */
  61. function isObjectLike(value) {
  62. return !!value && typeof value == 'object';
  63. }
  64. /** Used for native method references. */
  65. var objectProto = Object.prototype;
  66. /** Used to check objects for own properties. */
  67. var hasOwnProperty = objectProto.hasOwnProperty;
  68. /**
  69. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  70. * of values.
  71. */
  72. var objToString = objectProto.toString;
  73. /** Native method references. */
  74. var getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf;
  75. /**
  76. * The base implementation of `_.forIn` without support for callback
  77. * shorthands and `this` binding.
  78. *
  79. * @private
  80. * @param {Object} object The object to iterate over.
  81. * @param {Function} iteratee The function invoked per iteration.
  82. * @returns {Object} Returns `object`.
  83. */
  84. function baseForIn(object, iteratee) {
  85. return baseFor(object, iteratee, keysIn);
  86. }
  87. /**
  88. * A fallback implementation of `_.isPlainObject` which checks if `value`
  89. * is an object created by the `Object` constructor or has a `[[Prototype]]`
  90. * of `null`.
  91. *
  92. * @private
  93. * @param {*} value The value to check.
  94. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  95. */
  96. function shimIsPlainObject(value) {
  97. var Ctor;
  98. // Exit early for non `Object` objects.
  99. if (!(isObjectLike(value) && objToString.call(value) == objectTag) ||
  100. (!hasOwnProperty.call(value, 'constructor') &&
  101. (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
  102. return false;
  103. }
  104. // IE < 9 iterates inherited properties before own properties. If the first
  105. // iterated property is an object's own property then there are no inherited
  106. // enumerable properties.
  107. var result;
  108. // In most environments an object's own properties are iterated before
  109. // its inherited properties. If the last iterated property is an object's
  110. // own property then there are no inherited enumerable properties.
  111. baseForIn(value, function(subValue, key) {
  112. result = key;
  113. });
  114. return result === undefined || hasOwnProperty.call(value, result);
  115. }
  116. /**
  117. * Checks if `value` is a plain object, that is, an object created by the
  118. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  119. *
  120. * **Note:** This method assumes objects created by the `Object` constructor
  121. * have no inherited enumerable properties.
  122. *
  123. * @static
  124. * @memberOf _
  125. * @category Lang
  126. * @param {*} value The value to check.
  127. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  128. * @example
  129. *
  130. * function Foo() {
  131. * this.a = 1;
  132. * }
  133. *
  134. * _.isPlainObject(new Foo);
  135. * // => false
  136. *
  137. * _.isPlainObject([1, 2, 3]);
  138. * // => false
  139. *
  140. * _.isPlainObject({ 'x': 0, 'y': 0 });
  141. * // => true
  142. *
  143. * _.isPlainObject(Object.create(null));
  144. * // => true
  145. */
  146. var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
  147. if (!(value && objToString.call(value) == objectTag)) {
  148. return false;
  149. }
  150. var valueOf = value.valueOf,
  151. objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
  152. return objProto
  153. ? (value == objProto || getPrototypeOf(value) == objProto)
  154. : shimIsPlainObject(value);
  155. };
  156. module.exports = isPlainObject;
  157. },{"lodash._basefor":5,"lodash.isnative":6,"lodash.keysin":7}],5:[function(_dereq_,module,exports){
  158. /**
  159. * lodash 3.0.1 (Custom Build) <https://lodash.com/>
  160. * Build: `lodash modern modularize exports="npm" -o ./`
  161. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  162. * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
  163. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  164. * Available under MIT license <https://lodash.com/license>
  165. */
  166. /**
  167. * The base implementation of `baseForIn` and `baseForOwn` which iterates
  168. * over `object` properties returned by `keysFunc` invoking `iteratee` for
  169. * each property. Iterator functions may exit iteration early by explicitly
  170. * returning `false`.
  171. *
  172. * @private
  173. * @param {Object} object The object to iterate over.
  174. * @param {Function} iteratee The function invoked per iteration.
  175. * @param {Function} keysFunc The function to get the keys of `object`.
  176. * @returns {Object} Returns `object`.
  177. */
  178. var baseFor = createBaseFor();
  179. /**
  180. * Creates a base function for `_.forIn` or `_.forInRight`.
  181. *
  182. * @private
  183. * @param {boolean} [fromRight] Specify iterating from right to left.
  184. * @returns {Function} Returns the new base function.
  185. */
  186. function createBaseFor(fromRight) {
  187. return function(object, iteratee, keysFunc) {
  188. var iterable = toObject(object),
  189. props = keysFunc(object),
  190. length = props.length,
  191. index = fromRight ? length : -1;
  192. while ((fromRight ? index-- : ++index < length)) {
  193. var key = props[index];
  194. if (iteratee(iterable[key], key, iterable) === false) {
  195. break;
  196. }
  197. }
  198. return object;
  199. };
  200. }
  201. /**
  202. * Converts `value` to an object if it is not one.
  203. *
  204. * @private
  205. * @param {*} value The value to process.
  206. * @returns {Object} Returns the object.
  207. */
  208. function toObject(value) {
  209. return isObject(value) ? value : Object(value);
  210. }
  211. /**
  212. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  213. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  214. *
  215. * @static
  216. * @memberOf _
  217. * @category Lang
  218. * @param {*} value The value to check.
  219. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  220. * @example
  221. *
  222. * _.isObject({});
  223. * // => true
  224. *
  225. * _.isObject([1, 2, 3]);
  226. * // => true
  227. *
  228. * _.isObject(1);
  229. * // => false
  230. */
  231. function isObject(value) {
  232. // Avoid a V8 JIT bug in Chrome 19-20.
  233. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  234. var type = typeof value;
  235. return type == 'function' || (!!value && type == 'object');
  236. }
  237. module.exports = baseFor;
  238. },{}],6:[function(_dereq_,module,exports){
  239. /**
  240. * lodash 3.0.2 (Custom Build) <https://lodash.com/>
  241. * Build: `lodash modern modularize exports="npm" -o ./`
  242. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  243. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  244. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  245. * Available under MIT license <https://lodash.com/license>
  246. */
  247. /** `Object#toString` result references. */
  248. var funcTag = '[object Function]';
  249. /**
  250. * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
  251. * In addition to special characters the forward slash is escaped to allow for
  252. * easier `eval` use and `Function` compilation.
  253. */
  254. var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
  255. reHasRegExpChars = RegExp(reRegExpChars.source);
  256. /** Used to detect host constructors (Safari > 5). */
  257. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  258. /**
  259. * Converts `value` to a string if it is not one. An empty string is returned
  260. * for `null` or `undefined` values.
  261. *
  262. * @private
  263. * @param {*} value The value to process.
  264. * @returns {string} Returns the string.
  265. */
  266. function baseToString(value) {
  267. if (typeof value == 'string') {
  268. return value;
  269. }
  270. return value == null ? '' : (value + '');
  271. }
  272. /**
  273. * Checks if `value` is object-like.
  274. *
  275. * @private
  276. * @param {*} value The value to check.
  277. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  278. */
  279. function isObjectLike(value) {
  280. return !!value && typeof value == 'object';
  281. }
  282. /** Used for native method references. */
  283. var objectProto = Object.prototype;
  284. /** Used to resolve the decompiled source of functions. */
  285. var fnToString = Function.prototype.toString;
  286. /**
  287. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  288. * of values.
  289. */
  290. var objToString = objectProto.toString;
  291. /** Used to detect if a method is native. */
  292. var reIsNative = RegExp('^' +
  293. escapeRegExp(objToString)
  294. .replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  295. );
  296. /**
  297. * Checks if `value` is a native function.
  298. *
  299. * @static
  300. * @memberOf _
  301. * @category Lang
  302. * @param {*} value The value to check.
  303. * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
  304. * @example
  305. *
  306. * _.isNative(Array.prototype.push);
  307. * // => true
  308. *
  309. * _.isNative(_);
  310. * // => false
  311. */
  312. function isNative(value) {
  313. if (value == null) {
  314. return false;
  315. }
  316. if (objToString.call(value) == funcTag) {
  317. return reIsNative.test(fnToString.call(value));
  318. }
  319. return isObjectLike(value) && reIsHostCtor.test(value);
  320. }
  321. /**
  322. * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
  323. * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
  324. *
  325. * @static
  326. * @memberOf _
  327. * @category String
  328. * @param {string} [string=''] The string to escape.
  329. * @returns {string} Returns the escaped string.
  330. * @example
  331. *
  332. * _.escapeRegExp('[lodash](https://lodash.com/)');
  333. * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
  334. */
  335. function escapeRegExp(string) {
  336. string = baseToString(string);
  337. return (string && reHasRegExpChars.test(string))
  338. ? string.replace(reRegExpChars, '\\$&')
  339. : string;
  340. }
  341. module.exports = isNative;
  342. },{}],7:[function(_dereq_,module,exports){
  343. /**
  344. * lodash 3.0.6 (Custom Build) <https://lodash.com/>
  345. * Build: `lodash modern modularize exports="npm" -o ./`
  346. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  347. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  348. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  349. * Available under MIT license <https://lodash.com/license>
  350. */
  351. var isArguments = _dereq_('lodash.isarguments'),
  352. isArray = _dereq_('lodash.isarray');
  353. /** Used for native method references. */
  354. var objectProto = Object.prototype;
  355. /** Used to check objects for own properties. */
  356. var hasOwnProperty = objectProto.hasOwnProperty;
  357. /** Native method references. */
  358. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  359. /**
  360. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  361. * of an array-like value.
  362. */
  363. var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
  364. /**
  365. * An object environment feature flags.
  366. *
  367. * @static
  368. * @memberOf _
  369. * @type Object
  370. */
  371. var support = {};
  372. (function(x) {
  373. var Ctor = function() { this.x = x; },
  374. args = arguments,
  375. object = { '0': x, 'length': x },
  376. props = [];
  377. Ctor.prototype = { 'valueOf': x, 'y': x };
  378. for (var key in new Ctor) { props.push(key); }
  379. /**
  380. * Detect if `arguments` object indexes are non-enumerable.
  381. *
  382. * In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object
  383. * indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat
  384. * `arguments` object indexes as non-enumerable and fail `hasOwnProperty`
  385. * checks for indexes that exceed the number of function parameters and
  386. * whose associated argument values are `0`.
  387. *
  388. * @memberOf _.support
  389. * @type boolean
  390. */
  391. try {
  392. support.nonEnumArgs = !propertyIsEnumerable.call(args, 1);
  393. } catch(e) {
  394. support.nonEnumArgs = true;
  395. }
  396. }(1, 0));
  397. /**
  398. * Checks if `value` is a valid array-like index.
  399. *
  400. * @private
  401. * @param {*} value The value to check.
  402. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  403. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  404. */
  405. function isIndex(value, length) {
  406. value = +value;
  407. length = length == null ? MAX_SAFE_INTEGER : length;
  408. return value > -1 && value % 1 == 0 && value < length;
  409. }
  410. /**
  411. * Checks if `value` is a valid array-like length.
  412. *
  413. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  414. *
  415. * @private
  416. * @param {*} value The value to check.
  417. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  418. */
  419. function isLength(value) {
  420. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  421. }
  422. /**
  423. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  424. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  425. *
  426. * @static
  427. * @memberOf _
  428. * @category Lang
  429. * @param {*} value The value to check.
  430. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  431. * @example
  432. *
  433. * _.isObject({});
  434. * // => true
  435. *
  436. * _.isObject([1, 2, 3]);
  437. * // => true
  438. *
  439. * _.isObject(1);
  440. * // => false
  441. */
  442. function isObject(value) {
  443. // Avoid a V8 JIT bug in Chrome 19-20.
  444. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  445. var type = typeof value;
  446. return type == 'function' || (!!value && type == 'object');
  447. }
  448. /**
  449. * Creates an array of the own and inherited enumerable property names of `object`.
  450. *
  451. * **Note:** Non-object values are coerced to objects.
  452. *
  453. * @static
  454. * @memberOf _
  455. * @category Object
  456. * @param {Object} object The object to query.
  457. * @returns {Array} Returns the array of property names.
  458. * @example
  459. *
  460. * function Foo() {
  461. * this.a = 1;
  462. * this.b = 2;
  463. * }
  464. *
  465. * Foo.prototype.c = 3;
  466. *
  467. * _.keysIn(new Foo);
  468. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  469. */
  470. function keysIn(object) {
  471. if (object == null) {
  472. return [];
  473. }
  474. if (!isObject(object)) {
  475. object = Object(object);
  476. }
  477. var length = object.length;
  478. length = (length && isLength(length) &&
  479. (isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0;
  480. var Ctor = object.constructor,
  481. index = -1,
  482. isProto = typeof Ctor == 'function' && Ctor.prototype === object,
  483. result = Array(length),
  484. skipIndexes = length > 0;
  485. while (++index < length) {
  486. result[index] = (index + '');
  487. }
  488. for (var key in object) {
  489. if (!(skipIndexes && isIndex(key, length)) &&
  490. !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  491. result.push(key);
  492. }
  493. }
  494. return result;
  495. }
  496. module.exports = keysIn;
  497. },{"lodash.isarguments":8,"lodash.isarray":9}],8:[function(_dereq_,module,exports){
  498. /**
  499. * lodash 3.0.2 (Custom Build) <https://lodash.com/>
  500. * Build: `lodash modern modularize exports="npm" -o ./`
  501. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  502. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  503. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  504. * Available under MIT license <https://lodash.com/license>
  505. */
  506. /** `Object#toString` result references. */
  507. var argsTag = '[object Arguments]';
  508. /**
  509. * Checks if `value` is object-like.
  510. *
  511. * @private
  512. * @param {*} value The value to check.
  513. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  514. */
  515. function isObjectLike(value) {
  516. return !!value && typeof value == 'object';
  517. }
  518. /** Used for native method references. */
  519. var objectProto = Object.prototype;
  520. /**
  521. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  522. * of values.
  523. */
  524. var objToString = objectProto.toString;
  525. /**
  526. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  527. * of an array-like value.
  528. */
  529. var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
  530. /**
  531. * The base implementation of `_.property` without support for deep paths.
  532. *
  533. * @private
  534. * @param {string} key The key of the property to get.
  535. * @returns {Function} Returns the new function.
  536. */
  537. function baseProperty(key) {
  538. return function(object) {
  539. return object == null ? undefined : object[key];
  540. };
  541. }
  542. /**
  543. * Gets the "length" property value of `object`.
  544. *
  545. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  546. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  547. *
  548. * @private
  549. * @param {Object} object The object to query.
  550. * @returns {*} Returns the "length" value.
  551. */
  552. var getLength = baseProperty('length');
  553. /**
  554. * Checks if `value` is array-like.
  555. *
  556. * @private
  557. * @param {*} value The value to check.
  558. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  559. */
  560. function isArrayLike(value) {
  561. return value != null && isLength(getLength(value));
  562. }
  563. /**
  564. * Checks if `value` is a valid array-like length.
  565. *
  566. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  567. *
  568. * @private
  569. * @param {*} value The value to check.
  570. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  571. */
  572. function isLength(value) {
  573. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  574. }
  575. /**
  576. * Checks if `value` is classified as an `arguments` object.
  577. *
  578. * @static
  579. * @memberOf _
  580. * @category Lang
  581. * @param {*} value The value to check.
  582. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  583. * @example
  584. *
  585. * _.isArguments(function() { return arguments; }());
  586. * // => true
  587. *
  588. * _.isArguments([1, 2, 3]);
  589. * // => false
  590. */
  591. function isArguments(value) {
  592. return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag;
  593. }
  594. module.exports = isArguments;
  595. },{}],9:[function(_dereq_,module,exports){
  596. /**
  597. * lodash 3.0.2 (Custom Build) <https://lodash.com/>
  598. * Build: `lodash modern modularize exports="npm" -o ./`
  599. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  600. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  601. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  602. * Available under MIT license <https://lodash.com/license>
  603. */
  604. /** `Object#toString` result references. */
  605. var arrayTag = '[object Array]',
  606. funcTag = '[object Function]';
  607. /**
  608. * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
  609. * In addition to special characters the forward slash is escaped to allow for
  610. * easier `eval` use and `Function` compilation.
  611. */
  612. var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
  613. reHasRegExpChars = RegExp(reRegExpChars.source);
  614. /** Used to detect host constructors (Safari > 5). */
  615. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  616. /**
  617. * Converts `value` to a string if it is not one. An empty string is returned
  618. * for `null` or `undefined` values.
  619. *
  620. * @private
  621. * @param {*} value The value to process.
  622. * @returns {string} Returns the string.
  623. */
  624. function baseToString(value) {
  625. if (typeof value == 'string') {
  626. return value;
  627. }
  628. return value == null ? '' : (value + '');
  629. }
  630. /**
  631. * Checks if `value` is object-like.
  632. *
  633. * @private
  634. * @param {*} value The value to check.
  635. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  636. */
  637. function isObjectLike(value) {
  638. return !!value && typeof value == 'object';
  639. }
  640. /** Used for native method references. */
  641. var objectProto = Object.prototype;
  642. /** Used to resolve the decompiled source of functions. */
  643. var fnToString = Function.prototype.toString;
  644. /**
  645. * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
  646. * of values.
  647. */
  648. var objToString = objectProto.toString;
  649. /** Used to detect if a method is native. */
  650. var reIsNative = RegExp('^' +
  651. escapeRegExp(objToString)
  652. .replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  653. );
  654. /* Native method references for those with the same name as other `lodash` methods. */
  655. var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray;
  656. /**
  657. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  658. * of an array-like value.
  659. */
  660. var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
  661. /**
  662. * Checks if `value` is a valid array-like length.
  663. *
  664. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  665. *
  666. * @private
  667. * @param {*} value The value to check.
  668. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  669. */
  670. function isLength(value) {
  671. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  672. }
  673. /**
  674. * Checks if `value` is classified as an `Array` object.
  675. *
  676. * @static
  677. * @memberOf _
  678. * @category Lang
  679. * @param {*} value The value to check.
  680. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  681. * @example
  682. *
  683. * _.isArray([1, 2, 3]);
  684. * // => true
  685. *
  686. * _.isArray(function() { return arguments; }());
  687. * // => false
  688. */
  689. var isArray = nativeIsArray || function(value) {
  690. return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
  691. };
  692. /**
  693. * Checks if `value` is a native function.
  694. *
  695. * @static
  696. * @memberOf _
  697. * @category Lang
  698. * @param {*} value The value to check.
  699. * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
  700. * @example
  701. *
  702. * _.isNative(Array.prototype.push);
  703. * // => true
  704. *
  705. * _.isNative(_);
  706. * // => false
  707. */
  708. function isNative(value) {
  709. if (value == null) {
  710. return false;
  711. }
  712. if (objToString.call(value) == funcTag) {
  713. return reIsNative.test(fnToString.call(value));
  714. }
  715. return isObjectLike(value) && reIsHostCtor.test(value);
  716. }
  717. /**
  718. * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
  719. * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
  720. *
  721. * @static
  722. * @memberOf _
  723. * @category String
  724. * @param {string} [string=''] The string to escape.
  725. * @returns {string} Returns the escaped string.
  726. * @example
  727. *
  728. * _.escapeRegExp('[lodash](https://lodash.com/)');
  729. * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
  730. */
  731. function escapeRegExp(string) {
  732. string = baseToString(string);
  733. return (string && reHasRegExpChars.test(string))
  734. ? string.replace(reRegExpChars, '\\$&')
  735. : string;
  736. }
  737. module.exports = isArray;
  738. },{}],10:[function(_dereq_,module,exports){
  739. /**
  740. * lodash 3.2.1 (Custom Build) <https://lodash.com/>
  741. * Build: `lodash modern modularize exports="npm" -o ./`
  742. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  743. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  744. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  745. * Available under MIT license <https://lodash.com/license>
  746. */
  747. var arrayCopy = _dereq_('lodash._arraycopy'),
  748. arrayEach = _dereq_('lodash._arrayeach'),
  749. createAssigner = _dereq_('lodash._createassigner'),
  750. isArguments = _dereq_('lodash.isarguments'),
  751. isArray = _dereq_('lodash.isarray'),
  752. isNative = _dereq_('lodash.isnative'),
  753. isPlainObject = _dereq_('lodash.isplainobject'),
  754. isTypedArray = _dereq_('lodash.istypedarray'),
  755. keys = _dereq_('lodash.keys'),
  756. keysIn = _dereq_('lodash.keysin'),
  757. toPlainObject = _dereq_('lodash.toplainobject');
  758. /**
  759. * Checks if `value` is object-like.
  760. *
  761. * @private
  762. * @param {*} value The value to check.
  763. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  764. */
  765. function isObjectLike(value) {
  766. return !!value && typeof value == 'object';
  767. }
  768. /** Used for native method references. */
  769. var arrayProto = Array.prototype;
  770. /** Native method references. */
  771. var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
  772. push = arrayProto.push;
  773. /**
  774. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  775. * of an array-like value.
  776. */
  777. var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
  778. /**
  779. * The base implementation of `_.merge` without support for argument juggling,
  780. * multiple sources, and `this` binding `customizer` functions.
  781. *
  782. * @private
  783. * @param {Object} object The destination object.
  784. * @param {Object} source The source object.
  785. * @param {Function} [customizer] The function to customize merging properties.
  786. * @param {Array} [stackA=[]] Tracks traversed source objects.
  787. * @param {Array} [stackB=[]] Associates values with source counterparts.
  788. * @returns {Object} Returns `object`.
  789. */
  790. function baseMerge(object, source, customizer, stackA, stackB) {
  791. if (!isObject(object)) {
  792. return object;
  793. }
  794. var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source));
  795. if (!isSrcArr) {
  796. var props = keys(source);
  797. push.apply(props, getSymbols(source));
  798. }
  799. arrayEach(props || source, function(srcValue, key) {
  800. if (props) {
  801. key = srcValue;
  802. srcValue = source[key];
  803. }
  804. if (isObjectLike(srcValue)) {
  805. stackA || (stackA = []);
  806. stackB || (stackB = []);
  807. baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
  808. }
  809. else {
  810. var value = object[key],
  811. result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
  812. isCommon = result === undefined;
  813. if (isCommon) {
  814. result = srcValue;
  815. }
  816. if ((isSrcArr || result !== undefined) &&
  817. (isCommon || (result === result ? (result !== value) : (value === value)))) {
  818. object[key] = result;
  819. }
  820. }
  821. });
  822. return object;
  823. }
  824. /**
  825. * A specialized version of `baseMerge` for arrays and objects which performs
  826. * deep merges and tracks traversed objects enabling objects with circular
  827. * references to be merged.
  828. *
  829. * @private
  830. * @param {Object} object The destination object.
  831. * @param {Object} source The source object.
  832. * @param {string} key The key of the value to merge.
  833. * @param {Function} mergeFunc The function to merge values.
  834. * @param {Function} [customizer] The function to customize merging properties.
  835. * @param {Array} [stackA=[]] Tracks traversed source objects.
  836. * @param {Array} [stackB=[]] Associates values with source counterparts.
  837. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  838. */
  839. function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
  840. var length = stackA.length,
  841. srcValue = source[key];
  842. while (length--) {
  843. if (stackA[length] == srcValue) {
  844. object[key] = stackB[length];
  845. return;
  846. }
  847. }
  848. var value = object[key],
  849. result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
  850. isCommon = result === undefined;
  851. if (isCommon) {
  852. result = srcValue;
  853. if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
  854. result = isArray(value)
  855. ? value
  856. : (isArrayLike(value) ? arrayCopy(value) : []);
  857. }
  858. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  859. result = isArguments(value)
  860. ? toPlainObject(value)
  861. : (isPlainObject(value) ? value : {});
  862. }
  863. else {
  864. isCommon = false;
  865. }
  866. }
  867. // Add the source value to the stack of traversed objects and associate
  868. // it with its merged value.
  869. stackA.push(srcValue);
  870. stackB.push(result);
  871. if (isCommon) {
  872. // Recursively merge objects and arrays (susceptible to call stack limits).
  873. object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
  874. } else if (result === result ? (result !== value) : (value === value)) {
  875. object[key] = result;
  876. }
  877. }
  878. /**
  879. * The base implementation of `_.property` without support for deep paths.
  880. *
  881. * @private
  882. * @param {string} key The key of the property to get.
  883. * @returns {Function} Returns the new function.
  884. */
  885. function baseProperty(key) {
  886. return function(object) {
  887. return object == null ? undefined : object[key];
  888. };
  889. }
  890. /**
  891. * Gets the "length" property value of `object`.
  892. *
  893. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  894. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  895. *
  896. * @private
  897. * @param {Object} object The object to query.
  898. * @returns {*} Returns the "length" value.
  899. */
  900. var getLength = baseProperty('length');
  901. /**
  902. * Creates an array of the own symbols of `object`.
  903. *
  904. * @private
  905. * @param {Object} object The object to query.
  906. * @returns {Array} Returns the array of symbols.
  907. */
  908. var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
  909. return getOwnPropertySymbols(toObject(object));
  910. };
  911. /**
  912. * Checks if `value` is array-like.
  913. *
  914. * @private
  915. * @param {*} value The value to check.
  916. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  917. */
  918. function isArrayLike(value) {
  919. return value != null && isLength(getLength(value));
  920. }
  921. /**
  922. * Checks if `value` is a valid array-like length.
  923. *
  924. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  925. *
  926. * @private
  927. * @param {*} value The value to check.
  928. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  929. */
  930. function isLength(value) {
  931. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  932. }
  933. /**
  934. * Converts `value` to an object if it is not one.
  935. *
  936. * @private
  937. * @param {*} value The value to process.
  938. * @returns {Object} Returns the object.
  939. */
  940. function toObject(value) {
  941. return isObject(value) ? value : Object(value);
  942. }
  943. /**
  944. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  945. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  946. *
  947. * @static
  948. * @memberOf _
  949. * @category Lang
  950. * @param {*} value The value to check.
  951. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  952. * @example
  953. *
  954. * _.isObject({});
  955. * // => true
  956. *
  957. * _.isObject([1, 2, 3]);
  958. * // => true
  959. *
  960. * _.isObject(1);
  961. * // => false
  962. */
  963. function isObject(value) {
  964. // Avoid a V8 JIT bug in Chrome 19-20.
  965. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  966. var type = typeof value;
  967. return type == 'function' || (!!value && type == 'object');
  968. }
  969. /**
  970. * Recursively merges own enumerable properties of the source object(s), that
  971. * don't resolve to `undefined` into the destination object. Subsequent sources
  972. * overwrite property assignments of previous sources. If `customizer` is
  973. * provided it is invoked to produce the merged values of the destination and
  974. * source properties. If `customizer` returns `undefined` merging is handled
  975. * by the method instead. The `customizer` is bound to `thisArg` and invoked
  976. * with five arguments: (objectValue, sourceValue, key, object, source).
  977. *
  978. * @static
  979. * @memberOf _
  980. * @category Object
  981. * @param {Object} object The destination object.
  982. * @param {...Object} [sources] The source objects.
  983. * @param {Function} [customizer] The function to customize assigned values.
  984. * @param {*} [thisArg] The `this` binding of `customizer`.
  985. * @returns {Object} Returns `object`.
  986. * @example
  987. *
  988. * var users = {
  989. * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
  990. * };
  991. *
  992. * var ages = {
  993. * 'data': [{ 'age': 36 }, { 'age': 40 }]
  994. * };
  995. *
  996. * _.merge(users, ages);
  997. * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
  998. *
  999. * // using a customizer callback
  1000. * var object = {
  1001. * 'fruits': ['apple'],
  1002. * 'vegetables': ['beet']
  1003. * };
  1004. *
  1005. * var other = {
  1006. * 'fruits': ['banana'],
  1007. * 'vegetables': ['carrot']
  1008. * };
  1009. *
  1010. * _.merge(object, other, function(a, b) {
  1011. * if (_.isArray(a)) {
  1012. * return a.concat(b);
  1013. * }
  1014. * });
  1015. * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
  1016. */
  1017. var merge = createAssigner(baseMerge);
  1018. /**
  1019. * Creates a function that returns `value`.
  1020. *
  1021. * @static
  1022. * @memberOf _
  1023. * @category Utility
  1024. * @param {*} value The value to return from the new function.
  1025. * @returns {Function} Returns the new function.
  1026. * @example
  1027. *
  1028. * var object = { 'user': 'fred' };
  1029. * var getter = _.constant(object);
  1030. *
  1031. * getter() === object;
  1032. * // => true
  1033. */
  1034. function constant(value) {
  1035. return function() {
  1036. return value;
  1037. };
  1038. }
  1039. module.exports = merge;
  1040. },{"lodash._arraycopy":11,"lodash._arrayeach":12,"lodash._createassigner":13,"lodash.isarguments":17,"lodash.isarray":18,"lodash.isnative":19,"lodash.isplainobject":4,"lodash.istypedarray":20,"lodash.keys":21,"lodash.keysin":22,"lodash.toplainobject":23}],11:[function(_dereq_,module,exports){
  1041. /**
  1042. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  1043. * Build: `lodash modern modularize exports="npm" -o ./`
  1044. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1045. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  1046. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1047. * Available under MIT license <https://lodash.com/license>
  1048. */
  1049. /**
  1050. * Copies the values of `source` to `array`.
  1051. *
  1052. * @private
  1053. * @param {Array} source The array to copy values from.
  1054. * @param {Array} [array=[]] The array to copy values to.
  1055. * @returns {Array} Returns `array`.
  1056. */
  1057. function arrayCopy(source, array) {
  1058. var index = -1,
  1059. length = source.length;
  1060. array || (array = Array(length));
  1061. while (++index < length) {
  1062. array[index] = source[index];
  1063. }
  1064. return array;
  1065. }
  1066. module.exports = arrayCopy;
  1067. },{}],12:[function(_dereq_,module,exports){
  1068. /**
  1069. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  1070. * Build: `lodash modern modularize exports="npm" -o ./`
  1071. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1072. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  1073. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1074. * Available under MIT license <https://lodash.com/license>
  1075. */
  1076. /**
  1077. * A specialized version of `_.forEach` for arrays without support for callback
  1078. * shorthands or `this` binding.
  1079. *
  1080. * @private
  1081. * @param {Array} array The array to iterate over.
  1082. * @param {Function} iteratee The function invoked per iteration.
  1083. * @returns {Array} Returns `array`.
  1084. */
  1085. function arrayEach(array, iteratee) {
  1086. var index = -1,
  1087. length = array.length;
  1088. while (++index < length) {
  1089. if (iteratee(array[index], index, array) === false) {
  1090. break;
  1091. }
  1092. }
  1093. return array;
  1094. }
  1095. module.exports = arrayEach;
  1096. },{}],13:[function(_dereq_,module,exports){
  1097. /**
  1098. * lodash 3.1.0 (Custom Build) <https://lodash.com/>
  1099. * Build: `lodash modern modularize exports="npm" -o ./`
  1100. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1101. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1102. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1103. * Available under MIT license <https://lodash.com/license>
  1104. */
  1105. var bindCallback = _dereq_('lodash._bindcallback'),
  1106. isIterateeCall = _dereq_('lodash._isiterateecall'),
  1107. restParam = _dereq_('lodash.restparam');
  1108. /**
  1109. * Creates a function that assigns properties of source object(s) to a given
  1110. * destination object.
  1111. *
  1112. * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
  1113. *
  1114. * @private
  1115. * @param {Function} assigner The function to assign values.
  1116. * @returns {Function} Returns the new assigner function.
  1117. */
  1118. function createAssigner(assigner) {
  1119. return restParam(function(object, sources) {
  1120. var index = -1,
  1121. length = object == null ? 0 : sources.length,
  1122. customizer = length > 2 && sources[length - 2],
  1123. guard = length > 2 && sources[2],
  1124. thisArg = length > 1 && sources[length - 1];
  1125. if (typeof customizer == 'function') {
  1126. customizer = bindCallback(customizer, thisArg, 5);
  1127. length -= 2;
  1128. } else {
  1129. customizer = typeof thisArg == 'function' ? thisArg : null;
  1130. length -= (customizer ? 1 : 0);
  1131. }
  1132. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  1133. customizer = length < 3 ? null : customizer;
  1134. length = 1;
  1135. }
  1136. while (++index < length) {
  1137. var source = sources[index];
  1138. if (source) {
  1139. assigner(object, source, customizer);
  1140. }
  1141. }
  1142. return object;
  1143. });
  1144. }
  1145. module.exports = createAssigner;
  1146. },{"lodash._bindcallback":14,"lodash._isiterateecall":15,"lodash.restparam":16}],14:[function(_dereq_,module,exports){
  1147. /**
  1148. * lodash 3.0.1 (Custom Build) <https://lodash.com/>
  1149. * Build: `lodash modern modularize exports="npm" -o ./`
  1150. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1151. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1152. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1153. * Available under MIT license <https://lodash.com/license>
  1154. */
  1155. /**
  1156. * A specialized version of `baseCallback` which only supports `this` binding
  1157. * and specifying the number of arguments to provide to `func`.
  1158. *
  1159. * @private
  1160. * @param {Function} func The function to bind.
  1161. * @param {*} thisArg The `this` binding of `func`.
  1162. * @param {number} [argCount] The number of arguments to provide to `func`.
  1163. * @returns {Function} Returns the callback.
  1164. */
  1165. function bindCallback(func, thisArg, argCount) {
  1166. if (typeof func != 'function') {
  1167. return identity;
  1168. }
  1169. if (thisArg === undefined) {
  1170. return func;
  1171. }
  1172. switch (argCount) {
  1173. case 1: return function(value) {
  1174. return func.call(thisArg, value);
  1175. };
  1176. case 3: return function(value, index, collection) {
  1177. return func.call(thisArg, value, index, collection);
  1178. };
  1179. case 4: return function(accumulator, value, index, collection) {
  1180. return func.call(thisArg, accumulator, value, index, collection);
  1181. };
  1182. case 5: return function(value, other, key, object, source) {
  1183. return func.call(thisArg, value, other, key, object, source);
  1184. };
  1185. }
  1186. return function() {
  1187. return func.apply(thisArg, arguments);
  1188. };
  1189. }
  1190. /**
  1191. * This method returns the first argument provided to it.
  1192. *
  1193. * @static
  1194. * @memberOf _
  1195. * @category Utility
  1196. * @param {*} value Any value.
  1197. * @returns {*} Returns `value`.
  1198. * @example
  1199. *
  1200. * var object = { 'user': 'fred' };
  1201. *
  1202. * _.identity(object) === object;
  1203. * // => true
  1204. */
  1205. function identity(value) {
  1206. return value;
  1207. }
  1208. module.exports = bindCallback;
  1209. },{}],15:[function(_dereq_,module,exports){
  1210. /**
  1211. * lodash 3.0.7 (Custom Build) <https://lodash.com/>
  1212. * Build: `lodash modern modularize exports="npm" -o ./`
  1213. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1214. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1215. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1216. * Available under MIT license <https://lodash.com/license>
  1217. */
  1218. /**
  1219. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  1220. * of an array-like value.
  1221. */
  1222. var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
  1223. /**
  1224. * The base implementation of `_.property` without support for deep paths.
  1225. *
  1226. * @private
  1227. * @param {string} key The key of the property to get.
  1228. * @returns {Function} Returns the new function.
  1229. */
  1230. function baseProperty(key) {
  1231. return function(object) {
  1232. return object == null ? undefined : object[key];
  1233. };
  1234. }
  1235. /**
  1236. * Gets the "length" property value of `object`.
  1237. *
  1238. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  1239. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  1240. *
  1241. * @private
  1242. * @param {Object} object The object to query.
  1243. * @returns {*} Returns the "length" value.
  1244. */
  1245. var getLength = baseProperty('length');
  1246. /**
  1247. * Checks if `value` is array-like.
  1248. *
  1249. * @private
  1250. * @param {*} value The value to check.
  1251. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1252. */
  1253. function isArrayLike(value) {
  1254. return value != null && isLength(getLength(value));
  1255. }
  1256. /**
  1257. * Checks if `value` is a valid array-like index.
  1258. *
  1259. * @private
  1260. * @param {*} value The value to check.
  1261. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  1262. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  1263. */
  1264. function isIndex(value, length) {
  1265. value = +value;
  1266. length = length == null ? MAX_SAFE_INTEGER : length;
  1267. return value > -1 && value % 1 == 0 && value < length;
  1268. }
  1269. /**
  1270. * Checks if the provided arguments are from an iteratee call.
  1271. *
  1272. * @private
  1273. * @param {*} value The potential iteratee value argument.
  1274. * @param {*} index The potential iteratee index or key argument.
  1275. * @param {*} object The potential iteratee object argument.
  1276. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
  1277. */
  1278. function isIterateeCall(value, index, object) {
  1279. if (!isObject(object)) {
  1280. return false;
  1281. }
  1282. var type = typeof index;
  1283. if (type == 'number'
  1284. ? (isArrayLike(object) && isIndex(index, object.length))
  1285. : (type == 'string' && index in object)) {
  1286. var other = object[index];
  1287. return value === value ? (value === other) : (other !== other);
  1288. }
  1289. return false;
  1290. }
  1291. /**
  1292. * Checks if `value` is a valid array-like length.
  1293. *
  1294. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  1295. *
  1296. * @private
  1297. * @param {*} value The value to check.
  1298. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1299. */
  1300. function isLength(value) {
  1301. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1302. }
  1303. /**
  1304. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  1305. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1306. *
  1307. * @static
  1308. * @memberOf _
  1309. * @category Lang
  1310. * @param {*} value The value to check.
  1311. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1312. * @example
  1313. *
  1314. * _.isObject({});
  1315. * // => true
  1316. *
  1317. * _.isObject([1, 2, 3]);
  1318. * // => true
  1319. *
  1320. * _.isObject(1);
  1321. * // => false
  1322. */
  1323. function isObject(value) {
  1324. // Avoid a V8 JIT bug in Chrome 19-20.
  1325. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  1326. var type = typeof value;
  1327. return type == 'function' || (!!value && type == 'object');
  1328. }
  1329. module.exports = isIterateeCall;
  1330. },{}],16:[function(_dereq_,module,exports){
  1331. /**
  1332. * lodash 3.6.1 (Custom Build) <https://lodash.com/>
  1333. * Build: `lodash modern modularize exports="npm" -o ./`
  1334. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1335. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1336. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1337. * Available under MIT license <https://lodash.com/license>
  1338. */
  1339. /** Used as the `TypeError` message for "Functions" methods. */
  1340. var FUNC_ERROR_TEXT = 'Expected a function';
  1341. /* Native method references for those with the same name as other `lodash` methods. */
  1342. var nativeMax = Math.max;
  1343. /**
  1344. * Creates a function that invokes `func` with the `this` binding of the
  1345. * created function and arguments from `start` and beyond provided as an array.
  1346. *
  1347. * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
  1348. *
  1349. * @static
  1350. * @memberOf _
  1351. * @category Function
  1352. * @param {Function} func The function to apply a rest parameter to.
  1353. * @param {number} [start=func.length-1] The start position of the rest parameter.
  1354. * @returns {Function} Returns the new function.
  1355. * @example
  1356. *
  1357. * var say = _.restParam(function(what, names) {
  1358. * return what + ' ' + _.initial(names).join(', ') +
  1359. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  1360. * });
  1361. *
  1362. * say('hello', 'fred', 'barney', 'pebbles');
  1363. * // => 'hello fred, barney, & pebbles'
  1364. */
  1365. function restParam(func, start) {
  1366. if (typeof func != 'function') {
  1367. throw new TypeError(FUNC_ERROR_TEXT);
  1368. }
  1369. start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
  1370. return function() {
  1371. var args = arguments,
  1372. index = -1,
  1373. length = nativeMax(args.length - start, 0),
  1374. rest = Array(length);
  1375. while (++index < length) {
  1376. rest[index] = args[start + index];
  1377. }
  1378. switch (start) {
  1379. case 0: return func.call(this, rest);
  1380. case 1: return func.call(this, args[0], rest);
  1381. case 2: return func.call(this, args[0], args[1], rest);
  1382. }
  1383. var otherArgs = Array(start + 1);
  1384. index = -1;
  1385. while (++index < start) {
  1386. otherArgs[index] = args[index];
  1387. }
  1388. otherArgs[start] = rest;
  1389. return func.apply(this, otherArgs);
  1390. };
  1391. }
  1392. module.exports = restParam;
  1393. },{}],17:[function(_dereq_,module,exports){
  1394. arguments[4][8][0].apply(exports,arguments)
  1395. },{"dup":8}],18:[function(_dereq_,module,exports){
  1396. arguments[4][9][0].apply(exports,arguments)
  1397. },{"dup":9}],19:[function(_dereq_,module,exports){
  1398. arguments[4][6][0].apply(exports,arguments)
  1399. },{"dup":6}],20:[function(_dereq_,module,exports){
  1400. /**
  1401. * lodash 3.0.1 (Custom Build) <https://lodash.com/>
  1402. * Build: `lodash modern modularize exports="npm" -o ./`
  1403. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1404. * Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
  1405. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1406. * Available under MIT license <https://lodash.com/license>
  1407. */
  1408. /** `Object#toString` result references. */
  1409. var argsTag = '[object Arguments]',
  1410. arrayTag = '[object Array]',
  1411. boolTag = '[object Boolean]',
  1412. dateTag = '[object Date]',
  1413. errorTag = '[object Error]',
  1414. funcTag = '[object Function]',
  1415. mapTag = '[object Map]',
  1416. numberTag = '[object Number]',
  1417. objectTag = '[object Object]',
  1418. regexpTag = '[object RegExp]',
  1419. setTag = '[object Set]',
  1420. stringTag = '[object String]',
  1421. weakMapTag = '[object WeakMap]';
  1422. var arrayBufferTag = '[object ArrayBuffer]',
  1423. float32Tag = '[object Float32Array]',
  1424. float64Tag = '[object Float64Array]',
  1425. int8Tag = '[object Int8Array]',
  1426. int16Tag = '[object Int16Array]',
  1427. int32Tag = '[object Int32Array]',
  1428. uint8Tag = '[object Uint8Array]',
  1429. uint8ClampedTag = '[object Uint8ClampedArray]',
  1430. uint16Tag = '[object Uint16Array]',
  1431. uint32Tag = '[object Uint32Array]';
  1432. /** Used to identify `toStringTag` values of typed arrays. */
  1433. var typedArrayTags = {};
  1434. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1435. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1436. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1437. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1438. typedArrayTags[uint32Tag] = true;
  1439. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1440. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1441. typedArrayTags[dateTag] = typedArrayTags[errorTag] =
  1442. typedArrayTags[funcTag] = typedArrayTags[mapTag] =
  1443. typedArrayTags[numberTag] = typedArrayTags[objectTag] =
  1444. typedArrayTags[regexpTag] = typedArrayTags[setTag] =
  1445. typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  1446. /**
  1447. * Checks if `value` is object-like.
  1448. *
  1449. * @private
  1450. * @param {*} value The value to check.
  1451. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  1452. */
  1453. function isObjectLike(value) {
  1454. return !!value && typeof value == 'object';
  1455. }
  1456. /