UNPKG

1.45 MBJavaScriptView Raw
1module.exports =
2/******/ (function(modules) { // webpackBootstrap
3/******/ // The module cache
4/******/ var installedModules = {};
5/******/
6/******/ // The require function
7/******/ function __webpack_require__(moduleId) {
8/******/
9/******/ // Check if module is in cache
10/******/ if(installedModules[moduleId]) {
11/******/ return installedModules[moduleId].exports;
12/******/ }
13/******/ // Create a new module (and put it into the cache)
14/******/ var module = installedModules[moduleId] = {
15/******/ i: moduleId,
16/******/ l: false,
17/******/ exports: {}
18/******/ };
19/******/
20/******/ // Execute the module function
21/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22/******/
23/******/ // Flag the module as loaded
24/******/ module.l = true;
25/******/
26/******/ // Return the exports of the module
27/******/ return module.exports;
28/******/ }
29/******/
30/******/
31/******/ // expose the modules object (__webpack_modules__)
32/******/ __webpack_require__.m = modules;
33/******/
34/******/ // expose the module cache
35/******/ __webpack_require__.c = installedModules;
36/******/
37/******/ // define getter function for harmony exports
38/******/ __webpack_require__.d = function(exports, name, getter) {
39/******/ if(!__webpack_require__.o(exports, name)) {
40/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41/******/ }
42/******/ };
43/******/
44/******/ // define __esModule on exports
45/******/ __webpack_require__.r = function(exports) {
46/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48/******/ }
49/******/ Object.defineProperty(exports, '__esModule', { value: true });
50/******/ };
51/******/
52/******/ // create a fake namespace object
53/******/ // mode & 1: value is a module id, require it
54/******/ // mode & 2: merge all properties of value into the ns
55/******/ // mode & 4: return value when already ns object
56/******/ // mode & 8|1: behave like require
57/******/ __webpack_require__.t = function(value, mode) {
58/******/ if(mode & 1) value = __webpack_require__(value);
59/******/ if(mode & 8) return value;
60/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61/******/ var ns = Object.create(null);
62/******/ __webpack_require__.r(ns);
63/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65/******/ return ns;
66/******/ };
67/******/
68/******/ // getDefaultExport function for compatibility with non-harmony modules
69/******/ __webpack_require__.n = function(module) {
70/******/ var getter = module && module.__esModule ?
71/******/ function getDefault() { return module['default']; } :
72/******/ function getModuleExports() { return module; };
73/******/ __webpack_require__.d(getter, 'a', getter);
74/******/ return getter;
75/******/ };
76/******/
77/******/ // Object.prototype.hasOwnProperty.call
78/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79/******/
80/******/ // __webpack_public_path__
81/******/ __webpack_require__.p = "";
82/******/
83/******/
84/******/ // Load entry module and return exports
85/******/ return __webpack_require__(__webpack_require__.s = "fae3");
86/******/ })
87/************************************************************************/
88/******/ ({
89
90/***/ "0811":
91/***/ (function(module, __webpack_exports__, __webpack_require__) {
92
93"use strict";
94/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifOperator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2a2e");
95/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifOperator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifOperator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
96/* unused harmony reexport * */
97 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifOperator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
98
99/***/ }),
100
101/***/ "1b1f":
102/***/ (function(module, __webpack_exports__, __webpack_require__) {
103
104"use strict";
105/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidgetTaxonomyAssigner_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("52bf");
106/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidgetTaxonomyAssigner_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidgetTaxonomyAssigner_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
107/* unused harmony reexport * */
108 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidgetTaxonomyAssigner_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
109
110/***/ }),
111
112/***/ "1d77":
113/***/ (function(module, __webpack_exports__, __webpack_require__) {
114
115"use strict";
116/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TaxonSelector_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bdc0");
117/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TaxonSelector_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TaxonSelector_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
118/* unused harmony reexport * */
119 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TaxonSelector_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
120
121/***/ }),
122
123/***/ "1f6c":
124/***/ (function(module, __webpack_exports__, __webpack_require__) {
125
126"use strict";
127/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifControlPanel_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a10e");
128/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifControlPanel_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifControlPanel_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
129/* unused harmony reexport * */
130 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SerifControlPanel_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
131
132/***/ }),
133
134/***/ "2a2e":
135/***/ (function(module, exports, __webpack_require__) {
136
137// extracted by mini-css-extract-plugin
138
139/***/ }),
140
141/***/ "2e20":
142/***/ (function(module, __webpack_exports__, __webpack_require__) {
143
144"use strict";
145/* WEBPACK VAR INJECTION */(function(module, global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _gsScope; });
146/* unused harmony export TweenLite */
147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return globals; });
148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return TweenLite; });
149/* unused harmony export SimpleTimeline */
150/* unused harmony export Animation */
151/* unused harmony export Ease */
152/* unused harmony export Linear */
153/* unused harmony export Power0 */
154/* unused harmony export Power1 */
155/* unused harmony export Power2 */
156/* unused harmony export Power3 */
157/* unused harmony export Power4 */
158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TweenPlugin; });
159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EventDispatcher; });
160/*!
161 * VERSION: 2.0.2
162 * DATE: 2018-08-27
163 * UPDATES AND DOCS AT: http://greensock.com
164 *
165 * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
166 * This work is subject to the terms at http://greensock.com/standard-license or for
167 * Club GreenSock members, the software agreement that was issued with your membership.
168 *
169 * @author: Jack Doyle, jack@greensock.com
170 */
171
172/* ES6 changes:
173 - declare and export _gsScope at top.
174 - set var TweenLite = the result of the main function
175 - export default TweenLite at the bottom
176 - return TweenLite at the bottom of the main function
177 - pass in _gsScope as the first parameter of the main function (which is actually at the bottom)
178 - remove the "export to multiple environments" in Definition().
179 */
180var _gsScope = (typeof(window) !== "undefined") ? window : ( true && module.exports && typeof(global) !== "undefined") ? global : undefined || {};
181
182var TweenLite = (function(window, moduleName) {
183
184 "use strict";
185 var _exports = {},
186 _doc = window.document,
187 _globals = window.GreenSockGlobals = window.GreenSockGlobals || window;
188 if (_globals.TweenLite) {
189 return _globals.TweenLite; //in case the core set of classes is already loaded, don't instantiate twice.
190 }
191 var _namespace = function(ns) {
192 var a = ns.split("."),
193 p = _globals, i;
194 for (i = 0; i < a.length; i++) {
195 p[a[i]] = p = p[a[i]] || {};
196 }
197 return p;
198 },
199 gs = _namespace("com.greensock"),
200 _tinyNum = 0.0000000001,
201 _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
202 var b = [],
203 l = a.length,
204 i;
205 for (i = 0; i !== l; b.push(a[i++])) {}
206 return b;
207 },
208 _emptyFunc = function() {},
209 _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower)
210 var toString = Object.prototype.toString,
211 array = toString.call([]);
212 return function(obj) {
213 return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array));
214 };
215 }()),
216 a, i, p, _ticker, _tickerActive,
217 _defLookup = {},
218
219 /**
220 * @constructor
221 * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition.
222 * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is
223 * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin
224 * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally.
225 *
226 * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found,
227 * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere,
228 * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so
229 * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything
230 * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock
231 * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could
232 * sandbox the banner one like:
233 *
234 * <script>
235 * var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever.
236 * </script>
237 * <script src="js/greensock/v1.7/TweenMax.js"></script>
238 * <script>
239 * window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)
240 * </script>
241 * <script src="js/greensock/v1.6/TweenMax.js"></script>
242 * <script>
243 * gs.TweenLite.to(...); //would use v1.7
244 * TweenLite.to(...); //would use v1.6
245 * </script>
246 *
247 * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back".
248 * @param {!Array.<string>} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"]
249 * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition.
250 * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object)
251 */
252 Definition = function(ns, dependencies, func, global) {
253 this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses
254 _defLookup[ns] = this;
255 this.gsClass = null;
256 this.func = func;
257 var _classes = [];
258 this.check = function(init) {
259 var i = dependencies.length,
260 missing = i,
261 cur, a, n, cl;
262 while (--i > -1) {
263 if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) {
264 _classes[i] = cur.gsClass;
265 missing--;
266 } else if (init) {
267 cur.sc.push(this);
268 }
269 }
270 if (missing === 0 && func) {
271 a = ("com.greensock." + ns).split(".");
272 n = a.pop();
273 cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes);
274
275 //exports to multiple environments
276 if (global) {
277 _globals[n] = _exports[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)
278 /*
279 if (typeof(module) !== "undefined" && module.exports) { //node
280 if (ns === moduleName) {
281 module.exports = _exports[moduleName] = cl;
282 for (i in _exports) {
283 cl[i] = _exports[i];
284 }
285 } else if (_exports[moduleName]) {
286 _exports[moduleName][n] = cl;
287 }
288 } else if (typeof(define) === "function" && define.amd){ //AMD
289 define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; });
290 }
291 */
292 }
293 for (i = 0; i < this.sc.length; i++) {
294 this.sc[i].check();
295 }
296 }
297 };
298 this.check(true);
299 },
300
301 //used to create Definition instances (which basically registers a class that has dependencies).
302 _gsDefine = window._gsDefine = function(ns, dependencies, func, global) {
303 return new Definition(ns, dependencies, func, global);
304 },
305
306 //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class).
307 _class = gs._class = function(ns, func, global) {
308 func = func || function() {};
309 _gsDefine(ns, [], function(){ return func; }, global);
310 return func;
311 };
312
313 _gsDefine.globals = _globals;
314
315
316
317/*
318 * ----------------------------------------------------------------
319 * Ease
320 * ----------------------------------------------------------------
321 */
322 var _baseParams = [0, 0, 1, 1],
323 Ease = _class("easing.Ease", function(func, extraParams, type, power) {
324 this._func = func;
325 this._type = type || 0;
326 this._power = power || 0;
327 this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams;
328 }, true),
329 _easeMap = Ease.map = {},
330 _easeReg = Ease.register = function(ease, names, types, create) {
331 var na = names.split(","),
332 i = na.length,
333 ta = (types || "easeIn,easeOut,easeInOut").split(","),
334 e, name, j, type;
335 while (--i > -1) {
336 name = na[i];
337 e = create ? _class("easing."+name, null, true) : gs.easing[name] || {};
338 j = ta.length;
339 while (--j > -1) {
340 type = ta[j];
341 _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease();
342 }
343 }
344 };
345
346 p = Ease.prototype;
347 p._calcEnd = false;
348 p.getRatio = function(p) {
349 if (this._func) {
350 this._params[0] = p;
351 return this._func.apply(null, this._params);
352 }
353 var t = this._type,
354 pw = this._power,
355 r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2;
356 if (pw === 1) {
357 r *= r;
358 } else if (pw === 2) {
359 r *= r * r;
360 } else if (pw === 3) {
361 r *= r * r * r;
362 } else if (pw === 4) {
363 r *= r * r * r * r;
364 }
365 return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2);
366 };
367
368 //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut)
369 a = ["Linear","Quad","Cubic","Quart","Quint,Strong"];
370 i = a.length;
371 while (--i > -1) {
372 p = a[i]+",Power"+i;
373 _easeReg(new Ease(null,null,1,i), p, "easeOut", true);
374 _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : ""));
375 _easeReg(new Ease(null,null,3,i), p, "easeInOut");
376 }
377 _easeMap.linear = gs.easing.Linear.easeIn;
378 _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks
379
380
381/*
382 * ----------------------------------------------------------------
383 * EventDispatcher
384 * ----------------------------------------------------------------
385 */
386 var EventDispatcher = _class("events.EventDispatcher", function(target) {
387 this._listeners = {};
388 this._eventTarget = target || this;
389 });
390 p = EventDispatcher.prototype;
391
392 p.addEventListener = function(type, callback, scope, useParam, priority) {
393 priority = priority || 0;
394 var list = this._listeners[type],
395 index = 0,
396 listener, i;
397 if (this === _ticker && !_tickerActive) {
398 _ticker.wake();
399 }
400 if (list == null) {
401 this._listeners[type] = list = [];
402 }
403 i = list.length;
404 while (--i > -1) {
405 listener = list[i];
406 if (listener.c === callback && listener.s === scope) {
407 list.splice(i, 1);
408 } else if (index === 0 && listener.pr < priority) {
409 index = i + 1;
410 }
411 }
412 list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority});
413 };
414
415 p.removeEventListener = function(type, callback) {
416 var list = this._listeners[type], i;
417 if (list) {
418 i = list.length;
419 while (--i > -1) {
420 if (list[i].c === callback) {
421 list.splice(i, 1);
422 return;
423 }
424 }
425 }
426 };
427
428 p.dispatchEvent = function(type) {
429 var list = this._listeners[type],
430 i, t, listener;
431 if (list) {
432 i = list.length;
433 if (i > 1) {
434 list = list.slice(0); //in case addEventListener() is called from within a listener/callback (otherwise the index could change, resulting in a skip)
435 }
436 t = this._eventTarget;
437 while (--i > -1) {
438 listener = list[i];
439 if (listener) {
440 if (listener.up) {
441 listener.c.call(listener.s || t, {type:type, target:t});
442 } else {
443 listener.c.call(listener.s || t);
444 }
445 }
446 }
447 }
448 };
449
450
451/*
452 * ----------------------------------------------------------------
453 * Ticker
454 * ----------------------------------------------------------------
455 */
456 var _reqAnimFrame = window.requestAnimationFrame,
457 _cancelAnimFrame = window.cancelAnimationFrame,
458 _getTime = Date.now || function() {return new Date().getTime();},
459 _lastUpdate = _getTime();
460
461 //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.
462 a = ["ms","moz","webkit","o"];
463 i = a.length;
464 while (--i > -1 && !_reqAnimFrame) {
465 _reqAnimFrame = window[a[i] + "RequestAnimationFrame"];
466 _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"];
467 }
468
469 _class("Ticker", function(fps, useRAF) {
470 var _self = this,
471 _startTime = _getTime(),
472 _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false,
473 _lagThreshold = 500,
474 _adjustedLag = 33,
475 _tickWord = "tick", //helps reduce gc burden
476 _fps, _req, _id, _gap, _nextTime,
477 _tick = function(manual) {
478 var elapsed = _getTime() - _lastUpdate,
479 overlap, dispatch;
480 if (elapsed > _lagThreshold) {
481 _startTime += elapsed - _adjustedLag;
482 }
483 _lastUpdate += elapsed;
484 _self.time = (_lastUpdate - _startTime) / 1000;
485 overlap = _self.time - _nextTime;
486 if (!_fps || overlap > 0 || manual === true) {
487 _self.frame++;
488 _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);
489 dispatch = true;
490 }
491 if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
492 _id = _req(_tick);
493 }
494 if (dispatch) {
495 _self.dispatchEvent(_tickWord);
496 }
497 };
498
499 EventDispatcher.call(_self);
500 _self.time = _self.frame = 0;
501 _self.tick = function() {
502 _tick(true);
503 };
504
505 _self.lagSmoothing = function(threshold, adjustedLag) {
506 if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use.
507 return (_lagThreshold < 1 / _tinyNum);
508 }
509 _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited
510 _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);
511 };
512
513 _self.sleep = function() {
514 if (_id == null) {
515 return;
516 }
517 if (!_useRAF || !_cancelAnimFrame) {
518 clearTimeout(_id);
519 } else {
520 _cancelAnimFrame(_id);
521 }
522 _req = _emptyFunc;
523 _id = null;
524 if (_self === _ticker) {
525 _tickerActive = false;
526 }
527 };
528
529 _self.wake = function(seamless) {
530 if (_id !== null) {
531 _self.sleep();
532 } else if (seamless) {
533 _startTime += -_lastUpdate + (_lastUpdate = _getTime());
534 } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().
535 _lastUpdate = _getTime() - _lagThreshold + 5;
536 }
537 _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame;
538 if (_self === _ticker) {
539 _tickerActive = true;
540 }
541 _tick(2);
542 };
543
544 _self.fps = function(value) {
545 if (!arguments.length) {
546 return _fps;
547 }
548 _fps = value;
549 _gap = 1 / (_fps || 60);
550 _nextTime = this.time + _gap;
551 _self.wake();
552 };
553
554 _self.useRAF = function(value) {
555 if (!arguments.length) {
556 return _useRAF;
557 }
558 _self.sleep();
559 _useRAF = value;
560 _self.fps(_fps);
561 };
562 _self.fps(fps);
563
564 //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.
565 setTimeout(function() {
566 if (_useRAF === "auto" && _self.frame < 5 && (_doc || {}).visibilityState !== "hidden") {
567 _self.useRAF(false);
568 }
569 }, 1500);
570 });
571
572 p = gs.Ticker.prototype = new gs.events.EventDispatcher();
573 p.constructor = gs.Ticker;
574
575
576/*
577 * ----------------------------------------------------------------
578 * Animation
579 * ----------------------------------------------------------------
580 */
581 var Animation = _class("core.Animation", function(duration, vars) {
582 this.vars = vars = vars || {};
583 this._duration = this._totalDuration = duration || 0;
584 this._delay = Number(vars.delay) || 0;
585 this._timeScale = 1;
586 this._active = (vars.immediateRender === true);
587 this.data = vars.data;
588 this._reversed = (vars.reversed === true);
589
590 if (!_rootTimeline) {
591 return;
592 }
593 if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.
594 _ticker.wake();
595 }
596
597 var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline;
598 tl.add(this, tl._time);
599
600 if (this.vars.paused) {
601 this.paused(true);
602 }
603 });
604
605 _ticker = Animation.ticker = new gs.Ticker();
606 p = Animation.prototype;
607 p._dirty = p._gc = p._initted = p._paused = false;
608 p._totalTime = p._time = 0;
609 p._rawPrevTime = -1;
610 p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;
611 p._paused = false;
612
613
614 //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
615 var _checkTimeout = function() {
616 if (_tickerActive && _getTime() - _lastUpdate > 2000 && ((_doc || {}).visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled.
617 _ticker.wake();
618 }
619 var t = setTimeout(_checkTimeout, 2000);
620 if (t.unref) {
621 // allows a node process to exit even if the timeout’s callback hasn't been invoked. Without it, the node process could hang as this function is called every two seconds.
622 t.unref();
623 }
624 };
625 _checkTimeout();
626
627
628 p.play = function(from, suppressEvents) {
629 if (from != null) {
630 this.seek(from, suppressEvents);
631 }
632 return this.reversed(false).paused(false);
633 };
634
635 p.pause = function(atTime, suppressEvents) {
636 if (atTime != null) {
637 this.seek(atTime, suppressEvents);
638 }
639 return this.paused(true);
640 };
641
642 p.resume = function(from, suppressEvents) {
643 if (from != null) {
644 this.seek(from, suppressEvents);
645 }
646 return this.paused(false);
647 };
648
649 p.seek = function(time, suppressEvents) {
650 return this.totalTime(Number(time), suppressEvents !== false);
651 };
652
653 p.restart = function(includeDelay, suppressEvents) {
654 return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true);
655 };
656
657 p.reverse = function(from, suppressEvents) {
658 if (from != null) {
659 this.seek((from || this.totalDuration()), suppressEvents);
660 }
661 return this.reversed(true).paused(false);
662 };
663
664 p.render = function(time, suppressEvents, force) {
665 //stub - we override this method in subclasses.
666 };
667
668 p.invalidate = function() {
669 this._time = this._totalTime = 0;
670 this._initted = this._gc = false;
671 this._rawPrevTime = -1;
672 if (this._gc || !this.timeline) {
673 this._enabled(true);
674 }
675 return this;
676 };
677
678 p.isActive = function() {
679 var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.
680 startTime = this._startTime,
681 rawTime;
682 return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale - 0.0000001));
683 };
684
685 p._enabled = function (enabled, ignoreTimeline) {
686 if (!_tickerActive) {
687 _ticker.wake();
688 }
689 this._gc = !enabled;
690 this._active = this.isActive();
691 if (ignoreTimeline !== true) {
692 if (enabled && !this.timeline) {
693 this._timeline.add(this, this._startTime - this._delay);
694 } else if (!enabled && this.timeline) {
695 this._timeline._remove(this, true);
696 }
697 }
698 return false;
699 };
700
701
702 p._kill = function(vars, target) {
703 return this._enabled(false, false);
704 };
705
706 p.kill = function(vars, target) {
707 this._kill(vars, target);
708 return this;
709 };
710
711 p._uncache = function(includeSelf) {
712 var tween = includeSelf ? this : this.timeline;
713 while (tween) {
714 tween._dirty = true;
715 tween = tween.timeline;
716 }
717 return this;
718 };
719
720 p._swapSelfInParams = function(params) {
721 var i = params.length,
722 copy = params.concat();
723 while (--i > -1) {
724 if (params[i] === "{self}") {
725 copy[i] = this;
726 }
727 }
728 return copy;
729 };
730
731 p._callback = function(type) {
732 var v = this.vars,
733 callback = v[type],
734 params = v[type + "Params"],
735 scope = v[type + "Scope"] || v.callbackScope || this,
736 l = params ? params.length : 0;
737 switch (l) { //speed optimization; call() is faster than apply() so use it when there are only a few parameters (which is by far most common). Previously we simply did var v = this.vars; v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray);
738 case 0: callback.call(scope); break;
739 case 1: callback.call(scope, params[0]); break;
740 case 2: callback.call(scope, params[0], params[1]); break;
741 default: callback.apply(scope, params);
742 }
743 };
744
745//----Animation getters/setters --------------------------------------------------------
746
747 p.eventCallback = function(type, callback, params, scope) {
748 if ((type || "").substr(0,2) === "on") {
749 var v = this.vars;
750 if (arguments.length === 1) {
751 return v[type];
752 }
753 if (callback == null) {
754 delete v[type];
755 } else {
756 v[type] = callback;
757 v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params;
758 v[type + "Scope"] = scope;
759 }
760 if (type === "onUpdate") {
761 this._onUpdate = callback;
762 }
763 }
764 return this;
765 };
766
767 p.delay = function(value) {
768 if (!arguments.length) {
769 return this._delay;
770 }
771 if (this._timeline.smoothChildTiming) {
772 this.startTime( this._startTime + value - this._delay );
773 }
774 this._delay = value;
775 return this;
776 };
777
778 p.duration = function(value) {
779 if (!arguments.length) {
780 this._dirty = false;
781 return this._duration;
782 }
783 this._duration = this._totalDuration = value;
784 this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration.
785 if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) {
786 this.totalTime(this._totalTime * (value / this._duration), true);
787 }
788 return this;
789 };
790
791 p.totalDuration = function(value) {
792 this._dirty = false;
793 return (!arguments.length) ? this._totalDuration : this.duration(value);
794 };
795
796 p.time = function(value, suppressEvents) {
797 if (!arguments.length) {
798 return this._time;
799 }
800 if (this._dirty) {
801 this.totalDuration();
802 }
803 return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents);
804 };
805
806 p.totalTime = function(time, suppressEvents, uncapped) {
807 if (!_tickerActive) {
808 _ticker.wake();
809 }
810 if (!arguments.length) {
811 return this._totalTime;
812 }
813 if (this._timeline) {
814 if (time < 0 && !uncapped) {
815 time += this.totalDuration();
816 }
817 if (this._timeline.smoothChildTiming) {
818 if (this._dirty) {
819 this.totalDuration();
820 }
821 var totalDuration = this._totalDuration,
822 tl = this._timeline;
823 if (time > totalDuration && !uncapped) {
824 time = totalDuration;
825 }
826 this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale);
827 if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.
828 this._uncache(false);
829 }
830 //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed.
831 if (tl._timeline) {
832 while (tl._timeline) {
833 if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) {
834 tl.totalTime(tl._totalTime, true);
835 }
836 tl = tl._timeline;
837 }
838 }
839 }
840 if (this._gc) {
841 this._enabled(true, false);
842 }
843 if (this._totalTime !== time || this._duration === 0) {
844 if (_lazyTweens.length) {
845 _lazyRender();
846 }
847 this.render(time, suppressEvents, false);
848 if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.
849 _lazyRender();
850 }
851 }
852 }
853 return this;
854 };
855
856 p.progress = p.totalProgress = function(value, suppressEvents) {
857 var duration = this.duration();
858 return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents);
859 };
860
861 p.startTime = function(value) {
862 if (!arguments.length) {
863 return this._startTime;
864 }
865 if (value !== this._startTime) {
866 this._startTime = value;
867 if (this.timeline) if (this.timeline._sortChildren) {
868 this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.
869 }
870 }
871 return this;
872 };
873
874 p.endTime = function(includeRepeats) {
875 return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale;
876 };
877
878 p.timeScale = function(value) {
879 if (!arguments.length) {
880 return this._timeScale;
881 }
882 var pauseTime, t;
883 value = value || _tinyNum; //can't allow zero because it'll throw the math off
884 if (this._timeline && this._timeline.smoothChildTiming) {
885 pauseTime = this._pauseTime;
886 t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();
887 this._startTime = t - ((t - this._startTime) * this._timeScale / value);
888 }
889 this._timeScale = value;
890 t = this.timeline;
891 while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.
892 t._dirty = true;
893 t.totalDuration();
894 t = t.timeline;
895 }
896 return this;
897 };
898
899 p.reversed = function(value) {
900 if (!arguments.length) {
901 return this._reversed;
902 }
903 if (value != this._reversed) {
904 this._reversed = value;
905 this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true);
906 }
907 return this;
908 };
909
910 p.paused = function(value) {
911 if (!arguments.length) {
912 return this._paused;
913 }
914 var tl = this._timeline,
915 raw, elapsed;
916 if (value != this._paused) if (tl) {
917 if (!_tickerActive && !value) {
918 _ticker.wake();
919 }
920 raw = tl.rawTime();
921 elapsed = raw - this._pauseTime;
922 if (!value && tl.smoothChildTiming) {
923 this._startTime += elapsed;
924 this._uncache(false);
925 }
926 this._pauseTime = value ? raw : null;
927 this._paused = value;
928 this._active = this.isActive();
929 if (!value && elapsed !== 0 && this._initted && this.duration()) {
930 raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale;
931 this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render.
932 }
933 }
934 if (this._gc && !value) {
935 this._enabled(true, false);
936 }
937 return this;
938 };
939
940
941/*
942 * ----------------------------------------------------------------
943 * SimpleTimeline
944 * ----------------------------------------------------------------
945 */
946 var SimpleTimeline = _class("core.SimpleTimeline", function(vars) {
947 Animation.call(this, 0, vars);
948 this.autoRemoveChildren = this.smoothChildTiming = true;
949 });
950
951 p = SimpleTimeline.prototype = new Animation();
952 p.constructor = SimpleTimeline;
953 p.kill()._gc = false;
954 p._first = p._last = p._recent = null;
955 p._sortChildren = false;
956
957 p.add = p.insert = function(child, position, align, stagger) {
958 var prevTween, st;
959 child._startTime = Number(position || 0) + child._delay;
960 if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).
961 child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime);
962 }
963 if (child.timeline) {
964 child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.
965 }
966 child.timeline = child._timeline = this;
967 if (child._gc) {
968 child._enabled(true, true);
969 }
970 prevTween = this._last;
971 if (this._sortChildren) {
972 st = child._startTime;
973 while (prevTween && prevTween._startTime > st) {
974 prevTween = prevTween._prev;
975 }
976 }
977 if (prevTween) {
978 child._next = prevTween._next;
979 prevTween._next = child;
980 } else {
981 child._next = this._first;
982 this._first = child;
983 }
984 if (child._next) {
985 child._next._prev = child;
986 } else {
987 this._last = child;
988 }
989 child._prev = prevTween;
990 this._recent = child;
991 if (this._timeline) {
992 this._uncache(true);
993 }
994 return this;
995 };
996
997 p._remove = function(tween, skipDisable) {
998 if (tween.timeline === this) {
999 if (!skipDisable) {
1000 tween._enabled(false, true);
1001 }
1002
1003 if (tween._prev) {
1004 tween._prev._next = tween._next;
1005 } else if (this._first === tween) {
1006 this._first = tween._next;
1007 }
1008 if (tween._next) {
1009 tween._next._prev = tween._prev;
1010 } else if (this._last === tween) {
1011 this._last = tween._prev;
1012 }
1013 tween._next = tween._prev = tween.timeline = null;
1014 if (tween === this._recent) {
1015 this._recent = this._last;
1016 }
1017
1018 if (this._timeline) {
1019 this._uncache(true);
1020 }
1021 }
1022 return this;
1023 };
1024
1025 p.render = function(time, suppressEvents, force) {
1026 var tween = this._first,
1027 next;
1028 this._totalTime = this._time = this._rawPrevTime = time;
1029 while (tween) {
1030 next = tween._next; //record it here because the value could change after rendering...
1031 if (tween._active || (time >= tween._startTime && !tween._paused && !tween._gc)) {
1032 if (!tween._reversed) {
1033 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
1034 } else {
1035 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
1036 }
1037 }
1038 tween = next;
1039 }
1040 };
1041
1042 p.rawTime = function() {
1043 if (!_tickerActive) {
1044 _ticker.wake();
1045 }
1046 return this._totalTime;
1047 };
1048
1049/*
1050 * ----------------------------------------------------------------
1051 * TweenLite
1052 * ----------------------------------------------------------------
1053 */
1054 var TweenLite = _class("TweenLite", function(target, duration, vars) {
1055 Animation.call(this, duration, vars);
1056 this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
1057
1058 if (target == null) {
1059 throw "Cannot tween a null target.";
1060 }
1061
1062 this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;
1063
1064 var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),
1065 overwrite = this.vars.overwrite,
1066 i, targ, targets;
1067
1068 this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];
1069
1070 if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {
1071 this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
1072 this._propLookup = [];
1073 this._siblings = [];
1074 for (i = 0; i < targets.length; i++) {
1075 targ = targets[i];
1076 if (!targ) {
1077 targets.splice(i--, 1);
1078 continue;
1079 } else if (typeof(targ) === "string") {
1080 targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings
1081 if (typeof(targ) === "string") {
1082 targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case)
1083 }
1084 continue;
1085 } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.
1086 targets.splice(i--, 1);
1087 this._targets = targets = targets.concat(_slice(targ));
1088 continue;
1089 }
1090 this._siblings[i] = _register(targ, this, false);
1091 if (overwrite === 1) if (this._siblings[i].length > 1) {
1092 _applyOverwrite(targ, this, null, 1, this._siblings[i]);
1093 }
1094 }
1095
1096 } else {
1097 this._propLookup = {};
1098 this._siblings = _register(target, this, false);
1099 if (overwrite === 1) if (this._siblings.length > 1) {
1100 _applyOverwrite(target, this, null, 1, this._siblings);
1101 }
1102 }
1103 if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {
1104 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
1105 this.render(Math.min(0, -this._delay)); //in case delay is negative
1106 }
1107 }, true),
1108 _isSelector = function(v) {
1109 return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
1110 },
1111 _autoCSS = function(vars, target) {
1112 var css = {},
1113 p;
1114 for (p in vars) {
1115 if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties.
1116 css[p] = vars[p];
1117 delete vars[p];
1118 }
1119 }
1120 vars.css = css;
1121 };
1122
1123 p = TweenLite.prototype = new Animation();
1124 p.constructor = TweenLite;
1125 p.kill()._gc = false;
1126
1127//----TweenLite defaults, overwrite management, and root updates ----------------------------------------------------
1128
1129 p.ratio = 0;
1130 p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
1131 p._notifyPluginsOfEnabled = p._lazy = false;
1132
1133 TweenLite.version = "2.0.2";
1134 TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
1135 TweenLite.defaultOverwrite = "auto";
1136 TweenLite.ticker = _ticker;
1137 TweenLite.autoSleep = 120;
1138 TweenLite.lagSmoothing = function(threshold, adjustedLag) {
1139 _ticker.lagSmoothing(threshold, adjustedLag);
1140 };
1141
1142 TweenLite.selector = window.$ || window.jQuery || function(e) {
1143 var selector = window.$ || window.jQuery;
1144 if (selector) {
1145 TweenLite.selector = selector;
1146 return selector(e);
1147 }
1148 if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary.
1149 _doc = window.document;
1150 }
1151 return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));
1152 };
1153
1154 var _lazyTweens = [],
1155 _lazyLookup = {},
1156 _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,
1157 _relExp = /[\+-]=-?[\.\d]/,
1158 //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig,
1159 _setRatio = function(v) {
1160 var pt = this._firstPT,
1161 min = 0.000001,
1162 val;
1163 while (pt) {
1164 val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start;
1165 if (pt.m) {
1166 val = pt.m.call(this._tween, val, this._target || pt.t, this._tween);
1167 } else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser
1168 val = 0;
1169 }
1170 if (!pt.f) {
1171 pt.t[pt.p] = val;
1172 } else if (pt.fp) {
1173 pt.t[pt.p](pt.fp, val);
1174 } else {
1175 pt.t[pt.p](val);
1176 }
1177 pt = pt._next;
1178 }
1179 },
1180 //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")).
1181 _blobDif = function(start, end, filter, pt) {
1182 var a = [],
1183 charIndex = 0,
1184 s = "",
1185 color = 0,
1186 startNums, endNums, num, i, l, nonNumbers, currentNum;
1187 a.start = start;
1188 a.end = end;
1189 start = a[0] = start + ""; //ensure values are strings
1190 end = a[1] = end + "";
1191 if (filter) {
1192 filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.
1193 start = a[0];
1194 end = a[1];
1195 }
1196 a.length = 0;
1197 startNums = start.match(_numbersExp) || [];
1198 endNums = end.match(_numbersExp) || [];
1199 if (pt) {
1200 pt._next = null;
1201 pt.blob = 1;
1202 a._firstPT = a._applyPT = pt; //apply last in the linked list (which means inserting it first)
1203 }
1204 l = endNums.length;
1205 for (i = 0; i < l; i++) {
1206 currentNum = endNums[i];
1207 nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex);
1208 s += (nonNumbers || !i) ? nonNumbers : ","; //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
1209 charIndex += nonNumbers.length;
1210 if (color) { //sense rgba() values and round them.
1211 color = (color + 1) % 5;
1212 } else if (nonNumbers.substr(-5) === "rgba(") {
1213 color = 1;
1214 }
1215 if (currentNum === startNums[i] || startNums.length <= i) {
1216 s += currentNum;
1217 } else {
1218 if (s) {
1219 a.push(s);
1220 s = "";
1221 }
1222 num = parseFloat(startNums[i]);
1223 a.push(num);
1224 a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, m:(color && color < 4) ? Math.round : 0};
1225 //note: we don't set _prev because we'll never need to remove individual PropTweens from this list.
1226 }
1227 charIndex += currentNum.length;
1228 }
1229 s += end.substr(charIndex);
1230 if (s) {
1231 a.push(s);
1232 }
1233 a.setRatio = _setRatio;
1234 if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value).
1235 a.end = null;
1236 }
1237 return a;
1238 },
1239 //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example.
1240 _addPropTween = function(target, prop, start, end, overwriteProp, mod, funcParam, stringFilter, index) {
1241 if (typeof(end) === "function") {
1242 end = end(index || 0, target);
1243 }
1244 var type = typeof(target[prop]),
1245 getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)),
1246 s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](),
1247 isRelative = (typeof(end) === "string" && end.charAt(1) === "="),
1248 pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0},
1249 blob;
1250
1251 if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) {
1252 if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") {
1253 //a blob (string that has multiple numbers in it)
1254 pt.fp = funcParam;
1255 blob = _blobDif(s, (isRelative ? (parseFloat(pt.s) + pt.c) + (pt.s + "").replace(/[0-9\-\.]/g, "") : end), stringFilter || TweenLite.defaultStringFilter, pt);
1256 pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
1257 } else {
1258 pt.s = parseFloat(s);
1259 if (!isRelative) {
1260 pt.c = (parseFloat(end) - pt.s) || 0;
1261 }
1262 }
1263 }
1264 if (pt.c) { //only add it to the linked list if there's a change.
1265 if ((pt._next = this._firstPT)) {
1266 pt._next._prev = pt;
1267 }
1268 this._firstPT = pt;
1269 return pt;
1270 }
1271 },
1272 _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object.
1273 _plugins = TweenLite._plugins = {},
1274 _tweenLookup = _internals.tweenLookup = {},
1275 _tweenLookupNum = 0,
1276 _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1, id:1, yoyoEase:1},
1277 _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},
1278 _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),
1279 _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),
1280 _nextGCFrame = 30,
1281 _lazyRender = _internals.lazyRender = function() {
1282 var i = _lazyTweens.length,
1283 tween;
1284 _lazyLookup = {};
1285 while (--i > -1) {
1286 tween = _lazyTweens[i];
1287 if (tween && tween._lazy !== false) {
1288 tween.render(tween._lazy[0], tween._lazy[1], true);
1289 tween._lazy = false;
1290 }
1291 }
1292 _lazyTweens.length = 0;
1293 };
1294
1295 _rootTimeline._startTime = _ticker.time;
1296 _rootFramesTimeline._startTime = _ticker.frame;
1297 _rootTimeline._active = _rootFramesTimeline._active = true;
1298 setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick".
1299
1300 Animation._updateRoot = TweenLite.render = function() {
1301 var i, a, p;
1302 if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again.
1303 _lazyRender();
1304 }
1305 _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false);
1306 _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false);
1307 if (_lazyTweens.length) {
1308 _lazyRender();
1309 }
1310 if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to
1311 _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120);
1312 for (p in _tweenLookup) {
1313 a = _tweenLookup[p].tweens;
1314 i = a.length;
1315 while (--i > -1) {
1316 if (a[i]._gc) {
1317 a.splice(i, 1);
1318 }
1319 }
1320 if (a.length === 0) {
1321 delete _tweenLookup[p];
1322 }
1323 }
1324 //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly
1325 p = _rootTimeline._first;
1326 if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) {
1327 while (p && p._paused) {
1328 p = p._next;
1329 }
1330 if (!p) {
1331 _ticker.sleep();
1332 }
1333 }
1334 }
1335 };
1336
1337 _ticker.addEventListener("tick", Animation._updateRoot);
1338
1339 var _register = function(target, tween, scrub) {
1340 var id = target._gsTweenID, a, i;
1341 if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) {
1342 _tweenLookup[id] = {target:target, tweens:[]};
1343 }
1344 if (tween) {
1345 a = _tweenLookup[id].tweens;
1346 a[(i = a.length)] = tween;
1347 if (scrub) {
1348 while (--i > -1) {
1349 if (a[i] === tween) {
1350 a.splice(i, 1);
1351 }
1352 }
1353 }
1354 }
1355 return _tweenLookup[id].tweens;
1356 },
1357 _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) {
1358 var func = overwrittenTween.vars.onOverwrite, r1, r2;
1359 if (func) {
1360 r1 = func(overwrittenTween, overwritingTween, target, killedProps);
1361 }
1362 func = TweenLite.onOverwrite;
1363 if (func) {
1364 r2 = func(overwrittenTween, overwritingTween, target, killedProps);
1365 }
1366 return (r1 !== false && r2 !== false);
1367 },
1368 _applyOverwrite = function(target, tween, props, mode, siblings) {
1369 var i, changed, curTween, l;
1370 if (mode === 1 || mode >= 4) {
1371 l = siblings.length;
1372 for (i = 0; i < l; i++) {
1373 if ((curTween = siblings[i]) !== tween) {
1374 if (!curTween._gc) {
1375 if (curTween._kill(null, target, tween)) {
1376 changed = true;
1377 }
1378 }
1379 } else if (mode === 5) {
1380 break;
1381 }
1382 }
1383 return changed;
1384 }
1385 //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example)
1386 var startTime = tween._startTime + _tinyNum,
1387 overlaps = [],
1388 oCount = 0,
1389 zeroDur = (tween._duration === 0),
1390 globalStart;
1391 i = siblings.length;
1392 while (--i > -1) {
1393 if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) {
1394 //ignore
1395 } else if (curTween._timeline !== tween._timeline) {
1396 globalStart = globalStart || _checkOverlap(tween, 0, zeroDur);
1397 if (_checkOverlap(curTween, globalStart, zeroDur) === 0) {
1398 overlaps[oCount++] = curTween;
1399 }
1400 } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) {
1401 overlaps[oCount++] = curTween;
1402 }
1403 }
1404
1405 i = oCount;
1406 while (--i > -1) {
1407 curTween = overlaps[i];
1408 l = curTween._firstPT; //we need to discern if there were property tweens originally; if they all get removed in the next line's _kill() call, the tween should be killed. See https://github.com/greensock/GreenSock-JS/issues/278
1409 if (mode === 2) if (curTween._kill(props, target, tween)) {
1410 changed = true;
1411 }
1412 if (mode !== 2 || (!curTween._firstPT && curTween._initted && l)) {
1413 if (mode !== 2 && !_onOverwrite(curTween, tween)) {
1414 continue;
1415 }
1416 if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.
1417 changed = true;
1418 }
1419 }
1420 }
1421 return changed;
1422 },
1423 _checkOverlap = function(tween, reference, zeroDur) {
1424 var tl = tween._timeline,
1425 ts = tl._timeScale,
1426 t = tween._startTime;
1427 while (tl._timeline) {
1428 t += tl._startTime;
1429 ts *= tl._timeScale;
1430 if (tl._paused) {
1431 return -100;
1432 }
1433 tl = tl._timeline;
1434 }
1435 t /= ts;
1436 return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum;
1437 };
1438
1439
1440//---- TweenLite instance methods -----------------------------------------------------------------------------
1441
1442 p._init = function() {
1443 var v = this.vars,
1444 op = this._overwrittenProps,
1445 dur = this._duration,
1446 immediate = !!v.immediateRender,
1447 ease = v.ease,
1448 i, initPlugins, pt, p, startVars, l;
1449 if (v.startAt) {
1450 if (this._startAt) {
1451 this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.
1452 this._startAt.kill();
1453 }
1454 startVars = {};
1455 for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);
1456 startVars[p] = v.startAt[p];
1457 }
1458 startVars.data = "isStart";
1459 startVars.overwrite = false;
1460 startVars.immediateRender = true;
1461 startVars.lazy = (immediate && v.lazy !== false);
1462 startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).
1463 startVars.onUpdate = v.onUpdate;
1464 startVars.onUpdateParams = v.onUpdateParams;
1465 startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this;
1466 this._startAt = TweenLite.to(this.target || {}, 0, startVars);
1467 if (immediate) {
1468 if (this._time > 0) {
1469 this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
1470 } else if (dur !== 0) {
1471 return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.
1472 }
1473 }
1474 } else if (v.runBackwards && dur !== 0) {
1475 //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)
1476 if (this._startAt) {
1477 this._startAt.render(-1, true);
1478 this._startAt.kill();
1479 this._startAt = null;
1480 } else {
1481 if (this._time !== 0) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0
1482 immediate = false;
1483 }
1484 pt = {};
1485 for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through.
1486 if (!_reservedProps[p] || p === "autoCSS") {
1487 pt[p] = v[p];
1488 }
1489 }
1490 pt.overwrite = 0;
1491 pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
1492 pt.lazy = (immediate && v.lazy !== false);
1493 pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)
1494 this._startAt = TweenLite.to(this.target, 0, pt);
1495 if (!immediate) {
1496 this._startAt._init(); //ensures that the initial values are recorded
1497 this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween.
1498 if (this.vars.immediateRender) {
1499 this._startAt = null;
1500 }
1501 } else if (this._time === 0) {
1502 return;
1503 }
1504 }
1505 }
1506 this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;
1507 if (v.easeParams instanceof Array && ease.config) {
1508 this._ease = ease.config.apply(ease, v.easeParams);
1509 }
1510 this._easeType = this._ease._type;
1511 this._easePower = this._ease._power;
1512 this._firstPT = null;
1513
1514 if (this._targets) {
1515 l = this._targets.length;
1516 for (i = 0; i < l; i++) {
1517 if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null), i) ) {
1518 initPlugins = true;
1519 }
1520 }
1521 } else {
1522 initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op, 0);
1523 }
1524
1525 if (initPlugins) {
1526 TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite
1527 }
1528 if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live.
1529 this._enabled(false, false);
1530 }
1531 if (v.runBackwards) {
1532 pt = this._firstPT;
1533 while (pt) {
1534 pt.s += pt.c;
1535 pt.c = -pt.c;
1536 pt = pt._next;
1537 }
1538 }
1539 this._onUpdate = v.onUpdate;
1540 this._initted = true;
1541 };
1542
1543 p._initProps = function(target, propLookup, siblings, overwrittenProps, index) {
1544 var p, i, initPlugins, plugin, pt, v;
1545 if (target == null) {
1546 return false;
1547 }
1548
1549 if (_lazyLookup[target._gsTweenID]) {
1550 _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)
1551 }
1552
1553 if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe.
1554 _autoCSS(this.vars, target);
1555 }
1556 for (p in this.vars) {
1557 v = this.vars[p];
1558 if (_reservedProps[p]) {
1559 if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) {
1560 this.vars[p] = v = this._swapSelfInParams(v, this);
1561 }
1562
1563 } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this, index)) {
1564
1565 //t - target [object]
1566 //p - property [string]
1567 //s - start [number]
1568 //c - change [number]
1569 //f - isFunction [boolean]
1570 //n - name [string]
1571 //pg - isPlugin [boolean]
1572 //pr - priority [number]
1573 //m - mod [function | 0]
1574 this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority, m:0};
1575 i = plugin._overwriteProps.length;
1576 while (--i > -1) {
1577 propLookup[plugin._overwriteProps[i]] = this._firstPT;
1578 }
1579 if (plugin._priority || plugin._onInitAllProps) {
1580 initPlugins = true;
1581 }
1582 if (plugin._onDisable || plugin._onEnable) {
1583 this._notifyPluginsOfEnabled = true;
1584 }
1585 if (pt._next) {
1586 pt._next._prev = pt;
1587 }
1588
1589 } else {
1590 propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter, index);
1591 }
1592 }
1593
1594 if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first)
1595 return this._initProps(target, propLookup, siblings, overwrittenProps, index);
1596 }
1597 if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) {
1598 this._kill(propLookup, target);
1599 return this._initProps(target, propLookup, siblings, overwrittenProps, index);
1600 }
1601 if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does.
1602 _lazyLookup[target._gsTweenID] = true;
1603 }
1604 return initPlugins;
1605 };
1606
1607 p.render = function(time, suppressEvents, force) {
1608 var prevTime = this._time,
1609 duration = this._duration,
1610 prevRawPrevTime = this._rawPrevTime,
1611 isComplete, callback, pt, rawPrevTime;
1612 if (time >= duration - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
1613 this._totalTime = this._time = duration;
1614 this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
1615 if (!this._reversed ) {
1616 isComplete = true;
1617 callback = "onComplete";
1618 force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
1619 }
1620 if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
1621 if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
1622 time = 0;
1623 }
1624 if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
1625 force = true;
1626 if (prevRawPrevTime > _tinyNum) {
1627 callback = "onReverseComplete";
1628 }
1629 }
1630 this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
1631 }
1632
1633 } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.
1634 this._totalTime = this._time = 0;
1635 this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;
1636 if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) {
1637 callback = "onReverseComplete";
1638 isComplete = this._reversed;
1639 }
1640 if (time < 0) {
1641 this._active = false;
1642 if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
1643 if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && this.data === "isPause")) {
1644 force = true;
1645 }
1646 this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
1647 }
1648 }
1649 if (!this._initted || (this._startAt && this._startAt.progress())) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. Also, we check progress() because if startAt has already rendered at its end, we should force a render at its beginning. Otherwise, if you put the playhead directly on top of where a fromTo({immediateRender:false}) starts, and then move it backwards, the from() won't revert its values.
1650 force = true;
1651 }
1652 } else {
1653 this._totalTime = this._time = time;
1654
1655 if (this._easeType) {
1656 var r = time / duration, type = this._easeType, pow = this._easePower;
1657 if (type === 1 || (type === 3 && r >= 0.5)) {
1658 r = 1 - r;
1659 }
1660 if (type === 3) {
1661 r *= 2;
1662 }
1663 if (pow === 1) {
1664 r *= r;
1665 } else if (pow === 2) {
1666 r *= r * r;
1667 } else if (pow === 3) {
1668 r *= r * r * r;
1669 } else if (pow === 4) {
1670 r *= r * r * r * r;
1671 }
1672
1673 if (type === 1) {
1674 this.ratio = 1 - r;
1675 } else if (type === 2) {
1676 this.ratio = r;
1677 } else if (time / duration < 0.5) {
1678 this.ratio = r / 2;
1679 } else {
1680 this.ratio = 1 - (r / 2);
1681 }
1682
1683 } else {
1684 this.ratio = this._ease.getRatio(time / duration);
1685 }
1686 }
1687
1688 if (this._time === prevTime && !force) {
1689 return;
1690 } else if (!this._initted) {
1691 this._init();
1692 if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.
1693 return;
1694 } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) {
1695 this._time = this._totalTime = prevTime;
1696 this._rawPrevTime = prevRawPrevTime;
1697 _lazyTweens.push(this);
1698 this._lazy = [time, suppressEvents];
1699 return;
1700 }
1701 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.
1702 if (this._time && !isComplete) {
1703 this.ratio = this._ease.getRatio(this._time / duration);
1704 } else if (isComplete && this._ease._calcEnd) {
1705 this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);
1706 }
1707 }
1708 if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.
1709 this._lazy = false;
1710 }
1711 if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {
1712 this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.
1713 }
1714 if (prevTime === 0) {
1715 if (this._startAt) {
1716 if (time >= 0) {
1717 this._startAt.render(time, true, force);
1718 } else if (!callback) {
1719 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
1720 }
1721 }
1722 if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) {
1723 this._callback("onStart");
1724 }
1725 }
1726 pt = this._firstPT;
1727 while (pt) {
1728 if (pt.f) {
1729 pt.t[pt.p](pt.c * this.ratio + pt.s);
1730 } else {
1731 pt.t[pt.p] = pt.c * this.ratio + pt.s;
1732 }
1733 pt = pt._next;
1734 }
1735
1736 if (this._onUpdate) {
1737 if (time < 0) if (this._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
1738 this._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
1739 }
1740 if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {
1741 this._callback("onUpdate");
1742 }
1743 }
1744 if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
1745 if (time < 0 && this._startAt && !this._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values.
1746 this._startAt.render(time, true, force);
1747 }
1748 if (isComplete) {
1749 if (this._timeline.autoRemoveChildren) {
1750 this._enabled(false, false);
1751 }
1752 this._active = false;
1753 }
1754 if (!suppressEvents && this.vars[callback]) {
1755 this._callback(callback);
1756 }
1757 if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.
1758 this._rawPrevTime = 0;
1759 }
1760 }
1761 };
1762
1763 p._kill = function(vars, target, overwritingTween) {
1764 if (vars === "all") {
1765 vars = null;
1766 }
1767 if (vars == null) if (target == null || target === this.target) {
1768 this._lazy = false;
1769 return this._enabled(false, false);
1770 }
1771 target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;
1772 var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline),
1773 firstPT = this._firstPT,
1774 i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed;
1775 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
1776 i = target.length;
1777 while (--i > -1) {
1778 if (this._kill(vars, target[i], overwritingTween)) {
1779 changed = true;
1780 }
1781 }
1782 } else {
1783 if (this._targets) {
1784 i = this._targets.length;
1785 while (--i > -1) {
1786 if (target === this._targets[i]) {
1787 propLookup = this._propLookup[i] || {};
1788 this._overwrittenProps = this._overwrittenProps || [];
1789 overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all";
1790 break;
1791 }
1792 }
1793 } else if (target !== this.target) {
1794 return false;
1795 } else {
1796 propLookup = this._propLookup;
1797 overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all";
1798 }
1799
1800 if (propLookup) {
1801 killProps = vars || propLookup;
1802 record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)
1803 if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) {
1804 for (p in killProps) {
1805 if (propLookup[p]) {
1806 if (!killed) {
1807 killed = [];
1808 }
1809 killed.push(p);
1810 }
1811 }
1812 if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it).
1813 return false;
1814 }
1815 }
1816
1817 for (p in killProps) {
1818 if ((pt = propLookup[p])) {
1819 if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween.
1820 if (pt.f) {
1821 pt.t[pt.p](pt.s);
1822 } else {
1823 pt.t[pt.p] = pt.s;
1824 }
1825 changed = true;
1826 }
1827 if (pt.pg && pt.t._kill(killProps)) {
1828 changed = true; //some plugins need to be notified so they can perform cleanup tasks first
1829 }
1830 if (!pt.pg || pt.t._overwriteProps.length === 0) {
1831 if (pt._prev) {
1832 pt._prev._next = pt._next;
1833 } else if (pt === this._firstPT) {
1834 this._firstPT = pt._next;
1835 }
1836 if (pt._next) {
1837 pt._next._prev = pt._prev;
1838 }
1839 pt._next = pt._prev = null;
1840 }
1841 delete propLookup[p];
1842 }
1843 if (record) {
1844 overwrittenProps[p] = 1;
1845 }
1846 }
1847 if (!this._firstPT && this._initted && firstPT) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.
1848 this._enabled(false, false);
1849 }
1850 }
1851 }
1852 return changed;
1853 };
1854
1855 p.invalidate = function() {
1856 if (this._notifyPluginsOfEnabled) {
1857 TweenLite._onPluginEvent("_onDisable", this);
1858 }
1859 this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null;
1860 this._notifyPluginsOfEnabled = this._active = this._lazy = false;
1861 this._propLookup = (this._targets) ? {} : [];
1862 Animation.prototype.invalidate.call(this);
1863 if (this.vars.immediateRender) {
1864 this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
1865 this.render(Math.min(0, -this._delay)); //in case delay is negative.
1866 }
1867 return this;
1868 };
1869
1870 p._enabled = function(enabled, ignoreTimeline) {
1871 if (!_tickerActive) {
1872 _ticker.wake();
1873 }
1874 if (enabled && this._gc) {
1875 var targets = this._targets,
1876 i;
1877 if (targets) {
1878 i = targets.length;
1879 while (--i > -1) {
1880 this._siblings[i] = _register(targets[i], this, true);
1881 }
1882 } else {
1883 this._siblings = _register(this.target, this, true);
1884 }
1885 }
1886 Animation.prototype._enabled.call(this, enabled, ignoreTimeline);
1887 if (this._notifyPluginsOfEnabled) if (this._firstPT) {
1888 return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this);
1889 }
1890 return false;
1891 };
1892
1893
1894//----TweenLite static methods -----------------------------------------------------
1895
1896 TweenLite.to = function(target, duration, vars) {
1897 return new TweenLite(target, duration, vars);
1898 };
1899
1900 TweenLite.from = function(target, duration, vars) {
1901 vars.runBackwards = true;
1902 vars.immediateRender = (vars.immediateRender != false);
1903 return new TweenLite(target, duration, vars);
1904 };
1905
1906 TweenLite.fromTo = function(target, duration, fromVars, toVars) {
1907 toVars.startAt = fromVars;
1908 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);
1909 return new TweenLite(target, duration, toVars);
1910 };
1911
1912 TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) {
1913 return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0});
1914 };
1915
1916 TweenLite.set = function(target, vars) {
1917 return new TweenLite(target, 0, vars);
1918 };
1919
1920 TweenLite.getTweensOf = function(target, onlyActive) {
1921 if (target == null) { return []; }
1922 target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;
1923 var i, a, j, t;
1924 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
1925 i = target.length;
1926 a = [];
1927 while (--i > -1) {
1928 a = a.concat(TweenLite.getTweensOf(target[i], onlyActive));
1929 }
1930 i = a.length;
1931 //now get rid of any duplicates (tweens of arrays of objects could cause duplicates)
1932 while (--i > -1) {
1933 t = a[i];
1934 j = i;
1935 while (--j > -1) {
1936 if (t === a[j]) {
1937 a.splice(i, 1);
1938 }
1939 }
1940 }
1941 } else if (target._gsTweenID) {
1942 a = _register(target).concat();
1943 i = a.length;
1944 while (--i > -1) {
1945 if (a[i]._gc || (onlyActive && !a[i].isActive())) {
1946 a.splice(i, 1);
1947 }
1948 }
1949 }
1950 return a || [];
1951 };
1952
1953 TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) {
1954 if (typeof(onlyActive) === "object") {
1955 vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted)
1956 onlyActive = false;
1957 }
1958 var a = TweenLite.getTweensOf(target, onlyActive),
1959 i = a.length;
1960 while (--i > -1) {
1961 a[i]._kill(vars, target);
1962 }
1963 };
1964
1965
1966
1967/*
1968 * ----------------------------------------------------------------
1969 * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget)
1970 * ----------------------------------------------------------------
1971 */
1972 var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) {
1973 this._overwriteProps = (props || "").split(",");
1974 this._propName = this._overwriteProps[0];
1975 this._priority = priority || 0;
1976 this._super = TweenPlugin.prototype;
1977 }, true);
1978
1979 p = TweenPlugin.prototype;
1980 TweenPlugin.version = "1.19.0";
1981 TweenPlugin.API = 2;
1982 p._firstPT = null;
1983 p._addTween = _addPropTween;
1984 p.setRatio = _setRatio;
1985
1986 p._kill = function(lookup) {
1987 var a = this._overwriteProps,
1988 pt = this._firstPT,
1989 i;
1990 if (lookup[this._propName] != null) {
1991 this._overwriteProps = [];
1992 } else {
1993 i = a.length;
1994 while (--i > -1) {
1995 if (lookup[a[i]] != null) {
1996 a.splice(i, 1);
1997 }
1998 }
1999 }
2000 while (pt) {
2001 if (lookup[pt.n] != null) {
2002 if (pt._next) {
2003 pt._next._prev = pt._prev;
2004 }
2005 if (pt._prev) {
2006 pt._prev._next = pt._next;
2007 pt._prev = null;
2008 } else if (this._firstPT === pt) {
2009 this._firstPT = pt._next;
2010 }
2011 }
2012 pt = pt._next;
2013 }
2014 return false;
2015 };
2016
2017 p._mod = p._roundProps = function(lookup) {
2018 var pt = this._firstPT,
2019 val;
2020 while (pt) {
2021 val = lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ]);
2022 if (val && typeof(val) === "function") { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here.
2023 if (pt.f === 2) {
2024 pt.t._applyPT.m = val;
2025 } else {
2026 pt.m = val;
2027 }
2028 }
2029 pt = pt._next;
2030 }
2031 };
2032
2033 TweenLite._onPluginEvent = function(type, tween) {
2034 var pt = tween._firstPT,
2035 changed, pt2, first, last, next;
2036 if (type === "_onInitAllProps") {
2037 //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame.
2038 while (pt) {
2039 next = pt._next;
2040 pt2 = first;
2041 while (pt2 && pt2.pr > pt.pr) {
2042 pt2 = pt2._next;
2043 }
2044 if ((pt._prev = pt2 ? pt2._prev : last)) {
2045 pt._prev._next = pt;
2046 } else {
2047 first = pt;
2048 }
2049 if ((pt._next = pt2)) {
2050 pt2._prev = pt;
2051 } else {
2052 last = pt;
2053 }
2054 pt = next;
2055 }
2056 pt = tween._firstPT = first;
2057 }
2058 while (pt) {
2059 if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) {
2060 changed = true;
2061 }
2062 pt = pt._next;
2063 }
2064 return changed;
2065 };
2066
2067 TweenPlugin.activate = function(plugins) {
2068 var i = plugins.length;
2069 while (--i > -1) {
2070 if (plugins[i].API === TweenPlugin.API) {
2071 _plugins[(new plugins[i]())._propName] = plugins[i];
2072 }
2073 }
2074 return true;
2075 };
2076
2077 //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations.
2078 _gsDefine.plugin = function(config) {
2079 if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; }
2080 var propName = config.propName,
2081 priority = config.priority || 0,
2082 overwriteProps = config.overwriteProps,
2083 map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_mod", mod:"_mod", initAll:"_onInitAllProps"},
2084 Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin",
2085 function() {
2086 TweenPlugin.call(this, propName, priority);
2087 this._overwriteProps = overwriteProps || [];
2088 }, (config.global === true)),
2089 p = Plugin.prototype = new TweenPlugin(propName),
2090 prop;
2091 p.constructor = Plugin;
2092 Plugin.API = config.API;
2093 for (prop in map) {
2094 if (typeof(config[prop]) === "function") {
2095 p[map[prop]] = config[prop];
2096 }
2097 }
2098 Plugin.version = config.version;
2099 TweenPlugin.activate([Plugin]);
2100 return Plugin;
2101 };
2102
2103
2104 //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you.
2105 a = window._gsQueue;
2106 if (a) {
2107 for (i = 0; i < a.length; i++) {
2108 a[i]();
2109 }
2110 for (p in _defLookup) {
2111 if (!_defLookup[p].func) {
2112 window.console.log("GSAP encountered missing dependency: " + p);
2113 }
2114 }
2115 }
2116
2117 _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated
2118
2119 return TweenLite;
2120
2121})(_gsScope, "TweenLite");
2122
2123var globals = _gsScope.GreenSockGlobals;
2124var nonGlobals = globals.com.greensock;
2125
2126var SimpleTimeline = nonGlobals.core.SimpleTimeline;
2127var Animation = nonGlobals.core.Animation;
2128var Ease = globals.Ease;
2129var Linear = globals.Linear;
2130var Power0 = Linear;
2131var Power1 = globals.Power1;
2132var Power2 = globals.Power2;
2133var Power3 = globals.Power3;
2134var Power4 = globals.Power4;
2135var TweenPlugin = globals.TweenPlugin;
2136var EventDispatcher = nonGlobals.events.EventDispatcher;
2137
2138/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("dd40")(module), __webpack_require__("c8ba")))
2139
2140/***/ }),
2141
2142/***/ "2ef0":
2143/***/ (function(module, exports, __webpack_require__) {
2144
2145/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
2146 * @license
2147 * Lodash <https://lodash.com/>
2148 * Copyright JS Foundation and other contributors <https://js.foundation/>
2149 * Released under MIT license <https://lodash.com/license>
2150 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
2151 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2152 */
2153;(function() {
2154
2155 /** Used as a safe reference for `undefined` in pre-ES5 environments. */
2156 var undefined;
2157
2158 /** Used as the semantic version number. */
2159 var VERSION = '4.17.11';
2160
2161 /** Used as the size to enable large array optimizations. */
2162 var LARGE_ARRAY_SIZE = 200;
2163
2164 /** Error message constants. */
2165 var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
2166 FUNC_ERROR_TEXT = 'Expected a function';
2167
2168 /** Used to stand-in for `undefined` hash values. */
2169 var HASH_UNDEFINED = '__lodash_hash_undefined__';
2170
2171 /** Used as the maximum memoize cache size. */
2172 var MAX_MEMOIZE_SIZE = 500;
2173
2174 /** Used as the internal argument placeholder. */
2175 var PLACEHOLDER = '__lodash_placeholder__';
2176
2177 /** Used to compose bitmasks for cloning. */
2178 var CLONE_DEEP_FLAG = 1,
2179 CLONE_FLAT_FLAG = 2,
2180 CLONE_SYMBOLS_FLAG = 4;
2181
2182 /** Used to compose bitmasks for value comparisons. */
2183 var COMPARE_PARTIAL_FLAG = 1,
2184 COMPARE_UNORDERED_FLAG = 2;
2185
2186 /** Used to compose bitmasks for function metadata. */
2187 var WRAP_BIND_FLAG = 1,
2188 WRAP_BIND_KEY_FLAG = 2,
2189 WRAP_CURRY_BOUND_FLAG = 4,
2190 WRAP_CURRY_FLAG = 8,
2191 WRAP_CURRY_RIGHT_FLAG = 16,
2192 WRAP_PARTIAL_FLAG = 32,
2193 WRAP_PARTIAL_RIGHT_FLAG = 64,
2194 WRAP_ARY_FLAG = 128,
2195 WRAP_REARG_FLAG = 256,
2196 WRAP_FLIP_FLAG = 512;
2197
2198 /** Used as default options for `_.truncate`. */
2199 var DEFAULT_TRUNC_LENGTH = 30,
2200 DEFAULT_TRUNC_OMISSION = '...';
2201
2202 /** Used to detect hot functions by number of calls within a span of milliseconds. */
2203 var HOT_COUNT = 800,
2204 HOT_SPAN = 16;
2205
2206 /** Used to indicate the type of lazy iteratees. */
2207 var LAZY_FILTER_FLAG = 1,
2208 LAZY_MAP_FLAG = 2,
2209 LAZY_WHILE_FLAG = 3;
2210
2211 /** Used as references for various `Number` constants. */
2212 var INFINITY = 1 / 0,
2213 MAX_SAFE_INTEGER = 9007199254740991,
2214 MAX_INTEGER = 1.7976931348623157e+308,
2215 NAN = 0 / 0;
2216
2217 /** Used as references for the maximum length and index of an array. */
2218 var MAX_ARRAY_LENGTH = 4294967295,
2219 MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
2220 HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
2221
2222 /** Used to associate wrap methods with their bit flags. */
2223 var wrapFlags = [
2224 ['ary', WRAP_ARY_FLAG],
2225 ['bind', WRAP_BIND_FLAG],
2226 ['bindKey', WRAP_BIND_KEY_FLAG],
2227 ['curry', WRAP_CURRY_FLAG],
2228 ['curryRight', WRAP_CURRY_RIGHT_FLAG],
2229 ['flip', WRAP_FLIP_FLAG],
2230 ['partial', WRAP_PARTIAL_FLAG],
2231 ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
2232 ['rearg', WRAP_REARG_FLAG]
2233 ];
2234
2235 /** `Object#toString` result references. */
2236 var argsTag = '[object Arguments]',
2237 arrayTag = '[object Array]',
2238 asyncTag = '[object AsyncFunction]',
2239 boolTag = '[object Boolean]',
2240 dateTag = '[object Date]',
2241 domExcTag = '[object DOMException]',
2242 errorTag = '[object Error]',
2243 funcTag = '[object Function]',
2244 genTag = '[object GeneratorFunction]',
2245 mapTag = '[object Map]',
2246 numberTag = '[object Number]',
2247 nullTag = '[object Null]',
2248 objectTag = '[object Object]',
2249 promiseTag = '[object Promise]',
2250 proxyTag = '[object Proxy]',
2251 regexpTag = '[object RegExp]',
2252 setTag = '[object Set]',
2253 stringTag = '[object String]',
2254 symbolTag = '[object Symbol]',
2255 undefinedTag = '[object Undefined]',
2256 weakMapTag = '[object WeakMap]',
2257 weakSetTag = '[object WeakSet]';
2258
2259 var arrayBufferTag = '[object ArrayBuffer]',
2260 dataViewTag = '[object DataView]',
2261 float32Tag = '[object Float32Array]',
2262 float64Tag = '[object Float64Array]',
2263 int8Tag = '[object Int8Array]',
2264 int16Tag = '[object Int16Array]',
2265 int32Tag = '[object Int32Array]',
2266 uint8Tag = '[object Uint8Array]',
2267 uint8ClampedTag = '[object Uint8ClampedArray]',
2268 uint16Tag = '[object Uint16Array]',
2269 uint32Tag = '[object Uint32Array]';
2270
2271 /** Used to match empty string literals in compiled template source. */
2272 var reEmptyStringLeading = /\b__p \+= '';/g,
2273 reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
2274 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
2275
2276 /** Used to match HTML entities and HTML characters. */
2277 var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
2278 reUnescapedHtml = /[&<>"']/g,
2279 reHasEscapedHtml = RegExp(reEscapedHtml.source),
2280 reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
2281
2282 /** Used to match template delimiters. */
2283 var reEscape = /<%-([\s\S]+?)%>/g,
2284 reEvaluate = /<%([\s\S]+?)%>/g,
2285 reInterpolate = /<%=([\s\S]+?)%>/g;
2286
2287 /** Used to match property names within property paths. */
2288 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2289 reIsPlainProp = /^\w*$/,
2290 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2291
2292 /**
2293 * Used to match `RegExp`
2294 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
2295 */
2296 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
2297 reHasRegExpChar = RegExp(reRegExpChar.source);
2298
2299 /** Used to match leading and trailing whitespace. */
2300 var reTrim = /^\s+|\s+$/g,
2301 reTrimStart = /^\s+/,
2302 reTrimEnd = /\s+$/;
2303
2304 /** Used to match wrap detail comments. */
2305 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
2306 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
2307 reSplitDetails = /,? & /;
2308
2309 /** Used to match words composed of alphanumeric characters. */
2310 var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
2311
2312 /** Used to match backslashes in property paths. */
2313 var reEscapeChar = /\\(\\)?/g;
2314
2315 /**
2316 * Used to match
2317 * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
2318 */
2319 var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
2320
2321 /** Used to match `RegExp` flags from their coerced string values. */
2322 var reFlags = /\w*$/;
2323
2324 /** Used to detect bad signed hexadecimal string values. */
2325 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
2326
2327 /** Used to detect binary string values. */
2328 var reIsBinary = /^0b[01]+$/i;
2329
2330 /** Used to detect host constructors (Safari). */
2331 var reIsHostCtor = /^\[object .+?Constructor\]$/;
2332
2333 /** Used to detect octal string values. */
2334 var reIsOctal = /^0o[0-7]+$/i;
2335
2336 /** Used to detect unsigned integer values. */
2337 var reIsUint = /^(?:0|[1-9]\d*)$/;
2338
2339 /** Used to match Latin Unicode letters (excluding mathematical operators). */
2340 var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
2341
2342 /** Used to ensure capturing order of template delimiters. */
2343 var reNoMatch = /($^)/;
2344
2345 /** Used to match unescaped characters in compiled string literals. */
2346 var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
2347
2348 /** Used to compose unicode character classes. */
2349 var rsAstralRange = '\\ud800-\\udfff',
2350 rsComboMarksRange = '\\u0300-\\u036f',
2351 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
2352 rsComboSymbolsRange = '\\u20d0-\\u20ff',
2353 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
2354 rsDingbatRange = '\\u2700-\\u27bf',
2355 rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
2356 rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
2357 rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
2358 rsPunctuationRange = '\\u2000-\\u206f',
2359 rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
2360 rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
2361 rsVarRange = '\\ufe0e\\ufe0f',
2362 rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
2363
2364 /** Used to compose unicode capture groups. */
2365 var rsApos = "['\u2019]",
2366 rsAstral = '[' + rsAstralRange + ']',
2367 rsBreak = '[' + rsBreakRange + ']',
2368 rsCombo = '[' + rsComboRange + ']',
2369 rsDigits = '\\d+',
2370 rsDingbat = '[' + rsDingbatRange + ']',
2371 rsLower = '[' + rsLowerRange + ']',
2372 rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
2373 rsFitz = '\\ud83c[\\udffb-\\udfff]',
2374 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
2375 rsNonAstral = '[^' + rsAstralRange + ']',
2376 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
2377 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
2378 rsUpper = '[' + rsUpperRange + ']',
2379 rsZWJ = '\\u200d';
2380
2381 /** Used to compose unicode regexes. */
2382 var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
2383 rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
2384 rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
2385 rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
2386 reOptMod = rsModifier + '?',
2387 rsOptVar = '[' + rsVarRange + ']?',
2388 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
2389 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
2390 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
2391 rsSeq = rsOptVar + reOptMod + rsOptJoin,
2392 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
2393 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
2394
2395 /** Used to match apostrophes. */
2396 var reApos = RegExp(rsApos, 'g');
2397
2398 /**
2399 * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
2400 * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
2401 */
2402 var reComboMark = RegExp(rsCombo, 'g');
2403
2404 /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
2405 var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
2406
2407 /** Used to match complex or compound words. */
2408 var reUnicodeWord = RegExp([
2409 rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
2410 rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
2411 rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
2412 rsUpper + '+' + rsOptContrUpper,
2413 rsOrdUpper,
2414 rsOrdLower,
2415 rsDigits,
2416 rsEmoji
2417 ].join('|'), 'g');
2418
2419 /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
2420 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
2421
2422 /** Used to detect strings that need a more robust regexp to match words. */
2423 var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
2424
2425 /** Used to assign default `context` object properties. */
2426 var contextProps = [
2427 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
2428 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
2429 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
2430 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
2431 '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
2432 ];
2433
2434 /** Used to make template sourceURLs easier to identify. */
2435 var templateCounter = -1;
2436
2437 /** Used to identify `toStringTag` values of typed arrays. */
2438 var typedArrayTags = {};
2439 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
2440 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
2441 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
2442 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
2443 typedArrayTags[uint32Tag] = true;
2444 typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
2445 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
2446 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
2447 typedArrayTags[errorTag] = typedArrayTags[funcTag] =
2448 typedArrayTags[mapTag] = typedArrayTags[numberTag] =
2449 typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
2450 typedArrayTags[setTag] = typedArrayTags[stringTag] =
2451 typedArrayTags[weakMapTag] = false;
2452
2453 /** Used to identify `toStringTag` values supported by `_.clone`. */
2454 var cloneableTags = {};
2455 cloneableTags[argsTag] = cloneableTags[arrayTag] =
2456 cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2457 cloneableTags[boolTag] = cloneableTags[dateTag] =
2458 cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2459 cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2460 cloneableTags[int32Tag] = cloneableTags[mapTag] =
2461 cloneableTags[numberTag] = cloneableTags[objectTag] =
2462 cloneableTags[regexpTag] = cloneableTags[setTag] =
2463 cloneableTags[stringTag] = cloneableTags[symbolTag] =
2464 cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2465 cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2466 cloneableTags[errorTag] = cloneableTags[funcTag] =
2467 cloneableTags[weakMapTag] = false;
2468
2469 /** Used to map Latin Unicode letters to basic Latin letters. */
2470 var deburredLetters = {
2471 // Latin-1 Supplement block.
2472 '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
2473 '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
2474 '\xc7': 'C', '\xe7': 'c',
2475 '\xd0': 'D', '\xf0': 'd',
2476 '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
2477 '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
2478 '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
2479 '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
2480 '\xd1': 'N', '\xf1': 'n',
2481 '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
2482 '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
2483 '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
2484 '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
2485 '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
2486 '\xc6': 'Ae', '\xe6': 'ae',
2487 '\xde': 'Th', '\xfe': 'th',
2488 '\xdf': 'ss',
2489 // Latin Extended-A block.
2490 '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
2491 '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
2492 '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
2493 '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
2494 '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
2495 '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
2496 '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
2497 '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
2498 '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
2499 '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
2500 '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
2501 '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
2502 '\u0134': 'J', '\u0135': 'j',
2503 '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
2504 '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
2505 '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
2506 '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
2507 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
2508 '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
2509 '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
2510 '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
2511 '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
2512 '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
2513 '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
2514 '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
2515 '\u0163': 't', '\u0165': 't', '\u0167': 't',
2516 '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
2517 '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
2518 '\u0174': 'W', '\u0175': 'w',
2519 '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
2520 '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
2521 '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
2522 '\u0132': 'IJ', '\u0133': 'ij',
2523 '\u0152': 'Oe', '\u0153': 'oe',
2524 '\u0149': "'n", '\u017f': 's'
2525 };
2526
2527 /** Used to map characters to HTML entities. */
2528 var htmlEscapes = {
2529 '&': '&amp;',
2530 '<': '&lt;',
2531 '>': '&gt;',
2532 '"': '&quot;',
2533 "'": '&#39;'
2534 };
2535
2536 /** Used to map HTML entities to characters. */
2537 var htmlUnescapes = {
2538 '&amp;': '&',
2539 '&lt;': '<',
2540 '&gt;': '>',
2541 '&quot;': '"',
2542 '&#39;': "'"
2543 };
2544
2545 /** Used to escape characters for inclusion in compiled string literals. */
2546 var stringEscapes = {
2547 '\\': '\\',
2548 "'": "'",
2549 '\n': 'n',
2550 '\r': 'r',
2551 '\u2028': 'u2028',
2552 '\u2029': 'u2029'
2553 };
2554
2555 /** Built-in method references without a dependency on `root`. */
2556 var freeParseFloat = parseFloat,
2557 freeParseInt = parseInt;
2558
2559 /** Detect free variable `global` from Node.js. */
2560 var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
2561
2562 /** Detect free variable `self`. */
2563 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2564
2565 /** Used as a reference to the global object. */
2566 var root = freeGlobal || freeSelf || Function('return this')();
2567
2568 /** Detect free variable `exports`. */
2569 var freeExports = true && exports && !exports.nodeType && exports;
2570
2571 /** Detect free variable `module`. */
2572 var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
2573
2574 /** Detect the popular CommonJS extension `module.exports`. */
2575 var moduleExports = freeModule && freeModule.exports === freeExports;
2576
2577 /** Detect free variable `process` from Node.js. */
2578 var freeProcess = moduleExports && freeGlobal.process;
2579
2580 /** Used to access faster Node.js helpers. */
2581 var nodeUtil = (function() {
2582 try {
2583 // Use `util.types` for Node.js 10+.
2584 var types = freeModule && freeModule.require && freeModule.require('util').types;
2585
2586 if (types) {
2587 return types;
2588 }
2589
2590 // Legacy `process.binding('util')` for Node.js < 10.
2591 return freeProcess && freeProcess.binding && freeProcess.binding('util');
2592 } catch (e) {}
2593 }());
2594
2595 /* Node.js helper references. */
2596 var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
2597 nodeIsDate = nodeUtil && nodeUtil.isDate,
2598 nodeIsMap = nodeUtil && nodeUtil.isMap,
2599 nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
2600 nodeIsSet = nodeUtil && nodeUtil.isSet,
2601 nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
2602
2603 /*--------------------------------------------------------------------------*/
2604
2605 /**
2606 * A faster alternative to `Function#apply`, this function invokes `func`
2607 * with the `this` binding of `thisArg` and the arguments of `args`.
2608 *
2609 * @private
2610 * @param {Function} func The function to invoke.
2611 * @param {*} thisArg The `this` binding of `func`.
2612 * @param {Array} args The arguments to invoke `func` with.
2613 * @returns {*} Returns the result of `func`.
2614 */
2615 function apply(func, thisArg, args) {
2616 switch (args.length) {
2617 case 0: return func.call(thisArg);
2618 case 1: return func.call(thisArg, args[0]);
2619 case 2: return func.call(thisArg, args[0], args[1]);
2620 case 3: return func.call(thisArg, args[0], args[1], args[2]);
2621 }
2622 return func.apply(thisArg, args);
2623 }
2624
2625 /**
2626 * A specialized version of `baseAggregator` for arrays.
2627 *
2628 * @private
2629 * @param {Array} [array] The array to iterate over.
2630 * @param {Function} setter The function to set `accumulator` values.
2631 * @param {Function} iteratee The iteratee to transform keys.
2632 * @param {Object} accumulator The initial aggregated object.
2633 * @returns {Function} Returns `accumulator`.
2634 */
2635 function arrayAggregator(array, setter, iteratee, accumulator) {
2636 var index = -1,
2637 length = array == null ? 0 : array.length;
2638
2639 while (++index < length) {
2640 var value = array[index];
2641 setter(accumulator, value, iteratee(value), array);
2642 }
2643 return accumulator;
2644 }
2645
2646 /**
2647 * A specialized version of `_.forEach` for arrays without support for
2648 * iteratee shorthands.
2649 *
2650 * @private
2651 * @param {Array} [array] The array to iterate over.
2652 * @param {Function} iteratee The function invoked per iteration.
2653 * @returns {Array} Returns `array`.
2654 */
2655 function arrayEach(array, iteratee) {
2656 var index = -1,
2657 length = array == null ? 0 : array.length;
2658
2659 while (++index < length) {
2660 if (iteratee(array[index], index, array) === false) {
2661 break;
2662 }
2663 }
2664 return array;
2665 }
2666
2667 /**
2668 * A specialized version of `_.forEachRight` for arrays without support for
2669 * iteratee shorthands.
2670 *
2671 * @private
2672 * @param {Array} [array] The array to iterate over.
2673 * @param {Function} iteratee The function invoked per iteration.
2674 * @returns {Array} Returns `array`.
2675 */
2676 function arrayEachRight(array, iteratee) {
2677 var length = array == null ? 0 : array.length;
2678
2679 while (length--) {
2680 if (iteratee(array[length], length, array) === false) {
2681 break;
2682 }
2683 }
2684 return array;
2685 }
2686
2687 /**
2688 * A specialized version of `_.every` for arrays without support for
2689 * iteratee shorthands.
2690 *
2691 * @private
2692 * @param {Array} [array] The array to iterate over.
2693 * @param {Function} predicate The function invoked per iteration.
2694 * @returns {boolean} Returns `true` if all elements pass the predicate check,
2695 * else `false`.
2696 */
2697 function arrayEvery(array, predicate) {
2698 var index = -1,
2699 length = array == null ? 0 : array.length;
2700
2701 while (++index < length) {
2702 if (!predicate(array[index], index, array)) {
2703 return false;
2704 }
2705 }
2706 return true;
2707 }
2708
2709 /**
2710 * A specialized version of `_.filter` for arrays without support for
2711 * iteratee shorthands.
2712 *
2713 * @private
2714 * @param {Array} [array] The array to iterate over.
2715 * @param {Function} predicate The function invoked per iteration.
2716 * @returns {Array} Returns the new filtered array.
2717 */
2718 function arrayFilter(array, predicate) {
2719 var index = -1,
2720 length = array == null ? 0 : array.length,
2721 resIndex = 0,
2722 result = [];
2723
2724 while (++index < length) {
2725 var value = array[index];
2726 if (predicate(value, index, array)) {
2727 result[resIndex++] = value;
2728 }
2729 }
2730 return result;
2731 }
2732
2733 /**
2734 * A specialized version of `_.includes` for arrays without support for
2735 * specifying an index to search from.
2736 *
2737 * @private
2738 * @param {Array} [array] The array to inspect.
2739 * @param {*} target The value to search for.
2740 * @returns {boolean} Returns `true` if `target` is found, else `false`.
2741 */
2742 function arrayIncludes(array, value) {
2743 var length = array == null ? 0 : array.length;
2744 return !!length && baseIndexOf(array, value, 0) > -1;
2745 }
2746
2747 /**
2748 * This function is like `arrayIncludes` except that it accepts a comparator.
2749 *
2750 * @private
2751 * @param {Array} [array] The array to inspect.
2752 * @param {*} target The value to search for.
2753 * @param {Function} comparator The comparator invoked per element.
2754 * @returns {boolean} Returns `true` if `target` is found, else `false`.
2755 */
2756 function arrayIncludesWith(array, value, comparator) {
2757 var index = -1,
2758 length = array == null ? 0 : array.length;
2759
2760 while (++index < length) {
2761 if (comparator(value, array[index])) {
2762 return true;
2763 }
2764 }
2765 return false;
2766 }
2767
2768 /**
2769 * A specialized version of `_.map` for arrays without support for iteratee
2770 * shorthands.
2771 *
2772 * @private
2773 * @param {Array} [array] The array to iterate over.
2774 * @param {Function} iteratee The function invoked per iteration.
2775 * @returns {Array} Returns the new mapped array.
2776 */
2777 function arrayMap(array, iteratee) {
2778 var index = -1,
2779 length = array == null ? 0 : array.length,
2780 result = Array(length);
2781
2782 while (++index < length) {
2783 result[index] = iteratee(array[index], index, array);
2784 }
2785 return result;
2786 }
2787
2788 /**
2789 * Appends the elements of `values` to `array`.
2790 *
2791 * @private
2792 * @param {Array} array The array to modify.
2793 * @param {Array} values The values to append.
2794 * @returns {Array} Returns `array`.
2795 */
2796 function arrayPush(array, values) {
2797 var index = -1,
2798 length = values.length,
2799 offset = array.length;
2800
2801 while (++index < length) {
2802 array[offset + index] = values[index];
2803 }
2804 return array;
2805 }
2806
2807 /**
2808 * A specialized version of `_.reduce` for arrays without support for
2809 * iteratee shorthands.
2810 *
2811 * @private
2812 * @param {Array} [array] The array to iterate over.
2813 * @param {Function} iteratee The function invoked per iteration.
2814 * @param {*} [accumulator] The initial value.
2815 * @param {boolean} [initAccum] Specify using the first element of `array` as
2816 * the initial value.
2817 * @returns {*} Returns the accumulated value.
2818 */
2819 function arrayReduce(array, iteratee, accumulator, initAccum) {
2820 var index = -1,
2821 length = array == null ? 0 : array.length;
2822
2823 if (initAccum && length) {
2824 accumulator = array[++index];
2825 }
2826 while (++index < length) {
2827 accumulator = iteratee(accumulator, array[index], index, array);
2828 }
2829 return accumulator;
2830 }
2831
2832 /**
2833 * A specialized version of `_.reduceRight` for arrays without support for
2834 * iteratee shorthands.
2835 *
2836 * @private
2837 * @param {Array} [array] The array to iterate over.
2838 * @param {Function} iteratee The function invoked per iteration.
2839 * @param {*} [accumulator] The initial value.
2840 * @param {boolean} [initAccum] Specify using the last element of `array` as
2841 * the initial value.
2842 * @returns {*} Returns the accumulated value.
2843 */
2844 function arrayReduceRight(array, iteratee, accumulator, initAccum) {
2845 var length = array == null ? 0 : array.length;
2846 if (initAccum && length) {
2847 accumulator = array[--length];
2848 }
2849 while (length--) {
2850 accumulator = iteratee(accumulator, array[length], length, array);
2851 }
2852 return accumulator;
2853 }
2854
2855 /**
2856 * A specialized version of `_.some` for arrays without support for iteratee
2857 * shorthands.
2858 *
2859 * @private
2860 * @param {Array} [array] The array to iterate over.
2861 * @param {Function} predicate The function invoked per iteration.
2862 * @returns {boolean} Returns `true` if any element passes the predicate check,
2863 * else `false`.
2864 */
2865 function arraySome(array, predicate) {
2866 var index = -1,
2867 length = array == null ? 0 : array.length;
2868
2869 while (++index < length) {
2870 if (predicate(array[index], index, array)) {
2871 return true;
2872 }
2873 }
2874 return false;
2875 }
2876
2877 /**
2878 * Gets the size of an ASCII `string`.
2879 *
2880 * @private
2881 * @param {string} string The string inspect.
2882 * @returns {number} Returns the string size.
2883 */
2884 var asciiSize = baseProperty('length');
2885
2886 /**
2887 * Converts an ASCII `string` to an array.
2888 *
2889 * @private
2890 * @param {string} string The string to convert.
2891 * @returns {Array} Returns the converted array.
2892 */
2893 function asciiToArray(string) {
2894 return string.split('');
2895 }
2896
2897 /**
2898 * Splits an ASCII `string` into an array of its words.
2899 *
2900 * @private
2901 * @param {string} The string to inspect.
2902 * @returns {Array} Returns the words of `string`.
2903 */
2904 function asciiWords(string) {
2905 return string.match(reAsciiWord) || [];
2906 }
2907
2908 /**
2909 * The base implementation of methods like `_.findKey` and `_.findLastKey`,
2910 * without support for iteratee shorthands, which iterates over `collection`
2911 * using `eachFunc`.
2912 *
2913 * @private
2914 * @param {Array|Object} collection The collection to inspect.
2915 * @param {Function} predicate The function invoked per iteration.
2916 * @param {Function} eachFunc The function to iterate over `collection`.
2917 * @returns {*} Returns the found element or its key, else `undefined`.
2918 */
2919 function baseFindKey(collection, predicate, eachFunc) {
2920 var result;
2921 eachFunc(collection, function(value, key, collection) {
2922 if (predicate(value, key, collection)) {
2923 result = key;
2924 return false;
2925 }
2926 });
2927 return result;
2928 }
2929
2930 /**
2931 * The base implementation of `_.findIndex` and `_.findLastIndex` without
2932 * support for iteratee shorthands.
2933 *
2934 * @private
2935 * @param {Array} array The array to inspect.
2936 * @param {Function} predicate The function invoked per iteration.
2937 * @param {number} fromIndex The index to search from.
2938 * @param {boolean} [fromRight] Specify iterating from right to left.
2939 * @returns {number} Returns the index of the matched value, else `-1`.
2940 */
2941 function baseFindIndex(array, predicate, fromIndex, fromRight) {
2942 var length = array.length,
2943 index = fromIndex + (fromRight ? 1 : -1);
2944
2945 while ((fromRight ? index-- : ++index < length)) {
2946 if (predicate(array[index], index, array)) {
2947 return index;
2948 }
2949 }
2950 return -1;
2951 }
2952
2953 /**
2954 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
2955 *
2956 * @private
2957 * @param {Array} array The array to inspect.
2958 * @param {*} value The value to search for.
2959 * @param {number} fromIndex The index to search from.
2960 * @returns {number} Returns the index of the matched value, else `-1`.
2961 */
2962 function baseIndexOf(array, value, fromIndex) {
2963 return value === value
2964 ? strictIndexOf(array, value, fromIndex)
2965 : baseFindIndex(array, baseIsNaN, fromIndex);
2966 }
2967
2968 /**
2969 * This function is like `baseIndexOf` except that it accepts a comparator.
2970 *
2971 * @private
2972 * @param {Array} array The array to inspect.
2973 * @param {*} value The value to search for.
2974 * @param {number} fromIndex The index to search from.
2975 * @param {Function} comparator The comparator invoked per element.
2976 * @returns {number} Returns the index of the matched value, else `-1`.
2977 */
2978 function baseIndexOfWith(array, value, fromIndex, comparator) {
2979 var index = fromIndex - 1,
2980 length = array.length;
2981
2982 while (++index < length) {
2983 if (comparator(array[index], value)) {
2984 return index;
2985 }
2986 }
2987 return -1;
2988 }
2989
2990 /**
2991 * The base implementation of `_.isNaN` without support for number objects.
2992 *
2993 * @private
2994 * @param {*} value The value to check.
2995 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
2996 */
2997 function baseIsNaN(value) {
2998 return value !== value;
2999 }
3000
3001 /**
3002 * The base implementation of `_.mean` and `_.meanBy` without support for
3003 * iteratee shorthands.
3004 *
3005 * @private
3006 * @param {Array} array The array to iterate over.
3007 * @param {Function} iteratee The function invoked per iteration.
3008 * @returns {number} Returns the mean.
3009 */
3010 function baseMean(array, iteratee) {
3011 var length = array == null ? 0 : array.length;
3012 return length ? (baseSum(array, iteratee) / length) : NAN;
3013 }
3014
3015 /**
3016 * The base implementation of `_.property` without support for deep paths.
3017 *
3018 * @private
3019 * @param {string} key The key of the property to get.
3020 * @returns {Function} Returns the new accessor function.
3021 */
3022 function baseProperty(key) {
3023 return function(object) {
3024 return object == null ? undefined : object[key];
3025 };
3026 }
3027
3028 /**
3029 * The base implementation of `_.propertyOf` without support for deep paths.
3030 *
3031 * @private
3032 * @param {Object} object The object to query.
3033 * @returns {Function} Returns the new accessor function.
3034 */
3035 function basePropertyOf(object) {
3036 return function(key) {
3037 return object == null ? undefined : object[key];
3038 };
3039 }
3040
3041 /**
3042 * The base implementation of `_.reduce` and `_.reduceRight`, without support
3043 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
3044 *
3045 * @private
3046 * @param {Array|Object} collection The collection to iterate over.
3047 * @param {Function} iteratee The function invoked per iteration.
3048 * @param {*} accumulator The initial value.
3049 * @param {boolean} initAccum Specify using the first or last element of
3050 * `collection` as the initial value.
3051 * @param {Function} eachFunc The function to iterate over `collection`.
3052 * @returns {*} Returns the accumulated value.
3053 */
3054 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
3055 eachFunc(collection, function(value, index, collection) {
3056 accumulator = initAccum
3057 ? (initAccum = false, value)
3058 : iteratee(accumulator, value, index, collection);
3059 });
3060 return accumulator;
3061 }
3062
3063 /**
3064 * The base implementation of `_.sortBy` which uses `comparer` to define the
3065 * sort order of `array` and replaces criteria objects with their corresponding
3066 * values.
3067 *
3068 * @private
3069 * @param {Array} array The array to sort.
3070 * @param {Function} comparer The function to define sort order.
3071 * @returns {Array} Returns `array`.
3072 */
3073 function baseSortBy(array, comparer) {
3074 var length = array.length;
3075
3076 array.sort(comparer);
3077 while (length--) {
3078 array[length] = array[length].value;
3079 }
3080 return array;
3081 }
3082
3083 /**
3084 * The base implementation of `_.sum` and `_.sumBy` without support for
3085 * iteratee shorthands.
3086 *
3087 * @private
3088 * @param {Array} array The array to iterate over.
3089 * @param {Function} iteratee The function invoked per iteration.
3090 * @returns {number} Returns the sum.
3091 */
3092 function baseSum(array, iteratee) {
3093 var result,
3094 index = -1,
3095 length = array.length;
3096
3097 while (++index < length) {
3098 var current = iteratee(array[index]);
3099 if (current !== undefined) {
3100 result = result === undefined ? current : (result + current);
3101 }
3102 }
3103 return result;
3104 }
3105
3106 /**
3107 * The base implementation of `_.times` without support for iteratee shorthands
3108 * or max array length checks.
3109 *
3110 * @private
3111 * @param {number} n The number of times to invoke `iteratee`.
3112 * @param {Function} iteratee The function invoked per iteration.
3113 * @returns {Array} Returns the array of results.
3114 */
3115 function baseTimes(n, iteratee) {
3116 var index = -1,
3117 result = Array(n);
3118
3119 while (++index < n) {
3120 result[index] = iteratee(index);
3121 }
3122 return result;
3123 }
3124
3125 /**
3126 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
3127 * of key-value pairs for `object` corresponding to the property names of `props`.
3128 *
3129 * @private
3130 * @param {Object} object The object to query.
3131 * @param {Array} props The property names to get values for.
3132 * @returns {Object} Returns the key-value pairs.
3133 */
3134 function baseToPairs(object, props) {
3135 return arrayMap(props, function(key) {
3136 return [key, object[key]];
3137 });
3138 }
3139
3140 /**
3141 * The base implementation of `_.unary` without support for storing metadata.
3142 *
3143 * @private
3144 * @param {Function} func The function to cap arguments for.
3145 * @returns {Function} Returns the new capped function.
3146 */
3147 function baseUnary(func) {
3148 return function(value) {
3149 return func(value);
3150 };
3151 }
3152
3153 /**
3154 * The base implementation of `_.values` and `_.valuesIn` which creates an
3155 * array of `object` property values corresponding to the property names
3156 * of `props`.
3157 *
3158 * @private
3159 * @param {Object} object The object to query.
3160 * @param {Array} props The property names to get values for.
3161 * @returns {Object} Returns the array of property values.
3162 */
3163 function baseValues(object, props) {
3164 return arrayMap(props, function(key) {
3165 return object[key];
3166 });
3167 }
3168
3169 /**
3170 * Checks if a `cache` value for `key` exists.
3171 *
3172 * @private
3173 * @param {Object} cache The cache to query.
3174 * @param {string} key The key of the entry to check.
3175 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3176 */
3177 function cacheHas(cache, key) {
3178 return cache.has(key);
3179 }
3180
3181 /**
3182 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
3183 * that is not found in the character symbols.
3184 *
3185 * @private
3186 * @param {Array} strSymbols The string symbols to inspect.
3187 * @param {Array} chrSymbols The character symbols to find.
3188 * @returns {number} Returns the index of the first unmatched string symbol.
3189 */
3190 function charsStartIndex(strSymbols, chrSymbols) {
3191 var index = -1,
3192 length = strSymbols.length;
3193
3194 while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
3195 return index;
3196 }
3197
3198 /**
3199 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
3200 * that is not found in the character symbols.
3201 *
3202 * @private
3203 * @param {Array} strSymbols The string symbols to inspect.
3204 * @param {Array} chrSymbols The character symbols to find.
3205 * @returns {number} Returns the index of the last unmatched string symbol.
3206 */
3207 function charsEndIndex(strSymbols, chrSymbols) {
3208 var index = strSymbols.length;
3209
3210 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
3211 return index;
3212 }
3213
3214 /**
3215 * Gets the number of `placeholder` occurrences in `array`.
3216 *
3217 * @private
3218 * @param {Array} array The array to inspect.
3219 * @param {*} placeholder The placeholder to search for.
3220 * @returns {number} Returns the placeholder count.
3221 */
3222 function countHolders(array, placeholder) {
3223 var length = array.length,
3224 result = 0;
3225
3226 while (length--) {
3227 if (array[length] === placeholder) {
3228 ++result;
3229 }
3230 }
3231 return result;
3232 }
3233
3234 /**
3235 * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
3236 * letters to basic Latin letters.
3237 *
3238 * @private
3239 * @param {string} letter The matched letter to deburr.
3240 * @returns {string} Returns the deburred letter.
3241 */
3242 var deburrLetter = basePropertyOf(deburredLetters);
3243
3244 /**
3245 * Used by `_.escape` to convert characters to HTML entities.
3246 *
3247 * @private
3248 * @param {string} chr The matched character to escape.
3249 * @returns {string} Returns the escaped character.
3250 */
3251 var escapeHtmlChar = basePropertyOf(htmlEscapes);
3252
3253 /**
3254 * Used by `_.template` to escape characters for inclusion in compiled string literals.
3255 *
3256 * @private
3257 * @param {string} chr The matched character to escape.
3258 * @returns {string} Returns the escaped character.
3259 */
3260 function escapeStringChar(chr) {
3261 return '\\' + stringEscapes[chr];
3262 }
3263
3264 /**
3265 * Gets the value at `key` of `object`.
3266 *
3267 * @private
3268 * @param {Object} [object] The object to query.
3269 * @param {string} key The key of the property to get.
3270 * @returns {*} Returns the property value.
3271 */
3272 function getValue(object, key) {
3273 return object == null ? undefined : object[key];
3274 }
3275
3276 /**
3277 * Checks if `string` contains Unicode symbols.
3278 *
3279 * @private
3280 * @param {string} string The string to inspect.
3281 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
3282 */
3283 function hasUnicode(string) {
3284 return reHasUnicode.test(string);
3285 }
3286
3287 /**
3288 * Checks if `string` contains a word composed of Unicode symbols.
3289 *
3290 * @private
3291 * @param {string} string The string to inspect.
3292 * @returns {boolean} Returns `true` if a word is found, else `false`.
3293 */
3294 function hasUnicodeWord(string) {
3295 return reHasUnicodeWord.test(string);
3296 }
3297
3298 /**
3299 * Converts `iterator` to an array.
3300 *
3301 * @private
3302 * @param {Object} iterator The iterator to convert.
3303 * @returns {Array} Returns the converted array.
3304 */
3305 function iteratorToArray(iterator) {
3306 var data,
3307 result = [];
3308
3309 while (!(data = iterator.next()).done) {
3310 result.push(data.value);
3311 }
3312 return result;
3313 }
3314
3315 /**
3316 * Converts `map` to its key-value pairs.
3317 *
3318 * @private
3319 * @param {Object} map The map to convert.
3320 * @returns {Array} Returns the key-value pairs.
3321 */
3322 function mapToArray(map) {
3323 var index = -1,
3324 result = Array(map.size);
3325
3326 map.forEach(function(value, key) {
3327 result[++index] = [key, value];
3328 });
3329 return result;
3330 }
3331
3332 /**
3333 * Creates a unary function that invokes `func` with its argument transformed.
3334 *
3335 * @private
3336 * @param {Function} func The function to wrap.
3337 * @param {Function} transform The argument transform.
3338 * @returns {Function} Returns the new function.
3339 */
3340 function overArg(func, transform) {
3341 return function(arg) {
3342 return func(transform(arg));
3343 };
3344 }
3345
3346 /**
3347 * Replaces all `placeholder` elements in `array` with an internal placeholder
3348 * and returns an array of their indexes.
3349 *
3350 * @private
3351 * @param {Array} array The array to modify.
3352 * @param {*} placeholder The placeholder to replace.
3353 * @returns {Array} Returns the new array of placeholder indexes.
3354 */
3355 function replaceHolders(array, placeholder) {
3356 var index = -1,
3357 length = array.length,
3358 resIndex = 0,
3359 result = [];
3360
3361 while (++index < length) {
3362 var value = array[index];
3363 if (value === placeholder || value === PLACEHOLDER) {
3364 array[index] = PLACEHOLDER;
3365 result[resIndex++] = index;
3366 }
3367 }
3368 return result;
3369 }
3370
3371 /**
3372 * Converts `set` to an array of its values.
3373 *
3374 * @private
3375 * @param {Object} set The set to convert.
3376 * @returns {Array} Returns the values.
3377 */
3378 function setToArray(set) {
3379 var index = -1,
3380 result = Array(set.size);
3381
3382 set.forEach(function(value) {
3383 result[++index] = value;
3384 });
3385 return result;
3386 }
3387
3388 /**
3389 * Converts `set` to its value-value pairs.
3390 *
3391 * @private
3392 * @param {Object} set The set to convert.
3393 * @returns {Array} Returns the value-value pairs.
3394 */
3395 function setToPairs(set) {
3396 var index = -1,
3397 result = Array(set.size);
3398
3399 set.forEach(function(value) {
3400 result[++index] = [value, value];
3401 });
3402 return result;
3403 }
3404
3405 /**
3406 * A specialized version of `_.indexOf` which performs strict equality
3407 * comparisons of values, i.e. `===`.
3408 *
3409 * @private
3410 * @param {Array} array The array to inspect.
3411 * @param {*} value The value to search for.
3412 * @param {number} fromIndex The index to search from.
3413 * @returns {number} Returns the index of the matched value, else `-1`.
3414 */
3415 function strictIndexOf(array, value, fromIndex) {
3416 var index = fromIndex - 1,
3417 length = array.length;
3418
3419 while (++index < length) {
3420 if (array[index] === value) {
3421 return index;
3422 }
3423 }
3424 return -1;
3425 }
3426
3427 /**
3428 * A specialized version of `_.lastIndexOf` which performs strict equality
3429 * comparisons of values, i.e. `===`.
3430 *
3431 * @private
3432 * @param {Array} array The array to inspect.
3433 * @param {*} value The value to search for.
3434 * @param {number} fromIndex The index to search from.
3435 * @returns {number} Returns the index of the matched value, else `-1`.
3436 */
3437 function strictLastIndexOf(array, value, fromIndex) {
3438 var index = fromIndex + 1;
3439 while (index--) {
3440 if (array[index] === value) {
3441 return index;
3442 }
3443 }
3444 return index;
3445 }
3446
3447 /**
3448 * Gets the number of symbols in `string`.
3449 *
3450 * @private
3451 * @param {string} string The string to inspect.
3452 * @returns {number} Returns the string size.
3453 */
3454 function stringSize(string) {
3455 return hasUnicode(string)
3456 ? unicodeSize(string)
3457 : asciiSize(string);
3458 }
3459
3460 /**
3461 * Converts `string` to an array.
3462 *
3463 * @private
3464 * @param {string} string The string to convert.
3465 * @returns {Array} Returns the converted array.
3466 */
3467 function stringToArray(string) {
3468 return hasUnicode(string)
3469 ? unicodeToArray(string)
3470 : asciiToArray(string);
3471 }
3472
3473 /**
3474 * Used by `_.unescape` to convert HTML entities to characters.
3475 *
3476 * @private
3477 * @param {string} chr The matched character to unescape.
3478 * @returns {string} Returns the unescaped character.
3479 */
3480 var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
3481
3482 /**
3483 * Gets the size of a Unicode `string`.
3484 *
3485 * @private
3486 * @param {string} string The string inspect.
3487 * @returns {number} Returns the string size.
3488 */
3489 function unicodeSize(string) {
3490 var result = reUnicode.lastIndex = 0;
3491 while (reUnicode.test(string)) {
3492 ++result;
3493 }
3494 return result;
3495 }
3496
3497 /**
3498 * Converts a Unicode `string` to an array.
3499 *
3500 * @private
3501 * @param {string} string The string to convert.
3502 * @returns {Array} Returns the converted array.
3503 */
3504 function unicodeToArray(string) {
3505 return string.match(reUnicode) || [];
3506 }
3507
3508 /**
3509 * Splits a Unicode `string` into an array of its words.
3510 *
3511 * @private
3512 * @param {string} The string to inspect.
3513 * @returns {Array} Returns the words of `string`.
3514 */
3515 function unicodeWords(string) {
3516 return string.match(reUnicodeWord) || [];
3517 }
3518
3519 /*--------------------------------------------------------------------------*/
3520
3521 /**
3522 * Create a new pristine `lodash` function using the `context` object.
3523 *
3524 * @static
3525 * @memberOf _
3526 * @since 1.1.0
3527 * @category Util
3528 * @param {Object} [context=root] The context object.
3529 * @returns {Function} Returns a new `lodash` function.
3530 * @example
3531 *
3532 * _.mixin({ 'foo': _.constant('foo') });
3533 *
3534 * var lodash = _.runInContext();
3535 * lodash.mixin({ 'bar': lodash.constant('bar') });
3536 *
3537 * _.isFunction(_.foo);
3538 * // => true
3539 * _.isFunction(_.bar);
3540 * // => false
3541 *
3542 * lodash.isFunction(lodash.foo);
3543 * // => false
3544 * lodash.isFunction(lodash.bar);
3545 * // => true
3546 *
3547 * // Create a suped-up `defer` in Node.js.
3548 * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
3549 */
3550 var runInContext = (function runInContext(context) {
3551 context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
3552
3553 /** Built-in constructor references. */
3554 var Array = context.Array,
3555 Date = context.Date,
3556 Error = context.Error,
3557 Function = context.Function,
3558 Math = context.Math,
3559 Object = context.Object,
3560 RegExp = context.RegExp,
3561 String = context.String,
3562 TypeError = context.TypeError;
3563
3564 /** Used for built-in method references. */
3565 var arrayProto = Array.prototype,
3566 funcProto = Function.prototype,
3567 objectProto = Object.prototype;
3568
3569 /** Used to detect overreaching core-js shims. */
3570 var coreJsData = context['__core-js_shared__'];
3571
3572 /** Used to resolve the decompiled source of functions. */
3573 var funcToString = funcProto.toString;
3574
3575 /** Used to check objects for own properties. */
3576 var hasOwnProperty = objectProto.hasOwnProperty;
3577
3578 /** Used to generate unique IDs. */
3579 var idCounter = 0;
3580
3581 /** Used to detect methods masquerading as native. */
3582 var maskSrcKey = (function() {
3583 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
3584 return uid ? ('Symbol(src)_1.' + uid) : '';
3585 }());
3586
3587 /**
3588 * Used to resolve the
3589 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3590 * of values.
3591 */
3592 var nativeObjectToString = objectProto.toString;
3593
3594 /** Used to infer the `Object` constructor. */
3595 var objectCtorString = funcToString.call(Object);
3596
3597 /** Used to restore the original `_` reference in `_.noConflict`. */
3598 var oldDash = root._;
3599
3600 /** Used to detect if a method is native. */
3601 var reIsNative = RegExp('^' +
3602 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
3603 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
3604 );
3605
3606 /** Built-in value references. */
3607 var Buffer = moduleExports ? context.Buffer : undefined,
3608 Symbol = context.Symbol,
3609 Uint8Array = context.Uint8Array,
3610 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
3611 getPrototype = overArg(Object.getPrototypeOf, Object),
3612 objectCreate = Object.create,
3613 propertyIsEnumerable = objectProto.propertyIsEnumerable,
3614 splice = arrayProto.splice,
3615 spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
3616 symIterator = Symbol ? Symbol.iterator : undefined,
3617 symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3618
3619 var defineProperty = (function() {
3620 try {
3621 var func = getNative(Object, 'defineProperty');
3622 func({}, '', {});
3623 return func;
3624 } catch (e) {}
3625 }());
3626
3627 /** Mocked built-ins. */
3628 var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
3629 ctxNow = Date && Date.now !== root.Date.now && Date.now,
3630 ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
3631
3632 /* Built-in method references for those with the same name as other `lodash` methods. */
3633 var nativeCeil = Math.ceil,
3634 nativeFloor = Math.floor,
3635 nativeGetSymbols = Object.getOwnPropertySymbols,
3636 nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
3637 nativeIsFinite = context.isFinite,
3638 nativeJoin = arrayProto.join,
3639 nativeKeys = overArg(Object.keys, Object),
3640 nativeMax = Math.max,
3641 nativeMin = Math.min,
3642 nativeNow = Date.now,
3643 nativeParseInt = context.parseInt,
3644 nativeRandom = Math.random,
3645 nativeReverse = arrayProto.reverse;
3646
3647 /* Built-in method references that are verified to be native. */
3648 var DataView = getNative(context, 'DataView'),
3649 Map = getNative(context, 'Map'),
3650 Promise = getNative(context, 'Promise'),
3651 Set = getNative(context, 'Set'),
3652 WeakMap = getNative(context, 'WeakMap'),
3653 nativeCreate = getNative(Object, 'create');
3654
3655 /** Used to store function metadata. */
3656 var metaMap = WeakMap && new WeakMap;
3657
3658 /** Used to lookup unminified function names. */
3659 var realNames = {};
3660
3661 /** Used to detect maps, sets, and weakmaps. */
3662 var dataViewCtorString = toSource(DataView),
3663 mapCtorString = toSource(Map),
3664 promiseCtorString = toSource(Promise),
3665 setCtorString = toSource(Set),
3666 weakMapCtorString = toSource(WeakMap);
3667
3668 /** Used to convert symbols to primitives and strings. */
3669 var symbolProto = Symbol ? Symbol.prototype : undefined,
3670 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
3671 symbolToString = symbolProto ? symbolProto.toString : undefined;
3672
3673 /*------------------------------------------------------------------------*/
3674
3675 /**
3676 * Creates a `lodash` object which wraps `value` to enable implicit method
3677 * chain sequences. Methods that operate on and return arrays, collections,
3678 * and functions can be chained together. Methods that retrieve a single value
3679 * or may return a primitive value will automatically end the chain sequence
3680 * and return the unwrapped value. Otherwise, the value must be unwrapped
3681 * with `_#value`.
3682 *
3683 * Explicit chain sequences, which must be unwrapped with `_#value`, may be
3684 * enabled using `_.chain`.
3685 *
3686 * The execution of chained methods is lazy, that is, it's deferred until
3687 * `_#value` is implicitly or explicitly called.
3688 *
3689 * Lazy evaluation allows several methods to support shortcut fusion.
3690 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
3691 * the creation of intermediate arrays and can greatly reduce the number of
3692 * iteratee executions. Sections of a chain sequence qualify for shortcut
3693 * fusion if the section is applied to an array and iteratees accept only
3694 * one argument. The heuristic for whether a section qualifies for shortcut
3695 * fusion is subject to change.
3696 *
3697 * Chaining is supported in custom builds as long as the `_#value` method is
3698 * directly or indirectly included in the build.
3699 *
3700 * In addition to lodash methods, wrappers have `Array` and `String` methods.
3701 *
3702 * The wrapper `Array` methods are:
3703 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
3704 *
3705 * The wrapper `String` methods are:
3706 * `replace` and `split`
3707 *
3708 * The wrapper methods that support shortcut fusion are:
3709 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
3710 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
3711 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
3712 *
3713 * The chainable wrapper methods are:
3714 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
3715 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
3716 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
3717 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
3718 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
3719 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
3720 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
3721 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
3722 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
3723 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
3724 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
3725 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
3726 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
3727 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
3728 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
3729 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
3730 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
3731 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
3732 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
3733 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
3734 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
3735 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
3736 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
3737 * `zipObject`, `zipObjectDeep`, and `zipWith`
3738 *
3739 * The wrapper methods that are **not** chainable by default are:
3740 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
3741 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
3742 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
3743 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
3744 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
3745 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
3746 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
3747 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
3748 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
3749 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
3750 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
3751 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
3752 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
3753 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
3754 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
3755 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
3756 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
3757 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
3758 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
3759 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
3760 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
3761 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
3762 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
3763 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
3764 * `upperFirst`, `value`, and `words`
3765 *
3766 * @name _
3767 * @constructor
3768 * @category Seq
3769 * @param {*} value The value to wrap in a `lodash` instance.
3770 * @returns {Object} Returns the new `lodash` wrapper instance.
3771 * @example
3772 *
3773 * function square(n) {
3774 * return n * n;
3775 * }
3776 *
3777 * var wrapped = _([1, 2, 3]);
3778 *
3779 * // Returns an unwrapped value.
3780 * wrapped.reduce(_.add);
3781 * // => 6
3782 *
3783 * // Returns a wrapped value.
3784 * var squares = wrapped.map(square);
3785 *
3786 * _.isArray(squares);
3787 * // => false
3788 *
3789 * _.isArray(squares.value());
3790 * // => true
3791 */
3792 function lodash(value) {
3793 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
3794 if (value instanceof LodashWrapper) {
3795 return value;
3796 }
3797 if (hasOwnProperty.call(value, '__wrapped__')) {
3798 return wrapperClone(value);
3799 }
3800 }
3801 return new LodashWrapper(value);
3802 }
3803
3804 /**
3805 * The base implementation of `_.create` without support for assigning
3806 * properties to the created object.
3807 *
3808 * @private
3809 * @param {Object} proto The object to inherit from.
3810 * @returns {Object} Returns the new object.
3811 */
3812 var baseCreate = (function() {
3813 function object() {}
3814 return function(proto) {
3815 if (!isObject(proto)) {
3816 return {};
3817 }
3818 if (objectCreate) {
3819 return objectCreate(proto);
3820 }
3821 object.prototype = proto;
3822 var result = new object;
3823 object.prototype = undefined;
3824 return result;
3825 };
3826 }());
3827
3828 /**
3829 * The function whose prototype chain sequence wrappers inherit from.
3830 *
3831 * @private
3832 */
3833 function baseLodash() {
3834 // No operation performed.
3835 }
3836
3837 /**
3838 * The base constructor for creating `lodash` wrapper objects.
3839 *
3840 * @private
3841 * @param {*} value The value to wrap.
3842 * @param {boolean} [chainAll] Enable explicit method chain sequences.
3843 */
3844 function LodashWrapper(value, chainAll) {
3845 this.__wrapped__ = value;
3846 this.__actions__ = [];
3847 this.__chain__ = !!chainAll;
3848 this.__index__ = 0;
3849 this.__values__ = undefined;
3850 }
3851
3852 /**
3853 * By default, the template delimiters used by lodash are like those in
3854 * embedded Ruby (ERB) as well as ES2015 template strings. Change the
3855 * following template settings to use alternative delimiters.
3856 *
3857 * @static
3858 * @memberOf _
3859 * @type {Object}
3860 */
3861 lodash.templateSettings = {
3862
3863 /**
3864 * Used to detect `data` property values to be HTML-escaped.
3865 *
3866 * @memberOf _.templateSettings
3867 * @type {RegExp}
3868 */
3869 'escape': reEscape,
3870
3871 /**
3872 * Used to detect code to be evaluated.
3873 *
3874 * @memberOf _.templateSettings
3875 * @type {RegExp}
3876 */
3877 'evaluate': reEvaluate,
3878
3879 /**
3880 * Used to detect `data` property values to inject.
3881 *
3882 * @memberOf _.templateSettings
3883 * @type {RegExp}
3884 */
3885 'interpolate': reInterpolate,
3886
3887 /**
3888 * Used to reference the data object in the template text.
3889 *
3890 * @memberOf _.templateSettings
3891 * @type {string}
3892 */
3893 'variable': '',
3894
3895 /**
3896 * Used to import variables into the compiled template.
3897 *
3898 * @memberOf _.templateSettings
3899 * @type {Object}
3900 */
3901 'imports': {
3902
3903 /**
3904 * A reference to the `lodash` function.
3905 *
3906 * @memberOf _.templateSettings.imports
3907 * @type {Function}
3908 */
3909 '_': lodash
3910 }
3911 };
3912
3913 // Ensure wrappers are instances of `baseLodash`.
3914 lodash.prototype = baseLodash.prototype;
3915 lodash.prototype.constructor = lodash;
3916
3917 LodashWrapper.prototype = baseCreate(baseLodash.prototype);
3918 LodashWrapper.prototype.constructor = LodashWrapper;
3919
3920 /*------------------------------------------------------------------------*/
3921
3922 /**
3923 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
3924 *
3925 * @private
3926 * @constructor
3927 * @param {*} value The value to wrap.
3928 */
3929 function LazyWrapper(value) {
3930 this.__wrapped__ = value;
3931 this.__actions__ = [];
3932 this.__dir__ = 1;
3933 this.__filtered__ = false;
3934 this.__iteratees__ = [];
3935 this.__takeCount__ = MAX_ARRAY_LENGTH;
3936 this.__views__ = [];
3937 }
3938
3939 /**
3940 * Creates a clone of the lazy wrapper object.
3941 *
3942 * @private
3943 * @name clone
3944 * @memberOf LazyWrapper
3945 * @returns {Object} Returns the cloned `LazyWrapper` object.
3946 */
3947 function lazyClone() {
3948 var result = new LazyWrapper(this.__wrapped__);
3949 result.__actions__ = copyArray(this.__actions__);
3950 result.__dir__ = this.__dir__;
3951 result.__filtered__ = this.__filtered__;
3952 result.__iteratees__ = copyArray(this.__iteratees__);
3953 result.__takeCount__ = this.__takeCount__;
3954 result.__views__ = copyArray(this.__views__);
3955 return result;
3956 }
3957
3958 /**
3959 * Reverses the direction of lazy iteration.
3960 *
3961 * @private
3962 * @name reverse
3963 * @memberOf LazyWrapper
3964 * @returns {Object} Returns the new reversed `LazyWrapper` object.
3965 */
3966 function lazyReverse() {
3967 if (this.__filtered__) {
3968 var result = new LazyWrapper(this);
3969 result.__dir__ = -1;
3970 result.__filtered__ = true;
3971 } else {
3972 result = this.clone();
3973 result.__dir__ *= -1;
3974 }
3975 return result;
3976 }
3977
3978 /**
3979 * Extracts the unwrapped value from its lazy wrapper.
3980 *
3981 * @private
3982 * @name value
3983 * @memberOf LazyWrapper
3984 * @returns {*} Returns the unwrapped value.
3985 */
3986 function lazyValue() {
3987 var array = this.__wrapped__.value(),
3988 dir = this.__dir__,
3989 isArr = isArray(array),
3990 isRight = dir < 0,
3991 arrLength = isArr ? array.length : 0,
3992 view = getView(0, arrLength, this.__views__),
3993 start = view.start,
3994 end = view.end,
3995 length = end - start,
3996 index = isRight ? end : (start - 1),
3997 iteratees = this.__iteratees__,
3998 iterLength = iteratees.length,
3999 resIndex = 0,
4000 takeCount = nativeMin(length, this.__takeCount__);
4001
4002 if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
4003 return baseWrapperValue(array, this.__actions__);
4004 }
4005 var result = [];
4006
4007 outer:
4008 while (length-- && resIndex < takeCount) {
4009 index += dir;
4010
4011 var iterIndex = -1,
4012 value = array[index];
4013
4014 while (++iterIndex < iterLength) {
4015 var data = iteratees[iterIndex],
4016 iteratee = data.iteratee,
4017 type = data.type,
4018 computed = iteratee(value);
4019
4020 if (type == LAZY_MAP_FLAG) {
4021 value = computed;
4022 } else if (!computed) {
4023 if (type == LAZY_FILTER_FLAG) {
4024 continue outer;
4025 } else {
4026 break outer;
4027 }
4028 }
4029 }
4030 result[resIndex++] = value;
4031 }
4032 return result;
4033 }
4034
4035 // Ensure `LazyWrapper` is an instance of `baseLodash`.
4036 LazyWrapper.prototype = baseCreate(baseLodash.prototype);
4037 LazyWrapper.prototype.constructor = LazyWrapper;
4038
4039 /*------------------------------------------------------------------------*/
4040
4041 /**
4042 * Creates a hash object.
4043 *
4044 * @private
4045 * @constructor
4046 * @param {Array} [entries] The key-value pairs to cache.
4047 */
4048 function Hash(entries) {
4049 var index = -1,
4050 length = entries == null ? 0 : entries.length;
4051
4052 this.clear();
4053 while (++index < length) {
4054 var entry = entries[index];
4055 this.set(entry[0], entry[1]);
4056 }
4057 }
4058
4059 /**
4060 * Removes all key-value entries from the hash.
4061 *
4062 * @private
4063 * @name clear
4064 * @memberOf Hash
4065 */
4066 function hashClear() {
4067 this.__data__ = nativeCreate ? nativeCreate(null) : {};
4068 this.size = 0;
4069 }
4070
4071 /**
4072 * Removes `key` and its value from the hash.
4073 *
4074 * @private
4075 * @name delete
4076 * @memberOf Hash
4077 * @param {Object} hash The hash to modify.
4078 * @param {string} key The key of the value to remove.
4079 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4080 */
4081 function hashDelete(key) {
4082 var result = this.has(key) && delete this.__data__[key];
4083 this.size -= result ? 1 : 0;
4084 return result;
4085 }
4086
4087 /**
4088 * Gets the hash value for `key`.
4089 *
4090 * @private
4091 * @name get
4092 * @memberOf Hash
4093 * @param {string} key The key of the value to get.
4094 * @returns {*} Returns the entry value.
4095 */
4096 function hashGet(key) {
4097 var data = this.__data__;
4098 if (nativeCreate) {
4099 var result = data[key];
4100 return result === HASH_UNDEFINED ? undefined : result;
4101 }
4102 return hasOwnProperty.call(data, key) ? data[key] : undefined;
4103 }
4104
4105 /**
4106 * Checks if a hash value for `key` exists.
4107 *
4108 * @private
4109 * @name has
4110 * @memberOf Hash
4111 * @param {string} key The key of the entry to check.
4112 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4113 */
4114 function hashHas(key) {
4115 var data = this.__data__;
4116 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
4117 }
4118
4119 /**
4120 * Sets the hash `key` to `value`.
4121 *
4122 * @private
4123 * @name set
4124 * @memberOf Hash
4125 * @param {string} key The key of the value to set.
4126 * @param {*} value The value to set.
4127 * @returns {Object} Returns the hash instance.
4128 */
4129 function hashSet(key, value) {
4130 var data = this.__data__;
4131 this.size += this.has(key) ? 0 : 1;
4132 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
4133 return this;
4134 }
4135
4136 // Add methods to `Hash`.
4137 Hash.prototype.clear = hashClear;
4138 Hash.prototype['delete'] = hashDelete;
4139 Hash.prototype.get = hashGet;
4140 Hash.prototype.has = hashHas;
4141 Hash.prototype.set = hashSet;
4142
4143 /*------------------------------------------------------------------------*/
4144
4145 /**
4146 * Creates an list cache object.
4147 *
4148 * @private
4149 * @constructor
4150 * @param {Array} [entries] The key-value pairs to cache.
4151 */
4152 function ListCache(entries) {
4153 var index = -1,
4154 length = entries == null ? 0 : entries.length;
4155
4156 this.clear();
4157 while (++index < length) {
4158 var entry = entries[index];
4159 this.set(entry[0], entry[1]);
4160 }
4161 }
4162
4163 /**
4164 * Removes all key-value entries from the list cache.
4165 *
4166 * @private
4167 * @name clear
4168 * @memberOf ListCache
4169 */
4170 function listCacheClear() {
4171 this.__data__ = [];
4172 this.size = 0;
4173 }
4174
4175 /**
4176 * Removes `key` and its value from the list cache.
4177 *
4178 * @private
4179 * @name delete
4180 * @memberOf ListCache
4181 * @param {string} key The key of the value to remove.
4182 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4183 */
4184 function listCacheDelete(key) {
4185 var data = this.__data__,
4186 index = assocIndexOf(data, key);
4187
4188 if (index < 0) {
4189 return false;
4190 }
4191 var lastIndex = data.length - 1;
4192 if (index == lastIndex) {
4193 data.pop();
4194 } else {
4195 splice.call(data, index, 1);
4196 }
4197 --this.size;
4198 return true;
4199 }
4200
4201 /**
4202 * Gets the list cache value for `key`.
4203 *
4204 * @private
4205 * @name get
4206 * @memberOf ListCache
4207 * @param {string} key The key of the value to get.
4208 * @returns {*} Returns the entry value.
4209 */
4210 function listCacheGet(key) {
4211 var data = this.__data__,
4212 index = assocIndexOf(data, key);
4213
4214 return index < 0 ? undefined : data[index][1];
4215 }
4216
4217 /**
4218 * Checks if a list cache value for `key` exists.
4219 *
4220 * @private
4221 * @name has
4222 * @memberOf ListCache
4223 * @param {string} key The key of the entry to check.
4224 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4225 */
4226 function listCacheHas(key) {
4227 return assocIndexOf(this.__data__, key) > -1;
4228 }
4229
4230 /**
4231 * Sets the list cache `key` to `value`.
4232 *
4233 * @private
4234 * @name set
4235 * @memberOf ListCache
4236 * @param {string} key The key of the value to set.
4237 * @param {*} value The value to set.
4238 * @returns {Object} Returns the list cache instance.
4239 */
4240 function listCacheSet(key, value) {
4241 var data = this.__data__,
4242 index = assocIndexOf(data, key);
4243
4244 if (index < 0) {
4245 ++this.size;
4246 data.push([key, value]);
4247 } else {
4248 data[index][1] = value;
4249 }
4250 return this;
4251 }
4252
4253 // Add methods to `ListCache`.
4254 ListCache.prototype.clear = listCacheClear;
4255 ListCache.prototype['delete'] = listCacheDelete;
4256 ListCache.prototype.get = listCacheGet;
4257 ListCache.prototype.has = listCacheHas;
4258 ListCache.prototype.set = listCacheSet;
4259
4260 /*------------------------------------------------------------------------*/
4261
4262 /**
4263 * Creates a map cache object to store key-value pairs.
4264 *
4265 * @private
4266 * @constructor
4267 * @param {Array} [entries] The key-value pairs to cache.
4268 */
4269 function MapCache(entries) {
4270 var index = -1,
4271 length = entries == null ? 0 : entries.length;
4272
4273 this.clear();
4274 while (++index < length) {
4275 var entry = entries[index];
4276 this.set(entry[0], entry[1]);
4277 }
4278 }
4279
4280 /**
4281 * Removes all key-value entries from the map.
4282 *
4283 * @private
4284 * @name clear
4285 * @memberOf MapCache
4286 */
4287 function mapCacheClear() {
4288 this.size = 0;
4289 this.__data__ = {
4290 'hash': new Hash,
4291 'map': new (Map || ListCache),
4292 'string': new Hash
4293 };
4294 }
4295
4296 /**
4297 * Removes `key` and its value from the map.
4298 *
4299 * @private
4300 * @name delete
4301 * @memberOf MapCache
4302 * @param {string} key The key of the value to remove.
4303 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4304 */
4305 function mapCacheDelete(key) {
4306 var result = getMapData(this, key)['delete'](key);
4307 this.size -= result ? 1 : 0;
4308 return result;
4309 }
4310
4311 /**
4312 * Gets the map value for `key`.
4313 *
4314 * @private
4315 * @name get
4316 * @memberOf MapCache
4317 * @param {string} key The key of the value to get.
4318 * @returns {*} Returns the entry value.
4319 */
4320 function mapCacheGet(key) {
4321 return getMapData(this, key).get(key);
4322 }
4323
4324 /**
4325 * Checks if a map value for `key` exists.
4326 *
4327 * @private
4328 * @name has
4329 * @memberOf MapCache
4330 * @param {string} key The key of the entry to check.
4331 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4332 */
4333 function mapCacheHas(key) {
4334 return getMapData(this, key).has(key);
4335 }
4336
4337 /**
4338 * Sets the map `key` to `value`.
4339 *
4340 * @private
4341 * @name set
4342 * @memberOf MapCache
4343 * @param {string} key The key of the value to set.
4344 * @param {*} value The value to set.
4345 * @returns {Object} Returns the map cache instance.
4346 */
4347 function mapCacheSet(key, value) {
4348 var data = getMapData(this, key),
4349 size = data.size;
4350
4351 data.set(key, value);
4352 this.size += data.size == size ? 0 : 1;
4353 return this;
4354 }
4355
4356 // Add methods to `MapCache`.
4357 MapCache.prototype.clear = mapCacheClear;
4358 MapCache.prototype['delete'] = mapCacheDelete;
4359 MapCache.prototype.get = mapCacheGet;
4360 MapCache.prototype.has = mapCacheHas;
4361 MapCache.prototype.set = mapCacheSet;
4362
4363 /*------------------------------------------------------------------------*/
4364
4365 /**
4366 *
4367 * Creates an array cache object to store unique values.
4368 *
4369 * @private
4370 * @constructor
4371 * @param {Array} [values] The values to cache.
4372 */
4373 function SetCache(values) {
4374 var index = -1,
4375 length = values == null ? 0 : values.length;
4376
4377 this.__data__ = new MapCache;
4378 while (++index < length) {
4379 this.add(values[index]);
4380 }
4381 }
4382
4383 /**
4384 * Adds `value` to the array cache.
4385 *
4386 * @private
4387 * @name add
4388 * @memberOf SetCache
4389 * @alias push
4390 * @param {*} value The value to cache.
4391 * @returns {Object} Returns the cache instance.
4392 */
4393 function setCacheAdd(value) {
4394 this.__data__.set(value, HASH_UNDEFINED);
4395 return this;
4396 }
4397
4398 /**
4399 * Checks if `value` is in the array cache.
4400 *
4401 * @private
4402 * @name has
4403 * @memberOf SetCache
4404 * @param {*} value The value to search for.
4405 * @returns {number} Returns `true` if `value` is found, else `false`.
4406 */
4407 function setCacheHas(value) {
4408 return this.__data__.has(value);
4409 }
4410
4411 // Add methods to `SetCache`.
4412 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
4413 SetCache.prototype.has = setCacheHas;
4414
4415 /*------------------------------------------------------------------------*/
4416
4417 /**
4418 * Creates a stack cache object to store key-value pairs.
4419 *
4420 * @private
4421 * @constructor
4422 * @param {Array} [entries] The key-value pairs to cache.
4423 */
4424 function Stack(entries) {
4425 var data = this.__data__ = new ListCache(entries);
4426 this.size = data.size;
4427 }
4428
4429 /**
4430 * Removes all key-value entries from the stack.
4431 *
4432 * @private
4433 * @name clear
4434 * @memberOf Stack
4435 */
4436 function stackClear() {
4437 this.__data__ = new ListCache;
4438 this.size = 0;
4439 }
4440
4441 /**
4442 * Removes `key` and its value from the stack.
4443 *
4444 * @private
4445 * @name delete
4446 * @memberOf Stack
4447 * @param {string} key The key of the value to remove.
4448 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4449 */
4450 function stackDelete(key) {
4451 var data = this.__data__,
4452 result = data['delete'](key);
4453
4454 this.size = data.size;
4455 return result;
4456 }
4457
4458 /**
4459 * Gets the stack value for `key`.
4460 *
4461 * @private
4462 * @name get
4463 * @memberOf Stack
4464 * @param {string} key The key of the value to get.
4465 * @returns {*} Returns the entry value.
4466 */
4467 function stackGet(key) {
4468 return this.__data__.get(key);
4469 }
4470
4471 /**
4472 * Checks if a stack value for `key` exists.
4473 *
4474 * @private
4475 * @name has
4476 * @memberOf Stack
4477 * @param {string} key The key of the entry to check.
4478 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4479 */
4480 function stackHas(key) {
4481 return this.__data__.has(key);
4482 }
4483
4484 /**
4485 * Sets the stack `key` to `value`.
4486 *
4487 * @private
4488 * @name set
4489 * @memberOf Stack
4490 * @param {string} key The key of the value to set.
4491 * @param {*} value The value to set.
4492 * @returns {Object} Returns the stack cache instance.
4493 */
4494 function stackSet(key, value) {
4495 var data = this.__data__;
4496 if (data instanceof ListCache) {
4497 var pairs = data.__data__;
4498 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
4499 pairs.push([key, value]);
4500 this.size = ++data.size;
4501 return this;
4502 }
4503 data = this.__data__ = new MapCache(pairs);
4504 }
4505 data.set(key, value);
4506 this.size = data.size;
4507 return this;
4508 }
4509
4510 // Add methods to `Stack`.
4511 Stack.prototype.clear = stackClear;
4512 Stack.prototype['delete'] = stackDelete;
4513 Stack.prototype.get = stackGet;
4514 Stack.prototype.has = stackHas;
4515 Stack.prototype.set = stackSet;
4516
4517 /*------------------------------------------------------------------------*/
4518
4519 /**
4520 * Creates an array of the enumerable property names of the array-like `value`.
4521 *
4522 * @private
4523 * @param {*} value The value to query.
4524 * @param {boolean} inherited Specify returning inherited property names.
4525 * @returns {Array} Returns the array of property names.
4526 */
4527 function arrayLikeKeys(value, inherited) {
4528 var isArr = isArray(value),
4529 isArg = !isArr && isArguments(value),
4530 isBuff = !isArr && !isArg && isBuffer(value),
4531 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
4532 skipIndexes = isArr || isArg || isBuff || isType,
4533 result = skipIndexes ? baseTimes(value.length, String) : [],
4534 length = result.length;
4535
4536 for (var key in value) {
4537 if ((inherited || hasOwnProperty.call(value, key)) &&
4538 !(skipIndexes && (
4539 // Safari 9 has enumerable `arguments.length` in strict mode.
4540 key == 'length' ||
4541 // Node.js 0.10 has enumerable non-index properties on buffers.
4542 (isBuff && (key == 'offset' || key == 'parent')) ||
4543 // PhantomJS 2 has enumerable non-index properties on typed arrays.
4544 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
4545 // Skip index properties.
4546 isIndex(key, length)
4547 ))) {
4548 result.push(key);
4549 }
4550 }
4551 return result;
4552 }
4553
4554 /**
4555 * A specialized version of `_.sample` for arrays.
4556 *
4557 * @private
4558 * @param {Array} array The array to sample.
4559 * @returns {*} Returns the random element.
4560 */
4561 function arraySample(array) {
4562 var length = array.length;
4563 return length ? array[baseRandom(0, length - 1)] : undefined;
4564 }
4565
4566 /**
4567 * A specialized version of `_.sampleSize` for arrays.
4568 *
4569 * @private
4570 * @param {Array} array The array to sample.
4571 * @param {number} n The number of elements to sample.
4572 * @returns {Array} Returns the random elements.
4573 */
4574 function arraySampleSize(array, n) {
4575 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
4576 }
4577
4578 /**
4579 * A specialized version of `_.shuffle` for arrays.
4580 *
4581 * @private
4582 * @param {Array} array The array to shuffle.
4583 * @returns {Array} Returns the new shuffled array.
4584 */
4585 function arrayShuffle(array) {
4586 return shuffleSelf(copyArray(array));
4587 }
4588
4589 /**
4590 * This function is like `assignValue` except that it doesn't assign
4591 * `undefined` values.
4592 *
4593 * @private
4594 * @param {Object} object The object to modify.
4595 * @param {string} key The key of the property to assign.
4596 * @param {*} value The value to assign.
4597 */
4598 function assignMergeValue(object, key, value) {
4599 if ((value !== undefined && !eq(object[key], value)) ||
4600 (value === undefined && !(key in object))) {
4601 baseAssignValue(object, key, value);
4602 }
4603 }
4604
4605 /**
4606 * Assigns `value` to `key` of `object` if the existing value is not equivalent
4607 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4608 * for equality comparisons.
4609 *
4610 * @private
4611 * @param {Object} object The object to modify.
4612 * @param {string} key The key of the property to assign.
4613 * @param {*} value The value to assign.
4614 */
4615 function assignValue(object, key, value) {
4616 var objValue = object[key];
4617 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
4618 (value === undefined && !(key in object))) {
4619 baseAssignValue(object, key, value);
4620 }
4621 }
4622
4623 /**
4624 * Gets the index at which the `key` is found in `array` of key-value pairs.
4625 *
4626 * @private
4627 * @param {Array} array The array to inspect.
4628 * @param {*} key The key to search for.
4629 * @returns {number} Returns the index of the matched value, else `-1`.
4630 */
4631 function assocIndexOf(array, key) {
4632 var length = array.length;
4633 while (length--) {
4634 if (eq(array[length][0], key)) {
4635 return length;
4636 }
4637 }
4638 return -1;
4639 }
4640
4641 /**
4642 * Aggregates elements of `collection` on `accumulator` with keys transformed
4643 * by `iteratee` and values set by `setter`.
4644 *
4645 * @private
4646 * @param {Array|Object} collection The collection to iterate over.
4647 * @param {Function} setter The function to set `accumulator` values.
4648 * @param {Function} iteratee The iteratee to transform keys.
4649 * @param {Object} accumulator The initial aggregated object.
4650 * @returns {Function} Returns `accumulator`.
4651 */
4652 function baseAggregator(collection, setter, iteratee, accumulator) {
4653 baseEach(collection, function(value, key, collection) {
4654 setter(accumulator, value, iteratee(value), collection);
4655 });
4656 return accumulator;
4657 }
4658
4659 /**
4660 * The base implementation of `_.assign` without support for multiple sources
4661 * or `customizer` functions.
4662 *
4663 * @private
4664 * @param {Object} object The destination object.
4665 * @param {Object} source The source object.
4666 * @returns {Object} Returns `object`.
4667 */
4668 function baseAssign(object, source) {
4669 return object && copyObject(source, keys(source), object);
4670 }
4671
4672 /**
4673 * The base implementation of `_.assignIn` without support for multiple sources
4674 * or `customizer` functions.
4675 *
4676 * @private
4677 * @param {Object} object The destination object.
4678 * @param {Object} source The source object.
4679 * @returns {Object} Returns `object`.
4680 */
4681 function baseAssignIn(object, source) {
4682 return object && copyObject(source, keysIn(source), object);
4683 }
4684
4685 /**
4686 * The base implementation of `assignValue` and `assignMergeValue` without
4687 * value checks.
4688 *
4689 * @private
4690 * @param {Object} object The object to modify.
4691 * @param {string} key The key of the property to assign.
4692 * @param {*} value The value to assign.
4693 */
4694 function baseAssignValue(object, key, value) {
4695 if (key == '__proto__' && defineProperty) {
4696 defineProperty(object, key, {
4697 'configurable': true,
4698 'enumerable': true,
4699 'value': value,
4700 'writable': true
4701 });
4702 } else {
4703 object[key] = value;
4704 }
4705 }
4706
4707 /**
4708 * The base implementation of `_.at` without support for individual paths.
4709 *
4710 * @private
4711 * @param {Object} object The object to iterate over.
4712 * @param {string[]} paths The property paths to pick.
4713 * @returns {Array} Returns the picked elements.
4714 */
4715 function baseAt(object, paths) {
4716 var index = -1,
4717 length = paths.length,
4718 result = Array(length),
4719 skip = object == null;
4720
4721 while (++index < length) {
4722 result[index] = skip ? undefined : get(object, paths[index]);
4723 }
4724 return result;
4725 }
4726
4727 /**
4728 * The base implementation of `_.clamp` which doesn't coerce arguments.
4729 *
4730 * @private
4731 * @param {number} number The number to clamp.
4732 * @param {number} [lower] The lower bound.
4733 * @param {number} upper The upper bound.
4734 * @returns {number} Returns the clamped number.
4735 */
4736 function baseClamp(number, lower, upper) {
4737 if (number === number) {
4738 if (upper !== undefined) {
4739 number = number <= upper ? number : upper;
4740 }
4741 if (lower !== undefined) {
4742 number = number >= lower ? number : lower;
4743 }
4744 }
4745 return number;
4746 }
4747
4748 /**
4749 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4750 * traversed objects.
4751 *
4752 * @private
4753 * @param {*} value The value to clone.
4754 * @param {boolean} bitmask The bitmask flags.
4755 * 1 - Deep clone
4756 * 2 - Flatten inherited properties
4757 * 4 - Clone symbols
4758 * @param {Function} [customizer] The function to customize cloning.
4759 * @param {string} [key] The key of `value`.
4760 * @param {Object} [object] The parent object of `value`.
4761 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4762 * @returns {*} Returns the cloned value.
4763 */
4764 function baseClone(value, bitmask, customizer, key, object, stack) {
4765 var result,
4766 isDeep = bitmask & CLONE_DEEP_FLAG,
4767 isFlat = bitmask & CLONE_FLAT_FLAG,
4768 isFull = bitmask & CLONE_SYMBOLS_FLAG;
4769
4770 if (customizer) {
4771 result = object ? customizer(value, key, object, stack) : customizer(value);
4772 }
4773 if (result !== undefined) {
4774 return result;
4775 }
4776 if (!isObject(value)) {
4777 return value;
4778 }
4779 var isArr = isArray(value);
4780 if (isArr) {
4781 result = initCloneArray(value);
4782 if (!isDeep) {
4783 return copyArray(value, result);
4784 }
4785 } else {
4786 var tag = getTag(value),
4787 isFunc = tag == funcTag || tag == genTag;
4788
4789 if (isBuffer(value)) {
4790 return cloneBuffer(value, isDeep);
4791 }
4792 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
4793 result = (isFlat || isFunc) ? {} : initCloneObject(value);
4794 if (!isDeep) {
4795 return isFlat
4796 ? copySymbolsIn(value, baseAssignIn(result, value))
4797 : copySymbols(value, baseAssign(result, value));
4798 }
4799 } else {
4800 if (!cloneableTags[tag]) {
4801 return object ? value : {};
4802 }
4803 result = initCloneByTag(value, tag, isDeep);
4804 }
4805 }
4806 // Check for circular references and return its corresponding clone.
4807 stack || (stack = new Stack);
4808 var stacked = stack.get(value);
4809 if (stacked) {
4810 return stacked;
4811 }
4812 stack.set(value, result);
4813
4814 if (isSet(value)) {
4815 value.forEach(function(subValue) {
4816 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
4817 });
4818
4819 return result;
4820 }
4821
4822 if (isMap(value)) {
4823 value.forEach(function(subValue, key) {
4824 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
4825 });
4826
4827 return result;
4828 }
4829
4830 var keysFunc = isFull
4831 ? (isFlat ? getAllKeysIn : getAllKeys)
4832 : (isFlat ? keysIn : keys);
4833
4834 var props = isArr ? undefined : keysFunc(value);
4835 arrayEach(props || value, function(subValue, key) {
4836 if (props) {
4837 key = subValue;
4838 subValue = value[key];
4839 }
4840 // Recursively populate clone (susceptible to call stack limits).
4841 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
4842 });
4843 return result;
4844 }
4845
4846 /**
4847 * The base implementation of `_.conforms` which doesn't clone `source`.
4848 *
4849 * @private
4850 * @param {Object} source The object of property predicates to conform to.
4851 * @returns {Function} Returns the new spec function.
4852 */
4853 function baseConforms(source) {
4854 var props = keys(source);
4855 return function(object) {
4856 return baseConformsTo(object, source, props);
4857 };
4858 }
4859
4860 /**
4861 * The base implementation of `_.conformsTo` which accepts `props` to check.
4862 *
4863 * @private
4864 * @param {Object} object The object to inspect.
4865 * @param {Object} source The object of property predicates to conform to.
4866 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
4867 */
4868 function baseConformsTo(object, source, props) {
4869 var length = props.length;
4870 if (object == null) {
4871 return !length;
4872 }
4873 object = Object(object);
4874 while (length--) {
4875 var key = props[length],
4876 predicate = source[key],
4877 value = object[key];
4878
4879 if ((value === undefined && !(key in object)) || !predicate(value)) {
4880 return false;
4881 }
4882 }
4883 return true;
4884 }
4885
4886 /**
4887 * The base implementation of `_.delay` and `_.defer` which accepts `args`
4888 * to provide to `func`.
4889 *
4890 * @private
4891 * @param {Function} func The function to delay.
4892 * @param {number} wait The number of milliseconds to delay invocation.
4893 * @param {Array} args The arguments to provide to `func`.
4894 * @returns {number|Object} Returns the timer id or timeout object.
4895 */
4896 function baseDelay(func, wait, args) {
4897 if (typeof func != 'function') {
4898 throw new TypeError(FUNC_ERROR_TEXT);
4899 }
4900 return setTimeout(function() { func.apply(undefined, args); }, wait);
4901 }
4902
4903 /**
4904 * The base implementation of methods like `_.difference` without support
4905 * for excluding multiple arrays or iteratee shorthands.
4906 *
4907 * @private
4908 * @param {Array} array The array to inspect.
4909 * @param {Array} values The values to exclude.
4910 * @param {Function} [iteratee] The iteratee invoked per element.
4911 * @param {Function} [comparator] The comparator invoked per element.
4912 * @returns {Array} Returns the new array of filtered values.
4913 */
4914 function baseDifference(array, values, iteratee, comparator) {
4915 var index = -1,
4916 includes = arrayIncludes,
4917 isCommon = true,
4918 length = array.length,
4919 result = [],
4920 valuesLength = values.length;
4921
4922 if (!length) {
4923 return result;
4924 }
4925 if (iteratee) {
4926 values = arrayMap(values, baseUnary(iteratee));
4927 }
4928 if (comparator) {
4929 includes = arrayIncludesWith;
4930 isCommon = false;
4931 }
4932 else if (values.length >= LARGE_ARRAY_SIZE) {
4933 includes = cacheHas;
4934 isCommon = false;
4935 values = new SetCache(values);
4936 }
4937 outer:
4938 while (++index < length) {
4939 var value = array[index],
4940 computed = iteratee == null ? value : iteratee(value);
4941
4942 value = (comparator || value !== 0) ? value : 0;
4943 if (isCommon && computed === computed) {
4944 var valuesIndex = valuesLength;
4945 while (valuesIndex--) {
4946 if (values[valuesIndex] === computed) {
4947 continue outer;
4948 }
4949 }
4950 result.push(value);
4951 }
4952 else if (!includes(values, computed, comparator)) {
4953 result.push(value);
4954 }
4955 }
4956 return result;
4957 }
4958
4959 /**
4960 * The base implementation of `_.forEach` without support for iteratee shorthands.
4961 *
4962 * @private
4963 * @param {Array|Object} collection The collection to iterate over.
4964 * @param {Function} iteratee The function invoked per iteration.
4965 * @returns {Array|Object} Returns `collection`.
4966 */
4967 var baseEach = createBaseEach(baseForOwn);
4968
4969 /**
4970 * The base implementation of `_.forEachRight` without support for iteratee shorthands.
4971 *
4972 * @private
4973 * @param {Array|Object} collection The collection to iterate over.
4974 * @param {Function} iteratee The function invoked per iteration.
4975 * @returns {Array|Object} Returns `collection`.
4976 */
4977 var baseEachRight = createBaseEach(baseForOwnRight, true);
4978
4979 /**
4980 * The base implementation of `_.every` without support for iteratee shorthands.
4981 *
4982 * @private
4983 * @param {Array|Object} collection The collection to iterate over.
4984 * @param {Function} predicate The function invoked per iteration.
4985 * @returns {boolean} Returns `true` if all elements pass the predicate check,
4986 * else `false`
4987 */
4988 function baseEvery(collection, predicate) {
4989 var result = true;
4990 baseEach(collection, function(value, index, collection) {
4991 result = !!predicate(value, index, collection);
4992 return result;
4993 });
4994 return result;
4995 }
4996
4997 /**
4998 * The base implementation of methods like `_.max` and `_.min` which accepts a
4999 * `comparator` to determine the extremum value.
5000 *
5001 * @private
5002 * @param {Array} array The array to iterate over.
5003 * @param {Function} iteratee The iteratee invoked per iteration.
5004 * @param {Function} comparator The comparator used to compare values.
5005 * @returns {*} Returns the extremum value.
5006 */
5007 function baseExtremum(array, iteratee, comparator) {
5008 var index = -1,
5009 length = array.length;
5010
5011 while (++index < length) {
5012 var value = array[index],
5013 current = iteratee(value);
5014
5015 if (current != null && (computed === undefined
5016 ? (current === current && !isSymbol(current))
5017 : comparator(current, computed)
5018 )) {
5019 var computed = current,
5020 result = value;
5021 }
5022 }
5023 return result;
5024 }
5025
5026 /**
5027 * The base implementation of `_.fill` without an iteratee call guard.
5028 *
5029 * @private
5030 * @param {Array} array The array to fill.
5031 * @param {*} value The value to fill `array` with.
5032 * @param {number} [start=0] The start position.
5033 * @param {number} [end=array.length] The end position.
5034 * @returns {Array} Returns `array`.
5035 */
5036 function baseFill(array, value, start, end) {
5037 var length = array.length;
5038
5039 start = toInteger(start);
5040 if (start < 0) {
5041 start = -start > length ? 0 : (length + start);
5042 }
5043 end = (end === undefined || end > length) ? length : toInteger(end);
5044 if (end < 0) {
5045 end += length;
5046 }
5047 end = start > end ? 0 : toLength(end);
5048 while (start < end) {
5049 array[start++] = value;
5050 }
5051 return array;
5052 }
5053
5054 /**
5055 * The base implementation of `_.filter` without support for iteratee shorthands.
5056 *
5057 * @private
5058 * @param {Array|Object} collection The collection to iterate over.
5059 * @param {Function} predicate The function invoked per iteration.
5060 * @returns {Array} Returns the new filtered array.
5061 */
5062 function baseFilter(collection, predicate) {
5063 var result = [];
5064 baseEach(collection, function(value, index, collection) {
5065 if (predicate(value, index, collection)) {
5066 result.push(value);
5067 }
5068 });
5069 return result;
5070 }
5071
5072 /**
5073 * The base implementation of `_.flatten` with support for restricting flattening.
5074 *
5075 * @private
5076 * @param {Array} array The array to flatten.
5077 * @param {number} depth The maximum recursion depth.
5078 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
5079 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
5080 * @param {Array} [result=[]] The initial result value.
5081 * @returns {Array} Returns the new flattened array.
5082 */
5083 function baseFlatten(array, depth, predicate, isStrict, result) {
5084 var index = -1,
5085 length = array.length;
5086
5087 predicate || (predicate = isFlattenable);
5088 result || (result = []);
5089
5090 while (++index < length) {
5091 var value = array[index];
5092 if (depth > 0 && predicate(value)) {
5093 if (depth > 1) {
5094 // Recursively flatten arrays (susceptible to call stack limits).
5095 baseFlatten(value, depth - 1, predicate, isStrict, result);
5096 } else {
5097 arrayPush(result, value);
5098 }
5099 } else if (!isStrict) {
5100 result[result.length] = value;
5101 }
5102 }
5103 return result;
5104 }
5105
5106 /**
5107 * The base implementation of `baseForOwn` which iterates over `object`
5108 * properties returned by `keysFunc` and invokes `iteratee` for each property.
5109 * Iteratee functions may exit iteration early by explicitly returning `false`.
5110 *
5111 * @private
5112 * @param {Object} object The object to iterate over.
5113 * @param {Function} iteratee The function invoked per iteration.
5114 * @param {Function} keysFunc The function to get the keys of `object`.
5115 * @returns {Object} Returns `object`.
5116 */
5117 var baseFor = createBaseFor();
5118
5119 /**
5120 * This function is like `baseFor` except that it iterates over properties
5121 * in the opposite order.
5122 *
5123 * @private
5124 * @param {Object} object The object to iterate over.
5125 * @param {Function} iteratee The function invoked per iteration.
5126 * @param {Function} keysFunc The function to get the keys of `object`.
5127 * @returns {Object} Returns `object`.
5128 */
5129 var baseForRight = createBaseFor(true);
5130
5131 /**
5132 * The base implementation of `_.forOwn` without support for iteratee shorthands.
5133 *
5134 * @private
5135 * @param {Object} object The object to iterate over.
5136 * @param {Function} iteratee The function invoked per iteration.
5137 * @returns {Object} Returns `object`.
5138 */
5139 function baseForOwn(object, iteratee) {
5140 return object && baseFor(object, iteratee, keys);
5141 }
5142
5143 /**
5144 * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
5145 *
5146 * @private
5147 * @param {Object} object The object to iterate over.
5148 * @param {Function} iteratee The function invoked per iteration.
5149 * @returns {Object} Returns `object`.
5150 */
5151 function baseForOwnRight(object, iteratee) {
5152 return object && baseForRight(object, iteratee, keys);
5153 }
5154
5155 /**
5156 * The base implementation of `_.functions` which creates an array of
5157 * `object` function property names filtered from `props`.
5158 *
5159 * @private
5160 * @param {Object} object The object to inspect.
5161 * @param {Array} props The property names to filter.
5162 * @returns {Array} Returns the function names.
5163 */
5164 function baseFunctions(object, props) {
5165 return arrayFilter(props, function(key) {
5166 return isFunction(object[key]);
5167 });
5168 }
5169
5170 /**
5171 * The base implementation of `_.get` without support for default values.
5172 *
5173 * @private
5174 * @param {Object} object The object to query.
5175 * @param {Array|string} path The path of the property to get.
5176 * @returns {*} Returns the resolved value.
5177 */
5178 function baseGet(object, path) {
5179 path = castPath(path, object);
5180
5181 var index = 0,
5182 length = path.length;
5183
5184 while (object != null && index < length) {
5185 object = object[toKey(path[index++])];
5186 }
5187 return (index && index == length) ? object : undefined;
5188 }
5189
5190 /**
5191 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
5192 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
5193 * symbols of `object`.
5194 *
5195 * @private
5196 * @param {Object} object The object to query.
5197 * @param {Function} keysFunc The function to get the keys of `object`.
5198 * @param {Function} symbolsFunc The function to get the symbols of `object`.
5199 * @returns {Array} Returns the array of property names and symbols.
5200 */
5201 function baseGetAllKeys(object, keysFunc, symbolsFunc) {
5202 var result = keysFunc(object);
5203 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
5204 }
5205
5206 /**
5207 * The base implementation of `getTag` without fallbacks for buggy environments.
5208 *
5209 * @private
5210 * @param {*} value The value to query.
5211 * @returns {string} Returns the `toStringTag`.
5212 */
5213 function baseGetTag(value) {
5214 if (value == null) {
5215 return value === undefined ? undefinedTag : nullTag;
5216 }
5217 return (symToStringTag && symToStringTag in Object(value))
5218 ? getRawTag(value)
5219 : objectToString(value);
5220 }
5221
5222 /**
5223 * The base implementation of `_.gt` which doesn't coerce arguments.
5224 *
5225 * @private
5226 * @param {*} value The value to compare.
5227 * @param {*} other The other value to compare.
5228 * @returns {boolean} Returns `true` if `value` is greater than `other`,
5229 * else `false`.
5230 */
5231 function baseGt(value, other) {
5232 return value > other;
5233 }
5234
5235 /**
5236 * The base implementation of `_.has` without support for deep paths.
5237 *
5238 * @private
5239 * @param {Object} [object] The object to query.
5240 * @param {Array|string} key The key to check.
5241 * @returns {boolean} Returns `true` if `key` exists, else `false`.
5242 */
5243 function baseHas(object, key) {
5244 return object != null && hasOwnProperty.call(object, key);
5245 }
5246
5247 /**
5248 * The base implementation of `_.hasIn` without support for deep paths.
5249 *
5250 * @private
5251 * @param {Object} [object] The object to query.
5252 * @param {Array|string} key The key to check.
5253 * @returns {boolean} Returns `true` if `key` exists, else `false`.
5254 */
5255 function baseHasIn(object, key) {
5256 return object != null && key in Object(object);
5257 }
5258
5259 /**
5260 * The base implementation of `_.inRange` which doesn't coerce arguments.
5261 *
5262 * @private
5263 * @param {number} number The number to check.
5264 * @param {number} start The start of the range.
5265 * @param {number} end The end of the range.
5266 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
5267 */
5268 function baseInRange(number, start, end) {
5269 return number >= nativeMin(start, end) && number < nativeMax(start, end);
5270 }
5271
5272 /**
5273 * The base implementation of methods like `_.intersection`, without support
5274 * for iteratee shorthands, that accepts an array of arrays to inspect.
5275 *
5276 * @private
5277 * @param {Array} arrays The arrays to inspect.
5278 * @param {Function} [iteratee] The iteratee invoked per element.
5279 * @param {Function} [comparator] The comparator invoked per element.
5280 * @returns {Array} Returns the new array of shared values.
5281 */
5282 function baseIntersection(arrays, iteratee, comparator) {
5283 var includes = comparator ? arrayIncludesWith : arrayIncludes,
5284 length = arrays[0].length,
5285 othLength = arrays.length,
5286 othIndex = othLength,
5287 caches = Array(othLength),
5288 maxLength = Infinity,
5289 result = [];
5290
5291 while (othIndex--) {
5292 var array = arrays[othIndex];
5293 if (othIndex && iteratee) {
5294 array = arrayMap(array, baseUnary(iteratee));
5295 }
5296 maxLength = nativeMin(array.length, maxLength);
5297 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
5298 ? new SetCache(othIndex && array)
5299 : undefined;
5300 }
5301 array = arrays[0];
5302
5303 var index = -1,
5304 seen = caches[0];
5305
5306 outer:
5307 while (++index < length && result.length < maxLength) {
5308 var value = array[index],
5309 computed = iteratee ? iteratee(value) : value;
5310
5311 value = (comparator || value !== 0) ? value : 0;
5312 if (!(seen
5313 ? cacheHas(seen, computed)
5314 : includes(result, computed, comparator)
5315 )) {
5316 othIndex = othLength;
5317 while (--othIndex) {
5318 var cache = caches[othIndex];
5319 if (!(cache
5320 ? cacheHas(cache, computed)
5321 : includes(arrays[othIndex], computed, comparator))
5322 ) {
5323 continue outer;
5324 }
5325 }
5326 if (seen) {
5327 seen.push(computed);
5328 }
5329 result.push(value);
5330 }
5331 }
5332 return result;
5333 }
5334
5335 /**
5336 * The base implementation of `_.invert` and `_.invertBy` which inverts
5337 * `object` with values transformed by `iteratee` and set by `setter`.
5338 *
5339 * @private
5340 * @param {Object} object The object to iterate over.
5341 * @param {Function} setter The function to set `accumulator` values.
5342 * @param {Function} iteratee The iteratee to transform values.
5343 * @param {Object} accumulator The initial inverted object.
5344 * @returns {Function} Returns `accumulator`.
5345 */
5346 function baseInverter(object, setter, iteratee, accumulator) {
5347 baseForOwn(object, function(value, key, object) {
5348 setter(accumulator, iteratee(value), key, object);
5349 });
5350 return accumulator;
5351 }
5352
5353 /**
5354 * The base implementation of `_.invoke` without support for individual
5355 * method arguments.
5356 *
5357 * @private
5358 * @param {Object} object The object to query.
5359 * @param {Array|string} path The path of the method to invoke.
5360 * @param {Array} args The arguments to invoke the method with.
5361 * @returns {*} Returns the result of the invoked method.
5362 */
5363 function baseInvoke(object, path, args) {
5364 path = castPath(path, object);
5365 object = parent(object, path);
5366 var func = object == null ? object : object[toKey(last(path))];
5367 return func == null ? undefined : apply(func, object, args);
5368 }
5369
5370 /**
5371 * The base implementation of `_.isArguments`.
5372 *
5373 * @private
5374 * @param {*} value The value to check.
5375 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
5376 */
5377 function baseIsArguments(value) {
5378 return isObjectLike(value) && baseGetTag(value) == argsTag;
5379 }
5380
5381 /**
5382 * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
5383 *
5384 * @private
5385 * @param {*} value The value to check.
5386 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
5387 */
5388 function baseIsArrayBuffer(value) {
5389 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
5390 }
5391
5392 /**
5393 * The base implementation of `_.isDate` without Node.js optimizations.
5394 *
5395 * @private
5396 * @param {*} value The value to check.
5397 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
5398 */
5399 function baseIsDate(value) {
5400 return isObjectLike(value) && baseGetTag(value) == dateTag;
5401 }
5402
5403 /**
5404 * The base implementation of `_.isEqual` which supports partial comparisons
5405 * and tracks traversed objects.
5406 *
5407 * @private
5408 * @param {*} value The value to compare.
5409 * @param {*} other The other value to compare.
5410 * @param {boolean} bitmask The bitmask flags.
5411 * 1 - Unordered comparison
5412 * 2 - Partial comparison
5413 * @param {Function} [customizer] The function to customize comparisons.
5414 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
5415 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
5416 */
5417 function baseIsEqual(value, other, bitmask, customizer, stack) {
5418 if (value === other) {
5419 return true;
5420 }
5421 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
5422 return value !== value && other !== other;
5423 }
5424 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
5425 }
5426
5427 /**
5428 * A specialized version of `baseIsEqual` for arrays and objects which performs
5429 * deep comparisons and tracks traversed objects enabling objects with circular
5430 * references to be compared.
5431 *
5432 * @private
5433 * @param {Object} object The object to compare.
5434 * @param {Object} other The other object to compare.
5435 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
5436 * @param {Function} customizer The function to customize comparisons.
5437 * @param {Function} equalFunc The function to determine equivalents of values.
5438 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
5439 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
5440 */
5441 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
5442 var objIsArr = isArray(object),
5443 othIsArr = isArray(other),
5444 objTag = objIsArr ? arrayTag : getTag(object),
5445 othTag = othIsArr ? arrayTag : getTag(other);
5446
5447 objTag = objTag == argsTag ? objectTag : objTag;
5448 othTag = othTag == argsTag ? objectTag : othTag;
5449
5450 var objIsObj = objTag == objectTag,
5451 othIsObj = othTag == objectTag,
5452 isSameTag = objTag == othTag;
5453
5454 if (isSameTag && isBuffer(object)) {
5455 if (!isBuffer(other)) {
5456 return false;
5457 }
5458 objIsArr = true;
5459 objIsObj = false;
5460 }
5461 if (isSameTag && !objIsObj) {
5462 stack || (stack = new Stack);
5463 return (objIsArr || isTypedArray(object))
5464 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
5465 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
5466 }
5467 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
5468 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
5469 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
5470
5471 if (objIsWrapped || othIsWrapped) {
5472 var objUnwrapped = objIsWrapped ? object.value() : object,
5473 othUnwrapped = othIsWrapped ? other.value() : other;
5474
5475 stack || (stack = new Stack);
5476 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
5477 }
5478 }
5479 if (!isSameTag) {
5480 return false;
5481 }
5482 stack || (stack = new Stack);
5483 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
5484 }
5485
5486 /**
5487 * The base implementation of `_.isMap` without Node.js optimizations.
5488 *
5489 * @private
5490 * @param {*} value The value to check.
5491 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
5492 */
5493 function baseIsMap(value) {
5494 return isObjectLike(value) && getTag(value) == mapTag;
5495 }
5496
5497 /**
5498 * The base implementation of `_.isMatch` without support for iteratee shorthands.
5499 *
5500 * @private
5501 * @param {Object} object The object to inspect.
5502 * @param {Object} source The object of property values to match.
5503 * @param {Array} matchData The property names, values, and compare flags to match.
5504 * @param {Function} [customizer] The function to customize comparisons.
5505 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
5506 */
5507 function baseIsMatch(object, source, matchData, customizer) {
5508 var index = matchData.length,
5509 length = index,
5510 noCustomizer = !customizer;
5511
5512 if (object == null) {
5513 return !length;
5514 }
5515 object = Object(object);
5516 while (index--) {
5517 var data = matchData[index];
5518 if ((noCustomizer && data[2])
5519 ? data[1] !== object[data[0]]
5520 : !(data[0] in object)
5521 ) {
5522 return false;
5523 }
5524 }
5525 while (++index < length) {
5526 data = matchData[index];
5527 var key = data[0],
5528 objValue = object[key],
5529 srcValue = data[1];
5530
5531 if (noCustomizer && data[2]) {
5532 if (objValue === undefined && !(key in object)) {
5533 return false;
5534 }
5535 } else {
5536 var stack = new Stack;
5537 if (customizer) {
5538 var result = customizer(objValue, srcValue, key, object, source, stack);
5539 }
5540 if (!(result === undefined
5541 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
5542 : result
5543 )) {
5544 return false;
5545 }
5546 }
5547 }
5548 return true;
5549 }
5550
5551 /**
5552 * The base implementation of `_.isNative` without bad shim checks.
5553 *
5554 * @private
5555 * @param {*} value The value to check.
5556 * @returns {boolean} Returns `true` if `value` is a native function,
5557 * else `false`.
5558 */
5559 function baseIsNative(value) {
5560 if (!isObject(value) || isMasked(value)) {
5561 return false;
5562 }
5563 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
5564 return pattern.test(toSource(value));
5565 }
5566
5567 /**
5568 * The base implementation of `_.isRegExp` without Node.js optimizations.
5569 *
5570 * @private
5571 * @param {*} value The value to check.
5572 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
5573 */
5574 function baseIsRegExp(value) {
5575 return isObjectLike(value) && baseGetTag(value) == regexpTag;
5576 }
5577
5578 /**
5579 * The base implementation of `_.isSet` without Node.js optimizations.
5580 *
5581 * @private
5582 * @param {*} value The value to check.
5583 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
5584 */
5585 function baseIsSet(value) {
5586 return isObjectLike(value) && getTag(value) == setTag;
5587 }
5588
5589 /**
5590 * The base implementation of `_.isTypedArray` without Node.js optimizations.
5591 *
5592 * @private
5593 * @param {*} value The value to check.
5594 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
5595 */
5596 function baseIsTypedArray(value) {
5597 return isObjectLike(value) &&
5598 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
5599 }
5600
5601 /**
5602 * The base implementation of `_.iteratee`.
5603 *
5604 * @private
5605 * @param {*} [value=_.identity] The value to convert to an iteratee.
5606 * @returns {Function} Returns the iteratee.
5607 */
5608 function baseIteratee(value) {
5609 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
5610 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
5611 if (typeof value == 'function') {
5612 return value;
5613 }
5614 if (value == null) {
5615 return identity;
5616 }
5617 if (typeof value == 'object') {
5618 return isArray(value)
5619 ? baseMatchesProperty(value[0], value[1])
5620 : baseMatches(value);
5621 }
5622 return property(value);
5623 }
5624
5625 /**
5626 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
5627 *
5628 * @private
5629 * @param {Object} object The object to query.
5630 * @returns {Array} Returns the array of property names.
5631 */
5632 function baseKeys(object) {
5633 if (!isPrototype(object)) {
5634 return nativeKeys(object);
5635 }
5636 var result = [];
5637 for (var key in Object(object)) {
5638 if (hasOwnProperty.call(object, key) && key != 'constructor') {
5639 result.push(key);
5640 }
5641 }
5642 return result;
5643 }
5644
5645 /**
5646 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
5647 *
5648 * @private
5649 * @param {Object} object The object to query.
5650 * @returns {Array} Returns the array of property names.
5651 */
5652 function baseKeysIn(object) {
5653 if (!isObject(object)) {
5654 return nativeKeysIn(object);
5655 }
5656 var isProto = isPrototype(object),
5657 result = [];
5658
5659 for (var key in object) {
5660 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
5661 result.push(key);
5662 }
5663 }
5664 return result;
5665 }
5666
5667 /**
5668 * The base implementation of `_.lt` which doesn't coerce arguments.
5669 *
5670 * @private
5671 * @param {*} value The value to compare.
5672 * @param {*} other The other value to compare.
5673 * @returns {boolean} Returns `true` if `value` is less than `other`,
5674 * else `false`.
5675 */
5676 function baseLt(value, other) {
5677 return value < other;
5678 }
5679
5680 /**
5681 * The base implementation of `_.map` without support for iteratee shorthands.
5682 *
5683 * @private
5684 * @param {Array|Object} collection The collection to iterate over.
5685 * @param {Function} iteratee The function invoked per iteration.
5686 * @returns {Array} Returns the new mapped array.
5687 */
5688 function baseMap(collection, iteratee) {
5689 var index = -1,
5690 result = isArrayLike(collection) ? Array(collection.length) : [];
5691
5692 baseEach(collection, function(value, key, collection) {
5693 result[++index] = iteratee(value, key, collection);
5694 });
5695 return result;
5696 }
5697
5698 /**
5699 * The base implementation of `_.matches` which doesn't clone `source`.
5700 *
5701 * @private
5702 * @param {Object} source The object of property values to match.
5703 * @returns {Function} Returns the new spec function.
5704 */
5705 function baseMatches(source) {
5706 var matchData = getMatchData(source);
5707 if (matchData.length == 1 && matchData[0][2]) {
5708 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
5709 }
5710 return function(object) {
5711 return object === source || baseIsMatch(object, source, matchData);
5712 };
5713 }
5714
5715 /**
5716 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
5717 *
5718 * @private
5719 * @param {string} path The path of the property to get.
5720 * @param {*} srcValue The value to match.
5721 * @returns {Function} Returns the new spec function.
5722 */
5723 function baseMatchesProperty(path, srcValue) {
5724 if (isKey(path) && isStrictComparable(srcValue)) {
5725 return matchesStrictComparable(toKey(path), srcValue);
5726 }
5727 return function(object) {
5728 var objValue = get(object, path);
5729 return (objValue === undefined && objValue === srcValue)
5730 ? hasIn(object, path)
5731 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
5732 };
5733 }
5734
5735 /**
5736 * The base implementation of `_.merge` without support for multiple sources.
5737 *
5738 * @private
5739 * @param {Object} object The destination object.
5740 * @param {Object} source The source object.
5741 * @param {number} srcIndex The index of `source`.
5742 * @param {Function} [customizer] The function to customize merged values.
5743 * @param {Object} [stack] Tracks traversed source values and their merged
5744 * counterparts.
5745 */
5746 function baseMerge(object, source, srcIndex, customizer, stack) {
5747 if (object === source) {
5748 return;
5749 }
5750 baseFor(source, function(srcValue, key) {
5751 if (isObject(srcValue)) {
5752 stack || (stack = new Stack);
5753 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
5754 }
5755 else {
5756 var newValue = customizer
5757 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
5758 : undefined;
5759
5760 if (newValue === undefined) {
5761 newValue = srcValue;
5762 }
5763 assignMergeValue(object, key, newValue);
5764 }
5765 }, keysIn);
5766 }
5767
5768 /**
5769 * A specialized version of `baseMerge` for arrays and objects which performs
5770 * deep merges and tracks traversed objects enabling objects with circular
5771 * references to be merged.
5772 *
5773 * @private
5774 * @param {Object} object The destination object.
5775 * @param {Object} source The source object.
5776 * @param {string} key The key of the value to merge.
5777 * @param {number} srcIndex The index of `source`.
5778 * @param {Function} mergeFunc The function to merge values.
5779 * @param {Function} [customizer] The function to customize assigned values.
5780 * @param {Object} [stack] Tracks traversed source values and their merged
5781 * counterparts.
5782 */
5783 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
5784 var objValue = safeGet(object, key),
5785 srcValue = safeGet(source, key),
5786 stacked = stack.get(srcValue);
5787
5788 if (stacked) {
5789 assignMergeValue(object, key, stacked);
5790 return;
5791 }
5792 var newValue = customizer
5793 ? customizer(objValue, srcValue, (key + ''), object, source, stack)
5794 : undefined;
5795
5796 var isCommon = newValue === undefined;
5797
5798 if (isCommon) {
5799 var isArr = isArray(srcValue),
5800 isBuff = !isArr && isBuffer(srcValue),
5801 isTyped = !isArr && !isBuff && isTypedArray(srcValue);
5802
5803 newValue = srcValue;
5804 if (isArr || isBuff || isTyped) {
5805 if (isArray(objValue)) {
5806 newValue = objValue;
5807 }
5808 else if (isArrayLikeObject(objValue)) {
5809 newValue = copyArray(objValue);
5810 }
5811 else if (isBuff) {
5812 isCommon = false;
5813 newValue = cloneBuffer(srcValue, true);
5814 }
5815 else if (isTyped) {
5816 isCommon = false;
5817 newValue = cloneTypedArray(srcValue, true);
5818 }
5819 else {
5820 newValue = [];
5821 }
5822 }
5823 else if (isPlainObject(srcValue) || isArguments(srcValue)) {
5824 newValue = objValue;
5825 if (isArguments(objValue)) {
5826 newValue = toPlainObject(objValue);
5827 }
5828 else if (!isObject(objValue) || isFunction(objValue)) {
5829 newValue = initCloneObject(srcValue);
5830 }
5831 }
5832 else {
5833 isCommon = false;
5834 }
5835 }
5836 if (isCommon) {
5837 // Recursively merge objects and arrays (susceptible to call stack limits).
5838 stack.set(srcValue, newValue);
5839 mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
5840 stack['delete'](srcValue);
5841 }
5842 assignMergeValue(object, key, newValue);
5843 }
5844
5845 /**
5846 * The base implementation of `_.nth` which doesn't coerce arguments.
5847 *
5848 * @private
5849 * @param {Array} array The array to query.
5850 * @param {number} n The index of the element to return.
5851 * @returns {*} Returns the nth element of `array`.
5852 */
5853 function baseNth(array, n) {
5854 var length = array.length;
5855 if (!length) {
5856 return;
5857 }
5858 n += n < 0 ? length : 0;
5859 return isIndex(n, length) ? array[n] : undefined;
5860 }
5861
5862 /**
5863 * The base implementation of `_.orderBy` without param guards.
5864 *
5865 * @private
5866 * @param {Array|Object} collection The collection to iterate over.
5867 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
5868 * @param {string[]} orders The sort orders of `iteratees`.
5869 * @returns {Array} Returns the new sorted array.
5870 */
5871 function baseOrderBy(collection, iteratees, orders) {
5872 var index = -1;
5873 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
5874
5875 var result = baseMap(collection, function(value, key, collection) {
5876 var criteria = arrayMap(iteratees, function(iteratee) {
5877 return iteratee(value);
5878 });
5879 return { 'criteria': criteria, 'index': ++index, 'value': value };
5880 });
5881
5882 return baseSortBy(result, function(object, other) {
5883 return compareMultiple(object, other, orders);
5884 });
5885 }
5886
5887 /**
5888 * The base implementation of `_.pick` without support for individual
5889 * property identifiers.
5890 *
5891 * @private
5892 * @param {Object} object The source object.
5893 * @param {string[]} paths The property paths to pick.
5894 * @returns {Object} Returns the new object.
5895 */
5896 function basePick(object, paths) {
5897 return basePickBy(object, paths, function(value, path) {
5898 return hasIn(object, path);
5899 });
5900 }
5901
5902 /**
5903 * The base implementation of `_.pickBy` without support for iteratee shorthands.
5904 *
5905 * @private
5906 * @param {Object} object The source object.
5907 * @param {string[]} paths The property paths to pick.
5908 * @param {Function} predicate The function invoked per property.
5909 * @returns {Object} Returns the new object.
5910 */
5911 function basePickBy(object, paths, predicate) {
5912 var index = -1,
5913 length = paths.length,
5914 result = {};
5915
5916 while (++index < length) {
5917 var path = paths[index],
5918 value = baseGet(object, path);
5919
5920 if (predicate(value, path)) {
5921 baseSet(result, castPath(path, object), value);
5922 }
5923 }
5924 return result;
5925 }
5926
5927 /**
5928 * A specialized version of `baseProperty` which supports deep paths.
5929 *
5930 * @private
5931 * @param {Array|string} path The path of the property to get.
5932 * @returns {Function} Returns the new accessor function.
5933 */
5934 function basePropertyDeep(path) {
5935 return function(object) {
5936 return baseGet(object, path);
5937 };
5938 }
5939
5940 /**
5941 * The base implementation of `_.pullAllBy` without support for iteratee
5942 * shorthands.
5943 *
5944 * @private
5945 * @param {Array} array The array to modify.
5946 * @param {Array} values The values to remove.
5947 * @param {Function} [iteratee] The iteratee invoked per element.
5948 * @param {Function} [comparator] The comparator invoked per element.
5949 * @returns {Array} Returns `array`.
5950 */
5951 function basePullAll(array, values, iteratee, comparator) {
5952 var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
5953 index = -1,
5954 length = values.length,
5955 seen = array;
5956
5957 if (array === values) {
5958 values = copyArray(values);
5959 }
5960 if (iteratee) {
5961 seen = arrayMap(array, baseUnary(iteratee));
5962 }
5963 while (++index < length) {
5964 var fromIndex = 0,
5965 value = values[index],
5966 computed = iteratee ? iteratee(value) : value;
5967
5968 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
5969 if (seen !== array) {
5970 splice.call(seen, fromIndex, 1);
5971 }
5972 splice.call(array, fromIndex, 1);
5973 }
5974 }
5975 return array;
5976 }
5977
5978 /**
5979 * The base implementation of `_.pullAt` without support for individual
5980 * indexes or capturing the removed elements.
5981 *
5982 * @private
5983 * @param {Array} array The array to modify.
5984 * @param {number[]} indexes The indexes of elements to remove.
5985 * @returns {Array} Returns `array`.
5986 */
5987 function basePullAt(array, indexes) {
5988 var length = array ? indexes.length : 0,
5989 lastIndex = length - 1;
5990
5991 while (length--) {
5992 var index = indexes[length];
5993 if (length == lastIndex || index !== previous) {
5994 var previous = index;
5995 if (isIndex(index)) {
5996 splice.call(array, index, 1);
5997 } else {
5998 baseUnset(array, index);
5999 }
6000 }
6001 }
6002 return array;
6003 }
6004
6005 /**
6006 * The base implementation of `_.random` without support for returning
6007 * floating-point numbers.
6008 *
6009 * @private
6010 * @param {number} lower The lower bound.
6011 * @param {number} upper The upper bound.
6012 * @returns {number} Returns the random number.
6013 */
6014 function baseRandom(lower, upper) {
6015 return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
6016 }
6017
6018 /**
6019 * The base implementation of `_.range` and `_.rangeRight` which doesn't
6020 * coerce arguments.
6021 *
6022 * @private
6023 * @param {number} start The start of the range.
6024 * @param {number} end The end of the range.
6025 * @param {number} step The value to increment or decrement by.
6026 * @param {boolean} [fromRight] Specify iterating from right to left.
6027 * @returns {Array} Returns the range of numbers.
6028 */
6029 function baseRange(start, end, step, fromRight) {
6030 var index = -1,
6031 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
6032 result = Array(length);
6033
6034 while (length--) {
6035 result[fromRight ? length : ++index] = start;
6036 start += step;
6037 }
6038 return result;
6039 }
6040
6041 /**
6042 * The base implementation of `_.repeat` which doesn't coerce arguments.
6043 *
6044 * @private
6045 * @param {string} string The string to repeat.
6046 * @param {number} n The number of times to repeat the string.
6047 * @returns {string} Returns the repeated string.
6048 */
6049 function baseRepeat(string, n) {
6050 var result = '';
6051 if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
6052 return result;
6053 }
6054 // Leverage the exponentiation by squaring algorithm for a faster repeat.
6055 // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
6056 do {
6057 if (n % 2) {
6058 result += string;
6059 }
6060 n = nativeFloor(n / 2);
6061 if (n) {
6062 string += string;
6063 }
6064 } while (n);
6065
6066 return result;
6067 }
6068
6069 /**
6070 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
6071 *
6072 * @private
6073 * @param {Function} func The function to apply a rest parameter to.
6074 * @param {number} [start=func.length-1] The start position of the rest parameter.
6075 * @returns {Function} Returns the new function.
6076 */
6077 function baseRest(func, start) {
6078 return setToString(overRest(func, start, identity), func + '');
6079 }
6080
6081 /**
6082 * The base implementation of `_.sample`.
6083 *
6084 * @private
6085 * @param {Array|Object} collection The collection to sample.
6086 * @returns {*} Returns the random element.
6087 */
6088 function baseSample(collection) {
6089 return arraySample(values(collection));
6090 }
6091
6092 /**
6093 * The base implementation of `_.sampleSize` without param guards.
6094 *
6095 * @private
6096 * @param {Array|Object} collection The collection to sample.
6097 * @param {number} n The number of elements to sample.
6098 * @returns {Array} Returns the random elements.
6099 */
6100 function baseSampleSize(collection, n) {
6101 var array = values(collection);
6102 return shuffleSelf(array, baseClamp(n, 0, array.length));
6103 }
6104
6105 /**
6106 * The base implementation of `_.set`.
6107 *
6108 * @private
6109 * @param {Object} object The object to modify.
6110 * @param {Array|string} path The path of the property to set.
6111 * @param {*} value The value to set.
6112 * @param {Function} [customizer] The function to customize path creation.
6113 * @returns {Object} Returns `object`.
6114 */
6115 function baseSet(object, path, value, customizer) {
6116 if (!isObject(object)) {
6117 return object;
6118 }
6119 path = castPath(path, object);
6120
6121 var index = -1,
6122 length = path.length,
6123 lastIndex = length - 1,
6124 nested = object;
6125
6126 while (nested != null && ++index < length) {
6127 var key = toKey(path[index]),
6128 newValue = value;
6129
6130 if (index != lastIndex) {
6131 var objValue = nested[key];
6132 newValue = customizer ? customizer(objValue, key, nested) : undefined;
6133 if (newValue === undefined) {
6134 newValue = isObject(objValue)
6135 ? objValue
6136 : (isIndex(path[index + 1]) ? [] : {});
6137 }
6138 }
6139 assignValue(nested, key, newValue);
6140 nested = nested[key];
6141 }
6142 return object;
6143 }
6144
6145 /**
6146 * The base implementation of `setData` without support for hot loop shorting.
6147 *
6148 * @private
6149 * @param {Function} func The function to associate metadata with.
6150 * @param {*} data The metadata.
6151 * @returns {Function} Returns `func`.
6152 */
6153 var baseSetData = !metaMap ? identity : function(func, data) {
6154 metaMap.set(func, data);
6155 return func;
6156 };
6157
6158 /**
6159 * The base implementation of `setToString` without support for hot loop shorting.
6160 *
6161 * @private
6162 * @param {Function} func The function to modify.
6163 * @param {Function} string The `toString` result.
6164 * @returns {Function} Returns `func`.
6165 */
6166 var baseSetToString = !defineProperty ? identity : function(func, string) {
6167 return defineProperty(func, 'toString', {
6168 'configurable': true,
6169 'enumerable': false,
6170 'value': constant(string),
6171 'writable': true
6172 });
6173 };
6174
6175 /**
6176 * The base implementation of `_.shuffle`.
6177 *
6178 * @private
6179 * @param {Array|Object} collection The collection to shuffle.
6180 * @returns {Array} Returns the new shuffled array.
6181 */
6182 function baseShuffle(collection) {
6183 return shuffleSelf(values(collection));
6184 }
6185
6186 /**
6187 * The base implementation of `_.slice` without an iteratee call guard.
6188 *
6189 * @private
6190 * @param {Array} array The array to slice.
6191 * @param {number} [start=0] The start position.
6192 * @param {number} [end=array.length] The end position.
6193 * @returns {Array} Returns the slice of `array`.
6194 */
6195 function baseSlice(array, start, end) {
6196 var index = -1,
6197 length = array.length;
6198
6199 if (start < 0) {
6200 start = -start > length ? 0 : (length + start);
6201 }
6202 end = end > length ? length : end;
6203 if (end < 0) {
6204 end += length;
6205 }
6206 length = start > end ? 0 : ((end - start) >>> 0);
6207 start >>>= 0;
6208
6209 var result = Array(length);
6210 while (++index < length) {
6211 result[index] = array[index + start];
6212 }
6213 return result;
6214 }
6215
6216 /**
6217 * The base implementation of `_.some` without support for iteratee shorthands.
6218 *
6219 * @private
6220 * @param {Array|Object} collection The collection to iterate over.
6221 * @param {Function} predicate The function invoked per iteration.
6222 * @returns {boolean} Returns `true` if any element passes the predicate check,
6223 * else `false`.
6224 */
6225 function baseSome(collection, predicate) {
6226 var result;
6227
6228 baseEach(collection, function(value, index, collection) {
6229 result = predicate(value, index, collection);
6230 return !result;
6231 });
6232 return !!result;
6233 }
6234
6235 /**
6236 * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
6237 * performs a binary search of `array` to determine the index at which `value`
6238 * should be inserted into `array` in order to maintain its sort order.
6239 *
6240 * @private
6241 * @param {Array} array The sorted array to inspect.
6242 * @param {*} value The value to evaluate.
6243 * @param {boolean} [retHighest] Specify returning the highest qualified index.
6244 * @returns {number} Returns the index at which `value` should be inserted
6245 * into `array`.
6246 */
6247 function baseSortedIndex(array, value, retHighest) {
6248 var low = 0,
6249 high = array == null ? low : array.length;
6250
6251 if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
6252 while (low < high) {
6253 var mid = (low + high) >>> 1,
6254 computed = array[mid];
6255
6256 if (computed !== null && !isSymbol(computed) &&
6257 (retHighest ? (computed <= value) : (computed < value))) {
6258 low = mid + 1;
6259 } else {
6260 high = mid;
6261 }
6262 }
6263 return high;
6264 }
6265 return baseSortedIndexBy(array, value, identity, retHighest);
6266 }
6267
6268 /**
6269 * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
6270 * which invokes `iteratee` for `value` and each element of `array` to compute
6271 * their sort ranking. The iteratee is invoked with one argument; (value).
6272 *
6273 * @private
6274 * @param {Array} array The sorted array to inspect.
6275 * @param {*} value The value to evaluate.
6276 * @param {Function} iteratee The iteratee invoked per element.
6277 * @param {boolean} [retHighest] Specify returning the highest qualified index.
6278 * @returns {number} Returns the index at which `value` should be inserted
6279 * into `array`.
6280 */
6281 function baseSortedIndexBy(array, value, iteratee, retHighest) {
6282 value = iteratee(value);
6283
6284 var low = 0,
6285 high = array == null ? 0 : array.length,
6286 valIsNaN = value !== value,
6287 valIsNull = value === null,
6288 valIsSymbol = isSymbol(value),
6289 valIsUndefined = value === undefined;
6290
6291 while (low < high) {
6292 var mid = nativeFloor((low + high) / 2),
6293 computed = iteratee(array[mid]),
6294 othIsDefined = computed !== undefined,
6295 othIsNull = computed === null,
6296 othIsReflexive = computed === computed,
6297 othIsSymbol = isSymbol(computed);
6298
6299 if (valIsNaN) {
6300 var setLow = retHighest || othIsReflexive;
6301 } else if (valIsUndefined) {
6302 setLow = othIsReflexive && (retHighest || othIsDefined);
6303 } else if (valIsNull) {
6304 setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
6305 } else if (valIsSymbol) {
6306 setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
6307 } else if (othIsNull || othIsSymbol) {
6308 setLow = false;
6309 } else {
6310 setLow = retHighest ? (computed <= value) : (computed < value);
6311 }
6312 if (setLow) {
6313 low = mid + 1;
6314 } else {
6315 high = mid;
6316 }
6317 }
6318 return nativeMin(high, MAX_ARRAY_INDEX);
6319 }
6320
6321 /**
6322 * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
6323 * support for iteratee shorthands.
6324 *
6325 * @private
6326 * @param {Array} array The array to inspect.
6327 * @param {Function} [iteratee] The iteratee invoked per element.
6328 * @returns {Array} Returns the new duplicate free array.
6329 */
6330 function baseSortedUniq(array, iteratee) {
6331 var index = -1,
6332 length = array.length,
6333 resIndex = 0,
6334 result = [];
6335
6336 while (++index < length) {
6337 var value = array[index],
6338 computed = iteratee ? iteratee(value) : value;
6339
6340 if (!index || !eq(computed, seen)) {
6341 var seen = computed;
6342 result[resIndex++] = value === 0 ? 0 : value;
6343 }
6344 }
6345 return result;
6346 }
6347
6348 /**
6349 * The base implementation of `_.toNumber` which doesn't ensure correct
6350 * conversions of binary, hexadecimal, or octal string values.
6351 *
6352 * @private
6353 * @param {*} value The value to process.
6354 * @returns {number} Returns the number.
6355 */
6356 function baseToNumber(value) {
6357 if (typeof value == 'number') {
6358 return value;
6359 }
6360 if (isSymbol(value)) {
6361 return NAN;
6362 }
6363 return +value;
6364 }
6365
6366 /**
6367 * The base implementation of `_.toString` which doesn't convert nullish
6368 * values to empty strings.
6369 *
6370 * @private
6371 * @param {*} value The value to process.
6372 * @returns {string} Returns the string.
6373 */
6374 function baseToString(value) {
6375 // Exit early for strings to avoid a performance hit in some environments.
6376 if (typeof value == 'string') {
6377 return value;
6378 }
6379 if (isArray(value)) {
6380 // Recursively convert values (susceptible to call stack limits).
6381 return arrayMap(value, baseToString) + '';
6382 }
6383 if (isSymbol(value)) {
6384 return symbolToString ? symbolToString.call(value) : '';
6385 }
6386 var result = (value + '');
6387 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
6388 }
6389
6390 /**
6391 * The base implementation of `_.uniqBy` without support for iteratee shorthands.
6392 *
6393 * @private
6394 * @param {Array} array The array to inspect.
6395 * @param {Function} [iteratee] The iteratee invoked per element.
6396 * @param {Function} [comparator] The comparator invoked per element.
6397 * @returns {Array} Returns the new duplicate free array.
6398 */
6399 function baseUniq(array, iteratee, comparator) {
6400 var index = -1,
6401 includes = arrayIncludes,
6402 length = array.length,
6403 isCommon = true,
6404 result = [],
6405 seen = result;
6406
6407 if (comparator) {
6408 isCommon = false;
6409 includes = arrayIncludesWith;
6410 }
6411 else if (length >= LARGE_ARRAY_SIZE) {
6412 var set = iteratee ? null : createSet(array);
6413 if (set) {
6414 return setToArray(set);
6415 }
6416 isCommon = false;
6417 includes = cacheHas;
6418 seen = new SetCache;
6419 }
6420 else {
6421 seen = iteratee ? [] : result;
6422 }
6423 outer:
6424 while (++index < length) {
6425 var value = array[index],
6426 computed = iteratee ? iteratee(value) : value;
6427
6428 value = (comparator || value !== 0) ? value : 0;
6429 if (isCommon && computed === computed) {
6430 var seenIndex = seen.length;
6431 while (seenIndex--) {
6432 if (seen[seenIndex] === computed) {
6433 continue outer;
6434 }
6435 }
6436 if (iteratee) {
6437 seen.push(computed);
6438 }
6439 result.push(value);
6440 }
6441 else if (!includes(seen, computed, comparator)) {
6442 if (seen !== result) {
6443 seen.push(computed);
6444 }
6445 result.push(value);
6446 }
6447 }
6448 return result;
6449 }
6450
6451 /**
6452 * The base implementation of `_.unset`.
6453 *
6454 * @private
6455 * @param {Object} object The object to modify.
6456 * @param {Array|string} path The property path to unset.
6457 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
6458 */
6459 function baseUnset(object, path) {
6460 path = castPath(path, object);
6461 object = parent(object, path);
6462 return object == null || delete object[toKey(last(path))];
6463 }
6464
6465 /**
6466 * The base implementation of `_.update`.
6467 *
6468 * @private
6469 * @param {Object} object The object to modify.
6470 * @param {Array|string} path The path of the property to update.
6471 * @param {Function} updater The function to produce the updated value.
6472 * @param {Function} [customizer] The function to customize path creation.
6473 * @returns {Object} Returns `object`.
6474 */
6475 function baseUpdate(object, path, updater, customizer) {
6476 return baseSet(object, path, updater(baseGet(object, path)), customizer);
6477 }
6478
6479 /**
6480 * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
6481 * without support for iteratee shorthands.
6482 *
6483 * @private
6484 * @param {Array} array The array to query.
6485 * @param {Function} predicate The function invoked per iteration.
6486 * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
6487 * @param {boolean} [fromRight] Specify iterating from right to left.
6488 * @returns {Array} Returns the slice of `array`.
6489 */
6490 function baseWhile(array, predicate, isDrop, fromRight) {
6491 var length = array.length,
6492 index = fromRight ? length : -1;
6493
6494 while ((fromRight ? index-- : ++index < length) &&
6495 predicate(array[index], index, array)) {}
6496
6497 return isDrop
6498 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
6499 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
6500 }
6501
6502 /**
6503 * The base implementation of `wrapperValue` which returns the result of
6504 * performing a sequence of actions on the unwrapped `value`, where each
6505 * successive action is supplied the return value of the previous.
6506 *
6507 * @private
6508 * @param {*} value The unwrapped value.
6509 * @param {Array} actions Actions to perform to resolve the unwrapped value.
6510 * @returns {*} Returns the resolved value.
6511 */
6512 function baseWrapperValue(value, actions) {
6513 var result = value;
6514 if (result instanceof LazyWrapper) {
6515 result = result.value();
6516 }
6517 return arrayReduce(actions, function(result, action) {
6518 return action.func.apply(action.thisArg, arrayPush([result], action.args));
6519 }, result);
6520 }
6521
6522 /**
6523 * The base implementation of methods like `_.xor`, without support for
6524 * iteratee shorthands, that accepts an array of arrays to inspect.
6525 *
6526 * @private
6527 * @param {Array} arrays The arrays to inspect.
6528 * @param {Function} [iteratee] The iteratee invoked per element.
6529 * @param {Function} [comparator] The comparator invoked per element.
6530 * @returns {Array} Returns the new array of values.
6531 */
6532 function baseXor(arrays, iteratee, comparator) {
6533 var length = arrays.length;
6534 if (length < 2) {
6535 return length ? baseUniq(arrays[0]) : [];
6536 }
6537 var index = -1,
6538 result = Array(length);
6539
6540 while (++index < length) {
6541 var array = arrays[index],
6542 othIndex = -1;
6543
6544 while (++othIndex < length) {
6545 if (othIndex != index) {
6546 result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
6547 }
6548 }
6549 }
6550 return baseUniq(baseFlatten(result, 1), iteratee, comparator);
6551 }
6552
6553 /**
6554 * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
6555 *
6556 * @private
6557 * @param {Array} props The property identifiers.
6558 * @param {Array} values The property values.
6559 * @param {Function} assignFunc The function to assign values.
6560 * @returns {Object} Returns the new object.
6561 */
6562 function baseZipObject(props, values, assignFunc) {
6563 var index = -1,
6564 length = props.length,
6565 valsLength = values.length,
6566 result = {};
6567
6568 while (++index < length) {
6569 var value = index < valsLength ? values[index] : undefined;
6570 assignFunc(result, props[index], value);
6571 }
6572 return result;
6573 }
6574
6575 /**
6576 * Casts `value` to an empty array if it's not an array like object.
6577 *
6578 * @private
6579 * @param {*} value The value to inspect.
6580 * @returns {Array|Object} Returns the cast array-like object.
6581 */
6582 function castArrayLikeObject(value) {
6583 return isArrayLikeObject(value) ? value : [];
6584 }
6585
6586 /**
6587 * Casts `value` to `identity` if it's not a function.
6588 *
6589 * @private
6590 * @param {*} value The value to inspect.
6591 * @returns {Function} Returns cast function.
6592 */
6593 function castFunction(value) {
6594 return typeof value == 'function' ? value : identity;
6595 }
6596
6597 /**
6598 * Casts `value` to a path array if it's not one.
6599 *
6600 * @private
6601 * @param {*} value The value to inspect.
6602 * @param {Object} [object] The object to query keys on.
6603 * @returns {Array} Returns the cast property path array.
6604 */
6605 function castPath(value, object) {
6606 if (isArray(value)) {
6607 return value;
6608 }
6609 return isKey(value, object) ? [value] : stringToPath(toString(value));
6610 }
6611
6612 /**
6613 * A `baseRest` alias which can be replaced with `identity` by module
6614 * replacement plugins.
6615 *
6616 * @private
6617 * @type {Function}
6618 * @param {Function} func The function to apply a rest parameter to.
6619 * @returns {Function} Returns the new function.
6620 */
6621 var castRest = baseRest;
6622
6623 /**
6624 * Casts `array` to a slice if it's needed.
6625 *
6626 * @private
6627 * @param {Array} array The array to inspect.
6628 * @param {number} start The start position.
6629 * @param {number} [end=array.length] The end position.
6630 * @returns {Array} Returns the cast slice.
6631 */
6632 function castSlice(array, start, end) {
6633 var length = array.length;
6634 end = end === undefined ? length : end;
6635 return (!start && end >= length) ? array : baseSlice(array, start, end);
6636 }
6637
6638 /**
6639 * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
6640 *
6641 * @private
6642 * @param {number|Object} id The timer id or timeout object of the timer to clear.
6643 */
6644 var clearTimeout = ctxClearTimeout || function(id) {
6645 return root.clearTimeout(id);
6646 };
6647
6648 /**
6649 * Creates a clone of `buffer`.
6650 *
6651 * @private
6652 * @param {Buffer} buffer The buffer to clone.
6653 * @param {boolean} [isDeep] Specify a deep clone.
6654 * @returns {Buffer} Returns the cloned buffer.
6655 */
6656 function cloneBuffer(buffer, isDeep) {
6657 if (isDeep) {
6658 return buffer.slice();
6659 }
6660 var length = buffer.length,
6661 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
6662
6663 buffer.copy(result);
6664 return result;
6665 }
6666
6667 /**
6668 * Creates a clone of `arrayBuffer`.
6669 *
6670 * @private
6671 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
6672 * @returns {ArrayBuffer} Returns the cloned array buffer.
6673 */
6674 function cloneArrayBuffer(arrayBuffer) {
6675 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
6676 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
6677 return result;
6678 }
6679
6680 /**
6681 * Creates a clone of `dataView`.
6682 *
6683 * @private
6684 * @param {Object} dataView The data view to clone.
6685 * @param {boolean} [isDeep] Specify a deep clone.
6686 * @returns {Object} Returns the cloned data view.
6687 */
6688 function cloneDataView(dataView, isDeep) {
6689 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
6690 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
6691 }
6692
6693 /**
6694 * Creates a clone of `regexp`.
6695 *
6696 * @private
6697 * @param {Object} regexp The regexp to clone.
6698 * @returns {Object} Returns the cloned regexp.
6699 */
6700 function cloneRegExp(regexp) {
6701 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
6702 result.lastIndex = regexp.lastIndex;
6703 return result;
6704 }
6705
6706 /**
6707 * Creates a clone of the `symbol` object.
6708 *
6709 * @private
6710 * @param {Object} symbol The symbol object to clone.
6711 * @returns {Object} Returns the cloned symbol object.
6712 */
6713 function cloneSymbol(symbol) {
6714 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
6715 }
6716
6717 /**
6718 * Creates a clone of `typedArray`.
6719 *
6720 * @private
6721 * @param {Object} typedArray The typed array to clone.
6722 * @param {boolean} [isDeep] Specify a deep clone.
6723 * @returns {Object} Returns the cloned typed array.
6724 */
6725 function cloneTypedArray(typedArray, isDeep) {
6726 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
6727 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
6728 }
6729
6730 /**
6731 * Compares values to sort them in ascending order.
6732 *
6733 * @private
6734 * @param {*} value The value to compare.
6735 * @param {*} other The other value to compare.
6736 * @returns {number} Returns the sort order indicator for `value`.
6737 */
6738 function compareAscending(value, other) {
6739 if (value !== other) {
6740 var valIsDefined = value !== undefined,
6741 valIsNull = value === null,
6742 valIsReflexive = value === value,
6743 valIsSymbol = isSymbol(value);
6744
6745 var othIsDefined = other !== undefined,
6746 othIsNull = other === null,
6747 othIsReflexive = other === other,
6748 othIsSymbol = isSymbol(other);
6749
6750 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
6751 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
6752 (valIsNull && othIsDefined && othIsReflexive) ||
6753 (!valIsDefined && othIsReflexive) ||
6754 !valIsReflexive) {
6755 return 1;
6756 }
6757 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
6758 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
6759 (othIsNull && valIsDefined && valIsReflexive) ||
6760 (!othIsDefined && valIsReflexive) ||
6761 !othIsReflexive) {
6762 return -1;
6763 }
6764 }
6765 return 0;
6766 }
6767
6768 /**
6769 * Used by `_.orderBy` to compare multiple properties of a value to another
6770 * and stable sort them.
6771 *
6772 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
6773 * specify an order of "desc" for descending or "asc" for ascending sort order
6774 * of corresponding values.
6775 *
6776 * @private
6777 * @param {Object} object The object to compare.
6778 * @param {Object} other The other object to compare.
6779 * @param {boolean[]|string[]} orders The order to sort by for each property.
6780 * @returns {number} Returns the sort order indicator for `object`.
6781 */
6782 function compareMultiple(object, other, orders) {
6783 var index = -1,
6784 objCriteria = object.criteria,
6785 othCriteria = other.criteria,
6786 length = objCriteria.length,
6787 ordersLength = orders.length;
6788
6789 while (++index < length) {
6790 var result = compareAscending(objCriteria[index], othCriteria[index]);
6791 if (result) {
6792 if (index >= ordersLength) {
6793 return result;
6794 }
6795 var order = orders[index];
6796 return result * (order == 'desc' ? -1 : 1);
6797 }
6798 }
6799 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
6800 // that causes it, under certain circumstances, to provide the same value for
6801 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
6802 // for more details.
6803 //
6804 // This also ensures a stable sort in V8 and other engines.
6805 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
6806 return object.index - other.index;
6807 }
6808
6809 /**
6810 * Creates an array that is the composition of partially applied arguments,
6811 * placeholders, and provided arguments into a single array of arguments.
6812 *
6813 * @private
6814 * @param {Array} args The provided arguments.
6815 * @param {Array} partials The arguments to prepend to those provided.
6816 * @param {Array} holders The `partials` placeholder indexes.
6817 * @params {boolean} [isCurried] Specify composing for a curried function.
6818 * @returns {Array} Returns the new array of composed arguments.
6819 */
6820 function composeArgs(args, partials, holders, isCurried) {
6821 var argsIndex = -1,
6822 argsLength = args.length,
6823 holdersLength = holders.length,
6824 leftIndex = -1,
6825 leftLength = partials.length,
6826 rangeLength = nativeMax(argsLength - holdersLength, 0),
6827 result = Array(leftLength + rangeLength),
6828 isUncurried = !isCurried;
6829
6830 while (++leftIndex < leftLength) {
6831 result[leftIndex] = partials[leftIndex];
6832 }
6833 while (++argsIndex < holdersLength) {
6834 if (isUncurried || argsIndex < argsLength) {
6835 result[holders[argsIndex]] = args[argsIndex];
6836 }
6837 }
6838 while (rangeLength--) {
6839 result[leftIndex++] = args[argsIndex++];
6840 }
6841 return result;
6842 }
6843
6844 /**
6845 * This function is like `composeArgs` except that the arguments composition
6846 * is tailored for `_.partialRight`.
6847 *
6848 * @private
6849 * @param {Array} args The provided arguments.
6850 * @param {Array} partials The arguments to append to those provided.
6851 * @param {Array} holders The `partials` placeholder indexes.
6852 * @params {boolean} [isCurried] Specify composing for a curried function.
6853 * @returns {Array} Returns the new array of composed arguments.
6854 */
6855 function composeArgsRight(args, partials, holders, isCurried) {
6856 var argsIndex = -1,
6857 argsLength = args.length,
6858 holdersIndex = -1,
6859 holdersLength = holders.length,
6860 rightIndex = -1,
6861 rightLength = partials.length,
6862 rangeLength = nativeMax(argsLength - holdersLength, 0),
6863 result = Array(rangeLength + rightLength),
6864 isUncurried = !isCurried;
6865
6866 while (++argsIndex < rangeLength) {
6867 result[argsIndex] = args[argsIndex];
6868 }
6869 var offset = argsIndex;
6870 while (++rightIndex < rightLength) {
6871 result[offset + rightIndex] = partials[rightIndex];
6872 }
6873 while (++holdersIndex < holdersLength) {
6874 if (isUncurried || argsIndex < argsLength) {
6875 result[offset + holders[holdersIndex]] = args[argsIndex++];
6876 }
6877 }
6878 return result;
6879 }
6880
6881 /**
6882 * Copies the values of `source` to `array`.
6883 *
6884 * @private
6885 * @param {Array} source The array to copy values from.
6886 * @param {Array} [array=[]] The array to copy values to.
6887 * @returns {Array} Returns `array`.
6888 */
6889 function copyArray(source, array) {
6890 var index = -1,
6891 length = source.length;
6892
6893 array || (array = Array(length));
6894 while (++index < length) {
6895 array[index] = source[index];
6896 }
6897 return array;
6898 }
6899
6900 /**
6901 * Copies properties of `source` to `object`.
6902 *
6903 * @private
6904 * @param {Object} source The object to copy properties from.
6905 * @param {Array} props The property identifiers to copy.
6906 * @param {Object} [object={}] The object to copy properties to.
6907 * @param {Function} [customizer] The function to customize copied values.
6908 * @returns {Object} Returns `object`.
6909 */
6910 function copyObject(source, props, object, customizer) {
6911 var isNew = !object;
6912 object || (object = {});
6913
6914 var index = -1,
6915 length = props.length;
6916
6917 while (++index < length) {
6918 var key = props[index];
6919
6920 var newValue = customizer
6921 ? customizer(object[key], source[key], key, object, source)
6922 : undefined;
6923
6924 if (newValue === undefined) {
6925 newValue = source[key];
6926 }
6927 if (isNew) {
6928 baseAssignValue(object, key, newValue);
6929 } else {
6930 assignValue(object, key, newValue);
6931 }
6932 }
6933 return object;
6934 }
6935
6936 /**
6937 * Copies own symbols of `source` to `object`.
6938 *
6939 * @private
6940 * @param {Object} source The object to copy symbols from.
6941 * @param {Object} [object={}] The object to copy symbols to.
6942 * @returns {Object} Returns `object`.
6943 */
6944 function copySymbols(source, object) {
6945 return copyObject(source, getSymbols(source), object);
6946 }
6947
6948 /**
6949 * Copies own and inherited symbols of `source` to `object`.
6950 *
6951 * @private
6952 * @param {Object} source The object to copy symbols from.
6953 * @param {Object} [object={}] The object to copy symbols to.
6954 * @returns {Object} Returns `object`.
6955 */
6956 function copySymbolsIn(source, object) {
6957 return copyObject(source, getSymbolsIn(source), object);
6958 }
6959
6960 /**
6961 * Creates a function like `_.groupBy`.
6962 *
6963 * @private
6964 * @param {Function} setter The function to set accumulator values.
6965 * @param {Function} [initializer] The accumulator object initializer.
6966 * @returns {Function} Returns the new aggregator function.
6967 */
6968 function createAggregator(setter, initializer) {
6969 return function(collection, iteratee) {
6970 var func = isArray(collection) ? arrayAggregator : baseAggregator,
6971 accumulator = initializer ? initializer() : {};
6972
6973 return func(collection, setter, getIteratee(iteratee, 2), accumulator);
6974 };
6975 }
6976
6977 /**
6978 * Creates a function like `_.assign`.
6979 *
6980 * @private
6981 * @param {Function} assigner The function to assign values.
6982 * @returns {Function} Returns the new assigner function.
6983 */
6984 function createAssigner(assigner) {
6985 return baseRest(function(object, sources) {
6986 var index = -1,
6987 length = sources.length,
6988 customizer = length > 1 ? sources[length - 1] : undefined,
6989 guard = length > 2 ? sources[2] : undefined;
6990
6991 customizer = (assigner.length > 3 && typeof customizer == 'function')
6992 ? (length--, customizer)
6993 : undefined;
6994
6995 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
6996 customizer = length < 3 ? undefined : customizer;
6997 length = 1;
6998 }
6999 object = Object(object);
7000 while (++index < length) {
7001 var source = sources[index];
7002 if (source) {
7003 assigner(object, source, index, customizer);
7004 }
7005 }
7006 return object;
7007 });
7008 }
7009
7010 /**
7011 * Creates a `baseEach` or `baseEachRight` function.
7012 *
7013 * @private
7014 * @param {Function} eachFunc The function to iterate over a collection.
7015 * @param {boolean} [fromRight] Specify iterating from right to left.
7016 * @returns {Function} Returns the new base function.
7017 */
7018 function createBaseEach(eachFunc, fromRight) {
7019 return function(collection, iteratee) {
7020 if (collection == null) {
7021 return collection;
7022 }
7023 if (!isArrayLike(collection)) {
7024 return eachFunc(collection, iteratee);
7025 }
7026 var length = collection.length,
7027 index = fromRight ? length : -1,
7028 iterable = Object(collection);
7029
7030 while ((fromRight ? index-- : ++index < length)) {
7031 if (iteratee(iterable[index], index, iterable) === false) {
7032 break;
7033 }
7034 }
7035 return collection;
7036 };
7037 }
7038
7039 /**
7040 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
7041 *
7042 * @private
7043 * @param {boolean} [fromRight] Specify iterating from right to left.
7044 * @returns {Function} Returns the new base function.
7045 */
7046 function createBaseFor(fromRight) {
7047 return function(object, iteratee, keysFunc) {
7048 var index = -1,
7049 iterable = Object(object),
7050 props = keysFunc(object),
7051 length = props.length;
7052
7053 while (length--) {
7054 var key = props[fromRight ? length : ++index];
7055 if (iteratee(iterable[key], key, iterable) === false) {
7056 break;
7057 }
7058 }
7059 return object;
7060 };
7061 }
7062
7063 /**
7064 * Creates a function that wraps `func` to invoke it with the optional `this`
7065 * binding of `thisArg`.
7066 *
7067 * @private
7068 * @param {Function} func The function to wrap.
7069 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
7070 * @param {*} [thisArg] The `this` binding of `func`.
7071 * @returns {Function} Returns the new wrapped function.
7072 */
7073 function createBind(func, bitmask, thisArg) {
7074 var isBind = bitmask & WRAP_BIND_FLAG,
7075 Ctor = createCtor(func);
7076
7077 function wrapper() {
7078 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
7079 return fn.apply(isBind ? thisArg : this, arguments);
7080 }
7081 return wrapper;
7082 }
7083
7084 /**
7085 * Creates a function like `_.lowerFirst`.
7086 *
7087 * @private
7088 * @param {string} methodName The name of the `String` case method to use.
7089 * @returns {Function} Returns the new case function.
7090 */
7091 function createCaseFirst(methodName) {
7092 return function(string) {
7093 string = toString(string);
7094
7095 var strSymbols = hasUnicode(string)
7096 ? stringToArray(string)
7097 : undefined;
7098
7099 var chr = strSymbols
7100 ? strSymbols[0]
7101 : string.charAt(0);
7102
7103 var trailing = strSymbols
7104 ? castSlice(strSymbols, 1).join('')
7105 : string.slice(1);
7106
7107 return chr[methodName]() + trailing;
7108 };
7109 }
7110
7111 /**
7112 * Creates a function like `_.camelCase`.
7113 *
7114 * @private
7115 * @param {Function} callback The function to combine each word.
7116 * @returns {Function} Returns the new compounder function.
7117 */
7118 function createCompounder(callback) {
7119 return function(string) {
7120 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
7121 };
7122 }
7123
7124 /**
7125 * Creates a function that produces an instance of `Ctor` regardless of
7126 * whether it was invoked as part of a `new` expression or by `call` or `apply`.
7127 *
7128 * @private
7129 * @param {Function} Ctor The constructor to wrap.
7130 * @returns {Function} Returns the new wrapped function.
7131 */
7132 function createCtor(Ctor) {
7133 return function() {
7134 // Use a `switch` statement to work with class constructors. See
7135 // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
7136 // for more details.
7137 var args = arguments;
7138 switch (args.length) {
7139 case 0: return new Ctor;
7140 case 1: return new Ctor(args[0]);
7141 case 2: return new Ctor(args[0], args[1]);
7142 case 3: return new Ctor(args[0], args[1], args[2]);
7143 case 4: return new Ctor(args[0], args[1], args[2], args[3]);
7144 case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
7145 case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
7146 case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
7147 }
7148 var thisBinding = baseCreate(Ctor.prototype),
7149 result = Ctor.apply(thisBinding, args);
7150
7151 // Mimic the constructor's `return` behavior.
7152 // See https://es5.github.io/#x13.2.2 for more details.
7153 return isObject(result) ? result : thisBinding;
7154 };
7155 }
7156
7157 /**
7158 * Creates a function that wraps `func` to enable currying.
7159 *
7160 * @private
7161 * @param {Function} func The function to wrap.
7162 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
7163 * @param {number} arity The arity of `func`.
7164 * @returns {Function} Returns the new wrapped function.
7165 */
7166 function createCurry(func, bitmask, arity) {
7167 var Ctor = createCtor(func);
7168
7169 function wrapper() {
7170 var length = arguments.length,
7171 args = Array(length),
7172 index = length,
7173 placeholder = getHolder(wrapper);
7174
7175 while (index--) {
7176 args[index] = arguments[index];
7177 }
7178 var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
7179 ? []
7180 : replaceHolders(args, placeholder);
7181
7182 length -= holders.length;
7183 if (length < arity) {
7184 return createRecurry(
7185 func, bitmask, createHybrid, wrapper.placeholder, undefined,
7186 args, holders, undefined, undefined, arity - length);
7187 }
7188 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
7189 return apply(fn, this, args);
7190 }
7191 return wrapper;
7192 }
7193
7194 /**
7195 * Creates a `_.find` or `_.findLast` function.
7196 *
7197 * @private
7198 * @param {Function} findIndexFunc The function to find the collection index.
7199 * @returns {Function} Returns the new find function.
7200 */
7201 function createFind(findIndexFunc) {
7202 return function(collection, predicate, fromIndex) {
7203 var iterable = Object(collection);
7204 if (!isArrayLike(collection)) {
7205 var iteratee = getIteratee(predicate, 3);
7206 collection = keys(collection);
7207 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
7208 }
7209 var index = findIndexFunc(collection, predicate, fromIndex);
7210 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
7211 };
7212 }
7213
7214 /**
7215 * Creates a `_.flow` or `_.flowRight` function.
7216 *
7217 * @private
7218 * @param {boolean} [fromRight] Specify iterating from right to left.
7219 * @returns {Function} Returns the new flow function.
7220 */
7221 function createFlow(fromRight) {
7222 return flatRest(function(funcs) {
7223 var length = funcs.length,
7224 index = length,
7225 prereq = LodashWrapper.prototype.thru;
7226
7227 if (fromRight) {
7228 funcs.reverse();
7229 }
7230 while (index--) {
7231 var func = funcs[index];
7232 if (typeof func != 'function') {
7233 throw new TypeError(FUNC_ERROR_TEXT);
7234 }
7235 if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
7236 var wrapper = new LodashWrapper([], true);
7237 }
7238 }
7239 index = wrapper ? index : length;
7240 while (++index < length) {
7241 func = funcs[index];
7242
7243 var funcName = getFuncName(func),
7244 data = funcName == 'wrapper' ? getData(func) : undefined;
7245
7246 if (data && isLaziable(data[0]) &&
7247 data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
7248 !data[4].length && data[9] == 1
7249 ) {
7250 wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
7251 } else {
7252 wrapper = (func.length == 1 && isLaziable(func))
7253 ? wrapper[funcName]()
7254 : wrapper.thru(func);
7255 }
7256 }
7257 return function() {
7258 var args = arguments,
7259 value = args[0];
7260
7261 if (wrapper && args.length == 1 && isArray(value)) {
7262 return wrapper.plant(value).value();
7263 }
7264 var index = 0,
7265 result = length ? funcs[index].apply(this, args) : value;
7266
7267 while (++index < length) {
7268 result = funcs[index].call(this, result);
7269 }
7270 return result;
7271 };
7272 });
7273 }
7274
7275 /**
7276 * Creates a function that wraps `func` to invoke it with optional `this`
7277 * binding of `thisArg`, partial application, and currying.
7278 *
7279 * @private
7280 * @param {Function|string} func The function or method name to wrap.
7281 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
7282 * @param {*} [thisArg] The `this` binding of `func`.
7283 * @param {Array} [partials] The arguments to prepend to those provided to
7284 * the new function.
7285 * @param {Array} [holders] The `partials` placeholder indexes.
7286 * @param {Array} [partialsRight] The arguments to append to those provided
7287 * to the new function.
7288 * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
7289 * @param {Array} [argPos] The argument positions of the new function.
7290 * @param {number} [ary] The arity cap of `func`.
7291 * @param {number} [arity] The arity of `func`.
7292 * @returns {Function} Returns the new wrapped function.
7293 */
7294 function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
7295 var isAry = bitmask & WRAP_ARY_FLAG,
7296 isBind = bitmask & WRAP_BIND_FLAG,
7297 isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
7298 isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
7299 isFlip = bitmask & WRAP_FLIP_FLAG,
7300 Ctor = isBindKey ? undefined : createCtor(func);
7301
7302 function wrapper() {
7303 var length = arguments.length,
7304 args = Array(length),
7305 index = length;
7306
7307 while (index--) {
7308 args[index] = arguments[index];
7309 }
7310 if (isCurried) {
7311 var placeholder = getHolder(wrapper),
7312 holdersCount = countHolders(args, placeholder);
7313 }
7314 if (partials) {
7315 args = composeArgs(args, partials, holders, isCurried);
7316 }
7317 if (partialsRight) {
7318 args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
7319 }
7320 length -= holdersCount;
7321 if (isCurried && length < arity) {
7322 var newHolders = replaceHolders(args, placeholder);
7323 return createRecurry(
7324 func, bitmask, createHybrid, wrapper.placeholder, thisArg,
7325 args, newHolders, argPos, ary, arity - length
7326 );
7327 }
7328 var thisBinding = isBind ? thisArg : this,
7329 fn = isBindKey ? thisBinding[func] : func;
7330
7331 length = args.length;
7332 if (argPos) {
7333 args = reorder(args, argPos);
7334 } else if (isFlip && length > 1) {
7335 args.reverse();
7336 }
7337 if (isAry && ary < length) {
7338 args.length = ary;
7339 }
7340 if (this && this !== root && this instanceof wrapper) {
7341 fn = Ctor || createCtor(fn);
7342 }
7343 return fn.apply(thisBinding, args);
7344 }
7345 return wrapper;
7346 }
7347
7348 /**
7349 * Creates a function like `_.invertBy`.
7350 *
7351 * @private
7352 * @param {Function} setter The function to set accumulator values.
7353 * @param {Function} toIteratee The function to resolve iteratees.
7354 * @returns {Function} Returns the new inverter function.
7355 */
7356 function createInverter(setter, toIteratee) {
7357 return function(object, iteratee) {
7358 return baseInverter(object, setter, toIteratee(iteratee), {});
7359 };
7360 }
7361
7362 /**
7363 * Creates a function that performs a mathematical operation on two values.
7364 *
7365 * @private
7366 * @param {Function} operator The function to perform the operation.
7367 * @param {number} [defaultValue] The value used for `undefined` arguments.
7368 * @returns {Function} Returns the new mathematical operation function.
7369 */
7370 function createMathOperation(operator, defaultValue) {
7371 return function(value, other) {
7372 var result;
7373 if (value === undefined && other === undefined) {
7374 return defaultValue;
7375 }
7376 if (value !== undefined) {
7377 result = value;
7378 }
7379 if (other !== undefined) {
7380 if (result === undefined) {
7381 return other;
7382 }
7383 if (typeof value == 'string' || typeof other == 'string') {
7384 value = baseToString(value);
7385 other = baseToString(other);
7386 } else {
7387 value = baseToNumber(value);
7388 other = baseToNumber(other);
7389 }
7390 result = operator(value, other);
7391 }
7392 return result;
7393 };
7394 }
7395
7396 /**
7397 * Creates a function like `_.over`.
7398 *
7399 * @private
7400 * @param {Function} arrayFunc The function to iterate over iteratees.
7401 * @returns {Function} Returns the new over function.
7402 */
7403 function createOver(arrayFunc) {
7404 return flatRest(function(iteratees) {
7405 iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
7406 return baseRest(function(args) {
7407 var thisArg = this;
7408 return arrayFunc(iteratees, function(iteratee) {
7409 return apply(iteratee, thisArg, args);
7410 });
7411 });
7412 });
7413 }
7414
7415 /**
7416 * Creates the padding for `string` based on `length`. The `chars` string
7417 * is truncated if the number of characters exceeds `length`.
7418 *
7419 * @private
7420 * @param {number} length The padding length.
7421 * @param {string} [chars=' '] The string used as padding.
7422 * @returns {string} Returns the padding for `string`.
7423 */
7424 function createPadding(length, chars) {
7425 chars = chars === undefined ? ' ' : baseToString(chars);
7426
7427 var charsLength = chars.length;
7428 if (charsLength < 2) {
7429 return charsLength ? baseRepeat(chars, length) : chars;
7430 }
7431 var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
7432 return hasUnicode(chars)
7433 ? castSlice(stringToArray(result), 0, length).join('')
7434 : result.slice(0, length);
7435 }
7436
7437 /**
7438 * Creates a function that wraps `func` to invoke it with the `this` binding
7439 * of `thisArg` and `partials` prepended to the arguments it receives.
7440 *
7441 * @private
7442 * @param {Function} func The function to wrap.
7443 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
7444 * @param {*} thisArg The `this` binding of `func`.
7445 * @param {Array} partials The arguments to prepend to those provided to
7446 * the new function.
7447 * @returns {Function} Returns the new wrapped function.
7448 */
7449 function createPartial(func, bitmask, thisArg, partials) {
7450 var isBind = bitmask & WRAP_BIND_FLAG,
7451 Ctor = createCtor(func);
7452
7453 function wrapper() {
7454 var argsIndex = -1,
7455 argsLength = arguments.length,
7456 leftIndex = -1,
7457 leftLength = partials.length,
7458 args = Array(leftLength + argsLength),
7459 fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
7460
7461 while (++leftIndex < leftLength) {
7462 args[leftIndex] = partials[leftIndex];
7463 }
7464 while (argsLength--) {
7465 args[leftIndex++] = arguments[++argsIndex];
7466 }
7467 return apply(fn, isBind ? thisArg : this, args);
7468 }
7469 return wrapper;
7470 }
7471
7472 /**
7473 * Creates a `_.range` or `_.rangeRight` function.
7474 *
7475 * @private
7476 * @param {boolean} [fromRight] Specify iterating from right to left.
7477 * @returns {Function} Returns the new range function.
7478 */
7479 function createRange(fromRight) {
7480 return function(start, end, step) {
7481 if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
7482 end = step = undefined;
7483 }
7484 // Ensure the sign of `-0` is preserved.
7485 start = toFinite(start);
7486 if (end === undefined) {
7487 end = start;
7488 start = 0;
7489 } else {
7490 end = toFinite(end);
7491 }
7492 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
7493 return baseRange(start, end, step, fromRight);
7494 };
7495 }
7496
7497 /**
7498 * Creates a function that performs a relational operation on two values.
7499 *
7500 * @private
7501 * @param {Function} operator The function to perform the operation.
7502 * @returns {Function} Returns the new relational operation function.
7503 */
7504 function createRelationalOperation(operator) {
7505 return function(value, other) {
7506 if (!(typeof value == 'string' && typeof other == 'string')) {
7507 value = toNumber(value);
7508 other = toNumber(other);
7509 }
7510 return operator(value, other);
7511 };
7512 }
7513
7514 /**
7515 * Creates a function that wraps `func` to continue currying.
7516 *
7517 * @private
7518 * @param {Function} func The function to wrap.
7519 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
7520 * @param {Function} wrapFunc The function to create the `func` wrapper.
7521 * @param {*} placeholder The placeholder value.
7522 * @param {*} [thisArg] The `this` binding of `func`.
7523 * @param {Array} [partials] The arguments to prepend to those provided to
7524 * the new function.
7525 * @param {Array} [holders] The `partials` placeholder indexes.
7526 * @param {Array} [argPos] The argument positions of the new function.
7527 * @param {number} [ary] The arity cap of `func`.
7528 * @param {number} [arity] The arity of `func`.
7529 * @returns {Function} Returns the new wrapped function.
7530 */
7531 function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
7532 var isCurry = bitmask & WRAP_CURRY_FLAG,
7533 newHolders = isCurry ? holders : undefined,
7534 newHoldersRight = isCurry ? undefined : holders,
7535 newPartials = isCurry ? partials : undefined,
7536 newPartialsRight = isCurry ? undefined : partials;
7537
7538 bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
7539 bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
7540
7541 if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
7542 bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
7543 }
7544 var newData = [
7545 func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
7546 newHoldersRight, argPos, ary, arity
7547 ];
7548
7549 var result = wrapFunc.apply(undefined, newData);
7550 if (isLaziable(func)) {
7551 setData(result, newData);
7552 }
7553 result.placeholder = placeholder;
7554 return setWrapToString(result, func, bitmask);
7555 }
7556
7557 /**
7558 * Creates a function like `_.round`.
7559 *
7560 * @private
7561 * @param {string} methodName The name of the `Math` method to use when rounding.
7562 * @returns {Function} Returns the new round function.
7563 */
7564 function createRound(methodName) {
7565 var func = Math[methodName];
7566 return function(number, precision) {
7567 number = toNumber(number);
7568 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
7569 if (precision) {
7570 // Shift with exponential notation to avoid floating-point issues.
7571 // See [MDN](https://mdn.io/round#Examples) for more details.
7572 var pair = (toString(number) + 'e').split('e'),
7573 value = func(pair[0] + 'e' + (+pair[1] + precision));
7574
7575 pair = (toString(value) + 'e').split('e');
7576 return +(pair[0] + 'e' + (+pair[1] - precision));
7577 }
7578 return func(number);
7579 };
7580 }
7581
7582 /**
7583 * Creates a set object of `values`.
7584 *
7585 * @private
7586 * @param {Array} values The values to add to the set.
7587 * @returns {Object} Returns the new set.
7588 */
7589 var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
7590 return new Set(values);
7591 };
7592
7593 /**
7594 * Creates a `_.toPairs` or `_.toPairsIn` function.
7595 *
7596 * @private
7597 * @param {Function} keysFunc The function to get the keys of a given object.
7598 * @returns {Function} Returns the new pairs function.
7599 */
7600 function createToPairs(keysFunc) {
7601 return function(object) {
7602 var tag = getTag(object);
7603 if (tag == mapTag) {
7604 return mapToArray(object);
7605 }
7606 if (tag == setTag) {
7607 return setToPairs(object);
7608 }
7609 return baseToPairs(object, keysFunc(object));
7610 };
7611 }
7612
7613 /**
7614 * Creates a function that either curries or invokes `func` with optional
7615 * `this` binding and partially applied arguments.
7616 *
7617 * @private
7618 * @param {Function|string} func The function or method name to wrap.
7619 * @param {number} bitmask The bitmask flags.
7620 * 1 - `_.bind`
7621 * 2 - `_.bindKey`
7622 * 4 - `_.curry` or `_.curryRight` of a bound function
7623 * 8 - `_.curry`
7624 * 16 - `_.curryRight`
7625 * 32 - `_.partial`
7626 * 64 - `_.partialRight`
7627 * 128 - `_.rearg`
7628 * 256 - `_.ary`
7629 * 512 - `_.flip`
7630 * @param {*} [thisArg] The `this` binding of `func`.
7631 * @param {Array} [partials] The arguments to be partially applied.
7632 * @param {Array} [holders] The `partials` placeholder indexes.
7633 * @param {Array} [argPos] The argument positions of the new function.
7634 * @param {number} [ary] The arity cap of `func`.
7635 * @param {number} [arity] The arity of `func`.
7636 * @returns {Function} Returns the new wrapped function.
7637 */
7638 function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
7639 var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
7640 if (!isBindKey && typeof func != 'function') {
7641 throw new TypeError(FUNC_ERROR_TEXT);
7642 }
7643 var length = partials ? partials.length : 0;
7644 if (!length) {
7645 bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
7646 partials = holders = undefined;
7647 }
7648 ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
7649 arity = arity === undefined ? arity : toInteger(arity);
7650 length -= holders ? holders.length : 0;
7651
7652 if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
7653 var partialsRight = partials,
7654 holdersRight = holders;
7655
7656 partials = holders = undefined;
7657 }
7658 var data = isBindKey ? undefined : getData(func);
7659
7660 var newData = [
7661 func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
7662 argPos, ary, arity
7663 ];
7664
7665 if (data) {
7666 mergeData(newData, data);
7667 }
7668 func = newData[0];
7669 bitmask = newData[1];
7670 thisArg = newData[2];
7671 partials = newData[3];
7672 holders = newData[4];
7673 arity = newData[9] = newData[9] === undefined
7674 ? (isBindKey ? 0 : func.length)
7675 : nativeMax(newData[9] - length, 0);
7676
7677 if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
7678 bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
7679 }
7680 if (!bitmask || bitmask == WRAP_BIND_FLAG) {
7681 var result = createBind(func, bitmask, thisArg);
7682 } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
7683 result = createCurry(func, bitmask, arity);
7684 } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
7685 result = createPartial(func, bitmask, thisArg, partials);
7686 } else {
7687 result = createHybrid.apply(undefined, newData);
7688 }
7689 var setter = data ? baseSetData : setData;
7690 return setWrapToString(setter(result, newData), func, bitmask);
7691 }
7692
7693 /**
7694 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
7695 * of source objects to the destination object for all destination properties
7696 * that resolve to `undefined`.
7697 *
7698 * @private
7699 * @param {*} objValue The destination value.
7700 * @param {*} srcValue The source value.
7701 * @param {string} key The key of the property to assign.
7702 * @param {Object} object The parent object of `objValue`.
7703 * @returns {*} Returns the value to assign.
7704 */
7705 function customDefaultsAssignIn(objValue, srcValue, key, object) {
7706 if (objValue === undefined ||
7707 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
7708 return srcValue;
7709 }
7710 return objValue;
7711 }
7712
7713 /**
7714 * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
7715 * objects into destination objects that are passed thru.
7716 *
7717 * @private
7718 * @param {*} objValue The destination value.
7719 * @param {*} srcValue The source value.
7720 * @param {string} key The key of the property to merge.
7721 * @param {Object} object The parent object of `objValue`.
7722 * @param {Object} source The parent object of `srcValue`.
7723 * @param {Object} [stack] Tracks traversed source values and their merged
7724 * counterparts.
7725 * @returns {*} Returns the value to assign.
7726 */
7727 function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
7728 if (isObject(objValue) && isObject(srcValue)) {
7729 // Recursively merge objects and arrays (susceptible to call stack limits).
7730 stack.set(srcValue, objValue);
7731 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
7732 stack['delete'](srcValue);
7733 }
7734 return objValue;
7735 }
7736
7737 /**
7738 * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
7739 * objects.
7740 *
7741 * @private
7742 * @param {*} value The value to inspect.
7743 * @param {string} key The key of the property to inspect.
7744 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
7745 */
7746 function customOmitClone(value) {
7747 return isPlainObject(value) ? undefined : value;
7748 }
7749
7750 /**
7751 * A specialized version of `baseIsEqualDeep` for arrays with support for
7752 * partial deep comparisons.
7753 *
7754 * @private
7755 * @param {Array} array The array to compare.
7756 * @param {Array} other The other array to compare.
7757 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7758 * @param {Function} customizer The function to customize comparisons.
7759 * @param {Function} equalFunc The function to determine equivalents of values.
7760 * @param {Object} stack Tracks traversed `array` and `other` objects.
7761 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
7762 */
7763 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
7764 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7765 arrLength = array.length,
7766 othLength = other.length;
7767
7768 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
7769 return false;
7770 }
7771 // Assume cyclic values are equal.
7772 var stacked = stack.get(array);
7773 if (stacked && stack.get(other)) {
7774 return stacked == other;
7775 }
7776 var index = -1,
7777 result = true,
7778 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
7779
7780 stack.set(array, other);
7781 stack.set(other, array);
7782
7783 // Ignore non-index properties.
7784 while (++index < arrLength) {
7785 var arrValue = array[index],
7786 othValue = other[index];
7787
7788 if (customizer) {
7789 var compared = isPartial
7790 ? customizer(othValue, arrValue, index, other, array, stack)
7791 : customizer(arrValue, othValue, index, array, other, stack);
7792 }
7793 if (compared !== undefined) {
7794 if (compared) {
7795 continue;
7796 }
7797 result = false;
7798 break;
7799 }
7800 // Recursively compare arrays (susceptible to call stack limits).
7801 if (seen) {
7802 if (!arraySome(other, function(othValue, othIndex) {
7803 if (!cacheHas(seen, othIndex) &&
7804 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
7805 return seen.push(othIndex);
7806 }
7807 })) {
7808 result = false;
7809 break;
7810 }
7811 } else if (!(
7812 arrValue === othValue ||
7813 equalFunc(arrValue, othValue, bitmask, customizer, stack)
7814 )) {
7815 result = false;
7816 break;
7817 }
7818 }
7819 stack['delete'](array);
7820 stack['delete'](other);
7821 return result;
7822 }
7823
7824 /**
7825 * A specialized version of `baseIsEqualDeep` for comparing objects of
7826 * the same `toStringTag`.
7827 *
7828 * **Note:** This function only supports comparing values with tags of
7829 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
7830 *
7831 * @private
7832 * @param {Object} object The object to compare.
7833 * @param {Object} other The other object to compare.
7834 * @param {string} tag The `toStringTag` of the objects to compare.
7835 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7836 * @param {Function} customizer The function to customize comparisons.
7837 * @param {Function} equalFunc The function to determine equivalents of values.
7838 * @param {Object} stack Tracks traversed `object` and `other` objects.
7839 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7840 */
7841 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
7842 switch (tag) {
7843 case dataViewTag:
7844 if ((object.byteLength != other.byteLength) ||
7845 (object.byteOffset != other.byteOffset)) {
7846 return false;
7847 }
7848 object = object.buffer;
7849 other = other.buffer;
7850
7851 case arrayBufferTag:
7852 if ((object.byteLength != other.byteLength) ||
7853 !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
7854 return false;
7855 }
7856 return true;
7857
7858 case boolTag:
7859 case dateTag:
7860 case numberTag:
7861 // Coerce booleans to `1` or `0` and dates to milliseconds.
7862 // Invalid dates are coerced to `NaN`.
7863 return eq(+object, +other);
7864
7865 case errorTag:
7866 return object.name == other.name && object.message == other.message;
7867
7868 case regexpTag:
7869 case stringTag:
7870 // Coerce regexes to strings and treat strings, primitives and objects,
7871 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
7872 // for more details.
7873 return object == (other + '');
7874
7875 case mapTag:
7876 var convert = mapToArray;
7877
7878 case setTag:
7879 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
7880 convert || (convert = setToArray);
7881
7882 if (object.size != other.size && !isPartial) {
7883 return false;
7884 }
7885 // Assume cyclic values are equal.
7886 var stacked = stack.get(object);
7887 if (stacked) {
7888 return stacked == other;
7889 }
7890 bitmask |= COMPARE_UNORDERED_FLAG;
7891
7892 // Recursively compare objects (susceptible to call stack limits).
7893 stack.set(object, other);
7894 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
7895 stack['delete'](object);
7896 return result;
7897
7898 case symbolTag:
7899 if (symbolValueOf) {
7900 return symbolValueOf.call(object) == symbolValueOf.call(other);
7901 }
7902 }
7903 return false;
7904 }
7905
7906 /**
7907 * A specialized version of `baseIsEqualDeep` for objects with support for
7908 * partial deep comparisons.
7909 *
7910 * @private
7911 * @param {Object} object The object to compare.
7912 * @param {Object} other The other object to compare.
7913 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7914 * @param {Function} customizer The function to customize comparisons.
7915 * @param {Function} equalFunc The function to determine equivalents of values.
7916 * @param {Object} stack Tracks traversed `object` and `other` objects.
7917 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7918 */
7919 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
7920 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7921 objProps = getAllKeys(object),
7922 objLength = objProps.length,
7923 othProps = getAllKeys(other),
7924 othLength = othProps.length;
7925
7926 if (objLength != othLength && !isPartial) {
7927 return false;
7928 }
7929 var index = objLength;
7930 while (index--) {
7931 var key = objProps[index];
7932 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
7933 return false;
7934 }
7935 }
7936 // Assume cyclic values are equal.
7937 var stacked = stack.get(object);
7938 if (stacked && stack.get(other)) {
7939 return stacked == other;
7940 }
7941 var result = true;
7942 stack.set(object, other);
7943 stack.set(other, object);
7944
7945 var skipCtor = isPartial;
7946 while (++index < objLength) {
7947 key = objProps[index];
7948 var objValue = object[key],
7949 othValue = other[key];
7950
7951 if (customizer) {
7952 var compared = isPartial
7953 ? customizer(othValue, objValue, key, other, object, stack)
7954 : customizer(objValue, othValue, key, object, other, stack);
7955 }
7956 // Recursively compare objects (susceptible to call stack limits).
7957 if (!(compared === undefined
7958 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
7959 : compared
7960 )) {
7961 result = false;
7962 break;
7963 }
7964 skipCtor || (skipCtor = key == 'constructor');
7965 }
7966 if (result && !skipCtor) {
7967 var objCtor = object.constructor,
7968 othCtor = other.constructor;
7969
7970 // Non `Object` object instances with different constructors are not equal.
7971 if (objCtor != othCtor &&
7972 ('constructor' in object && 'constructor' in other) &&
7973 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
7974 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
7975 result = false;
7976 }
7977 }
7978 stack['delete'](object);
7979 stack['delete'](other);
7980 return result;
7981 }
7982
7983 /**
7984 * A specialized version of `baseRest` which flattens the rest array.
7985 *
7986 * @private
7987 * @param {Function} func The function to apply a rest parameter to.
7988 * @returns {Function} Returns the new function.
7989 */
7990 function flatRest(func) {
7991 return setToString(overRest(func, undefined, flatten), func + '');
7992 }
7993
7994 /**
7995 * Creates an array of own enumerable property names and symbols of `object`.
7996 *
7997 * @private
7998 * @param {Object} object The object to query.
7999 * @returns {Array} Returns the array of property names and symbols.
8000 */
8001 function getAllKeys(object) {
8002 return baseGetAllKeys(object, keys, getSymbols);
8003 }
8004
8005 /**
8006 * Creates an array of own and inherited enumerable property names and
8007 * symbols of `object`.
8008 *
8009 * @private
8010 * @param {Object} object The object to query.
8011 * @returns {Array} Returns the array of property names and symbols.
8012 */
8013 function getAllKeysIn(object) {
8014 return baseGetAllKeys(object, keysIn, getSymbolsIn);
8015 }
8016
8017 /**
8018 * Gets metadata for `func`.
8019 *
8020 * @private
8021 * @param {Function} func The function to query.
8022 * @returns {*} Returns the metadata for `func`.
8023 */
8024 var getData = !metaMap ? noop : function(func) {
8025 return metaMap.get(func);
8026 };
8027
8028 /**
8029 * Gets the name of `func`.
8030 *
8031 * @private
8032 * @param {Function} func The function to query.
8033 * @returns {string} Returns the function name.
8034 */
8035 function getFuncName(func) {
8036 var result = (func.name + ''),
8037 array = realNames[result],
8038 length = hasOwnProperty.call(realNames, result) ? array.length : 0;
8039
8040 while (length--) {
8041 var data = array[length],
8042 otherFunc = data.func;
8043 if (otherFunc == null || otherFunc == func) {
8044 return data.name;
8045 }
8046 }
8047 return result;
8048 }
8049
8050 /**
8051 * Gets the argument placeholder value for `func`.
8052 *
8053 * @private
8054 * @param {Function} func The function to inspect.
8055 * @returns {*} Returns the placeholder value.
8056 */
8057 function getHolder(func) {
8058 var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
8059 return object.placeholder;
8060 }
8061
8062 /**
8063 * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
8064 * this function returns the custom method, otherwise it returns `baseIteratee`.
8065 * If arguments are provided, the chosen function is invoked with them and
8066 * its result is returned.
8067 *
8068 * @private
8069 * @param {*} [value] The value to convert to an iteratee.
8070 * @param {number} [arity] The arity of the created iteratee.
8071 * @returns {Function} Returns the chosen function or its result.
8072 */
8073 function getIteratee() {
8074 var result = lodash.iteratee || iteratee;
8075 result = result === iteratee ? baseIteratee : result;
8076 return arguments.length ? result(arguments[0], arguments[1]) : result;
8077 }
8078
8079 /**
8080 * Gets the data for `map`.
8081 *
8082 * @private
8083 * @param {Object} map The map to query.
8084 * @param {string} key The reference key.
8085 * @returns {*} Returns the map data.
8086 */
8087 function getMapData(map, key) {
8088 var data = map.__data__;
8089 return isKeyable(key)
8090 ? data[typeof key == 'string' ? 'string' : 'hash']
8091 : data.map;
8092 }
8093
8094 /**
8095 * Gets the property names, values, and compare flags of `object`.
8096 *
8097 * @private
8098 * @param {Object} object The object to query.
8099 * @returns {Array} Returns the match data of `object`.
8100 */
8101 function getMatchData(object) {
8102 var result = keys(object),
8103 length = result.length;
8104
8105 while (length--) {
8106 var key = result[length],
8107 value = object[key];
8108
8109 result[length] = [key, value, isStrictComparable(value)];
8110 }
8111 return result;
8112 }
8113
8114 /**
8115 * Gets the native function at `key` of `object`.
8116 *
8117 * @private
8118 * @param {Object} object The object to query.
8119 * @param {string} key The key of the method to get.
8120 * @returns {*} Returns the function if it's native, else `undefined`.
8121 */
8122 function getNative(object, key) {
8123 var value = getValue(object, key);
8124 return baseIsNative(value) ? value : undefined;
8125 }
8126
8127 /**
8128 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
8129 *
8130 * @private
8131 * @param {*} value The value to query.
8132 * @returns {string} Returns the raw `toStringTag`.
8133 */
8134 function getRawTag(value) {
8135 var isOwn = hasOwnProperty.call(value, symToStringTag),
8136 tag = value[symToStringTag];
8137
8138 try {
8139 value[symToStringTag] = undefined;
8140 var unmasked = true;
8141 } catch (e) {}
8142
8143 var result = nativeObjectToString.call(value);
8144 if (unmasked) {
8145 if (isOwn) {
8146 value[symToStringTag] = tag;
8147 } else {
8148 delete value[symToStringTag];
8149 }
8150 }
8151 return result;
8152 }
8153
8154 /**
8155 * Creates an array of the own enumerable symbols of `object`.
8156 *
8157 * @private
8158 * @param {Object} object The object to query.
8159 * @returns {Array} Returns the array of symbols.
8160 */
8161 var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
8162 if (object == null) {
8163 return [];
8164 }
8165 object = Object(object);
8166 return arrayFilter(nativeGetSymbols(object), function(symbol) {
8167 return propertyIsEnumerable.call(object, symbol);
8168 });
8169 };
8170
8171 /**
8172 * Creates an array of the own and inherited enumerable symbols of `object`.
8173 *
8174 * @private
8175 * @param {Object} object The object to query.
8176 * @returns {Array} Returns the array of symbols.
8177 */
8178 var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
8179 var result = [];
8180 while (object) {
8181 arrayPush(result, getSymbols(object));
8182 object = getPrototype(object);
8183 }
8184 return result;
8185 };
8186
8187 /**
8188 * Gets the `toStringTag` of `value`.
8189 *
8190 * @private
8191 * @param {*} value The value to query.
8192 * @returns {string} Returns the `toStringTag`.
8193 */
8194 var getTag = baseGetTag;
8195
8196 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
8197 if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
8198 (Map && getTag(new Map) != mapTag) ||
8199 (Promise && getTag(Promise.resolve()) != promiseTag) ||
8200 (Set && getTag(new Set) != setTag) ||
8201 (WeakMap && getTag(new WeakMap) != weakMapTag)) {
8202 getTag = function(value) {
8203 var result = baseGetTag(value),
8204 Ctor = result == objectTag ? value.constructor : undefined,
8205 ctorString = Ctor ? toSource(Ctor) : '';
8206
8207 if (ctorString) {
8208 switch (ctorString) {
8209 case dataViewCtorString: return dataViewTag;
8210 case mapCtorString: return mapTag;
8211 case promiseCtorString: return promiseTag;
8212 case setCtorString: return setTag;
8213 case weakMapCtorString: return weakMapTag;
8214 }
8215 }
8216 return result;
8217 };
8218 }
8219
8220 /**
8221 * Gets the view, applying any `transforms` to the `start` and `end` positions.
8222 *
8223 * @private
8224 * @param {number} start The start of the view.
8225 * @param {number} end The end of the view.
8226 * @param {Array} transforms The transformations to apply to the view.
8227 * @returns {Object} Returns an object containing the `start` and `end`
8228 * positions of the view.
8229 */
8230 function getView(start, end, transforms) {
8231 var index = -1,
8232 length = transforms.length;
8233
8234 while (++index < length) {
8235 var data = transforms[index],
8236 size = data.size;
8237
8238 switch (data.type) {
8239 case 'drop': start += size; break;
8240 case 'dropRight': end -= size; break;
8241 case 'take': end = nativeMin(end, start + size); break;
8242 case 'takeRight': start = nativeMax(start, end - size); break;
8243 }
8244 }
8245 return { 'start': start, 'end': end };
8246 }
8247
8248 /**
8249 * Extracts wrapper details from the `source` body comment.
8250 *
8251 * @private
8252 * @param {string} source The source to inspect.
8253 * @returns {Array} Returns the wrapper details.
8254 */
8255 function getWrapDetails(source) {
8256 var match = source.match(reWrapDetails);
8257 return match ? match[1].split(reSplitDetails) : [];
8258 }
8259
8260 /**
8261 * Checks if `path` exists on `object`.
8262 *
8263 * @private
8264 * @param {Object} object The object to query.
8265 * @param {Array|string} path The path to check.
8266 * @param {Function} hasFunc The function to check properties.
8267 * @returns {boolean} Returns `true` if `path` exists, else `false`.
8268 */
8269 function hasPath(object, path, hasFunc) {
8270 path = castPath(path, object);
8271
8272 var index = -1,
8273 length = path.length,
8274 result = false;
8275
8276 while (++index < length) {
8277 var key = toKey(path[index]);
8278 if (!(result = object != null && hasFunc(object, key))) {
8279 break;
8280 }
8281 object = object[key];
8282 }
8283 if (result || ++index != length) {
8284 return result;
8285 }
8286 length = object == null ? 0 : object.length;
8287 return !!length && isLength(length) && isIndex(key, length) &&
8288 (isArray(object) || isArguments(object));
8289 }
8290
8291 /**
8292 * Initializes an array clone.
8293 *
8294 * @private
8295 * @param {Array} array The array to clone.
8296 * @returns {Array} Returns the initialized clone.
8297 */
8298 function initCloneArray(array) {
8299 var length = array.length,
8300 result = new array.constructor(length);
8301
8302 // Add properties assigned by `RegExp#exec`.
8303 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
8304 result.index = array.index;
8305 result.input = array.input;
8306 }
8307 return result;
8308 }
8309
8310 /**
8311 * Initializes an object clone.
8312 *
8313 * @private
8314 * @param {Object} object The object to clone.
8315 * @returns {Object} Returns the initialized clone.
8316 */
8317 function initCloneObject(object) {
8318 return (typeof object.constructor == 'function' && !isPrototype(object))
8319 ? baseCreate(getPrototype(object))
8320 : {};
8321 }
8322
8323 /**
8324 * Initializes an object clone based on its `toStringTag`.
8325 *
8326 * **Note:** This function only supports cloning values with tags of
8327 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
8328 *
8329 * @private
8330 * @param {Object} object The object to clone.
8331 * @param {string} tag The `toStringTag` of the object to clone.
8332 * @param {boolean} [isDeep] Specify a deep clone.
8333 * @returns {Object} Returns the initialized clone.
8334 */
8335 function initCloneByTag(object, tag, isDeep) {
8336 var Ctor = object.constructor;
8337 switch (tag) {
8338 case arrayBufferTag:
8339 return cloneArrayBuffer(object);
8340
8341 case boolTag:
8342 case dateTag:
8343 return new Ctor(+object);
8344
8345 case dataViewTag:
8346 return cloneDataView(object, isDeep);
8347
8348 case float32Tag: case float64Tag:
8349 case int8Tag: case int16Tag: case int32Tag:
8350 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
8351 return cloneTypedArray(object, isDeep);
8352
8353 case mapTag:
8354 return new Ctor;
8355
8356 case numberTag:
8357 case stringTag:
8358 return new Ctor(object);
8359
8360 case regexpTag:
8361 return cloneRegExp(object);
8362
8363 case setTag:
8364 return new Ctor;
8365
8366 case symbolTag:
8367 return cloneSymbol(object);
8368 }
8369 }
8370
8371 /**
8372 * Inserts wrapper `details` in a comment at the top of the `source` body.
8373 *
8374 * @private
8375 * @param {string} source The source to modify.
8376 * @returns {Array} details The details to insert.
8377 * @returns {string} Returns the modified source.
8378 */
8379 function insertWrapDetails(source, details) {
8380 var length = details.length;
8381 if (!length) {
8382 return source;
8383 }
8384 var lastIndex = length - 1;
8385 details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
8386 details = details.join(length > 2 ? ', ' : ' ');
8387 return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
8388 }
8389
8390 /**
8391 * Checks if `value` is a flattenable `arguments` object or array.
8392 *
8393 * @private
8394 * @param {*} value The value to check.
8395 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
8396 */
8397 function isFlattenable(value) {
8398 return isArray(value) || isArguments(value) ||
8399 !!(spreadableSymbol && value && value[spreadableSymbol]);
8400 }
8401
8402 /**
8403 * Checks if `value` is a valid array-like index.
8404 *
8405 * @private
8406 * @param {*} value The value to check.
8407 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
8408 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
8409 */
8410 function isIndex(value, length) {
8411 var type = typeof value;
8412 length = length == null ? MAX_SAFE_INTEGER : length;
8413
8414 return !!length &&
8415 (type == 'number' ||
8416 (type != 'symbol' && reIsUint.test(value))) &&
8417 (value > -1 && value % 1 == 0 && value < length);
8418 }
8419
8420 /**
8421 * Checks if the given arguments are from an iteratee call.
8422 *
8423 * @private
8424 * @param {*} value The potential iteratee value argument.
8425 * @param {*} index The potential iteratee index or key argument.
8426 * @param {*} object The potential iteratee object argument.
8427 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
8428 * else `false`.
8429 */
8430 function isIterateeCall(value, index, object) {
8431 if (!isObject(object)) {
8432 return false;
8433 }
8434 var type = typeof index;
8435 if (type == 'number'
8436 ? (isArrayLike(object) && isIndex(index, object.length))
8437 : (type == 'string' && index in object)
8438 ) {
8439 return eq(object[index], value);
8440 }
8441 return false;
8442 }
8443
8444 /**
8445 * Checks if `value` is a property name and not a property path.
8446 *
8447 * @private
8448 * @param {*} value The value to check.
8449 * @param {Object} [object] The object to query keys on.
8450 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
8451 */
8452 function isKey(value, object) {
8453 if (isArray(value)) {
8454 return false;
8455 }
8456 var type = typeof value;
8457 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
8458 value == null || isSymbol(value)) {
8459 return true;
8460 }
8461 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
8462 (object != null && value in Object(object));
8463 }
8464
8465 /**
8466 * Checks if `value` is suitable for use as unique object key.
8467 *
8468 * @private
8469 * @param {*} value The value to check.
8470 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
8471 */
8472 function isKeyable(value) {
8473 var type = typeof value;
8474 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
8475 ? (value !== '__proto__')
8476 : (value === null);
8477 }
8478
8479 /**
8480 * Checks if `func` has a lazy counterpart.
8481 *
8482 * @private
8483 * @param {Function} func The function to check.
8484 * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
8485 * else `false`.
8486 */
8487 function isLaziable(func) {
8488 var funcName = getFuncName(func),
8489 other = lodash[funcName];
8490
8491 if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
8492 return false;
8493 }
8494 if (func === other) {
8495 return true;
8496 }
8497 var data = getData(other);
8498 return !!data && func === data[0];
8499 }
8500
8501 /**
8502 * Checks if `func` has its source masked.
8503 *
8504 * @private
8505 * @param {Function} func The function to check.
8506 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
8507 */
8508 function isMasked(func) {
8509 return !!maskSrcKey && (maskSrcKey in func);
8510 }
8511
8512 /**
8513 * Checks if `func` is capable of being masked.
8514 *
8515 * @private
8516 * @param {*} value The value to check.
8517 * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
8518 */
8519 var isMaskable = coreJsData ? isFunction : stubFalse;
8520
8521 /**
8522 * Checks if `value` is likely a prototype object.
8523 *
8524 * @private
8525 * @param {*} value The value to check.
8526 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
8527 */
8528 function isPrototype(value) {
8529 var Ctor = value && value.constructor,
8530 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
8531
8532 return value === proto;
8533 }
8534
8535 /**
8536 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
8537 *
8538 * @private
8539 * @param {*} value The value to check.
8540 * @returns {boolean} Returns `true` if `value` if suitable for strict
8541 * equality comparisons, else `false`.
8542 */
8543 function isStrictComparable(value) {
8544 return value === value && !isObject(value);
8545 }
8546
8547 /**
8548 * A specialized version of `matchesProperty` for source values suitable
8549 * for strict equality comparisons, i.e. `===`.
8550 *
8551 * @private
8552 * @param {string} key The key of the property to get.
8553 * @param {*} srcValue The value to match.
8554 * @returns {Function} Returns the new spec function.
8555 */
8556 function matchesStrictComparable(key, srcValue) {
8557 return function(object) {
8558 if (object == null) {
8559 return false;
8560 }
8561 return object[key] === srcValue &&
8562 (srcValue !== undefined || (key in Object(object)));
8563 };
8564 }
8565
8566 /**
8567 * A specialized version of `_.memoize` which clears the memoized function's
8568 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
8569 *
8570 * @private
8571 * @param {Function} func The function to have its output memoized.
8572 * @returns {Function} Returns the new memoized function.
8573 */
8574 function memoizeCapped(func) {
8575 var result = memoize(func, function(key) {
8576 if (cache.size === MAX_MEMOIZE_SIZE) {
8577 cache.clear();
8578 }
8579 return key;
8580 });
8581
8582 var cache = result.cache;
8583 return result;
8584 }
8585
8586 /**
8587 * Merges the function metadata of `source` into `data`.
8588 *
8589 * Merging metadata reduces the number of wrappers used to invoke a function.
8590 * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
8591 * may be applied regardless of execution order. Methods like `_.ary` and
8592 * `_.rearg` modify function arguments, making the order in which they are
8593 * executed important, preventing the merging of metadata. However, we make
8594 * an exception for a safe combined case where curried functions have `_.ary`
8595 * and or `_.rearg` applied.
8596 *
8597 * @private
8598 * @param {Array} data The destination metadata.
8599 * @param {Array} source The source metadata.
8600 * @returns {Array} Returns `data`.
8601 */
8602 function mergeData(data, source) {
8603 var bitmask = data[1],
8604 srcBitmask = source[1],
8605 newBitmask = bitmask | srcBitmask,
8606 isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
8607
8608 var isCombo =
8609 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
8610 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
8611 ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
8612
8613 // Exit early if metadata can't be merged.
8614 if (!(isCommon || isCombo)) {
8615 return data;
8616 }
8617 // Use source `thisArg` if available.
8618 if (srcBitmask & WRAP_BIND_FLAG) {
8619 data[2] = source[2];
8620 // Set when currying a bound function.
8621 newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
8622 }
8623 // Compose partial arguments.
8624 var value = source[3];
8625 if (value) {
8626 var partials = data[3];
8627 data[3] = partials ? composeArgs(partials, value, source[4]) : value;
8628 data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
8629 }
8630 // Compose partial right arguments.
8631 value = source[5];
8632 if (value) {
8633 partials = data[5];
8634 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
8635 data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
8636 }
8637 // Use source `argPos` if available.
8638 value = source[7];
8639 if (value) {
8640 data[7] = value;
8641 }
8642 // Use source `ary` if it's smaller.
8643 if (srcBitmask & WRAP_ARY_FLAG) {
8644 data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
8645 }
8646 // Use source `arity` if one is not provided.
8647 if (data[9] == null) {
8648 data[9] = source[9];
8649 }
8650 // Use source `func` and merge bitmasks.
8651 data[0] = source[0];
8652 data[1] = newBitmask;
8653
8654 return data;
8655 }
8656
8657 /**
8658 * This function is like
8659 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
8660 * except that it includes inherited enumerable properties.
8661 *
8662 * @private
8663 * @param {Object} object The object to query.
8664 * @returns {Array} Returns the array of property names.
8665 */
8666 function nativeKeysIn(object) {
8667 var result = [];
8668 if (object != null) {
8669 for (var key in Object(object)) {
8670 result.push(key);
8671 }
8672 }
8673 return result;
8674 }
8675
8676 /**
8677 * Converts `value` to a string using `Object.prototype.toString`.
8678 *
8679 * @private
8680 * @param {*} value The value to convert.
8681 * @returns {string} Returns the converted string.
8682 */
8683 function objectToString(value) {
8684 return nativeObjectToString.call(value);
8685 }
8686
8687 /**
8688 * A specialized version of `baseRest` which transforms the rest array.
8689 *
8690 * @private
8691 * @param {Function} func The function to apply a rest parameter to.
8692 * @param {number} [start=func.length-1] The start position of the rest parameter.
8693 * @param {Function} transform The rest array transform.
8694 * @returns {Function} Returns the new function.
8695 */
8696 function overRest(func, start, transform) {
8697 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
8698 return function() {
8699 var args = arguments,
8700 index = -1,
8701 length = nativeMax(args.length - start, 0),
8702 array = Array(length);
8703
8704 while (++index < length) {
8705 array[index] = args[start + index];
8706 }
8707 index = -1;
8708 var otherArgs = Array(start + 1);
8709 while (++index < start) {
8710 otherArgs[index] = args[index];
8711 }
8712 otherArgs[start] = transform(array);
8713 return apply(func, this, otherArgs);
8714 };
8715 }
8716
8717 /**
8718 * Gets the parent value at `path` of `object`.
8719 *
8720 * @private
8721 * @param {Object} object The object to query.
8722 * @param {Array} path The path to get the parent value of.
8723 * @returns {*} Returns the parent value.
8724 */
8725 function parent(object, path) {
8726 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
8727 }
8728
8729 /**
8730 * Reorder `array` according to the specified indexes where the element at
8731 * the first index is assigned as the first element, the element at
8732 * the second index is assigned as the second element, and so on.
8733 *
8734 * @private
8735 * @param {Array} array The array to reorder.
8736 * @param {Array} indexes The arranged array indexes.
8737 * @returns {Array} Returns `array`.
8738 */
8739 function reorder(array, indexes) {
8740 var arrLength = array.length,
8741 length = nativeMin(indexes.length, arrLength),
8742 oldArray = copyArray(array);
8743
8744 while (length--) {
8745 var index = indexes[length];
8746 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
8747 }
8748 return array;
8749 }
8750
8751 /**
8752 * Gets the value at `key`, unless `key` is "__proto__".
8753 *
8754 * @private
8755 * @param {Object} object The object to query.
8756 * @param {string} key The key of the property to get.
8757 * @returns {*} Returns the property value.
8758 */
8759 function safeGet(object, key) {
8760 if (key == '__proto__') {
8761 return;
8762 }
8763
8764 return object[key];
8765 }
8766
8767 /**
8768 * Sets metadata for `func`.
8769 *
8770 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
8771 * period of time, it will trip its breaker and transition to an identity
8772 * function to avoid garbage collection pauses in V8. See
8773 * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
8774 * for more details.
8775 *
8776 * @private
8777 * @param {Function} func The function to associate metadata with.
8778 * @param {*} data The metadata.
8779 * @returns {Function} Returns `func`.
8780 */
8781 var setData = shortOut(baseSetData);
8782
8783 /**
8784 * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
8785 *
8786 * @private
8787 * @param {Function} func The function to delay.
8788 * @param {number} wait The number of milliseconds to delay invocation.
8789 * @returns {number|Object} Returns the timer id or timeout object.
8790 */
8791 var setTimeout = ctxSetTimeout || function(func, wait) {
8792 return root.setTimeout(func, wait);
8793 };
8794
8795 /**
8796 * Sets the `toString` method of `func` to return `string`.
8797 *
8798 * @private
8799 * @param {Function} func The function to modify.
8800 * @param {Function} string The `toString` result.
8801 * @returns {Function} Returns `func`.
8802 */
8803 var setToString = shortOut(baseSetToString);
8804
8805 /**
8806 * Sets the `toString` method of `wrapper` to mimic the source of `reference`
8807 * with wrapper details in a comment at the top of the source body.
8808 *
8809 * @private
8810 * @param {Function} wrapper The function to modify.
8811 * @param {Function} reference The reference function.
8812 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8813 * @returns {Function} Returns `wrapper`.
8814 */
8815 function setWrapToString(wrapper, reference, bitmask) {
8816 var source = (reference + '');
8817 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
8818 }
8819
8820 /**
8821 * Creates a function that'll short out and invoke `identity` instead
8822 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
8823 * milliseconds.
8824 *
8825 * @private
8826 * @param {Function} func The function to restrict.
8827 * @returns {Function} Returns the new shortable function.
8828 */
8829 function shortOut(func) {
8830 var count = 0,
8831 lastCalled = 0;
8832
8833 return function() {
8834 var stamp = nativeNow(),
8835 remaining = HOT_SPAN - (stamp - lastCalled);
8836
8837 lastCalled = stamp;
8838 if (remaining > 0) {
8839 if (++count >= HOT_COUNT) {
8840 return arguments[0];
8841 }
8842 } else {
8843 count = 0;
8844 }
8845 return func.apply(undefined, arguments);
8846 };
8847 }
8848
8849 /**
8850 * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
8851 *
8852 * @private
8853 * @param {Array} array The array to shuffle.
8854 * @param {number} [size=array.length] The size of `array`.
8855 * @returns {Array} Returns `array`.
8856 */
8857 function shuffleSelf(array, size) {
8858 var index = -1,
8859 length = array.length,
8860 lastIndex = length - 1;
8861
8862 size = size === undefined ? length : size;
8863 while (++index < size) {
8864 var rand = baseRandom(index, lastIndex),
8865 value = array[rand];
8866
8867 array[rand] = array[index];
8868 array[index] = value;
8869 }
8870 array.length = size;
8871 return array;
8872 }
8873
8874 /**
8875 * Converts `string` to a property path array.
8876 *
8877 * @private
8878 * @param {string} string The string to convert.
8879 * @returns {Array} Returns the property path array.
8880 */
8881 var stringToPath = memoizeCapped(function(string) {
8882 var result = [];
8883 if (string.charCodeAt(0) === 46 /* . */) {
8884 result.push('');
8885 }
8886 string.replace(rePropName, function(match, number, quote, subString) {
8887 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8888 });
8889 return result;
8890 });
8891
8892 /**
8893 * Converts `value` to a string key if it's not a string or symbol.
8894 *
8895 * @private
8896 * @param {*} value The value to inspect.
8897 * @returns {string|symbol} Returns the key.
8898 */
8899 function toKey(value) {
8900 if (typeof value == 'string' || isSymbol(value)) {
8901 return value;
8902 }
8903 var result = (value + '');
8904 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8905 }
8906
8907 /**
8908 * Converts `func` to its source code.
8909 *
8910 * @private
8911 * @param {Function} func The function to convert.
8912 * @returns {string} Returns the source code.
8913 */
8914 function toSource(func) {
8915 if (func != null) {
8916 try {
8917 return funcToString.call(func);
8918 } catch (e) {}
8919 try {
8920 return (func + '');
8921 } catch (e) {}
8922 }
8923 return '';
8924 }
8925
8926 /**
8927 * Updates wrapper `details` based on `bitmask` flags.
8928 *
8929 * @private
8930 * @returns {Array} details The details to modify.
8931 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8932 * @returns {Array} Returns `details`.
8933 */
8934 function updateWrapDetails(details, bitmask) {
8935 arrayEach(wrapFlags, function(pair) {
8936 var value = '_.' + pair[0];
8937 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
8938 details.push(value);
8939 }
8940 });
8941 return details.sort();
8942 }
8943
8944 /**
8945 * Creates a clone of `wrapper`.
8946 *
8947 * @private
8948 * @param {Object} wrapper The wrapper to clone.
8949 * @returns {Object} Returns the cloned wrapper.
8950 */
8951 function wrapperClone(wrapper) {
8952 if (wrapper instanceof LazyWrapper) {
8953 return wrapper.clone();
8954 }
8955 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
8956 result.__actions__ = copyArray(wrapper.__actions__);
8957 result.__index__ = wrapper.__index__;
8958 result.__values__ = wrapper.__values__;
8959 return result;
8960 }
8961
8962 /*------------------------------------------------------------------------*/
8963
8964 /**
8965 * Creates an array of elements split into groups the length of `size`.
8966 * If `array` can't be split evenly, the final chunk will be the remaining
8967 * elements.
8968 *
8969 * @static
8970 * @memberOf _
8971 * @since 3.0.0
8972 * @category Array
8973 * @param {Array} array The array to process.
8974 * @param {number} [size=1] The length of each chunk
8975 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8976 * @returns {Array} Returns the new array of chunks.
8977 * @example
8978 *
8979 * _.chunk(['a', 'b', 'c', 'd'], 2);
8980 * // => [['a', 'b'], ['c', 'd']]
8981 *
8982 * _.chunk(['a', 'b', 'c', 'd'], 3);
8983 * // => [['a', 'b', 'c'], ['d']]
8984 */
8985 function chunk(array, size, guard) {
8986 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
8987 size = 1;
8988 } else {
8989 size = nativeMax(toInteger(size), 0);
8990 }
8991 var length = array == null ? 0 : array.length;
8992 if (!length || size < 1) {
8993 return [];
8994 }
8995 var index = 0,
8996 resIndex = 0,
8997 result = Array(nativeCeil(length / size));
8998
8999 while (index < length) {
9000 result[resIndex++] = baseSlice(array, index, (index += size));
9001 }
9002 return result;
9003 }
9004
9005 /**
9006 * Creates an array with all falsey values removed. The values `false`, `null`,
9007 * `0`, `""`, `undefined`, and `NaN` are falsey.
9008 *
9009 * @static
9010 * @memberOf _
9011 * @since 0.1.0
9012 * @category Array
9013 * @param {Array} array The array to compact.
9014 * @returns {Array} Returns the new array of filtered values.
9015 * @example
9016 *
9017 * _.compact([0, 1, false, 2, '', 3]);
9018 * // => [1, 2, 3]
9019 */
9020 function compact(array) {
9021 var index = -1,
9022 length = array == null ? 0 : array.length,
9023 resIndex = 0,
9024 result = [];
9025
9026 while (++index < length) {
9027 var value = array[index];
9028 if (value) {
9029 result[resIndex++] = value;
9030 }
9031 }
9032 return result;
9033 }
9034
9035 /**
9036 * Creates a new array concatenating `array` with any additional arrays
9037 * and/or values.
9038 *
9039 * @static
9040 * @memberOf _
9041 * @since 4.0.0
9042 * @category Array
9043 * @param {Array} array The array to concatenate.
9044 * @param {...*} [values] The values to concatenate.
9045 * @returns {Array} Returns the new concatenated array.
9046 * @example
9047 *
9048 * var array = [1];
9049 * var other = _.concat(array, 2, [3], [[4]]);
9050 *
9051 * console.log(other);
9052 * // => [1, 2, 3, [4]]
9053 *
9054 * console.log(array);
9055 * // => [1]
9056 */
9057 function concat() {
9058 var length = arguments.length;
9059 if (!length) {
9060 return [];
9061 }
9062 var args = Array(length - 1),
9063 array = arguments[0],
9064 index = length;
9065
9066 while (index--) {
9067 args[index - 1] = arguments[index];
9068 }
9069 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
9070 }
9071
9072 /**
9073 * Creates an array of `array` values not included in the other given arrays
9074 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9075 * for equality comparisons. The order and references of result values are
9076 * determined by the first array.
9077 *
9078 * **Note:** Unlike `_.pullAll`, this method returns a new array.
9079 *
9080 * @static
9081 * @memberOf _
9082 * @since 0.1.0
9083 * @category Array
9084 * @param {Array} array The array to inspect.
9085 * @param {...Array} [values] The values to exclude.
9086 * @returns {Array} Returns the new array of filtered values.
9087 * @see _.without, _.xor
9088 * @example
9089 *
9090 * _.difference([2, 1], [2, 3]);
9091 * // => [1]
9092 */
9093 var difference = baseRest(function(array, values) {
9094 return isArrayLikeObject(array)
9095 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
9096 : [];
9097 });
9098
9099 /**
9100 * This method is like `_.difference` except that it accepts `iteratee` which
9101 * is invoked for each element of `array` and `values` to generate the criterion
9102 * by which they're compared. The order and references of result values are
9103 * determined by the first array. The iteratee is invoked with one argument:
9104 * (value).
9105 *
9106 * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
9107 *
9108 * @static
9109 * @memberOf _
9110 * @since 4.0.0
9111 * @category Array
9112 * @param {Array} array The array to inspect.
9113 * @param {...Array} [values] The values to exclude.
9114 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9115 * @returns {Array} Returns the new array of filtered values.
9116 * @example
9117 *
9118 * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
9119 * // => [1.2]
9120 *
9121 * // The `_.property` iteratee shorthand.
9122 * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
9123 * // => [{ 'x': 2 }]
9124 */
9125 var differenceBy = baseRest(function(array, values) {
9126 var iteratee = last(values);
9127 if (isArrayLikeObject(iteratee)) {
9128 iteratee = undefined;
9129 }
9130 return isArrayLikeObject(array)
9131 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
9132 : [];
9133 });
9134
9135 /**
9136 * This method is like `_.difference` except that it accepts `comparator`
9137 * which is invoked to compare elements of `array` to `values`. The order and
9138 * references of result values are determined by the first array. The comparator
9139 * is invoked with two arguments: (arrVal, othVal).
9140 *
9141 * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
9142 *
9143 * @static
9144 * @memberOf _
9145 * @since 4.0.0
9146 * @category Array
9147 * @param {Array} array The array to inspect.
9148 * @param {...Array} [values] The values to exclude.
9149 * @param {Function} [comparator] The comparator invoked per element.
9150 * @returns {Array} Returns the new array of filtered values.
9151 * @example
9152 *
9153 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9154 *
9155 * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
9156 * // => [{ 'x': 2, 'y': 1 }]
9157 */
9158 var differenceWith = baseRest(function(array, values) {
9159 var comparator = last(values);
9160 if (isArrayLikeObject(comparator)) {
9161 comparator = undefined;
9162 }
9163 return isArrayLikeObject(array)
9164 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
9165 : [];
9166 });
9167
9168 /**
9169 * Creates a slice of `array` with `n` elements dropped from the beginning.
9170 *
9171 * @static
9172 * @memberOf _
9173 * @since 0.5.0
9174 * @category Array
9175 * @param {Array} array The array to query.
9176 * @param {number} [n=1] The number of elements to drop.
9177 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9178 * @returns {Array} Returns the slice of `array`.
9179 * @example
9180 *
9181 * _.drop([1, 2, 3]);
9182 * // => [2, 3]
9183 *
9184 * _.drop([1, 2, 3], 2);
9185 * // => [3]
9186 *
9187 * _.drop([1, 2, 3], 5);
9188 * // => []
9189 *
9190 * _.drop([1, 2, 3], 0);
9191 * // => [1, 2, 3]
9192 */
9193 function drop(array, n, guard) {
9194 var length = array == null ? 0 : array.length;
9195 if (!length) {
9196 return [];
9197 }
9198 n = (guard || n === undefined) ? 1 : toInteger(n);
9199 return baseSlice(array, n < 0 ? 0 : n, length);
9200 }
9201
9202 /**
9203 * Creates a slice of `array` with `n` elements dropped from the end.
9204 *
9205 * @static
9206 * @memberOf _
9207 * @since 3.0.0
9208 * @category Array
9209 * @param {Array} array The array to query.
9210 * @param {number} [n=1] The number of elements to drop.
9211 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9212 * @returns {Array} Returns the slice of `array`.
9213 * @example
9214 *
9215 * _.dropRight([1, 2, 3]);
9216 * // => [1, 2]
9217 *
9218 * _.dropRight([1, 2, 3], 2);
9219 * // => [1]
9220 *
9221 * _.dropRight([1, 2, 3], 5);
9222 * // => []
9223 *
9224 * _.dropRight([1, 2, 3], 0);
9225 * // => [1, 2, 3]
9226 */
9227 function dropRight(array, n, guard) {
9228 var length = array == null ? 0 : array.length;
9229 if (!length) {
9230 return [];
9231 }
9232 n = (guard || n === undefined) ? 1 : toInteger(n);
9233 n = length - n;
9234 return baseSlice(array, 0, n < 0 ? 0 : n);
9235 }
9236
9237 /**
9238 * Creates a slice of `array` excluding elements dropped from the end.
9239 * Elements are dropped until `predicate` returns falsey. The predicate is
9240 * invoked with three arguments: (value, index, array).
9241 *
9242 * @static
9243 * @memberOf _
9244 * @since 3.0.0
9245 * @category Array
9246 * @param {Array} array The array to query.
9247 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9248 * @returns {Array} Returns the slice of `array`.
9249 * @example
9250 *
9251 * var users = [
9252 * { 'user': 'barney', 'active': true },
9253 * { 'user': 'fred', 'active': false },
9254 * { 'user': 'pebbles', 'active': false }
9255 * ];
9256 *
9257 * _.dropRightWhile(users, function(o) { return !o.active; });
9258 * // => objects for ['barney']
9259 *
9260 * // The `_.matches` iteratee shorthand.
9261 * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
9262 * // => objects for ['barney', 'fred']
9263 *
9264 * // The `_.matchesProperty` iteratee shorthand.
9265 * _.dropRightWhile(users, ['active', false]);
9266 * // => objects for ['barney']
9267 *
9268 * // The `_.property` iteratee shorthand.
9269 * _.dropRightWhile(users, 'active');
9270 * // => objects for ['barney', 'fred', 'pebbles']
9271 */
9272 function dropRightWhile(array, predicate) {
9273 return (array && array.length)
9274 ? baseWhile(array, getIteratee(predicate, 3), true, true)
9275 : [];
9276 }
9277
9278 /**
9279 * Creates a slice of `array` excluding elements dropped from the beginning.
9280 * Elements are dropped until `predicate` returns falsey. The predicate is
9281 * invoked with three arguments: (value, index, array).
9282 *
9283 * @static
9284 * @memberOf _
9285 * @since 3.0.0
9286 * @category Array
9287 * @param {Array} array The array to query.
9288 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9289 * @returns {Array} Returns the slice of `array`.
9290 * @example
9291 *
9292 * var users = [
9293 * { 'user': 'barney', 'active': false },
9294 * { 'user': 'fred', 'active': false },
9295 * { 'user': 'pebbles', 'active': true }
9296 * ];
9297 *
9298 * _.dropWhile(users, function(o) { return !o.active; });
9299 * // => objects for ['pebbles']
9300 *
9301 * // The `_.matches` iteratee shorthand.
9302 * _.dropWhile(users, { 'user': 'barney', 'active': false });
9303 * // => objects for ['fred', 'pebbles']
9304 *
9305 * // The `_.matchesProperty` iteratee shorthand.
9306 * _.dropWhile(users, ['active', false]);
9307 * // => objects for ['pebbles']
9308 *
9309 * // The `_.property` iteratee shorthand.
9310 * _.dropWhile(users, 'active');
9311 * // => objects for ['barney', 'fred', 'pebbles']
9312 */
9313 function dropWhile(array, predicate) {
9314 return (array && array.length)
9315 ? baseWhile(array, getIteratee(predicate, 3), true)
9316 : [];
9317 }
9318
9319 /**
9320 * Fills elements of `array` with `value` from `start` up to, but not
9321 * including, `end`.
9322 *
9323 * **Note:** This method mutates `array`.
9324 *
9325 * @static
9326 * @memberOf _
9327 * @since 3.2.0
9328 * @category Array
9329 * @param {Array} array The array to fill.
9330 * @param {*} value The value to fill `array` with.
9331 * @param {number} [start=0] The start position.
9332 * @param {number} [end=array.length] The end position.
9333 * @returns {Array} Returns `array`.
9334 * @example
9335 *
9336 * var array = [1, 2, 3];
9337 *
9338 * _.fill(array, 'a');
9339 * console.log(array);
9340 * // => ['a', 'a', 'a']
9341 *
9342 * _.fill(Array(3), 2);
9343 * // => [2, 2, 2]
9344 *
9345 * _.fill([4, 6, 8, 10], '*', 1, 3);
9346 * // => [4, '*', '*', 10]
9347 */
9348 function fill(array, value, start, end) {
9349 var length = array == null ? 0 : array.length;
9350 if (!length) {
9351 return [];
9352 }
9353 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
9354 start = 0;
9355 end = length;
9356 }
9357 return baseFill(array, value, start, end);
9358 }
9359
9360 /**
9361 * This method is like `_.find` except that it returns the index of the first
9362 * element `predicate` returns truthy for instead of the element itself.
9363 *
9364 * @static
9365 * @memberOf _
9366 * @since 1.1.0
9367 * @category Array
9368 * @param {Array} array The array to inspect.
9369 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9370 * @param {number} [fromIndex=0] The index to search from.
9371 * @returns {number} Returns the index of the found element, else `-1`.
9372 * @example
9373 *
9374 * var users = [
9375 * { 'user': 'barney', 'active': false },
9376 * { 'user': 'fred', 'active': false },
9377 * { 'user': 'pebbles', 'active': true }
9378 * ];
9379 *
9380 * _.findIndex(users, function(o) { return o.user == 'barney'; });
9381 * // => 0
9382 *
9383 * // The `_.matches` iteratee shorthand.
9384 * _.findIndex(users, { 'user': 'fred', 'active': false });
9385 * // => 1
9386 *
9387 * // The `_.matchesProperty` iteratee shorthand.
9388 * _.findIndex(users, ['active', false]);
9389 * // => 0
9390 *
9391 * // The `_.property` iteratee shorthand.
9392 * _.findIndex(users, 'active');
9393 * // => 2
9394 */
9395 function findIndex(array, predicate, fromIndex) {
9396 var length = array == null ? 0 : array.length;
9397 if (!length) {
9398 return -1;
9399 }
9400 var index = fromIndex == null ? 0 : toInteger(fromIndex);
9401 if (index < 0) {
9402 index = nativeMax(length + index, 0);
9403 }
9404 return baseFindIndex(array, getIteratee(predicate, 3), index);
9405 }
9406
9407 /**
9408 * This method is like `_.findIndex` except that it iterates over elements
9409 * of `collection` from right to left.
9410 *
9411 * @static
9412 * @memberOf _
9413 * @since 2.0.0
9414 * @category Array
9415 * @param {Array} array The array to inspect.
9416 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9417 * @param {number} [fromIndex=array.length-1] The index to search from.
9418 * @returns {number} Returns the index of the found element, else `-1`.
9419 * @example
9420 *
9421 * var users = [
9422 * { 'user': 'barney', 'active': true },
9423 * { 'user': 'fred', 'active': false },
9424 * { 'user': 'pebbles', 'active': false }
9425 * ];
9426 *
9427 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
9428 * // => 2
9429 *
9430 * // The `_.matches` iteratee shorthand.
9431 * _.findLastIndex(users, { 'user': 'barney', 'active': true });
9432 * // => 0
9433 *
9434 * // The `_.matchesProperty` iteratee shorthand.
9435 * _.findLastIndex(users, ['active', false]);
9436 * // => 2
9437 *
9438 * // The `_.property` iteratee shorthand.
9439 * _.findLastIndex(users, 'active');
9440 * // => 0
9441 */
9442 function findLastIndex(array, predicate, fromIndex) {
9443 var length = array == null ? 0 : array.length;
9444 if (!length) {
9445 return -1;
9446 }
9447 var index = length - 1;
9448 if (fromIndex !== undefined) {
9449 index = toInteger(fromIndex);
9450 index = fromIndex < 0
9451 ? nativeMax(length + index, 0)
9452 : nativeMin(index, length - 1);
9453 }
9454 return baseFindIndex(array, getIteratee(predicate, 3), index, true);
9455 }
9456
9457 /**
9458 * Flattens `array` a single level deep.
9459 *
9460 * @static
9461 * @memberOf _
9462 * @since 0.1.0
9463 * @category Array
9464 * @param {Array} array The array to flatten.
9465 * @returns {Array} Returns the new flattened array.
9466 * @example
9467 *
9468 * _.flatten([1, [2, [3, [4]], 5]]);
9469 * // => [1, 2, [3, [4]], 5]
9470 */
9471 function flatten(array) {
9472 var length = array == null ? 0 : array.length;
9473 return length ? baseFlatten(array, 1) : [];
9474 }
9475
9476 /**
9477 * Recursively flattens `array`.
9478 *
9479 * @static
9480 * @memberOf _
9481 * @since 3.0.0
9482 * @category Array
9483 * @param {Array} array The array to flatten.
9484 * @returns {Array} Returns the new flattened array.
9485 * @example
9486 *
9487 * _.flattenDeep([1, [2, [3, [4]], 5]]);
9488 * // => [1, 2, 3, 4, 5]
9489 */
9490 function flattenDeep(array) {
9491 var length = array == null ? 0 : array.length;
9492 return length ? baseFlatten(array, INFINITY) : [];
9493 }
9494
9495 /**
9496 * Recursively flatten `array` up to `depth` times.
9497 *
9498 * @static
9499 * @memberOf _
9500 * @since 4.4.0
9501 * @category Array
9502 * @param {Array} array The array to flatten.
9503 * @param {number} [depth=1] The maximum recursion depth.
9504 * @returns {Array} Returns the new flattened array.
9505 * @example
9506 *
9507 * var array = [1, [2, [3, [4]], 5]];
9508 *
9509 * _.flattenDepth(array, 1);
9510 * // => [1, 2, [3, [4]], 5]
9511 *
9512 * _.flattenDepth(array, 2);
9513 * // => [1, 2, 3, [4], 5]
9514 */
9515 function flattenDepth(array, depth) {
9516 var length = array == null ? 0 : array.length;
9517 if (!length) {
9518 return [];
9519 }
9520 depth = depth === undefined ? 1 : toInteger(depth);
9521 return baseFlatten(array, depth);
9522 }
9523
9524 /**
9525 * The inverse of `_.toPairs`; this method returns an object composed
9526 * from key-value `pairs`.
9527 *
9528 * @static
9529 * @memberOf _
9530 * @since 4.0.0
9531 * @category Array
9532 * @param {Array} pairs The key-value pairs.
9533 * @returns {Object} Returns the new object.
9534 * @example
9535 *
9536 * _.fromPairs([['a', 1], ['b', 2]]);
9537 * // => { 'a': 1, 'b': 2 }
9538 */
9539 function fromPairs(pairs) {
9540 var index = -1,
9541 length = pairs == null ? 0 : pairs.length,
9542 result = {};
9543
9544 while (++index < length) {
9545 var pair = pairs[index];
9546 result[pair[0]] = pair[1];
9547 }
9548 return result;
9549 }
9550
9551 /**
9552 * Gets the first element of `array`.
9553 *
9554 * @static
9555 * @memberOf _
9556 * @since 0.1.0
9557 * @alias first
9558 * @category Array
9559 * @param {Array} array The array to query.
9560 * @returns {*} Returns the first element of `array`.
9561 * @example
9562 *
9563 * _.head([1, 2, 3]);
9564 * // => 1
9565 *
9566 * _.head([]);
9567 * // => undefined
9568 */
9569 function head(array) {
9570 return (array && array.length) ? array[0] : undefined;
9571 }
9572
9573 /**
9574 * Gets the index at which the first occurrence of `value` is found in `array`
9575 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9576 * for equality comparisons. If `fromIndex` is negative, it's used as the
9577 * offset from the end of `array`.
9578 *
9579 * @static
9580 * @memberOf _
9581 * @since 0.1.0
9582 * @category Array
9583 * @param {Array} array The array to inspect.
9584 * @param {*} value The value to search for.
9585 * @param {number} [fromIndex=0] The index to search from.
9586 * @returns {number} Returns the index of the matched value, else `-1`.
9587 * @example
9588 *
9589 * _.indexOf([1, 2, 1, 2], 2);
9590 * // => 1
9591 *
9592 * // Search from the `fromIndex`.
9593 * _.indexOf([1, 2, 1, 2], 2, 2);
9594 * // => 3
9595 */
9596 function indexOf(array, value, fromIndex) {
9597 var length = array == null ? 0 : array.length;
9598 if (!length) {
9599 return -1;
9600 }
9601 var index = fromIndex == null ? 0 : toInteger(fromIndex);
9602 if (index < 0) {
9603 index = nativeMax(length + index, 0);
9604 }
9605 return baseIndexOf(array, value, index);
9606 }
9607
9608 /**
9609 * Gets all but the last element of `array`.
9610 *
9611 * @static
9612 * @memberOf _
9613 * @since 0.1.0
9614 * @category Array
9615 * @param {Array} array The array to query.
9616 * @returns {Array} Returns the slice of `array`.
9617 * @example
9618 *
9619 * _.initial([1, 2, 3]);
9620 * // => [1, 2]
9621 */
9622 function initial(array) {
9623 var length = array == null ? 0 : array.length;
9624 return length ? baseSlice(array, 0, -1) : [];
9625 }
9626
9627 /**
9628 * Creates an array of unique values that are included in all given arrays
9629 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9630 * for equality comparisons. The order and references of result values are
9631 * determined by the first array.
9632 *
9633 * @static
9634 * @memberOf _
9635 * @since 0.1.0
9636 * @category Array
9637 * @param {...Array} [arrays] The arrays to inspect.
9638 * @returns {Array} Returns the new array of intersecting values.
9639 * @example
9640 *
9641 * _.intersection([2, 1], [2, 3]);
9642 * // => [2]
9643 */
9644 var intersection = baseRest(function(arrays) {
9645 var mapped = arrayMap(arrays, castArrayLikeObject);
9646 return (mapped.length && mapped[0] === arrays[0])
9647 ? baseIntersection(mapped)
9648 : [];
9649 });
9650
9651 /**
9652 * This method is like `_.intersection` except that it accepts `iteratee`
9653 * which is invoked for each element of each `arrays` to generate the criterion
9654 * by which they're compared. The order and references of result values are
9655 * determined by the first array. The iteratee is invoked with one argument:
9656 * (value).
9657 *
9658 * @static
9659 * @memberOf _
9660 * @since 4.0.0
9661 * @category Array
9662 * @param {...Array} [arrays] The arrays to inspect.
9663 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9664 * @returns {Array} Returns the new array of intersecting values.
9665 * @example
9666 *
9667 * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
9668 * // => [2.1]
9669 *
9670 * // The `_.property` iteratee shorthand.
9671 * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9672 * // => [{ 'x': 1 }]
9673 */
9674 var intersectionBy = baseRest(function(arrays) {
9675 var iteratee = last(arrays),
9676 mapped = arrayMap(arrays, castArrayLikeObject);
9677
9678 if (iteratee === last(mapped)) {
9679 iteratee = undefined;
9680 } else {
9681 mapped.pop();
9682 }
9683 return (mapped.length && mapped[0] === arrays[0])
9684 ? baseIntersection(mapped, getIteratee(iteratee, 2))
9685 : [];
9686 });
9687
9688 /**
9689 * This method is like `_.intersection` except that it accepts `comparator`
9690 * which is invoked to compare elements of `arrays`. The order and references
9691 * of result values are determined by the first array. The comparator is
9692 * invoked with two arguments: (arrVal, othVal).
9693 *
9694 * @static
9695 * @memberOf _
9696 * @since 4.0.0
9697 * @category Array
9698 * @param {...Array} [arrays] The arrays to inspect.
9699 * @param {Function} [comparator] The comparator invoked per element.
9700 * @returns {Array} Returns the new array of intersecting values.
9701 * @example
9702 *
9703 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9704 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9705 *
9706 * _.intersectionWith(objects, others, _.isEqual);
9707 * // => [{ 'x': 1, 'y': 2 }]
9708 */
9709 var intersectionWith = baseRest(function(arrays) {
9710 var comparator = last(arrays),
9711 mapped = arrayMap(arrays, castArrayLikeObject);
9712
9713 comparator = typeof comparator == 'function' ? comparator : undefined;
9714 if (comparator) {
9715 mapped.pop();
9716 }
9717 return (mapped.length && mapped[0] === arrays[0])
9718 ? baseIntersection(mapped, undefined, comparator)
9719 : [];
9720 });
9721
9722 /**
9723 * Converts all elements in `array` into a string separated by `separator`.
9724 *
9725 * @static
9726 * @memberOf _
9727 * @since 4.0.0
9728 * @category Array
9729 * @param {Array} array The array to convert.
9730 * @param {string} [separator=','] The element separator.
9731 * @returns {string} Returns the joined string.
9732 * @example
9733 *
9734 * _.join(['a', 'b', 'c'], '~');
9735 * // => 'a~b~c'
9736 */
9737 function join(array, separator) {
9738 return array == null ? '' : nativeJoin.call(array, separator);
9739 }
9740
9741 /**
9742 * Gets the last element of `array`.
9743 *
9744 * @static
9745 * @memberOf _
9746 * @since 0.1.0
9747 * @category Array
9748 * @param {Array} array The array to query.
9749 * @returns {*} Returns the last element of `array`.
9750 * @example
9751 *
9752 * _.last([1, 2, 3]);
9753 * // => 3
9754 */
9755 function last(array) {
9756 var length = array == null ? 0 : array.length;
9757 return length ? array[length - 1] : undefined;
9758 }
9759
9760 /**
9761 * This method is like `_.indexOf` except that it iterates over elements of
9762 * `array` from right to left.
9763 *
9764 * @static
9765 * @memberOf _
9766 * @since 0.1.0
9767 * @category Array
9768 * @param {Array} array The array to inspect.
9769 * @param {*} value The value to search for.
9770 * @param {number} [fromIndex=array.length-1] The index to search from.
9771 * @returns {number} Returns the index of the matched value, else `-1`.
9772 * @example
9773 *
9774 * _.lastIndexOf([1, 2, 1, 2], 2);
9775 * // => 3
9776 *
9777 * // Search from the `fromIndex`.
9778 * _.lastIndexOf([1, 2, 1, 2], 2, 2);
9779 * // => 1
9780 */
9781 function lastIndexOf(array, value, fromIndex) {
9782 var length = array == null ? 0 : array.length;
9783 if (!length) {
9784 return -1;
9785 }
9786 var index = length;
9787 if (fromIndex !== undefined) {
9788 index = toInteger(fromIndex);
9789 index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
9790 }
9791 return value === value
9792 ? strictLastIndexOf(array, value, index)
9793 : baseFindIndex(array, baseIsNaN, index, true);
9794 }
9795
9796 /**
9797 * Gets the element at index `n` of `array`. If `n` is negative, the nth
9798 * element from the end is returned.
9799 *
9800 * @static
9801 * @memberOf _
9802 * @since 4.11.0
9803 * @category Array
9804 * @param {Array} array The array to query.
9805 * @param {number} [n=0] The index of the element to return.
9806 * @returns {*} Returns the nth element of `array`.
9807 * @example
9808 *
9809 * var array = ['a', 'b', 'c', 'd'];
9810 *
9811 * _.nth(array, 1);
9812 * // => 'b'
9813 *
9814 * _.nth(array, -2);
9815 * // => 'c';
9816 */
9817 function nth(array, n) {
9818 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
9819 }
9820
9821 /**
9822 * Removes all given values from `array` using
9823 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9824 * for equality comparisons.
9825 *
9826 * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
9827 * to remove elements from an array by predicate.
9828 *
9829 * @static
9830 * @memberOf _
9831 * @since 2.0.0
9832 * @category Array
9833 * @param {Array} array The array to modify.
9834 * @param {...*} [values] The values to remove.
9835 * @returns {Array} Returns `array`.
9836 * @example
9837 *
9838 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9839 *
9840 * _.pull(array, 'a', 'c');
9841 * console.log(array);
9842 * // => ['b', 'b']
9843 */
9844 var pull = baseRest(pullAll);
9845
9846 /**
9847 * This method is like `_.pull` except that it accepts an array of values to remove.
9848 *
9849 * **Note:** Unlike `_.difference`, this method mutates `array`.
9850 *
9851 * @static
9852 * @memberOf _
9853 * @since 4.0.0
9854 * @category Array
9855 * @param {Array} array The array to modify.
9856 * @param {Array} values The values to remove.
9857 * @returns {Array} Returns `array`.
9858 * @example
9859 *
9860 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9861 *
9862 * _.pullAll(array, ['a', 'c']);
9863 * console.log(array);
9864 * // => ['b', 'b']
9865 */
9866 function pullAll(array, values) {
9867 return (array && array.length && values && values.length)
9868 ? basePullAll(array, values)
9869 : array;
9870 }
9871
9872 /**
9873 * This method is like `_.pullAll` except that it accepts `iteratee` which is
9874 * invoked for each element of `array` and `values` to generate the criterion
9875 * by which they're compared. The iteratee is invoked with one argument: (value).
9876 *
9877 * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
9878 *
9879 * @static
9880 * @memberOf _
9881 * @since 4.0.0
9882 * @category Array
9883 * @param {Array} array The array to modify.
9884 * @param {Array} values The values to remove.
9885 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9886 * @returns {Array} Returns `array`.
9887 * @example
9888 *
9889 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
9890 *
9891 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
9892 * console.log(array);
9893 * // => [{ 'x': 2 }]
9894 */
9895 function pullAllBy(array, values, iteratee) {
9896 return (array && array.length && values && values.length)
9897 ? basePullAll(array, values, getIteratee(iteratee, 2))
9898 : array;
9899 }
9900
9901 /**
9902 * This method is like `_.pullAll` except that it accepts `comparator` which
9903 * is invoked to compare elements of `array` to `values`. The comparator is
9904 * invoked with two arguments: (arrVal, othVal).
9905 *
9906 * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
9907 *
9908 * @static
9909 * @memberOf _
9910 * @since 4.6.0
9911 * @category Array
9912 * @param {Array} array The array to modify.
9913 * @param {Array} values The values to remove.
9914 * @param {Function} [comparator] The comparator invoked per element.
9915 * @returns {Array} Returns `array`.
9916 * @example
9917 *
9918 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
9919 *
9920 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
9921 * console.log(array);
9922 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
9923 */
9924 function pullAllWith(array, values, comparator) {
9925 return (array && array.length && values && values.length)
9926 ? basePullAll(array, values, undefined, comparator)
9927 : array;
9928 }
9929
9930 /**
9931 * Removes elements from `array` corresponding to `indexes` and returns an
9932 * array of removed elements.
9933 *
9934 * **Note:** Unlike `_.at`, this method mutates `array`.
9935 *
9936 * @static
9937 * @memberOf _
9938 * @since 3.0.0
9939 * @category Array
9940 * @param {Array} array The array to modify.
9941 * @param {...(number|number[])} [indexes] The indexes of elements to remove.
9942 * @returns {Array} Returns the new array of removed elements.
9943 * @example
9944 *
9945 * var array = ['a', 'b', 'c', 'd'];
9946 * var pulled = _.pullAt(array, [1, 3]);
9947 *
9948 * console.log(array);
9949 * // => ['a', 'c']
9950 *
9951 * console.log(pulled);
9952 * // => ['b', 'd']
9953 */
9954 var pullAt = flatRest(function(array, indexes) {
9955 var length = array == null ? 0 : array.length,
9956 result = baseAt(array, indexes);
9957
9958 basePullAt(array, arrayMap(indexes, function(index) {
9959 return isIndex(index, length) ? +index : index;
9960 }).sort(compareAscending));
9961
9962 return result;
9963 });
9964
9965 /**
9966 * Removes all elements from `array` that `predicate` returns truthy for
9967 * and returns an array of the removed elements. The predicate is invoked
9968 * with three arguments: (value, index, array).
9969 *
9970 * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
9971 * to pull elements from an array by value.
9972 *
9973 * @static
9974 * @memberOf _
9975 * @since 2.0.0
9976 * @category Array
9977 * @param {Array} array The array to modify.
9978 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9979 * @returns {Array} Returns the new array of removed elements.
9980 * @example
9981 *
9982 * var array = [1, 2, 3, 4];
9983 * var evens = _.remove(array, function(n) {
9984 * return n % 2 == 0;
9985 * });
9986 *
9987 * console.log(array);
9988 * // => [1, 3]
9989 *
9990 * console.log(evens);
9991 * // => [2, 4]
9992 */
9993 function remove(array, predicate) {
9994 var result = [];
9995 if (!(array && array.length)) {
9996 return result;
9997 }
9998 var index = -1,
9999 indexes = [],
10000 length = array.length;
10001
10002 predicate = getIteratee(predicate, 3);
10003 while (++index < length) {
10004 var value = array[index];
10005 if (predicate(value, index, array)) {
10006 result.push(value);
10007 indexes.push(index);
10008 }
10009 }
10010 basePullAt(array, indexes);
10011 return result;
10012 }
10013
10014 /**
10015 * Reverses `array` so that the first element becomes the last, the second
10016 * element becomes the second to last, and so on.
10017 *
10018 * **Note:** This method mutates `array` and is based on
10019 * [`Array#reverse`](https://mdn.io/Array/reverse).
10020 *
10021 * @static
10022 * @memberOf _
10023 * @since 4.0.0
10024 * @category Array
10025 * @param {Array} array The array to modify.
10026 * @returns {Array} Returns `array`.
10027 * @example
10028 *
10029 * var array = [1, 2, 3];
10030 *
10031 * _.reverse(array);
10032 * // => [3, 2, 1]
10033 *
10034 * console.log(array);
10035 * // => [3, 2, 1]
10036 */
10037 function reverse(array) {
10038 return array == null ? array : nativeReverse.call(array);
10039 }
10040
10041 /**
10042 * Creates a slice of `array` from `start` up to, but not including, `end`.
10043 *
10044 * **Note:** This method is used instead of
10045 * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
10046 * returned.
10047 *
10048 * @static
10049 * @memberOf _
10050 * @since 3.0.0
10051 * @category Array
10052 * @param {Array} array The array to slice.
10053 * @param {number} [start=0] The start position.
10054 * @param {number} [end=array.length] The end position.
10055 * @returns {Array} Returns the slice of `array`.
10056 */
10057 function slice(array, start, end) {
10058 var length = array == null ? 0 : array.length;
10059 if (!length) {
10060 return [];
10061 }
10062 if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
10063 start = 0;
10064 end = length;
10065 }
10066 else {
10067 start = start == null ? 0 : toInteger(start);
10068 end = end === undefined ? length : toInteger(end);
10069 }
10070 return baseSlice(array, start, end);
10071 }
10072
10073 /**
10074 * Uses a binary search to determine the lowest index at which `value`
10075 * should be inserted into `array` in order to maintain its sort order.
10076 *
10077 * @static
10078 * @memberOf _
10079 * @since 0.1.0
10080 * @category Array
10081 * @param {Array} array The sorted array to inspect.
10082 * @param {*} value The value to evaluate.
10083 * @returns {number} Returns the index at which `value` should be inserted
10084 * into `array`.
10085 * @example
10086 *
10087 * _.sortedIndex([30, 50], 40);
10088 * // => 1
10089 */
10090 function sortedIndex(array, value) {
10091 return baseSortedIndex(array, value);
10092 }
10093
10094 /**
10095 * This method is like `_.sortedIndex` except that it accepts `iteratee`
10096 * which is invoked for `value` and each element of `array` to compute their
10097 * sort ranking. The iteratee is invoked with one argument: (value).
10098 *
10099 * @static
10100 * @memberOf _
10101 * @since 4.0.0
10102 * @category Array
10103 * @param {Array} array The sorted array to inspect.
10104 * @param {*} value The value to evaluate.
10105 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10106 * @returns {number} Returns the index at which `value` should be inserted
10107 * into `array`.
10108 * @example
10109 *
10110 * var objects = [{ 'x': 4 }, { 'x': 5 }];
10111 *
10112 * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
10113 * // => 0
10114 *
10115 * // The `_.property` iteratee shorthand.
10116 * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
10117 * // => 0
10118 */
10119 function sortedIndexBy(array, value, iteratee) {
10120 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
10121 }
10122
10123 /**
10124 * This method is like `_.indexOf` except that it performs a binary
10125 * search on a sorted `array`.
10126 *
10127 * @static
10128 * @memberOf _
10129 * @since 4.0.0
10130 * @category Array
10131 * @param {Array} array The array to inspect.
10132 * @param {*} value The value to search for.
10133 * @returns {number} Returns the index of the matched value, else `-1`.
10134 * @example
10135 *
10136 * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
10137 * // => 1
10138 */
10139 function sortedIndexOf(array, value) {
10140 var length = array == null ? 0 : array.length;
10141 if (length) {
10142 var index = baseSortedIndex(array, value);
10143 if (index < length && eq(array[index], value)) {
10144 return index;
10145 }
10146 }
10147 return -1;
10148 }
10149
10150 /**
10151 * This method is like `_.sortedIndex` except that it returns the highest
10152 * index at which `value` should be inserted into `array` in order to
10153 * maintain its sort order.
10154 *
10155 * @static
10156 * @memberOf _
10157 * @since 3.0.0
10158 * @category Array
10159 * @param {Array} array The sorted array to inspect.
10160 * @param {*} value The value to evaluate.
10161 * @returns {number} Returns the index at which `value` should be inserted
10162 * into `array`.
10163 * @example
10164 *
10165 * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
10166 * // => 4
10167 */
10168 function sortedLastIndex(array, value) {
10169 return baseSortedIndex(array, value, true);
10170 }
10171
10172 /**
10173 * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
10174 * which is invoked for `value` and each element of `array` to compute their
10175 * sort ranking. The iteratee is invoked with one argument: (value).
10176 *
10177 * @static
10178 * @memberOf _
10179 * @since 4.0.0
10180 * @category Array
10181 * @param {Array} array The sorted array to inspect.
10182 * @param {*} value The value to evaluate.
10183 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10184 * @returns {number} Returns the index at which `value` should be inserted
10185 * into `array`.
10186 * @example
10187 *
10188 * var objects = [{ 'x': 4 }, { 'x': 5 }];
10189 *
10190 * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
10191 * // => 1
10192 *
10193 * // The `_.property` iteratee shorthand.
10194 * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
10195 * // => 1
10196 */
10197 function sortedLastIndexBy(array, value, iteratee) {
10198 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
10199 }
10200
10201 /**
10202 * This method is like `_.lastIndexOf` except that it performs a binary
10203 * search on a sorted `array`.
10204 *
10205 * @static
10206 * @memberOf _
10207 * @since 4.0.0
10208 * @category Array
10209 * @param {Array} array The array to inspect.
10210 * @param {*} value The value to search for.
10211 * @returns {number} Returns the index of the matched value, else `-1`.
10212 * @example
10213 *
10214 * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
10215 * // => 3
10216 */
10217 function sortedLastIndexOf(array, value) {
10218 var length = array == null ? 0 : array.length;
10219 if (length) {
10220 var index = baseSortedIndex(array, value, true) - 1;
10221 if (eq(array[index], value)) {
10222 return index;
10223 }
10224 }
10225 return -1;
10226 }
10227
10228 /**
10229 * This method is like `_.uniq` except that it's designed and optimized
10230 * for sorted arrays.
10231 *
10232 * @static
10233 * @memberOf _
10234 * @since 4.0.0
10235 * @category Array
10236 * @param {Array} array The array to inspect.
10237 * @returns {Array} Returns the new duplicate free array.
10238 * @example
10239 *
10240 * _.sortedUniq([1, 1, 2]);
10241 * // => [1, 2]
10242 */
10243 function sortedUniq(array) {
10244 return (array && array.length)
10245 ? baseSortedUniq(array)
10246 : [];
10247 }
10248
10249 /**
10250 * This method is like `_.uniqBy` except that it's designed and optimized
10251 * for sorted arrays.
10252 *
10253 * @static
10254 * @memberOf _
10255 * @since 4.0.0
10256 * @category Array
10257 * @param {Array} array The array to inspect.
10258 * @param {Function} [iteratee] The iteratee invoked per element.
10259 * @returns {Array} Returns the new duplicate free array.
10260 * @example
10261 *
10262 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
10263 * // => [1.1, 2.3]
10264 */
10265 function sortedUniqBy(array, iteratee) {
10266 return (array && array.length)
10267 ? baseSortedUniq(array, getIteratee(iteratee, 2))
10268 : [];
10269 }
10270
10271 /**
10272 * Gets all but the first element of `array`.
10273 *
10274 * @static
10275 * @memberOf _
10276 * @since 4.0.0
10277 * @category Array
10278 * @param {Array} array The array to query.
10279 * @returns {Array} Returns the slice of `array`.
10280 * @example
10281 *
10282 * _.tail([1, 2, 3]);
10283 * // => [2, 3]
10284 */
10285 function tail(array) {
10286 var length = array == null ? 0 : array.length;
10287 return length ? baseSlice(array, 1, length) : [];
10288 }
10289
10290 /**
10291 * Creates a slice of `array` with `n` elements taken from the beginning.
10292 *
10293 * @static
10294 * @memberOf _
10295 * @since 0.1.0
10296 * @category Array
10297 * @param {Array} array The array to query.
10298 * @param {number} [n=1] The number of elements to take.
10299 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
10300 * @returns {Array} Returns the slice of `array`.
10301 * @example
10302 *
10303 * _.take([1, 2, 3]);
10304 * // => [1]
10305 *
10306 * _.take([1, 2, 3], 2);
10307 * // => [1, 2]
10308 *
10309 * _.take([1, 2, 3], 5);
10310 * // => [1, 2, 3]
10311 *
10312 * _.take([1, 2, 3], 0);
10313 * // => []
10314 */
10315 function take(array, n, guard) {
10316 if (!(array && array.length)) {
10317 return [];
10318 }
10319 n = (guard || n === undefined) ? 1 : toInteger(n);
10320 return baseSlice(array, 0, n < 0 ? 0 : n);
10321 }
10322
10323 /**
10324 * Creates a slice of `array` with `n` elements taken from the end.
10325 *
10326 * @static
10327 * @memberOf _
10328 * @since 3.0.0
10329 * @category Array
10330 * @param {Array} array The array to query.
10331 * @param {number} [n=1] The number of elements to take.
10332 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
10333 * @returns {Array} Returns the slice of `array`.
10334 * @example
10335 *
10336 * _.takeRight([1, 2, 3]);
10337 * // => [3]
10338 *
10339 * _.takeRight([1, 2, 3], 2);
10340 * // => [2, 3]
10341 *
10342 * _.takeRight([1, 2, 3], 5);
10343 * // => [1, 2, 3]
10344 *
10345 * _.takeRight([1, 2, 3], 0);
10346 * // => []
10347 */
10348 function takeRight(array, n, guard) {
10349 var length = array == null ? 0 : array.length;
10350 if (!length) {
10351 return [];
10352 }
10353 n = (guard || n === undefined) ? 1 : toInteger(n);
10354 n = length - n;
10355 return baseSlice(array, n < 0 ? 0 : n, length);
10356 }
10357
10358 /**
10359 * Creates a slice of `array` with elements taken from the end. Elements are
10360 * taken until `predicate` returns falsey. The predicate is invoked with
10361 * three arguments: (value, index, array).
10362 *
10363 * @static
10364 * @memberOf _
10365 * @since 3.0.0
10366 * @category Array
10367 * @param {Array} array The array to query.
10368 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10369 * @returns {Array} Returns the slice of `array`.
10370 * @example
10371 *
10372 * var users = [
10373 * { 'user': 'barney', 'active': true },
10374 * { 'user': 'fred', 'active': false },
10375 * { 'user': 'pebbles', 'active': false }
10376 * ];
10377 *
10378 * _.takeRightWhile(users, function(o) { return !o.active; });
10379 * // => objects for ['fred', 'pebbles']
10380 *
10381 * // The `_.matches` iteratee shorthand.
10382 * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
10383 * // => objects for ['pebbles']
10384 *
10385 * // The `_.matchesProperty` iteratee shorthand.
10386 * _.takeRightWhile(users, ['active', false]);
10387 * // => objects for ['fred', 'pebbles']
10388 *
10389 * // The `_.property` iteratee shorthand.
10390 * _.takeRightWhile(users, 'active');
10391 * // => []
10392 */
10393 function takeRightWhile(array, predicate) {
10394 return (array && array.length)
10395 ? baseWhile(array, getIteratee(predicate, 3), false, true)
10396 : [];
10397 }
10398
10399 /**
10400 * Creates a slice of `array` with elements taken from the beginning. Elements
10401 * are taken until `predicate` returns falsey. The predicate is invoked with
10402 * three arguments: (value, index, array).
10403 *
10404 * @static
10405 * @memberOf _
10406 * @since 3.0.0
10407 * @category Array
10408 * @param {Array} array The array to query.
10409 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10410 * @returns {Array} Returns the slice of `array`.
10411 * @example
10412 *
10413 * var users = [
10414 * { 'user': 'barney', 'active': false },
10415 * { 'user': 'fred', 'active': false },
10416 * { 'user': 'pebbles', 'active': true }
10417 * ];
10418 *
10419 * _.takeWhile(users, function(o) { return !o.active; });
10420 * // => objects for ['barney', 'fred']
10421 *
10422 * // The `_.matches` iteratee shorthand.
10423 * _.takeWhile(users, { 'user': 'barney', 'active': false });
10424 * // => objects for ['barney']
10425 *
10426 * // The `_.matchesProperty` iteratee shorthand.
10427 * _.takeWhile(users, ['active', false]);
10428 * // => objects for ['barney', 'fred']
10429 *
10430 * // The `_.property` iteratee shorthand.
10431 * _.takeWhile(users, 'active');
10432 * // => []
10433 */
10434 function takeWhile(array, predicate) {
10435 return (array && array.length)
10436 ? baseWhile(array, getIteratee(predicate, 3))
10437 : [];
10438 }
10439
10440 /**
10441 * Creates an array of unique values, in order, from all given arrays using
10442 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10443 * for equality comparisons.
10444 *
10445 * @static
10446 * @memberOf _
10447 * @since 0.1.0
10448 * @category Array
10449 * @param {...Array} [arrays] The arrays to inspect.
10450 * @returns {Array} Returns the new array of combined values.
10451 * @example
10452 *
10453 * _.union([2], [1, 2]);
10454 * // => [2, 1]
10455 */
10456 var union = baseRest(function(arrays) {
10457 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
10458 });
10459
10460 /**
10461 * This method is like `_.union` except that it accepts `iteratee` which is
10462 * invoked for each element of each `arrays` to generate the criterion by
10463 * which uniqueness is computed. Result values are chosen from the first
10464 * array in which the value occurs. The iteratee is invoked with one argument:
10465 * (value).
10466 *
10467 * @static
10468 * @memberOf _
10469 * @since 4.0.0
10470 * @category Array
10471 * @param {...Array} [arrays] The arrays to inspect.
10472 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10473 * @returns {Array} Returns the new array of combined values.
10474 * @example
10475 *
10476 * _.unionBy([2.1], [1.2, 2.3], Math.floor);
10477 * // => [2.1, 1.2]
10478 *
10479 * // The `_.property` iteratee shorthand.
10480 * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
10481 * // => [{ 'x': 1 }, { 'x': 2 }]
10482 */
10483 var unionBy = baseRest(function(arrays) {
10484 var iteratee = last(arrays);
10485 if (isArrayLikeObject(iteratee)) {
10486 iteratee = undefined;
10487 }
10488 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
10489 });
10490
10491 /**
10492 * This method is like `_.union` except that it accepts `comparator` which
10493 * is invoked to compare elements of `arrays`. Result values are chosen from
10494 * the first array in which the value occurs. The comparator is invoked
10495 * with two arguments: (arrVal, othVal).
10496 *
10497 * @static
10498 * @memberOf _
10499 * @since 4.0.0
10500 * @category Array
10501 * @param {...Array} [arrays] The arrays to inspect.
10502 * @param {Function} [comparator] The comparator invoked per element.
10503 * @returns {Array} Returns the new array of combined values.
10504 * @example
10505 *
10506 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
10507 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
10508 *
10509 * _.unionWith(objects, others, _.isEqual);
10510 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
10511 */
10512 var unionWith = baseRest(function(arrays) {
10513 var comparator = last(arrays);
10514 comparator = typeof comparator == 'function' ? comparator : undefined;
10515 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
10516 });
10517
10518 /**
10519 * Creates a duplicate-free version of an array, using
10520 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10521 * for equality comparisons, in which only the first occurrence of each element
10522 * is kept. The order of result values is determined by the order they occur
10523 * in the array.
10524 *
10525 * @static
10526 * @memberOf _
10527 * @since 0.1.0
10528 * @category Array
10529 * @param {Array} array The array to inspect.
10530 * @returns {Array} Returns the new duplicate free array.
10531 * @example
10532 *
10533 * _.uniq([2, 1, 2]);
10534 * // => [2, 1]
10535 */
10536 function uniq(array) {
10537 return (array && array.length) ? baseUniq(array) : [];
10538 }
10539
10540 /**
10541 * This method is like `_.uniq` except that it accepts `iteratee` which is
10542 * invoked for each element in `array` to generate the criterion by which
10543 * uniqueness is computed. The order of result values is determined by the
10544 * order they occur in the array. The iteratee is invoked with one argument:
10545 * (value).
10546 *
10547 * @static
10548 * @memberOf _
10549 * @since 4.0.0
10550 * @category Array
10551 * @param {Array} array The array to inspect.
10552 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10553 * @returns {Array} Returns the new duplicate free array.
10554 * @example
10555 *
10556 * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
10557 * // => [2.1, 1.2]
10558 *
10559 * // The `_.property` iteratee shorthand.
10560 * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
10561 * // => [{ 'x': 1 }, { 'x': 2 }]
10562 */
10563 function uniqBy(array, iteratee) {
10564 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
10565 }
10566
10567 /**
10568 * This method is like `_.uniq` except that it accepts `comparator` which
10569 * is invoked to compare elements of `array`. The order of result values is
10570 * determined by the order they occur in the array.The comparator is invoked
10571 * with two arguments: (arrVal, othVal).
10572 *
10573 * @static
10574 * @memberOf _
10575 * @since 4.0.0
10576 * @category Array
10577 * @param {Array} array The array to inspect.
10578 * @param {Function} [comparator] The comparator invoked per element.
10579 * @returns {Array} Returns the new duplicate free array.
10580 * @example
10581 *
10582 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
10583 *
10584 * _.uniqWith(objects, _.isEqual);
10585 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
10586 */
10587 function uniqWith(array, comparator) {
10588 comparator = typeof comparator == 'function' ? comparator : undefined;
10589 return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
10590 }
10591
10592 /**
10593 * This method is like `_.zip` except that it accepts an array of grouped
10594 * elements and creates an array regrouping the elements to their pre-zip
10595 * configuration.
10596 *
10597 * @static
10598 * @memberOf _
10599 * @since 1.2.0
10600 * @category Array
10601 * @param {Array} array The array of grouped elements to process.
10602 * @returns {Array} Returns the new array of regrouped elements.
10603 * @example
10604 *
10605 * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
10606 * // => [['a', 1, true], ['b', 2, false]]
10607 *
10608 * _.unzip(zipped);
10609 * // => [['a', 'b'], [1, 2], [true, false]]
10610 */
10611 function unzip(array) {
10612 if (!(array && array.length)) {
10613 return [];
10614 }
10615 var length = 0;
10616 array = arrayFilter(array, function(group) {
10617 if (isArrayLikeObject(group)) {
10618 length = nativeMax(group.length, length);
10619 return true;
10620 }
10621 });
10622 return baseTimes(length, function(index) {
10623 return arrayMap(array, baseProperty(index));
10624 });
10625 }
10626
10627 /**
10628 * This method is like `_.unzip` except that it accepts `iteratee` to specify
10629 * how regrouped values should be combined. The iteratee is invoked with the
10630 * elements of each group: (...group).
10631 *
10632 * @static
10633 * @memberOf _
10634 * @since 3.8.0
10635 * @category Array
10636 * @param {Array} array The array of grouped elements to process.
10637 * @param {Function} [iteratee=_.identity] The function to combine
10638 * regrouped values.
10639 * @returns {Array} Returns the new array of regrouped elements.
10640 * @example
10641 *
10642 * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
10643 * // => [[1, 10, 100], [2, 20, 200]]
10644 *
10645 * _.unzipWith(zipped, _.add);
10646 * // => [3, 30, 300]
10647 */
10648 function unzipWith(array, iteratee) {
10649 if (!(array && array.length)) {
10650 return [];
10651 }
10652 var result = unzip(array);
10653 if (iteratee == null) {
10654 return result;
10655 }
10656 return arrayMap(result, function(group) {
10657 return apply(iteratee, undefined, group);
10658 });
10659 }
10660
10661 /**
10662 * Creates an array excluding all given values using
10663 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10664 * for equality comparisons.
10665 *
10666 * **Note:** Unlike `_.pull`, this method returns a new array.
10667 *
10668 * @static
10669 * @memberOf _
10670 * @since 0.1.0
10671 * @category Array
10672 * @param {Array} array The array to inspect.
10673 * @param {...*} [values] The values to exclude.
10674 * @returns {Array} Returns the new array of filtered values.
10675 * @see _.difference, _.xor
10676 * @example
10677 *
10678 * _.without([2, 1, 2, 3], 1, 2);
10679 * // => [3]
10680 */
10681 var without = baseRest(function(array, values) {
10682 return isArrayLikeObject(array)
10683 ? baseDifference(array, values)
10684 : [];
10685 });
10686
10687 /**
10688 * Creates an array of unique values that is the
10689 * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
10690 * of the given arrays. The order of result values is determined by the order
10691 * they occur in the arrays.
10692 *
10693 * @static
10694 * @memberOf _
10695 * @since 2.4.0
10696 * @category Array
10697 * @param {...Array} [arrays] The arrays to inspect.
10698 * @returns {Array} Returns the new array of filtered values.
10699 * @see _.difference, _.without
10700 * @example
10701 *
10702 * _.xor([2, 1], [2, 3]);
10703 * // => [1, 3]
10704 */
10705 var xor = baseRest(function(arrays) {
10706 return baseXor(arrayFilter(arrays, isArrayLikeObject));
10707 });
10708
10709 /**
10710 * This method is like `_.xor` except that it accepts `iteratee` which is
10711 * invoked for each element of each `arrays` to generate the criterion by
10712 * which by which they're compared. The order of result values is determined
10713 * by the order they occur in the arrays. The iteratee is invoked with one
10714 * argument: (value).
10715 *
10716 * @static
10717 * @memberOf _
10718 * @since 4.0.0
10719 * @category Array
10720 * @param {...Array} [arrays] The arrays to inspect.
10721 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10722 * @returns {Array} Returns the new array of filtered values.
10723 * @example
10724 *
10725 * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
10726 * // => [1.2, 3.4]
10727 *
10728 * // The `_.property` iteratee shorthand.
10729 * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
10730 * // => [{ 'x': 2 }]
10731 */
10732 var xorBy = baseRest(function(arrays) {
10733 var iteratee = last(arrays);
10734 if (isArrayLikeObject(iteratee)) {
10735 iteratee = undefined;
10736 }
10737 return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
10738 });
10739
10740 /**
10741 * This method is like `_.xor` except that it accepts `comparator` which is
10742 * invoked to compare elements of `arrays`. The order of result values is
10743 * determined by the order they occur in the arrays. The comparator is invoked
10744 * with two arguments: (arrVal, othVal).
10745 *
10746 * @static
10747 * @memberOf _
10748 * @since 4.0.0
10749 * @category Array
10750 * @param {...Array} [arrays] The arrays to inspect.
10751 * @param {Function} [comparator] The comparator invoked per element.
10752 * @returns {Array} Returns the new array of filtered values.
10753 * @example
10754 *
10755 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
10756 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
10757 *
10758 * _.xorWith(objects, others, _.isEqual);
10759 * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
10760 */
10761 var xorWith = baseRest(function(arrays) {
10762 var comparator = last(arrays);
10763 comparator = typeof comparator == 'function' ? comparator : undefined;
10764 return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
10765 });
10766
10767 /**
10768 * Creates an array of grouped elements, the first of which contains the
10769 * first elements of the given arrays, the second of which contains the
10770 * second elements of the given arrays, and so on.
10771 *
10772 * @static
10773 * @memberOf _
10774 * @since 0.1.0
10775 * @category Array
10776 * @param {...Array} [arrays] The arrays to process.
10777 * @returns {Array} Returns the new array of grouped elements.
10778 * @example
10779 *
10780 * _.zip(['a', 'b'], [1, 2], [true, false]);
10781 * // => [['a', 1, true], ['b', 2, false]]
10782 */
10783 var zip = baseRest(unzip);
10784
10785 /**
10786 * This method is like `_.fromPairs` except that it accepts two arrays,
10787 * one of property identifiers and one of corresponding values.
10788 *
10789 * @static
10790 * @memberOf _
10791 * @since 0.4.0
10792 * @category Array
10793 * @param {Array} [props=[]] The property identifiers.
10794 * @param {Array} [values=[]] The property values.
10795 * @returns {Object} Returns the new object.
10796 * @example
10797 *
10798 * _.zipObject(['a', 'b'], [1, 2]);
10799 * // => { 'a': 1, 'b': 2 }
10800 */
10801 function zipObject(props, values) {
10802 return baseZipObject(props || [], values || [], assignValue);
10803 }
10804
10805 /**
10806 * This method is like `_.zipObject` except that it supports property paths.
10807 *
10808 * @static
10809 * @memberOf _
10810 * @since 4.1.0
10811 * @category Array
10812 * @param {Array} [props=[]] The property identifiers.
10813 * @param {Array} [values=[]] The property values.
10814 * @returns {Object} Returns the new object.
10815 * @example
10816 *
10817 * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
10818 * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
10819 */
10820 function zipObjectDeep(props, values) {
10821 return baseZipObject(props || [], values || [], baseSet);
10822 }
10823
10824 /**
10825 * This method is like `_.zip` except that it accepts `iteratee` to specify
10826 * how grouped values should be combined. The iteratee is invoked with the
10827 * elements of each group: (...group).
10828 *
10829 * @static
10830 * @memberOf _
10831 * @since 3.8.0
10832 * @category Array
10833 * @param {...Array} [arrays] The arrays to process.
10834 * @param {Function} [iteratee=_.identity] The function to combine
10835 * grouped values.
10836 * @returns {Array} Returns the new array of grouped elements.
10837 * @example
10838 *
10839 * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
10840 * return a + b + c;
10841 * });
10842 * // => [111, 222]
10843 */
10844 var zipWith = baseRest(function(arrays) {
10845 var length = arrays.length,
10846 iteratee = length > 1 ? arrays[length - 1] : undefined;
10847
10848 iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
10849 return unzipWith(arrays, iteratee);
10850 });
10851
10852 /*------------------------------------------------------------------------*/
10853
10854 /**
10855 * Creates a `lodash` wrapper instance that wraps `value` with explicit method
10856 * chain sequences enabled. The result of such sequences must be unwrapped
10857 * with `_#value`.
10858 *
10859 * @static
10860 * @memberOf _
10861 * @since 1.3.0
10862 * @category Seq
10863 * @param {*} value The value to wrap.
10864 * @returns {Object} Returns the new `lodash` wrapper instance.
10865 * @example
10866 *
10867 * var users = [
10868 * { 'user': 'barney', 'age': 36 },
10869 * { 'user': 'fred', 'age': 40 },
10870 * { 'user': 'pebbles', 'age': 1 }
10871 * ];
10872 *
10873 * var youngest = _
10874 * .chain(users)
10875 * .sortBy('age')
10876 * .map(function(o) {
10877 * return o.user + ' is ' + o.age;
10878 * })
10879 * .head()
10880 * .value();
10881 * // => 'pebbles is 1'
10882 */
10883 function chain(value) {
10884 var result = lodash(value);
10885 result.__chain__ = true;
10886 return result;
10887 }
10888
10889 /**
10890 * This method invokes `interceptor` and returns `value`. The interceptor
10891 * is invoked with one argument; (value). The purpose of this method is to
10892 * "tap into" a method chain sequence in order to modify intermediate results.
10893 *
10894 * @static
10895 * @memberOf _
10896 * @since 0.1.0
10897 * @category Seq
10898 * @param {*} value The value to provide to `interceptor`.
10899 * @param {Function} interceptor The function to invoke.
10900 * @returns {*} Returns `value`.
10901 * @example
10902 *
10903 * _([1, 2, 3])
10904 * .tap(function(array) {
10905 * // Mutate input array.
10906 * array.pop();
10907 * })
10908 * .reverse()
10909 * .value();
10910 * // => [2, 1]
10911 */
10912 function tap(value, interceptor) {
10913 interceptor(value);
10914 return value;
10915 }
10916
10917 /**
10918 * This method is like `_.tap` except that it returns the result of `interceptor`.
10919 * The purpose of this method is to "pass thru" values replacing intermediate
10920 * results in a method chain sequence.
10921 *
10922 * @static
10923 * @memberOf _
10924 * @since 3.0.0
10925 * @category Seq
10926 * @param {*} value The value to provide to `interceptor`.
10927 * @param {Function} interceptor The function to invoke.
10928 * @returns {*} Returns the result of `interceptor`.
10929 * @example
10930 *
10931 * _(' abc ')
10932 * .chain()
10933 * .trim()
10934 * .thru(function(value) {
10935 * return [value];
10936 * })
10937 * .value();
10938 * // => ['abc']
10939 */
10940 function thru(value, interceptor) {
10941 return interceptor(value);
10942 }
10943
10944 /**
10945 * This method is the wrapper version of `_.at`.
10946 *
10947 * @name at
10948 * @memberOf _
10949 * @since 1.0.0
10950 * @category Seq
10951 * @param {...(string|string[])} [paths] The property paths to pick.
10952 * @returns {Object} Returns the new `lodash` wrapper instance.
10953 * @example
10954 *
10955 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
10956 *
10957 * _(object).at(['a[0].b.c', 'a[1]']).value();
10958 * // => [3, 4]
10959 */
10960 var wrapperAt = flatRest(function(paths) {
10961 var length = paths.length,
10962 start = length ? paths[0] : 0,
10963 value = this.__wrapped__,
10964 interceptor = function(object) { return baseAt(object, paths); };
10965
10966 if (length > 1 || this.__actions__.length ||
10967 !(value instanceof LazyWrapper) || !isIndex(start)) {
10968 return this.thru(interceptor);
10969 }
10970 value = value.slice(start, +start + (length ? 1 : 0));
10971 value.__actions__.push({
10972 'func': thru,
10973 'args': [interceptor],
10974 'thisArg': undefined
10975 });
10976 return new LodashWrapper(value, this.__chain__).thru(function(array) {
10977 if (length && !array.length) {
10978 array.push(undefined);
10979 }
10980 return array;
10981 });
10982 });
10983
10984 /**
10985 * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
10986 *
10987 * @name chain
10988 * @memberOf _
10989 * @since 0.1.0
10990 * @category Seq
10991 * @returns {Object} Returns the new `lodash` wrapper instance.
10992 * @example
10993 *
10994 * var users = [
10995 * { 'user': 'barney', 'age': 36 },
10996 * { 'user': 'fred', 'age': 40 }
10997 * ];
10998 *
10999 * // A sequence without explicit chaining.
11000 * _(users).head();
11001 * // => { 'user': 'barney', 'age': 36 }
11002 *
11003 * // A sequence with explicit chaining.
11004 * _(users)
11005 * .chain()
11006 * .head()
11007 * .pick('user')
11008 * .value();
11009 * // => { 'user': 'barney' }
11010 */
11011 function wrapperChain() {
11012 return chain(this);
11013 }
11014
11015 /**
11016 * Executes the chain sequence and returns the wrapped result.
11017 *
11018 * @name commit
11019 * @memberOf _
11020 * @since 3.2.0
11021 * @category Seq
11022 * @returns {Object} Returns the new `lodash` wrapper instance.
11023 * @example
11024 *
11025 * var array = [1, 2];
11026 * var wrapped = _(array).push(3);
11027 *
11028 * console.log(array);
11029 * // => [1, 2]
11030 *
11031 * wrapped = wrapped.commit();
11032 * console.log(array);
11033 * // => [1, 2, 3]
11034 *
11035 * wrapped.last();
11036 * // => 3
11037 *
11038 * console.log(array);
11039 * // => [1, 2, 3]
11040 */
11041 function wrapperCommit() {
11042 return new LodashWrapper(this.value(), this.__chain__);
11043 }
11044
11045 /**
11046 * Gets the next value on a wrapped object following the
11047 * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
11048 *
11049 * @name next
11050 * @memberOf _
11051 * @since 4.0.0
11052 * @category Seq
11053 * @returns {Object} Returns the next iterator value.
11054 * @example
11055 *
11056 * var wrapped = _([1, 2]);
11057 *
11058 * wrapped.next();
11059 * // => { 'done': false, 'value': 1 }
11060 *
11061 * wrapped.next();
11062 * // => { 'done': false, 'value': 2 }
11063 *
11064 * wrapped.next();
11065 * // => { 'done': true, 'value': undefined }
11066 */
11067 function wrapperNext() {
11068 if (this.__values__ === undefined) {
11069 this.__values__ = toArray(this.value());
11070 }
11071 var done = this.__index__ >= this.__values__.length,
11072 value = done ? undefined : this.__values__[this.__index__++];
11073
11074 return { 'done': done, 'value': value };
11075 }
11076
11077 /**
11078 * Enables the wrapper to be iterable.
11079 *
11080 * @name Symbol.iterator
11081 * @memberOf _
11082 * @since 4.0.0
11083 * @category Seq
11084 * @returns {Object} Returns the wrapper object.
11085 * @example
11086 *
11087 * var wrapped = _([1, 2]);
11088 *
11089 * wrapped[Symbol.iterator]() === wrapped;
11090 * // => true
11091 *
11092 * Array.from(wrapped);
11093 * // => [1, 2]
11094 */
11095 function wrapperToIterator() {
11096 return this;
11097 }
11098
11099 /**
11100 * Creates a clone of the chain sequence planting `value` as the wrapped value.
11101 *
11102 * @name plant
11103 * @memberOf _
11104 * @since 3.2.0
11105 * @category Seq
11106 * @param {*} value The value to plant.
11107 * @returns {Object} Returns the new `lodash` wrapper instance.
11108 * @example
11109 *
11110 * function square(n) {
11111 * return n * n;
11112 * }
11113 *
11114 * var wrapped = _([1, 2]).map(square);
11115 * var other = wrapped.plant([3, 4]);
11116 *
11117 * other.value();
11118 * // => [9, 16]
11119 *
11120 * wrapped.value();
11121 * // => [1, 4]
11122 */
11123 function wrapperPlant(value) {
11124 var result,
11125 parent = this;
11126
11127 while (parent instanceof baseLodash) {
11128 var clone = wrapperClone(parent);
11129 clone.__index__ = 0;
11130 clone.__values__ = undefined;
11131 if (result) {
11132 previous.__wrapped__ = clone;
11133 } else {
11134 result = clone;
11135 }
11136 var previous = clone;
11137 parent = parent.__wrapped__;
11138 }
11139 previous.__wrapped__ = value;
11140 return result;
11141 }
11142
11143 /**
11144 * This method is the wrapper version of `_.reverse`.
11145 *
11146 * **Note:** This method mutates the wrapped array.
11147 *
11148 * @name reverse
11149 * @memberOf _
11150 * @since 0.1.0
11151 * @category Seq
11152 * @returns {Object} Returns the new `lodash` wrapper instance.
11153 * @example
11154 *
11155 * var array = [1, 2, 3];
11156 *
11157 * _(array).reverse().value()
11158 * // => [3, 2, 1]
11159 *
11160 * console.log(array);
11161 * // => [3, 2, 1]
11162 */
11163 function wrapperReverse() {
11164 var value = this.__wrapped__;
11165 if (value instanceof LazyWrapper) {
11166 var wrapped = value;
11167 if (this.__actions__.length) {
11168 wrapped = new LazyWrapper(this);
11169 }
11170 wrapped = wrapped.reverse();
11171 wrapped.__actions__.push({
11172 'func': thru,
11173 'args': [reverse],
11174 'thisArg': undefined
11175 });
11176 return new LodashWrapper(wrapped, this.__chain__);
11177 }
11178 return this.thru(reverse);
11179 }
11180
11181 /**
11182 * Executes the chain sequence to resolve the unwrapped value.
11183 *
11184 * @name value
11185 * @memberOf _
11186 * @since 0.1.0
11187 * @alias toJSON, valueOf
11188 * @category Seq
11189 * @returns {*} Returns the resolved unwrapped value.
11190 * @example
11191 *
11192 * _([1, 2, 3]).value();
11193 * // => [1, 2, 3]
11194 */
11195 function wrapperValue() {
11196 return baseWrapperValue(this.__wrapped__, this.__actions__);
11197 }
11198
11199 /*------------------------------------------------------------------------*/
11200
11201 /**
11202 * Creates an object composed of keys generated from the results of running
11203 * each element of `collection` thru `iteratee`. The corresponding value of
11204 * each key is the number of times the key was returned by `iteratee`. The
11205 * iteratee is invoked with one argument: (value).
11206 *
11207 * @static
11208 * @memberOf _
11209 * @since 0.5.0
11210 * @category Collection
11211 * @param {Array|Object} collection The collection to iterate over.
11212 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
11213 * @returns {Object} Returns the composed aggregate object.
11214 * @example
11215 *
11216 * _.countBy([6.1, 4.2, 6.3], Math.floor);
11217 * // => { '4': 1, '6': 2 }
11218 *
11219 * // The `_.property` iteratee shorthand.
11220 * _.countBy(['one', 'two', 'three'], 'length');
11221 * // => { '3': 2, '5': 1 }
11222 */
11223 var countBy = createAggregator(function(result, value, key) {
11224 if (hasOwnProperty.call(result, key)) {
11225 ++result[key];
11226 } else {
11227 baseAssignValue(result, key, 1);
11228 }
11229 });
11230
11231 /**
11232 * Checks if `predicate` returns truthy for **all** elements of `collection`.
11233 * Iteration is stopped once `predicate` returns falsey. The predicate is
11234 * invoked with three arguments: (value, index|key, collection).
11235 *
11236 * **Note:** This method returns `true` for
11237 * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
11238 * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
11239 * elements of empty collections.
11240 *
11241 * @static
11242 * @memberOf _
11243 * @since 0.1.0
11244 * @category Collection
11245 * @param {Array|Object} collection The collection to iterate over.
11246 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11247 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11248 * @returns {boolean} Returns `true` if all elements pass the predicate check,
11249 * else `false`.
11250 * @example
11251 *
11252 * _.every([true, 1, null, 'yes'], Boolean);
11253 * // => false
11254 *
11255 * var users = [
11256 * { 'user': 'barney', 'age': 36, 'active': false },
11257 * { 'user': 'fred', 'age': 40, 'active': false }
11258 * ];
11259 *
11260 * // The `_.matches` iteratee shorthand.
11261 * _.every(users, { 'user': 'barney', 'active': false });
11262 * // => false
11263 *
11264 * // The `_.matchesProperty` iteratee shorthand.
11265 * _.every(users, ['active', false]);
11266 * // => true
11267 *
11268 * // The `_.property` iteratee shorthand.
11269 * _.every(users, 'active');
11270 * // => false
11271 */
11272 function every(collection, predicate, guard) {
11273 var func = isArray(collection) ? arrayEvery : baseEvery;
11274 if (guard && isIterateeCall(collection, predicate, guard)) {
11275 predicate = undefined;
11276 }
11277 return func(collection, getIteratee(predicate, 3));
11278 }
11279
11280 /**
11281 * Iterates over elements of `collection`, returning an array of all elements
11282 * `predicate` returns truthy for. The predicate is invoked with three
11283 * arguments: (value, index|key, collection).
11284 *
11285 * **Note:** Unlike `_.remove`, this method returns a new array.
11286 *
11287 * @static
11288 * @memberOf _
11289 * @since 0.1.0
11290 * @category Collection
11291 * @param {Array|Object} collection The collection to iterate over.
11292 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11293 * @returns {Array} Returns the new filtered array.
11294 * @see _.reject
11295 * @example
11296 *
11297 * var users = [
11298 * { 'user': 'barney', 'age': 36, 'active': true },
11299 * { 'user': 'fred', 'age': 40, 'active': false }
11300 * ];
11301 *
11302 * _.filter(users, function(o) { return !o.active; });
11303 * // => objects for ['fred']
11304 *
11305 * // The `_.matches` iteratee shorthand.
11306 * _.filter(users, { 'age': 36, 'active': true });
11307 * // => objects for ['barney']
11308 *
11309 * // The `_.matchesProperty` iteratee shorthand.
11310 * _.filter(users, ['active', false]);
11311 * // => objects for ['fred']
11312 *
11313 * // The `_.property` iteratee shorthand.
11314 * _.filter(users, 'active');
11315 * // => objects for ['barney']
11316 */
11317 function filter(collection, predicate) {
11318 var func = isArray(collection) ? arrayFilter : baseFilter;
11319 return func(collection, getIteratee(predicate, 3));
11320 }
11321
11322 /**
11323 * Iterates over elements of `collection`, returning the first element
11324 * `predicate` returns truthy for. The predicate is invoked with three
11325 * arguments: (value, index|key, collection).
11326 *
11327 * @static
11328 * @memberOf _
11329 * @since 0.1.0
11330 * @category Collection
11331 * @param {Array|Object} collection The collection to inspect.
11332 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11333 * @param {number} [fromIndex=0] The index to search from.
11334 * @returns {*} Returns the matched element, else `undefined`.
11335 * @example
11336 *
11337 * var users = [
11338 * { 'user': 'barney', 'age': 36, 'active': true },
11339 * { 'user': 'fred', 'age': 40, 'active': false },
11340 * { 'user': 'pebbles', 'age': 1, 'active': true }
11341 * ];
11342 *
11343 * _.find(users, function(o) { return o.age < 40; });
11344 * // => object for 'barney'
11345 *
11346 * // The `_.matches` iteratee shorthand.
11347 * _.find(users, { 'age': 1, 'active': true });
11348 * // => object for 'pebbles'
11349 *
11350 * // The `_.matchesProperty` iteratee shorthand.
11351 * _.find(users, ['active', false]);
11352 * // => object for 'fred'
11353 *
11354 * // The `_.property` iteratee shorthand.
11355 * _.find(users, 'active');
11356 * // => object for 'barney'
11357 */
11358 var find = createFind(findIndex);
11359
11360 /**
11361 * This method is like `_.find` except that it iterates over elements of
11362 * `collection` from right to left.
11363 *
11364 * @static
11365 * @memberOf _
11366 * @since 2.0.0
11367 * @category Collection
11368 * @param {Array|Object} collection The collection to inspect.
11369 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11370 * @param {number} [fromIndex=collection.length-1] The index to search from.
11371 * @returns {*} Returns the matched element, else `undefined`.
11372 * @example
11373 *
11374 * _.findLast([1, 2, 3, 4], function(n) {
11375 * return n % 2 == 1;
11376 * });
11377 * // => 3
11378 */
11379 var findLast = createFind(findLastIndex);
11380
11381 /**
11382 * Creates a flattened array of values by running each element in `collection`
11383 * thru `iteratee` and flattening the mapped results. The iteratee is invoked
11384 * with three arguments: (value, index|key, collection).
11385 *
11386 * @static
11387 * @memberOf _
11388 * @since 4.0.0
11389 * @category Collection
11390 * @param {Array|Object} collection The collection to iterate over.
11391 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11392 * @returns {Array} Returns the new flattened array.
11393 * @example
11394 *
11395 * function duplicate(n) {
11396 * return [n, n];
11397 * }
11398 *
11399 * _.flatMap([1, 2], duplicate);
11400 * // => [1, 1, 2, 2]
11401 */
11402 function flatMap(collection, iteratee) {
11403 return baseFlatten(map(collection, iteratee), 1);
11404 }
11405
11406 /**
11407 * This method is like `_.flatMap` except that it recursively flattens the
11408 * mapped results.
11409 *
11410 * @static
11411 * @memberOf _
11412 * @since 4.7.0
11413 * @category Collection
11414 * @param {Array|Object} collection The collection to iterate over.
11415 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11416 * @returns {Array} Returns the new flattened array.
11417 * @example
11418 *
11419 * function duplicate(n) {
11420 * return [[[n, n]]];
11421 * }
11422 *
11423 * _.flatMapDeep([1, 2], duplicate);
11424 * // => [1, 1, 2, 2]
11425 */
11426 function flatMapDeep(collection, iteratee) {
11427 return baseFlatten(map(collection, iteratee), INFINITY);
11428 }
11429
11430 /**
11431 * This method is like `_.flatMap` except that it recursively flattens the
11432 * mapped results up to `depth` times.
11433 *
11434 * @static
11435 * @memberOf _
11436 * @since 4.7.0
11437 * @category Collection
11438 * @param {Array|Object} collection The collection to iterate over.
11439 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11440 * @param {number} [depth=1] The maximum recursion depth.
11441 * @returns {Array} Returns the new flattened array.
11442 * @example
11443 *
11444 * function duplicate(n) {
11445 * return [[[n, n]]];
11446 * }
11447 *
11448 * _.flatMapDepth([1, 2], duplicate, 2);
11449 * // => [[1, 1], [2, 2]]
11450 */
11451 function flatMapDepth(collection, iteratee, depth) {
11452 depth = depth === undefined ? 1 : toInteger(depth);
11453 return baseFlatten(map(collection, iteratee), depth);
11454 }
11455
11456 /**
11457 * Iterates over elements of `collection` and invokes `iteratee` for each element.
11458 * The iteratee is invoked with three arguments: (value, index|key, collection).
11459 * Iteratee functions may exit iteration early by explicitly returning `false`.
11460 *
11461 * **Note:** As with other "Collections" methods, objects with a "length"
11462 * property are iterated like arrays. To avoid this behavior use `_.forIn`
11463 * or `_.forOwn` for object iteration.
11464 *
11465 * @static
11466 * @memberOf _
11467 * @since 0.1.0
11468 * @alias each
11469 * @category Collection
11470 * @param {Array|Object} collection The collection to iterate over.
11471 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11472 * @returns {Array|Object} Returns `collection`.
11473 * @see _.forEachRight
11474 * @example
11475 *
11476 * _.forEach([1, 2], function(value) {
11477 * console.log(value);
11478 * });
11479 * // => Logs `1` then `2`.
11480 *
11481 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
11482 * console.log(key);
11483 * });
11484 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
11485 */
11486 function forEach(collection, iteratee) {
11487 var func = isArray(collection) ? arrayEach : baseEach;
11488 return func(collection, getIteratee(iteratee, 3));
11489 }
11490
11491 /**
11492 * This method is like `_.forEach` except that it iterates over elements of
11493 * `collection` from right to left.
11494 *
11495 * @static
11496 * @memberOf _
11497 * @since 2.0.0
11498 * @alias eachRight
11499 * @category Collection
11500 * @param {Array|Object} collection The collection to iterate over.
11501 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11502 * @returns {Array|Object} Returns `collection`.
11503 * @see _.forEach
11504 * @example
11505 *
11506 * _.forEachRight([1, 2], function(value) {
11507 * console.log(value);
11508 * });
11509 * // => Logs `2` then `1`.
11510 */
11511 function forEachRight(collection, iteratee) {
11512 var func = isArray(collection) ? arrayEachRight : baseEachRight;
11513 return func(collection, getIteratee(iteratee, 3));
11514 }
11515
11516 /**
11517 * Creates an object composed of keys generated from the results of running
11518 * each element of `collection` thru `iteratee`. The order of grouped values
11519 * is determined by the order they occur in `collection`. The corresponding
11520 * value of each key is an array of elements responsible for generating the
11521 * key. The iteratee is invoked with one argument: (value).
11522 *
11523 * @static
11524 * @memberOf _
11525 * @since 0.1.0
11526 * @category Collection
11527 * @param {Array|Object} collection The collection to iterate over.
11528 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
11529 * @returns {Object} Returns the composed aggregate object.
11530 * @example
11531 *
11532 * _.groupBy([6.1, 4.2, 6.3], Math.floor);
11533 * // => { '4': [4.2], '6': [6.1, 6.3] }
11534 *
11535 * // The `_.property` iteratee shorthand.
11536 * _.groupBy(['one', 'two', 'three'], 'length');
11537 * // => { '3': ['one', 'two'], '5': ['three'] }
11538 */
11539 var groupBy = createAggregator(function(result, value, key) {
11540 if (hasOwnProperty.call(result, key)) {
11541 result[key].push(value);
11542 } else {
11543 baseAssignValue(result, key, [value]);
11544 }
11545 });
11546
11547 /**
11548 * Checks if `value` is in `collection`. If `collection` is a string, it's
11549 * checked for a substring of `value`, otherwise
11550 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
11551 * is used for equality comparisons. If `fromIndex` is negative, it's used as
11552 * the offset from the end of `collection`.
11553 *
11554 * @static
11555 * @memberOf _
11556 * @since 0.1.0
11557 * @category Collection
11558 * @param {Array|Object|string} collection The collection to inspect.
11559 * @param {*} value The value to search for.
11560 * @param {number} [fromIndex=0] The index to search from.
11561 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
11562 * @returns {boolean} Returns `true` if `value` is found, else `false`.
11563 * @example
11564 *
11565 * _.includes([1, 2, 3], 1);
11566 * // => true
11567 *
11568 * _.includes([1, 2, 3], 1, 2);
11569 * // => false
11570 *
11571 * _.includes({ 'a': 1, 'b': 2 }, 1);
11572 * // => true
11573 *
11574 * _.includes('abcd', 'bc');
11575 * // => true
11576 */
11577 function includes(collection, value, fromIndex, guard) {
11578 collection = isArrayLike(collection) ? collection : values(collection);
11579 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
11580
11581 var length = collection.length;
11582 if (fromIndex < 0) {
11583 fromIndex = nativeMax(length + fromIndex, 0);
11584 }
11585 return isString(collection)
11586 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
11587 : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
11588 }
11589
11590 /**
11591 * Invokes the method at `path` of each element in `collection`, returning
11592 * an array of the results of each invoked method. Any additional arguments
11593 * are provided to each invoked method. If `path` is a function, it's invoked
11594 * for, and `this` bound to, each element in `collection`.
11595 *
11596 * @static
11597 * @memberOf _
11598 * @since 4.0.0
11599 * @category Collection
11600 * @param {Array|Object} collection The collection to iterate over.
11601 * @param {Array|Function|string} path The path of the method to invoke or
11602 * the function invoked per iteration.
11603 * @param {...*} [args] The arguments to invoke each method with.
11604 * @returns {Array} Returns the array of results.
11605 * @example
11606 *
11607 * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
11608 * // => [[1, 5, 7], [1, 2, 3]]
11609 *
11610 * _.invokeMap([123, 456], String.prototype.split, '');
11611 * // => [['1', '2', '3'], ['4', '5', '6']]
11612 */
11613 var invokeMap = baseRest(function(collection, path, args) {
11614 var index = -1,
11615 isFunc = typeof path == 'function',
11616 result = isArrayLike(collection) ? Array(collection.length) : [];
11617
11618 baseEach(collection, function(value) {
11619 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
11620 });
11621 return result;
11622 });
11623
11624 /**
11625 * Creates an object composed of keys generated from the results of running
11626 * each element of `collection` thru `iteratee`. The corresponding value of
11627 * each key is the last element responsible for generating the key. The
11628 * iteratee is invoked with one argument: (value).
11629 *
11630 * @static
11631 * @memberOf _
11632 * @since 4.0.0
11633 * @category Collection
11634 * @param {Array|Object} collection The collection to iterate over.
11635 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
11636 * @returns {Object} Returns the composed aggregate object.
11637 * @example
11638 *
11639 * var array = [
11640 * { 'dir': 'left', 'code': 97 },
11641 * { 'dir': 'right', 'code': 100 }
11642 * ];
11643 *
11644 * _.keyBy(array, function(o) {
11645 * return String.fromCharCode(o.code);
11646 * });
11647 * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
11648 *
11649 * _.keyBy(array, 'dir');
11650 * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
11651 */
11652 var keyBy = createAggregator(function(result, value, key) {
11653 baseAssignValue(result, key, value);
11654 });
11655
11656 /**
11657 * Creates an array of values by running each element in `collection` thru
11658 * `iteratee`. The iteratee is invoked with three arguments:
11659 * (value, index|key, collection).
11660 *
11661 * Many lodash methods are guarded to work as iteratees for methods like
11662 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
11663 *
11664 * The guarded methods are:
11665 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
11666 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
11667 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
11668 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
11669 *
11670 * @static
11671 * @memberOf _
11672 * @since 0.1.0
11673 * @category Collection
11674 * @param {Array|Object} collection The collection to iterate over.
11675 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11676 * @returns {Array} Returns the new mapped array.
11677 * @example
11678 *
11679 * function square(n) {
11680 * return n * n;
11681 * }
11682 *
11683 * _.map([4, 8], square);
11684 * // => [16, 64]
11685 *
11686 * _.map({ 'a': 4, 'b': 8 }, square);
11687 * // => [16, 64] (iteration order is not guaranteed)
11688 *
11689 * var users = [
11690 * { 'user': 'barney' },
11691 * { 'user': 'fred' }
11692 * ];
11693 *
11694 * // The `_.property` iteratee shorthand.
11695 * _.map(users, 'user');
11696 * // => ['barney', 'fred']
11697 */
11698 function map(collection, iteratee) {
11699 var func = isArray(collection) ? arrayMap : baseMap;
11700 return func(collection, getIteratee(iteratee, 3));
11701 }
11702
11703 /**
11704 * This method is like `_.sortBy` except that it allows specifying the sort
11705 * orders of the iteratees to sort by. If `orders` is unspecified, all values
11706 * are sorted in ascending order. Otherwise, specify an order of "desc" for
11707 * descending or "asc" for ascending sort order of corresponding values.
11708 *
11709 * @static
11710 * @memberOf _
11711 * @since 4.0.0
11712 * @category Collection
11713 * @param {Array|Object} collection The collection to iterate over.
11714 * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
11715 * The iteratees to sort by.
11716 * @param {string[]} [orders] The sort orders of `iteratees`.
11717 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
11718 * @returns {Array} Returns the new sorted array.
11719 * @example
11720 *
11721 * var users = [
11722 * { 'user': 'fred', 'age': 48 },
11723 * { 'user': 'barney', 'age': 34 },
11724 * { 'user': 'fred', 'age': 40 },
11725 * { 'user': 'barney', 'age': 36 }
11726 * ];
11727 *
11728 * // Sort by `user` in ascending order and by `age` in descending order.
11729 * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
11730 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11731 */
11732 function orderBy(collection, iteratees, orders, guard) {
11733 if (collection == null) {
11734 return [];
11735 }
11736 if (!isArray(iteratees)) {
11737 iteratees = iteratees == null ? [] : [iteratees];
11738 }
11739 orders = guard ? undefined : orders;
11740 if (!isArray(orders)) {
11741 orders = orders == null ? [] : [orders];
11742 }
11743 return baseOrderBy(collection, iteratees, orders);
11744 }
11745
11746 /**
11747 * Creates an array of elements split into two groups, the first of which
11748 * contains elements `predicate` returns truthy for, the second of which
11749 * contains elements `predicate` returns falsey for. The predicate is
11750 * invoked with one argument: (value).
11751 *
11752 * @static
11753 * @memberOf _
11754 * @since 3.0.0
11755 * @category Collection
11756 * @param {Array|Object} collection The collection to iterate over.
11757 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11758 * @returns {Array} Returns the array of grouped elements.
11759 * @example
11760 *
11761 * var users = [
11762 * { 'user': 'barney', 'age': 36, 'active': false },
11763 * { 'user': 'fred', 'age': 40, 'active': true },
11764 * { 'user': 'pebbles', 'age': 1, 'active': false }
11765 * ];
11766 *
11767 * _.partition(users, function(o) { return o.active; });
11768 * // => objects for [['fred'], ['barney', 'pebbles']]
11769 *
11770 * // The `_.matches` iteratee shorthand.
11771 * _.partition(users, { 'age': 1, 'active': false });
11772 * // => objects for [['pebbles'], ['barney', 'fred']]
11773 *
11774 * // The `_.matchesProperty` iteratee shorthand.
11775 * _.partition(users, ['active', false]);
11776 * // => objects for [['barney', 'pebbles'], ['fred']]
11777 *
11778 * // The `_.property` iteratee shorthand.
11779 * _.partition(users, 'active');
11780 * // => objects for [['fred'], ['barney', 'pebbles']]
11781 */
11782 var partition = createAggregator(function(result, value, key) {
11783 result[key ? 0 : 1].push(value);
11784 }, function() { return [[], []]; });
11785
11786 /**
11787 * Reduces `collection` to a value which is the accumulated result of running
11788 * each element in `collection` thru `iteratee`, where each successive
11789 * invocation is supplied the return value of the previous. If `accumulator`
11790 * is not given, the first element of `collection` is used as the initial
11791 * value. The iteratee is invoked with four arguments:
11792 * (accumulator, value, index|key, collection).
11793 *
11794 * Many lodash methods are guarded to work as iteratees for methods like
11795 * `_.reduce`, `_.reduceRight`, and `_.transform`.
11796 *
11797 * The guarded methods are:
11798 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
11799 * and `sortBy`
11800 *
11801 * @static
11802 * @memberOf _
11803 * @since 0.1.0
11804 * @category Collection
11805 * @param {Array|Object} collection The collection to iterate over.
11806 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11807 * @param {*} [accumulator] The initial value.
11808 * @returns {*} Returns the accumulated value.
11809 * @see _.reduceRight
11810 * @example
11811 *
11812 * _.reduce([1, 2], function(sum, n) {
11813 * return sum + n;
11814 * }, 0);
11815 * // => 3
11816 *
11817 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
11818 * (result[value] || (result[value] = [])).push(key);
11819 * return result;
11820 * }, {});
11821 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
11822 */
11823 function reduce(collection, iteratee, accumulator) {
11824 var func = isArray(collection) ? arrayReduce : baseReduce,
11825 initAccum = arguments.length < 3;
11826
11827 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
11828 }
11829
11830 /**
11831 * This method is like `_.reduce` except that it iterates over elements of
11832 * `collection` from right to left.
11833 *
11834 * @static
11835 * @memberOf _
11836 * @since 0.1.0
11837 * @category Collection
11838 * @param {Array|Object} collection The collection to iterate over.
11839 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11840 * @param {*} [accumulator] The initial value.
11841 * @returns {*} Returns the accumulated value.
11842 * @see _.reduce
11843 * @example
11844 *
11845 * var array = [[0, 1], [2, 3], [4, 5]];
11846 *
11847 * _.reduceRight(array, function(flattened, other) {
11848 * return flattened.concat(other);
11849 * }, []);
11850 * // => [4, 5, 2, 3, 0, 1]
11851 */
11852 function reduceRight(collection, iteratee, accumulator) {
11853 var func = isArray(collection) ? arrayReduceRight : baseReduce,
11854 initAccum = arguments.length < 3;
11855
11856 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
11857 }
11858
11859 /**
11860 * The opposite of `_.filter`; this method returns the elements of `collection`
11861 * that `predicate` does **not** return truthy for.
11862 *
11863 * @static
11864 * @memberOf _
11865 * @since 0.1.0
11866 * @category Collection
11867 * @param {Array|Object} collection The collection to iterate over.
11868 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11869 * @returns {Array} Returns the new filtered array.
11870 * @see _.filter
11871 * @example
11872 *
11873 * var users = [
11874 * { 'user': 'barney', 'age': 36, 'active': false },
11875 * { 'user': 'fred', 'age': 40, 'active': true }
11876 * ];
11877 *
11878 * _.reject(users, function(o) { return !o.active; });
11879 * // => objects for ['fred']
11880 *
11881 * // The `_.matches` iteratee shorthand.
11882 * _.reject(users, { 'age': 40, 'active': true });
11883 * // => objects for ['barney']
11884 *
11885 * // The `_.matchesProperty` iteratee shorthand.
11886 * _.reject(users, ['active', false]);
11887 * // => objects for ['fred']
11888 *
11889 * // The `_.property` iteratee shorthand.
11890 * _.reject(users, 'active');
11891 * // => objects for ['barney']
11892 */
11893 function reject(collection, predicate) {
11894 var func = isArray(collection) ? arrayFilter : baseFilter;
11895 return func(collection, negate(getIteratee(predicate, 3)));
11896 }
11897
11898 /**
11899 * Gets a random element from `collection`.
11900 *
11901 * @static
11902 * @memberOf _
11903 * @since 2.0.0
11904 * @category Collection
11905 * @param {Array|Object} collection The collection to sample.
11906 * @returns {*} Returns the random element.
11907 * @example
11908 *
11909 * _.sample([1, 2, 3, 4]);
11910 * // => 2
11911 */
11912 function sample(collection) {
11913 var func = isArray(collection) ? arraySample : baseSample;
11914 return func(collection);
11915 }
11916
11917 /**
11918 * Gets `n` random elements at unique keys from `collection` up to the
11919 * size of `collection`.
11920 *
11921 * @static
11922 * @memberOf _
11923 * @since 4.0.0
11924 * @category Collection
11925 * @param {Array|Object} collection The collection to sample.
11926 * @param {number} [n=1] The number of elements to sample.
11927 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11928 * @returns {Array} Returns the random elements.
11929 * @example
11930 *
11931 * _.sampleSize([1, 2, 3], 2);
11932 * // => [3, 1]
11933 *
11934 * _.sampleSize([1, 2, 3], 4);
11935 * // => [2, 3, 1]
11936 */
11937 function sampleSize(collection, n, guard) {
11938 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
11939 n = 1;
11940 } else {
11941 n = toInteger(n);
11942 }
11943 var func = isArray(collection) ? arraySampleSize : baseSampleSize;
11944 return func(collection, n);
11945 }
11946
11947 /**
11948 * Creates an array of shuffled values, using a version of the
11949 * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
11950 *
11951 * @static
11952 * @memberOf _
11953 * @since 0.1.0
11954 * @category Collection
11955 * @param {Array|Object} collection The collection to shuffle.
11956 * @returns {Array} Returns the new shuffled array.
11957 * @example
11958 *
11959 * _.shuffle([1, 2, 3, 4]);
11960 * // => [4, 1, 3, 2]
11961 */
11962 function shuffle(collection) {
11963 var func = isArray(collection) ? arrayShuffle : baseShuffle;
11964 return func(collection);
11965 }
11966
11967 /**
11968 * Gets the size of `collection` by returning its length for array-like
11969 * values or the number of own enumerable string keyed properties for objects.
11970 *
11971 * @static
11972 * @memberOf _
11973 * @since 0.1.0
11974 * @category Collection
11975 * @param {Array|Object|string} collection The collection to inspect.
11976 * @returns {number} Returns the collection size.
11977 * @example
11978 *
11979 * _.size([1, 2, 3]);
11980 * // => 3
11981 *
11982 * _.size({ 'a': 1, 'b': 2 });
11983 * // => 2
11984 *
11985 * _.size('pebbles');
11986 * // => 7
11987 */
11988 function size(collection) {
11989 if (collection == null) {
11990 return 0;
11991 }
11992 if (isArrayLike(collection)) {
11993 return isString(collection) ? stringSize(collection) : collection.length;
11994 }
11995 var tag = getTag(collection);
11996 if (tag == mapTag || tag == setTag) {
11997 return collection.size;
11998 }
11999 return baseKeys(collection).length;
12000 }
12001
12002 /**
12003 * Checks if `predicate` returns truthy for **any** element of `collection`.
12004 * Iteration is stopped once `predicate` returns truthy. The predicate is
12005 * invoked with three arguments: (value, index|key, collection).
12006 *
12007 * @static
12008 * @memberOf _
12009 * @since 0.1.0
12010 * @category Collection
12011 * @param {Array|Object} collection The collection to iterate over.
12012 * @param {Function} [predicate=_.identity] The function invoked per iteration.
12013 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
12014 * @returns {boolean} Returns `true` if any element passes the predicate check,
12015 * else `false`.
12016 * @example
12017 *
12018 * _.some([null, 0, 'yes', false], Boolean);
12019 * // => true
12020 *
12021 * var users = [
12022 * { 'user': 'barney', 'active': true },
12023 * { 'user': 'fred', 'active': false }
12024 * ];
12025 *
12026 * // The `_.matches` iteratee shorthand.
12027 * _.some(users, { 'user': 'barney', 'active': false });
12028 * // => false
12029 *
12030 * // The `_.matchesProperty` iteratee shorthand.
12031 * _.some(users, ['active', false]);
12032 * // => true
12033 *
12034 * // The `_.property` iteratee shorthand.
12035 * _.some(users, 'active');
12036 * // => true
12037 */
12038 function some(collection, predicate, guard) {
12039 var func = isArray(collection) ? arraySome : baseSome;
12040 if (guard && isIterateeCall(collection, predicate, guard)) {
12041 predicate = undefined;
12042 }
12043 return func(collection, getIteratee(predicate, 3));
12044 }
12045
12046 /**
12047 * Creates an array of elements, sorted in ascending order by the results of
12048 * running each element in a collection thru each iteratee. This method
12049 * performs a stable sort, that is, it preserves the original sort order of
12050 * equal elements. The iteratees are invoked with one argument: (value).
12051 *
12052 * @static
12053 * @memberOf _
12054 * @since 0.1.0
12055 * @category Collection
12056 * @param {Array|Object} collection The collection to iterate over.
12057 * @param {...(Function|Function[])} [iteratees=[_.identity]]
12058 * The iteratees to sort by.
12059 * @returns {Array} Returns the new sorted array.
12060 * @example
12061 *
12062 * var users = [
12063 * { 'user': 'fred', 'age': 48 },
12064 * { 'user': 'barney', 'age': 36 },
12065 * { 'user': 'fred', 'age': 40 },
12066 * { 'user': 'barney', 'age': 34 }
12067 * ];
12068 *
12069 * _.sortBy(users, [function(o) { return o.user; }]);
12070 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
12071 *
12072 * _.sortBy(users, ['user', 'age']);
12073 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
12074 */
12075 var sortBy = baseRest(function(collection, iteratees) {
12076 if (collection == null) {
12077 return [];
12078 }
12079 var length = iteratees.length;
12080 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
12081 iteratees = [];
12082 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
12083 iteratees = [iteratees[0]];
12084 }
12085 return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
12086 });
12087
12088 /*------------------------------------------------------------------------*/
12089
12090 /**
12091 * Gets the timestamp of the number of milliseconds that have elapsed since
12092 * the Unix epoch (1 January 1970 00:00:00 UTC).
12093 *
12094 * @static
12095 * @memberOf _
12096 * @since 2.4.0
12097 * @category Date
12098 * @returns {number} Returns the timestamp.
12099 * @example
12100 *
12101 * _.defer(function(stamp) {
12102 * console.log(_.now() - stamp);
12103 * }, _.now());
12104 * // => Logs the number of milliseconds it took for the deferred invocation.
12105 */
12106 var now = ctxNow || function() {
12107 return root.Date.now();
12108 };
12109
12110 /*------------------------------------------------------------------------*/
12111
12112 /**
12113 * The opposite of `_.before`; this method creates a function that invokes
12114 * `func` once it's called `n` or more times.
12115 *
12116 * @static
12117 * @memberOf _
12118 * @since 0.1.0
12119 * @category Function
12120 * @param {number} n The number of calls before `func` is invoked.
12121 * @param {Function} func The function to restrict.
12122 * @returns {Function} Returns the new restricted function.
12123 * @example
12124 *
12125 * var saves = ['profile', 'settings'];
12126 *
12127 * var done = _.after(saves.length, function() {
12128 * console.log('done saving!');
12129 * });
12130 *
12131 * _.forEach(saves, function(type) {
12132 * asyncSave({ 'type': type, 'complete': done });
12133 * });
12134 * // => Logs 'done saving!' after the two async saves have completed.
12135 */
12136 function after(n, func) {
12137 if (typeof func != 'function') {
12138 throw new TypeError(FUNC_ERROR_TEXT);
12139 }
12140 n = toInteger(n);
12141 return function() {
12142 if (--n < 1) {
12143 return func.apply(this, arguments);
12144 }
12145 };
12146 }
12147
12148 /**
12149 * Creates a function that invokes `func`, with up to `n` arguments,
12150 * ignoring any additional arguments.
12151 *
12152 * @static
12153 * @memberOf _
12154 * @since 3.0.0
12155 * @category Function
12156 * @param {Function} func The function to cap arguments for.
12157 * @param {number} [n=func.length] The arity cap.
12158 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
12159 * @returns {Function} Returns the new capped function.
12160 * @example
12161 *
12162 * _.map(['6', '8', '10'], _.ary(parseInt, 1));
12163 * // => [6, 8, 10]
12164 */
12165 function ary(func, n, guard) {
12166 n = guard ? undefined : n;
12167 n = (func && n == null) ? func.length : n;
12168 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
12169 }
12170
12171 /**
12172 * Creates a function that invokes `func`, with the `this` binding and arguments
12173 * of the created function, while it's called less than `n` times. Subsequent
12174 * calls to the created function return the result of the last `func` invocation.
12175 *
12176 * @static
12177 * @memberOf _
12178 * @since 3.0.0
12179 * @category Function
12180 * @param {number} n The number of calls at which `func` is no longer invoked.
12181 * @param {Function} func The function to restrict.
12182 * @returns {Function} Returns the new restricted function.
12183 * @example
12184 *
12185 * jQuery(element).on('click', _.before(5, addContactToList));
12186 * // => Allows adding up to 4 contacts to the list.
12187 */
12188 function before(n, func) {
12189 var result;
12190 if (typeof func != 'function') {
12191 throw new TypeError(FUNC_ERROR_TEXT);
12192 }
12193 n = toInteger(n);
12194 return function() {
12195 if (--n > 0) {
12196 result = func.apply(this, arguments);
12197 }
12198 if (n <= 1) {
12199 func = undefined;
12200 }
12201 return result;
12202 };
12203 }
12204
12205 /**
12206 * Creates a function that invokes `func` with the `this` binding of `thisArg`
12207 * and `partials` prepended to the arguments it receives.
12208 *
12209 * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
12210 * may be used as a placeholder for partially applied arguments.
12211 *
12212 * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
12213 * property of bound functions.
12214 *
12215 * @static
12216 * @memberOf _
12217 * @since 0.1.0
12218 * @category Function
12219 * @param {Function} func The function to bind.
12220 * @param {*} thisArg The `this` binding of `func`.
12221 * @param {...*} [partials] The arguments to be partially applied.
12222 * @returns {Function} Returns the new bound function.
12223 * @example
12224 *
12225 * function greet(greeting, punctuation) {
12226 * return greeting + ' ' + this.user + punctuation;
12227 * }
12228 *
12229 * var object = { 'user': 'fred' };
12230 *
12231 * var bound = _.bind(greet, object, 'hi');
12232 * bound('!');
12233 * // => 'hi fred!'
12234 *
12235 * // Bound with placeholders.
12236 * var bound = _.bind(greet, object, _, '!');
12237 * bound('hi');
12238 * // => 'hi fred!'
12239 */
12240 var bind = baseRest(function(func, thisArg, partials) {
12241 var bitmask = WRAP_BIND_FLAG;
12242 if (partials.length) {
12243 var holders = replaceHolders(partials, getHolder(bind));
12244 bitmask |= WRAP_PARTIAL_FLAG;
12245 }
12246 return createWrap(func, bitmask, thisArg, partials, holders);
12247 });
12248
12249 /**
12250 * Creates a function that invokes the method at `object[key]` with `partials`
12251 * prepended to the arguments it receives.
12252 *
12253 * This method differs from `_.bind` by allowing bound functions to reference
12254 * methods that may be redefined or don't yet exist. See
12255 * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
12256 * for more details.
12257 *
12258 * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
12259 * builds, may be used as a placeholder for partially applied arguments.
12260 *
12261 * @static
12262 * @memberOf _
12263 * @since 0.10.0
12264 * @category Function
12265 * @param {Object} object The object to invoke the method on.
12266 * @param {string} key The key of the method.
12267 * @param {...*} [partials] The arguments to be partially applied.
12268 * @returns {Function} Returns the new bound function.
12269 * @example
12270 *
12271 * var object = {
12272 * 'user': 'fred',
12273 * 'greet': function(greeting, punctuation) {
12274 * return greeting + ' ' + this.user + punctuation;
12275 * }
12276 * };
12277 *
12278 * var bound = _.bindKey(object, 'greet', 'hi');
12279 * bound('!');
12280 * // => 'hi fred!'
12281 *
12282 * object.greet = function(greeting, punctuation) {
12283 * return greeting + 'ya ' + this.user + punctuation;
12284 * };
12285 *
12286 * bound('!');
12287 * // => 'hiya fred!'
12288 *
12289 * // Bound with placeholders.
12290 * var bound = _.bindKey(object, 'greet', _, '!');
12291 * bound('hi');
12292 * // => 'hiya fred!'
12293 */
12294 var bindKey = baseRest(function(object, key, partials) {
12295 var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
12296 if (partials.length) {
12297 var holders = replaceHolders(partials, getHolder(bindKey));
12298 bitmask |= WRAP_PARTIAL_FLAG;
12299 }
12300 return createWrap(key, bitmask, object, partials, holders);
12301 });
12302
12303 /**
12304 * Creates a function that accepts arguments of `func` and either invokes
12305 * `func` returning its result, if at least `arity` number of arguments have
12306 * been provided, or returns a function that accepts the remaining `func`
12307 * arguments, and so on. The arity of `func` may be specified if `func.length`
12308 * is not sufficient.
12309 *
12310 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
12311 * may be used as a placeholder for provided arguments.
12312 *
12313 * **Note:** This method doesn't set the "length" property of curried functions.
12314 *
12315 * @static
12316 * @memberOf _
12317 * @since 2.0.0
12318 * @category Function
12319 * @param {Function} func The function to curry.
12320 * @param {number} [arity=func.length] The arity of `func`.
12321 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
12322 * @returns {Function} Returns the new curried function.
12323 * @example
12324 *
12325 * var abc = function(a, b, c) {
12326 * return [a, b, c];
12327 * };
12328 *
12329 * var curried = _.curry(abc);
12330 *
12331 * curried(1)(2)(3);
12332 * // => [1, 2, 3]
12333 *
12334 * curried(1, 2)(3);
12335 * // => [1, 2, 3]
12336 *
12337 * curried(1, 2, 3);
12338 * // => [1, 2, 3]
12339 *
12340 * // Curried with placeholders.
12341 * curried(1)(_, 3)(2);
12342 * // => [1, 2, 3]
12343 */
12344 function curry(func, arity, guard) {
12345 arity = guard ? undefined : arity;
12346 var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
12347 result.placeholder = curry.placeholder;
12348 return result;
12349 }
12350
12351 /**
12352 * This method is like `_.curry` except that arguments are applied to `func`
12353 * in the manner of `_.partialRight` instead of `_.partial`.
12354 *
12355 * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
12356 * builds, may be used as a placeholder for provided arguments.
12357 *
12358 * **Note:** This method doesn't set the "length" property of curried functions.
12359 *
12360 * @static
12361 * @memberOf _
12362 * @since 3.0.0
12363 * @category Function
12364 * @param {Function} func The function to curry.
12365 * @param {number} [arity=func.length] The arity of `func`.
12366 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
12367 * @returns {Function} Returns the new curried function.
12368 * @example
12369 *
12370 * var abc = function(a, b, c) {
12371 * return [a, b, c];
12372 * };
12373 *
12374 * var curried = _.curryRight(abc);
12375 *
12376 * curried(3)(2)(1);
12377 * // => [1, 2, 3]
12378 *
12379 * curried(2, 3)(1);
12380 * // => [1, 2, 3]
12381 *
12382 * curried(1, 2, 3);
12383 * // => [1, 2, 3]
12384 *
12385 * // Curried with placeholders.
12386 * curried(3)(1, _)(2);
12387 * // => [1, 2, 3]
12388 */
12389 function curryRight(func, arity, guard) {
12390 arity = guard ? undefined : arity;
12391 var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
12392 result.placeholder = curryRight.placeholder;
12393 return result;
12394 }
12395
12396 /**
12397 * Creates a debounced function that delays invoking `func` until after `wait`
12398 * milliseconds have elapsed since the last time the debounced function was
12399 * invoked. The debounced function comes with a `cancel` method to cancel
12400 * delayed `func` invocations and a `flush` method to immediately invoke them.
12401 * Provide `options` to indicate whether `func` should be invoked on the
12402 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
12403 * with the last arguments provided to the debounced function. Subsequent
12404 * calls to the debounced function return the result of the last `func`
12405 * invocation.
12406 *
12407 * **Note:** If `leading` and `trailing` options are `true`, `func` is
12408 * invoked on the trailing edge of the timeout only if the debounced function
12409 * is invoked more than once during the `wait` timeout.
12410 *
12411 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
12412 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
12413 *
12414 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
12415 * for details over the differences between `_.debounce` and `_.throttle`.
12416 *
12417 * @static
12418 * @memberOf _
12419 * @since 0.1.0
12420 * @category Function
12421 * @param {Function} func The function to debounce.
12422 * @param {number} [wait=0] The number of milliseconds to delay.
12423 * @param {Object} [options={}] The options object.
12424 * @param {boolean} [options.leading=false]
12425 * Specify invoking on the leading edge of the timeout.
12426 * @param {number} [options.maxWait]
12427 * The maximum time `func` is allowed to be delayed before it's invoked.
12428 * @param {boolean} [options.trailing=true]
12429 * Specify invoking on the trailing edge of the timeout.
12430 * @returns {Function} Returns the new debounced function.
12431 * @example
12432 *
12433 * // Avoid costly calculations while the window size is in flux.
12434 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
12435 *
12436 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
12437 * jQuery(element).on('click', _.debounce(sendMail, 300, {
12438 * 'leading': true,
12439 * 'trailing': false
12440 * }));
12441 *
12442 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
12443 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
12444 * var source = new EventSource('/stream');
12445 * jQuery(source).on('message', debounced);
12446 *
12447 * // Cancel the trailing debounced invocation.
12448 * jQuery(window).on('popstate', debounced.cancel);
12449 */
12450 function debounce(func, wait, options) {
12451 var lastArgs,
12452 lastThis,
12453 maxWait,
12454 result,
12455 timerId,
12456 lastCallTime,
12457 lastInvokeTime = 0,
12458 leading = false,
12459 maxing = false,
12460 trailing = true;
12461
12462 if (typeof func != 'function') {
12463 throw new TypeError(FUNC_ERROR_TEXT);
12464 }
12465 wait = toNumber(wait) || 0;
12466 if (isObject(options)) {
12467 leading = !!options.leading;
12468 maxing = 'maxWait' in options;
12469 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
12470 trailing = 'trailing' in options ? !!options.trailing : trailing;
12471 }
12472
12473 function invokeFunc(time) {
12474 var args = lastArgs,
12475 thisArg = lastThis;
12476
12477 lastArgs = lastThis = undefined;
12478 lastInvokeTime = time;
12479 result = func.apply(thisArg, args);
12480 return result;
12481 }
12482
12483 function leadingEdge(time) {
12484 // Reset any `maxWait` timer.
12485 lastInvokeTime = time;
12486 // Start the timer for the trailing edge.
12487 timerId = setTimeout(timerExpired, wait);
12488 // Invoke the leading edge.
12489 return leading ? invokeFunc(time) : result;
12490 }
12491
12492 function remainingWait(time) {
12493 var timeSinceLastCall = time - lastCallTime,
12494 timeSinceLastInvoke = time - lastInvokeTime,
12495 timeWaiting = wait - timeSinceLastCall;
12496
12497 return maxing
12498 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
12499 : timeWaiting;
12500 }
12501
12502 function shouldInvoke(time) {
12503 var timeSinceLastCall = time - lastCallTime,
12504 timeSinceLastInvoke = time - lastInvokeTime;
12505
12506 // Either this is the first call, activity has stopped and we're at the
12507 // trailing edge, the system time has gone backwards and we're treating
12508 // it as the trailing edge, or we've hit the `maxWait` limit.
12509 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
12510 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
12511 }
12512
12513 function timerExpired() {
12514 var time = now();
12515 if (shouldInvoke(time)) {
12516 return trailingEdge(time);
12517 }
12518 // Restart the timer.
12519 timerId = setTimeout(timerExpired, remainingWait(time));
12520 }
12521
12522 function trailingEdge(time) {
12523 timerId = undefined;
12524
12525 // Only invoke if we have `lastArgs` which means `func` has been
12526 // debounced at least once.
12527 if (trailing && lastArgs) {
12528 return invokeFunc(time);
12529 }
12530 lastArgs = lastThis = undefined;
12531 return result;
12532 }
12533
12534 function cancel() {
12535 if (timerId !== undefined) {
12536 clearTimeout(timerId);
12537 }
12538 lastInvokeTime = 0;
12539 lastArgs = lastCallTime = lastThis = timerId = undefined;
12540 }
12541
12542 function flush() {
12543 return timerId === undefined ? result : trailingEdge(now());
12544 }
12545
12546 function debounced() {
12547 var time = now(),
12548 isInvoking = shouldInvoke(time);
12549
12550 lastArgs = arguments;
12551 lastThis = this;
12552 lastCallTime = time;
12553
12554 if (isInvoking) {
12555 if (timerId === undefined) {
12556 return leadingEdge(lastCallTime);
12557 }
12558 if (maxing) {
12559 // Handle invocations in a tight loop.
12560 timerId = setTimeout(timerExpired, wait);
12561 return invokeFunc(lastCallTime);
12562 }
12563 }
12564 if (timerId === undefined) {
12565 timerId = setTimeout(timerExpired, wait);
12566 }
12567 return result;
12568 }
12569 debounced.cancel = cancel;
12570 debounced.flush = flush;
12571 return debounced;
12572 }
12573
12574 /**
12575 * Defers invoking the `func` until the current call stack has cleared. Any
12576 * additional arguments are provided to `func` when it's invoked.
12577 *
12578 * @static
12579 * @memberOf _
12580 * @since 0.1.0
12581 * @category Function
12582 * @param {Function} func The function to defer.
12583 * @param {...*} [args] The arguments to invoke `func` with.
12584 * @returns {number} Returns the timer id.
12585 * @example
12586 *
12587 * _.defer(function(text) {
12588 * console.log(text);
12589 * }, 'deferred');
12590 * // => Logs 'deferred' after one millisecond.
12591 */
12592 var defer = baseRest(function(func, args) {
12593 return baseDelay(func, 1, args);
12594 });
12595
12596 /**
12597 * Invokes `func` after `wait` milliseconds. Any additional arguments are
12598 * provided to `func` when it's invoked.
12599 *
12600 * @static
12601 * @memberOf _
12602 * @since 0.1.0
12603 * @category Function
12604 * @param {Function} func The function to delay.
12605 * @param {number} wait The number of milliseconds to delay invocation.
12606 * @param {...*} [args] The arguments to invoke `func` with.
12607 * @returns {number} Returns the timer id.
12608 * @example
12609 *
12610 * _.delay(function(text) {
12611 * console.log(text);
12612 * }, 1000, 'later');
12613 * // => Logs 'later' after one second.
12614 */
12615 var delay = baseRest(function(func, wait, args) {
12616 return baseDelay(func, toNumber(wait) || 0, args);
12617 });
12618
12619 /**
12620 * Creates a function that invokes `func` with arguments reversed.
12621 *
12622 * @static
12623 * @memberOf _
12624 * @since 4.0.0
12625 * @category Function
12626 * @param {Function} func The function to flip arguments for.
12627 * @returns {Function} Returns the new flipped function.
12628 * @example
12629 *
12630 * var flipped = _.flip(function() {
12631 * return _.toArray(arguments);
12632 * });
12633 *
12634 * flipped('a', 'b', 'c', 'd');
12635 * // => ['d', 'c', 'b', 'a']
12636 */
12637 function flip(func) {
12638 return createWrap(func, WRAP_FLIP_FLAG);
12639 }
12640
12641 /**
12642 * Creates a function that memoizes the result of `func`. If `resolver` is
12643 * provided, it determines the cache key for storing the result based on the
12644 * arguments provided to the memoized function. By default, the first argument
12645 * provided to the memoized function is used as the map cache key. The `func`
12646 * is invoked with the `this` binding of the memoized function.
12647 *
12648 * **Note:** The cache is exposed as the `cache` property on the memoized
12649 * function. Its creation may be customized by replacing the `_.memoize.Cache`
12650 * constructor with one whose instances implement the
12651 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
12652 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
12653 *
12654 * @static
12655 * @memberOf _
12656 * @since 0.1.0
12657 * @category Function
12658 * @param {Function} func The function to have its output memoized.
12659 * @param {Function} [resolver] The function to resolve the cache key.
12660 * @returns {Function} Returns the new memoized function.
12661 * @example
12662 *
12663 * var object = { 'a': 1, 'b': 2 };
12664 * var other = { 'c': 3, 'd': 4 };
12665 *
12666 * var values = _.memoize(_.values);
12667 * values(object);
12668 * // => [1, 2]
12669 *
12670 * values(other);
12671 * // => [3, 4]
12672 *
12673 * object.a = 2;
12674 * values(object);
12675 * // => [1, 2]
12676 *
12677 * // Modify the result cache.
12678 * values.cache.set(object, ['a', 'b']);
12679 * values(object);
12680 * // => ['a', 'b']
12681 *
12682 * // Replace `_.memoize.Cache`.
12683 * _.memoize.Cache = WeakMap;
12684 */
12685 function memoize(func, resolver) {
12686 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
12687 throw new TypeError(FUNC_ERROR_TEXT);
12688 }
12689 var memoized = function() {
12690 var args = arguments,
12691 key = resolver ? resolver.apply(this, args) : args[0],
12692 cache = memoized.cache;
12693
12694 if (cache.has(key)) {
12695 return cache.get(key);
12696 }
12697 var result = func.apply(this, args);
12698 memoized.cache = cache.set(key, result) || cache;
12699 return result;
12700 };
12701 memoized.cache = new (memoize.Cache || MapCache);
12702 return memoized;
12703 }
12704
12705 // Expose `MapCache`.
12706 memoize.Cache = MapCache;
12707
12708 /**
12709 * Creates a function that negates the result of the predicate `func`. The
12710 * `func` predicate is invoked with the `this` binding and arguments of the
12711 * created function.
12712 *
12713 * @static
12714 * @memberOf _
12715 * @since 3.0.0
12716 * @category Function
12717 * @param {Function} predicate The predicate to negate.
12718 * @returns {Function} Returns the new negated function.
12719 * @example
12720 *
12721 * function isEven(n) {
12722 * return n % 2 == 0;
12723 * }
12724 *
12725 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
12726 * // => [1, 3, 5]
12727 */
12728 function negate(predicate) {
12729 if (typeof predicate != 'function') {
12730 throw new TypeError(FUNC_ERROR_TEXT);
12731 }
12732 return function() {
12733 var args = arguments;
12734 switch (args.length) {
12735 case 0: return !predicate.call(this);
12736 case 1: return !predicate.call(this, args[0]);
12737 case 2: return !predicate.call(this, args[0], args[1]);
12738 case 3: return !predicate.call(this, args[0], args[1], args[2]);
12739 }
12740 return !predicate.apply(this, args);
12741 };
12742 }
12743
12744 /**
12745 * Creates a function that is restricted to invoking `func` once. Repeat calls
12746 * to the function return the value of the first invocation. The `func` is
12747 * invoked with the `this` binding and arguments of the created function.
12748 *
12749 * @static
12750 * @memberOf _
12751 * @since 0.1.0
12752 * @category Function
12753 * @param {Function} func The function to restrict.
12754 * @returns {Function} Returns the new restricted function.
12755 * @example
12756 *
12757 * var initialize = _.once(createApplication);
12758 * initialize();
12759 * initialize();
12760 * // => `createApplication` is invoked once
12761 */
12762 function once(func) {
12763 return before(2, func);
12764 }
12765
12766 /**
12767 * Creates a function that invokes `func` with its arguments transformed.
12768 *
12769 * @static
12770 * @since 4.0.0
12771 * @memberOf _
12772 * @category Function
12773 * @param {Function} func The function to wrap.
12774 * @param {...(Function|Function[])} [transforms=[_.identity]]
12775 * The argument transforms.
12776 * @returns {Function} Returns the new function.
12777 * @example
12778 *
12779 * function doubled(n) {
12780 * return n * 2;
12781 * }
12782 *
12783 * function square(n) {
12784 * return n * n;
12785 * }
12786 *
12787 * var func = _.overArgs(function(x, y) {
12788 * return [x, y];
12789 * }, [square, doubled]);
12790 *
12791 * func(9, 3);
12792 * // => [81, 6]
12793 *
12794 * func(10, 5);
12795 * // => [100, 10]
12796 */
12797 var overArgs = castRest(function(func, transforms) {
12798 transforms = (transforms.length == 1 && isArray(transforms[0]))
12799 ? arrayMap(transforms[0], baseUnary(getIteratee()))
12800 : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
12801
12802 var funcsLength = transforms.length;
12803 return baseRest(function(args) {
12804 var index = -1,
12805 length = nativeMin(args.length, funcsLength);
12806
12807 while (++index < length) {
12808 args[index] = transforms[index].call(this, args[index]);
12809 }
12810 return apply(func, this, args);
12811 });
12812 });
12813
12814 /**
12815 * Creates a function that invokes `func` with `partials` prepended to the
12816 * arguments it receives. This method is like `_.bind` except it does **not**
12817 * alter the `this` binding.
12818 *
12819 * The `_.partial.placeholder` value, which defaults to `_` in monolithic
12820 * builds, may be used as a placeholder for partially applied arguments.
12821 *
12822 * **Note:** This method doesn't set the "length" property of partially
12823 * applied functions.
12824 *
12825 * @static
12826 * @memberOf _
12827 * @since 0.2.0
12828 * @category Function
12829 * @param {Function} func The function to partially apply arguments to.
12830 * @param {...*} [partials] The arguments to be partially applied.
12831 * @returns {Function} Returns the new partially applied function.
12832 * @example
12833 *
12834 * function greet(greeting, name) {
12835 * return greeting + ' ' + name;
12836 * }
12837 *
12838 * var sayHelloTo = _.partial(greet, 'hello');
12839 * sayHelloTo('fred');
12840 * // => 'hello fred'
12841 *
12842 * // Partially applied with placeholders.
12843 * var greetFred = _.partial(greet, _, 'fred');
12844 * greetFred('hi');
12845 * // => 'hi fred'
12846 */
12847 var partial = baseRest(function(func, partials) {
12848 var holders = replaceHolders(partials, getHolder(partial));
12849 return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
12850 });
12851
12852 /**
12853 * This method is like `_.partial` except that partially applied arguments
12854 * are appended to the arguments it receives.
12855 *
12856 * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
12857 * builds, may be used as a placeholder for partially applied arguments.
12858 *
12859 * **Note:** This method doesn't set the "length" property of partially
12860 * applied functions.
12861 *
12862 * @static
12863 * @memberOf _
12864 * @since 1.0.0
12865 * @category Function
12866 * @param {Function} func The function to partially apply arguments to.
12867 * @param {...*} [partials] The arguments to be partially applied.
12868 * @returns {Function} Returns the new partially applied function.
12869 * @example
12870 *
12871 * function greet(greeting, name) {
12872 * return greeting + ' ' + name;
12873 * }
12874 *
12875 * var greetFred = _.partialRight(greet, 'fred');
12876 * greetFred('hi');
12877 * // => 'hi fred'
12878 *
12879 * // Partially applied with placeholders.
12880 * var sayHelloTo = _.partialRight(greet, 'hello', _);
12881 * sayHelloTo('fred');
12882 * // => 'hello fred'
12883 */
12884 var partialRight = baseRest(function(func, partials) {
12885 var holders = replaceHolders(partials, getHolder(partialRight));
12886 return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
12887 });
12888
12889 /**
12890 * Creates a function that invokes `func` with arguments arranged according
12891 * to the specified `indexes` where the argument value at the first index is
12892 * provided as the first argument, the argument value at the second index is
12893 * provided as the second argument, and so on.
12894 *
12895 * @static
12896 * @memberOf _
12897 * @since 3.0.0
12898 * @category Function
12899 * @param {Function} func The function to rearrange arguments for.
12900 * @param {...(number|number[])} indexes The arranged argument indexes.
12901 * @returns {Function} Returns the new function.
12902 * @example
12903 *
12904 * var rearged = _.rearg(function(a, b, c) {
12905 * return [a, b, c];
12906 * }, [2, 0, 1]);
12907 *
12908 * rearged('b', 'c', 'a')
12909 * // => ['a', 'b', 'c']
12910 */
12911 var rearg = flatRest(function(func, indexes) {
12912 return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
12913 });
12914
12915 /**
12916 * Creates a function that invokes `func` with the `this` binding of the
12917 * created function and arguments from `start` and beyond provided as
12918 * an array.
12919 *
12920 * **Note:** This method is based on the
12921 * [rest parameter](https://mdn.io/rest_parameters).
12922 *
12923 * @static
12924 * @memberOf _
12925 * @since 4.0.0
12926 * @category Function
12927 * @param {Function} func The function to apply a rest parameter to.
12928 * @param {number} [start=func.length-1] The start position of the rest parameter.
12929 * @returns {Function} Returns the new function.
12930 * @example
12931 *
12932 * var say = _.rest(function(what, names) {
12933 * return what + ' ' + _.initial(names).join(', ') +
12934 * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
12935 * });
12936 *
12937 * say('hello', 'fred', 'barney', 'pebbles');
12938 * // => 'hello fred, barney, & pebbles'
12939 */
12940 function rest(func, start) {
12941 if (typeof func != 'function') {
12942 throw new TypeError(FUNC_ERROR_TEXT);
12943 }
12944 start = start === undefined ? start : toInteger(start);
12945 return baseRest(func, start);
12946 }
12947
12948 /**
12949 * Creates a function that invokes `func` with the `this` binding of the
12950 * create function and an array of arguments much like
12951 * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
12952 *
12953 * **Note:** This method is based on the
12954 * [spread operator](https://mdn.io/spread_operator).
12955 *
12956 * @static
12957 * @memberOf _
12958 * @since 3.2.0
12959 * @category Function
12960 * @param {Function} func The function to spread arguments over.
12961 * @param {number} [start=0] The start position of the spread.
12962 * @returns {Function} Returns the new function.
12963 * @example
12964 *
12965 * var say = _.spread(function(who, what) {
12966 * return who + ' says ' + what;
12967 * });
12968 *
12969 * say(['fred', 'hello']);
12970 * // => 'fred says hello'
12971 *
12972 * var numbers = Promise.all([
12973 * Promise.resolve(40),
12974 * Promise.resolve(36)
12975 * ]);
12976 *
12977 * numbers.then(_.spread(function(x, y) {
12978 * return x + y;
12979 * }));
12980 * // => a Promise of 76
12981 */
12982 function spread(func, start) {
12983 if (typeof func != 'function') {
12984 throw new TypeError(FUNC_ERROR_TEXT);
12985 }
12986 start = start == null ? 0 : nativeMax(toInteger(start), 0);
12987 return baseRest(function(args) {
12988 var array = args[start],
12989 otherArgs = castSlice(args, 0, start);
12990
12991 if (array) {
12992 arrayPush(otherArgs, array);
12993 }
12994 return apply(func, this, otherArgs);
12995 });
12996 }
12997
12998 /**
12999 * Creates a throttled function that only invokes `func` at most once per
13000 * every `wait` milliseconds. The throttled function comes with a `cancel`
13001 * method to cancel delayed `func` invocations and a `flush` method to
13002 * immediately invoke them. Provide `options` to indicate whether `func`
13003 * should be invoked on the leading and/or trailing edge of the `wait`
13004 * timeout. The `func` is invoked with the last arguments provided to the
13005 * throttled function. Subsequent calls to the throttled function return the
13006 * result of the last `func` invocation.
13007 *
13008 * **Note:** If `leading` and `trailing` options are `true`, `func` is
13009 * invoked on the trailing edge of the timeout only if the throttled function
13010 * is invoked more than once during the `wait` timeout.
13011 *
13012 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
13013 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
13014 *
13015 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
13016 * for details over the differences between `_.throttle` and `_.debounce`.
13017 *
13018 * @static
13019 * @memberOf _
13020 * @since 0.1.0
13021 * @category Function
13022 * @param {Function} func The function to throttle.
13023 * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
13024 * @param {Object} [options={}] The options object.
13025 * @param {boolean} [options.leading=true]
13026 * Specify invoking on the leading edge of the timeout.
13027 * @param {boolean} [options.trailing=true]
13028 * Specify invoking on the trailing edge of the timeout.
13029 * @returns {Function} Returns the new throttled function.
13030 * @example
13031 *
13032 * // Avoid excessively updating the position while scrolling.
13033 * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
13034 *
13035 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
13036 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
13037 * jQuery(element).on('click', throttled);
13038 *
13039 * // Cancel the trailing throttled invocation.
13040 * jQuery(window).on('popstate', throttled.cancel);
13041 */
13042 function throttle(func, wait, options) {
13043 var leading = true,
13044 trailing = true;
13045
13046 if (typeof func != 'function') {
13047 throw new TypeError(FUNC_ERROR_TEXT);
13048 }
13049 if (isObject(options)) {
13050 leading = 'leading' in options ? !!options.leading : leading;
13051 trailing = 'trailing' in options ? !!options.trailing : trailing;
13052 }
13053 return debounce(func, wait, {
13054 'leading': leading,
13055 'maxWait': wait,
13056 'trailing': trailing
13057 });
13058 }
13059
13060 /**
13061 * Creates a function that accepts up to one argument, ignoring any
13062 * additional arguments.
13063 *
13064 * @static
13065 * @memberOf _
13066 * @since 4.0.0
13067 * @category Function
13068 * @param {Function} func The function to cap arguments for.
13069 * @returns {Function} Returns the new capped function.
13070 * @example
13071 *
13072 * _.map(['6', '8', '10'], _.unary(parseInt));
13073 * // => [6, 8, 10]
13074 */
13075 function unary(func) {
13076 return ary(func, 1);
13077 }
13078
13079 /**
13080 * Creates a function that provides `value` to `wrapper` as its first
13081 * argument. Any additional arguments provided to the function are appended
13082 * to those provided to the `wrapper`. The wrapper is invoked with the `this`
13083 * binding of the created function.
13084 *
13085 * @static
13086 * @memberOf _
13087 * @since 0.1.0
13088 * @category Function
13089 * @param {*} value The value to wrap.
13090 * @param {Function} [wrapper=identity] The wrapper function.
13091 * @returns {Function} Returns the new function.
13092 * @example
13093 *
13094 * var p = _.wrap(_.escape, function(func, text) {
13095 * return '<p>' + func(text) + '</p>';
13096 * });
13097 *
13098 * p('fred, barney, & pebbles');
13099 * // => '<p>fred, barney, &amp; pebbles</p>'
13100 */
13101 function wrap(value, wrapper) {
13102 return partial(castFunction(wrapper), value);
13103 }
13104
13105 /*------------------------------------------------------------------------*/
13106
13107 /**
13108 * Casts `value` as an array if it's not one.
13109 *
13110 * @static
13111 * @memberOf _
13112 * @since 4.4.0
13113 * @category Lang
13114 * @param {*} value The value to inspect.
13115 * @returns {Array} Returns the cast array.
13116 * @example
13117 *
13118 * _.castArray(1);
13119 * // => [1]
13120 *
13121 * _.castArray({ 'a': 1 });
13122 * // => [{ 'a': 1 }]
13123 *
13124 * _.castArray('abc');
13125 * // => ['abc']
13126 *
13127 * _.castArray(null);
13128 * // => [null]
13129 *
13130 * _.castArray(undefined);
13131 * // => [undefined]
13132 *
13133 * _.castArray();
13134 * // => []
13135 *
13136 * var array = [1, 2, 3];
13137 * console.log(_.castArray(array) === array);
13138 * // => true
13139 */
13140 function castArray() {
13141 if (!arguments.length) {
13142 return [];
13143 }
13144 var value = arguments[0];
13145 return isArray(value) ? value : [value];
13146 }
13147
13148 /**
13149 * Creates a shallow clone of `value`.
13150 *
13151 * **Note:** This method is loosely based on the
13152 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
13153 * and supports cloning arrays, array buffers, booleans, date objects, maps,
13154 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
13155 * arrays. The own enumerable properties of `arguments` objects are cloned
13156 * as plain objects. An empty object is returned for uncloneable values such
13157 * as error objects, functions, DOM nodes, and WeakMaps.
13158 *
13159 * @static
13160 * @memberOf _
13161 * @since 0.1.0
13162 * @category Lang
13163 * @param {*} value The value to clone.
13164 * @returns {*} Returns the cloned value.
13165 * @see _.cloneDeep
13166 * @example
13167 *
13168 * var objects = [{ 'a': 1 }, { 'b': 2 }];
13169 *
13170 * var shallow = _.clone(objects);
13171 * console.log(shallow[0] === objects[0]);
13172 * // => true
13173 */
13174 function clone(value) {
13175 return baseClone(value, CLONE_SYMBOLS_FLAG);
13176 }
13177
13178 /**
13179 * This method is like `_.clone` except that it accepts `customizer` which
13180 * is invoked to produce the cloned value. If `customizer` returns `undefined`,
13181 * cloning is handled by the method instead. The `customizer` is invoked with
13182 * up to four arguments; (value [, index|key, object, stack]).
13183 *
13184 * @static
13185 * @memberOf _
13186 * @since 4.0.0
13187 * @category Lang
13188 * @param {*} value The value to clone.
13189 * @param {Function} [customizer] The function to customize cloning.
13190 * @returns {*} Returns the cloned value.
13191 * @see _.cloneDeepWith
13192 * @example
13193 *
13194 * function customizer(value) {
13195 * if (_.isElement(value)) {
13196 * return value.cloneNode(false);
13197 * }
13198 * }
13199 *
13200 * var el = _.cloneWith(document.body, customizer);
13201 *
13202 * console.log(el === document.body);
13203 * // => false
13204 * console.log(el.nodeName);
13205 * // => 'BODY'
13206 * console.log(el.childNodes.length);
13207 * // => 0
13208 */
13209 function cloneWith(value, customizer) {
13210 customizer = typeof customizer == 'function' ? customizer : undefined;
13211 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
13212 }
13213
13214 /**
13215 * This method is like `_.clone` except that it recursively clones `value`.
13216 *
13217 * @static
13218 * @memberOf _
13219 * @since 1.0.0
13220 * @category Lang
13221 * @param {*} value The value to recursively clone.
13222 * @returns {*} Returns the deep cloned value.
13223 * @see _.clone
13224 * @example
13225 *
13226 * var objects = [{ 'a': 1 }, { 'b': 2 }];
13227 *
13228 * var deep = _.cloneDeep(objects);
13229 * console.log(deep[0] === objects[0]);
13230 * // => false
13231 */
13232 function cloneDeep(value) {
13233 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
13234 }
13235
13236 /**
13237 * This method is like `_.cloneWith` except that it recursively clones `value`.
13238 *
13239 * @static
13240 * @memberOf _
13241 * @since 4.0.0
13242 * @category Lang
13243 * @param {*} value The value to recursively clone.
13244 * @param {Function} [customizer] The function to customize cloning.
13245 * @returns {*} Returns the deep cloned value.
13246 * @see _.cloneWith
13247 * @example
13248 *
13249 * function customizer(value) {
13250 * if (_.isElement(value)) {
13251 * return value.cloneNode(true);
13252 * }
13253 * }
13254 *
13255 * var el = _.cloneDeepWith(document.body, customizer);
13256 *
13257 * console.log(el === document.body);
13258 * // => false
13259 * console.log(el.nodeName);
13260 * // => 'BODY'
13261 * console.log(el.childNodes.length);
13262 * // => 20
13263 */
13264 function cloneDeepWith(value, customizer) {
13265 customizer = typeof customizer == 'function' ? customizer : undefined;
13266 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
13267 }
13268
13269 /**
13270 * Checks if `object` conforms to `source` by invoking the predicate
13271 * properties of `source` with the corresponding property values of `object`.
13272 *
13273 * **Note:** This method is equivalent to `_.conforms` when `source` is
13274 * partially applied.
13275 *
13276 * @static
13277 * @memberOf _
13278 * @since 4.14.0
13279 * @category Lang
13280 * @param {Object} object The object to inspect.
13281 * @param {Object} source The object of property predicates to conform to.
13282 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
13283 * @example
13284 *
13285 * var object = { 'a': 1, 'b': 2 };
13286 *
13287 * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
13288 * // => true
13289 *
13290 * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
13291 * // => false
13292 */
13293 function conformsTo(object, source) {
13294 return source == null || baseConformsTo(object, source, keys(source));
13295 }
13296
13297 /**
13298 * Performs a
13299 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
13300 * comparison between two values to determine if they are equivalent.
13301 *
13302 * @static
13303 * @memberOf _
13304 * @since 4.0.0
13305 * @category Lang
13306 * @param {*} value The value to compare.
13307 * @param {*} other The other value to compare.
13308 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13309 * @example
13310 *
13311 * var object = { 'a': 1 };
13312 * var other = { 'a': 1 };
13313 *
13314 * _.eq(object, object);
13315 * // => true
13316 *
13317 * _.eq(object, other);
13318 * // => false
13319 *
13320 * _.eq('a', 'a');
13321 * // => true
13322 *
13323 * _.eq('a', Object('a'));
13324 * // => false
13325 *
13326 * _.eq(NaN, NaN);
13327 * // => true
13328 */
13329 function eq(value, other) {
13330 return value === other || (value !== value && other !== other);
13331 }
13332
13333 /**
13334 * Checks if `value` is greater than `other`.
13335 *
13336 * @static
13337 * @memberOf _
13338 * @since 3.9.0
13339 * @category Lang
13340 * @param {*} value The value to compare.
13341 * @param {*} other The other value to compare.
13342 * @returns {boolean} Returns `true` if `value` is greater than `other`,
13343 * else `false`.
13344 * @see _.lt
13345 * @example
13346 *
13347 * _.gt(3, 1);
13348 * // => true
13349 *
13350 * _.gt(3, 3);
13351 * // => false
13352 *
13353 * _.gt(1, 3);
13354 * // => false
13355 */
13356 var gt = createRelationalOperation(baseGt);
13357
13358 /**
13359 * Checks if `value` is greater than or equal to `other`.
13360 *
13361 * @static
13362 * @memberOf _
13363 * @since 3.9.0
13364 * @category Lang
13365 * @param {*} value The value to compare.
13366 * @param {*} other The other value to compare.
13367 * @returns {boolean} Returns `true` if `value` is greater than or equal to
13368 * `other`, else `false`.
13369 * @see _.lte
13370 * @example
13371 *
13372 * _.gte(3, 1);
13373 * // => true
13374 *
13375 * _.gte(3, 3);
13376 * // => true
13377 *
13378 * _.gte(1, 3);
13379 * // => false
13380 */
13381 var gte = createRelationalOperation(function(value, other) {
13382 return value >= other;
13383 });
13384
13385 /**
13386 * Checks if `value` is likely an `arguments` object.
13387 *
13388 * @static
13389 * @memberOf _
13390 * @since 0.1.0
13391 * @category Lang
13392 * @param {*} value The value to check.
13393 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
13394 * else `false`.
13395 * @example
13396 *
13397 * _.isArguments(function() { return arguments; }());
13398 * // => true
13399 *
13400 * _.isArguments([1, 2, 3]);
13401 * // => false
13402 */
13403 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
13404 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
13405 !propertyIsEnumerable.call(value, 'callee');
13406 };
13407
13408 /**
13409 * Checks if `value` is classified as an `Array` object.
13410 *
13411 * @static
13412 * @memberOf _
13413 * @since 0.1.0
13414 * @category Lang
13415 * @param {*} value The value to check.
13416 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
13417 * @example
13418 *
13419 * _.isArray([1, 2, 3]);
13420 * // => true
13421 *
13422 * _.isArray(document.body.children);
13423 * // => false
13424 *
13425 * _.isArray('abc');
13426 * // => false
13427 *
13428 * _.isArray(_.noop);
13429 * // => false
13430 */
13431 var isArray = Array.isArray;
13432
13433 /**
13434 * Checks if `value` is classified as an `ArrayBuffer` object.
13435 *
13436 * @static
13437 * @memberOf _
13438 * @since 4.3.0
13439 * @category Lang
13440 * @param {*} value The value to check.
13441 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
13442 * @example
13443 *
13444 * _.isArrayBuffer(new ArrayBuffer(2));
13445 * // => true
13446 *
13447 * _.isArrayBuffer(new Array(2));
13448 * // => false
13449 */
13450 var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
13451
13452 /**
13453 * Checks if `value` is array-like. A value is considered array-like if it's
13454 * not a function and has a `value.length` that's an integer greater than or
13455 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
13456 *
13457 * @static
13458 * @memberOf _
13459 * @since 4.0.0
13460 * @category Lang
13461 * @param {*} value The value to check.
13462 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
13463 * @example
13464 *
13465 * _.isArrayLike([1, 2, 3]);
13466 * // => true
13467 *
13468 * _.isArrayLike(document.body.children);
13469 * // => true
13470 *
13471 * _.isArrayLike('abc');
13472 * // => true
13473 *
13474 * _.isArrayLike(_.noop);
13475 * // => false
13476 */
13477 function isArrayLike(value) {
13478 return value != null && isLength(value.length) && !isFunction(value);
13479 }
13480
13481 /**
13482 * This method is like `_.isArrayLike` except that it also checks if `value`
13483 * is an object.
13484 *
13485 * @static
13486 * @memberOf _
13487 * @since 4.0.0
13488 * @category Lang
13489 * @param {*} value The value to check.
13490 * @returns {boolean} Returns `true` if `value` is an array-like object,
13491 * else `false`.
13492 * @example
13493 *
13494 * _.isArrayLikeObject([1, 2, 3]);
13495 * // => true
13496 *
13497 * _.isArrayLikeObject(document.body.children);
13498 * // => true
13499 *
13500 * _.isArrayLikeObject('abc');
13501 * // => false
13502 *
13503 * _.isArrayLikeObject(_.noop);
13504 * // => false
13505 */
13506 function isArrayLikeObject(value) {
13507 return isObjectLike(value) && isArrayLike(value);
13508 }
13509
13510 /**
13511 * Checks if `value` is classified as a boolean primitive or object.
13512 *
13513 * @static
13514 * @memberOf _
13515 * @since 0.1.0
13516 * @category Lang
13517 * @param {*} value The value to check.
13518 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
13519 * @example
13520 *
13521 * _.isBoolean(false);
13522 * // => true
13523 *
13524 * _.isBoolean(null);
13525 * // => false
13526 */
13527 function isBoolean(value) {
13528 return value === true || value === false ||
13529 (isObjectLike(value) && baseGetTag(value) == boolTag);
13530 }
13531
13532 /**
13533 * Checks if `value` is a buffer.
13534 *
13535 * @static
13536 * @memberOf _
13537 * @since 4.3.0
13538 * @category Lang
13539 * @param {*} value The value to check.
13540 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
13541 * @example
13542 *
13543 * _.isBuffer(new Buffer(2));
13544 * // => true
13545 *
13546 * _.isBuffer(new Uint8Array(2));
13547 * // => false
13548 */
13549 var isBuffer = nativeIsBuffer || stubFalse;
13550
13551 /**
13552 * Checks if `value` is classified as a `Date` object.
13553 *
13554 * @static
13555 * @memberOf _
13556 * @since 0.1.0
13557 * @category Lang
13558 * @param {*} value The value to check.
13559 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
13560 * @example
13561 *
13562 * _.isDate(new Date);
13563 * // => true
13564 *
13565 * _.isDate('Mon April 23 2012');
13566 * // => false
13567 */
13568 var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
13569
13570 /**
13571 * Checks if `value` is likely a DOM element.
13572 *
13573 * @static
13574 * @memberOf _
13575 * @since 0.1.0
13576 * @category Lang
13577 * @param {*} value The value to check.
13578 * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
13579 * @example
13580 *
13581 * _.isElement(document.body);
13582 * // => true
13583 *
13584 * _.isElement('<body>');
13585 * // => false
13586 */
13587 function isElement(value) {
13588 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
13589 }
13590
13591 /**
13592 * Checks if `value` is an empty object, collection, map, or set.
13593 *
13594 * Objects are considered empty if they have no own enumerable string keyed
13595 * properties.
13596 *
13597 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
13598 * jQuery-like collections are considered empty if they have a `length` of `0`.
13599 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
13600 *
13601 * @static
13602 * @memberOf _
13603 * @since 0.1.0
13604 * @category Lang
13605 * @param {*} value The value to check.
13606 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
13607 * @example
13608 *
13609 * _.isEmpty(null);
13610 * // => true
13611 *
13612 * _.isEmpty(true);
13613 * // => true
13614 *
13615 * _.isEmpty(1);
13616 * // => true
13617 *
13618 * _.isEmpty([1, 2, 3]);
13619 * // => false
13620 *
13621 * _.isEmpty({ 'a': 1 });
13622 * // => false
13623 */
13624 function isEmpty(value) {
13625 if (value == null) {
13626 return true;
13627 }
13628 if (isArrayLike(value) &&
13629 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
13630 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
13631 return !value.length;
13632 }
13633 var tag = getTag(value);
13634 if (tag == mapTag || tag == setTag) {
13635 return !value.size;
13636 }
13637 if (isPrototype(value)) {
13638 return !baseKeys(value).length;
13639 }
13640 for (var key in value) {
13641 if (hasOwnProperty.call(value, key)) {
13642 return false;
13643 }
13644 }
13645 return true;
13646 }
13647
13648 /**
13649 * Performs a deep comparison between two values to determine if they are
13650 * equivalent.
13651 *
13652 * **Note:** This method supports comparing arrays, array buffers, booleans,
13653 * date objects, error objects, maps, numbers, `Object` objects, regexes,
13654 * sets, strings, symbols, and typed arrays. `Object` objects are compared
13655 * by their own, not inherited, enumerable properties. Functions and DOM
13656 * nodes are compared by strict equality, i.e. `===`.
13657 *
13658 * @static
13659 * @memberOf _
13660 * @since 0.1.0
13661 * @category Lang
13662 * @param {*} value The value to compare.
13663 * @param {*} other The other value to compare.
13664 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13665 * @example
13666 *
13667 * var object = { 'a': 1 };
13668 * var other = { 'a': 1 };
13669 *
13670 * _.isEqual(object, other);
13671 * // => true
13672 *
13673 * object === other;
13674 * // => false
13675 */
13676 function isEqual(value, other) {
13677 return baseIsEqual(value, other);
13678 }
13679
13680 /**
13681 * This method is like `_.isEqual` except that it accepts `customizer` which
13682 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13683 * are handled by the method instead. The `customizer` is invoked with up to
13684 * six arguments: (objValue, othValue [, index|key, object, other, stack]).
13685 *
13686 * @static
13687 * @memberOf _
13688 * @since 4.0.0
13689 * @category Lang
13690 * @param {*} value The value to compare.
13691 * @param {*} other The other value to compare.
13692 * @param {Function} [customizer] The function to customize comparisons.
13693 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13694 * @example
13695 *
13696 * function isGreeting(value) {
13697 * return /^h(?:i|ello)$/.test(value);
13698 * }
13699 *
13700 * function customizer(objValue, othValue) {
13701 * if (isGreeting(objValue) && isGreeting(othValue)) {
13702 * return true;
13703 * }
13704 * }
13705 *
13706 * var array = ['hello', 'goodbye'];
13707 * var other = ['hi', 'goodbye'];
13708 *
13709 * _.isEqualWith(array, other, customizer);
13710 * // => true
13711 */
13712 function isEqualWith(value, other, customizer) {
13713 customizer = typeof customizer == 'function' ? customizer : undefined;
13714 var result = customizer ? customizer(value, other) : undefined;
13715 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
13716 }
13717
13718 /**
13719 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
13720 * `SyntaxError`, `TypeError`, or `URIError` object.
13721 *
13722 * @static
13723 * @memberOf _
13724 * @since 3.0.0
13725 * @category Lang
13726 * @param {*} value The value to check.
13727 * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
13728 * @example
13729 *
13730 * _.isError(new Error);
13731 * // => true
13732 *
13733 * _.isError(Error);
13734 * // => false
13735 */
13736 function isError(value) {
13737 if (!isObjectLike(value)) {
13738 return false;
13739 }
13740 var tag = baseGetTag(value);
13741 return tag == errorTag || tag == domExcTag ||
13742 (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
13743 }
13744
13745 /**
13746 * Checks if `value` is a finite primitive number.
13747 *
13748 * **Note:** This method is based on
13749 * [`Number.isFinite`](https://mdn.io/Number/isFinite).
13750 *
13751 * @static
13752 * @memberOf _
13753 * @since 0.1.0
13754 * @category Lang
13755 * @param {*} value The value to check.
13756 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
13757 * @example
13758 *
13759 * _.isFinite(3);
13760 * // => true
13761 *
13762 * _.isFinite(Number.MIN_VALUE);
13763 * // => true
13764 *
13765 * _.isFinite(Infinity);
13766 * // => false
13767 *
13768 * _.isFinite('3');
13769 * // => false
13770 */
13771 function isFinite(value) {
13772 return typeof value == 'number' && nativeIsFinite(value);
13773 }
13774
13775 /**
13776 * Checks if `value` is classified as a `Function` object.
13777 *
13778 * @static
13779 * @memberOf _
13780 * @since 0.1.0
13781 * @category Lang
13782 * @param {*} value The value to check.
13783 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
13784 * @example
13785 *
13786 * _.isFunction(_);
13787 * // => true
13788 *
13789 * _.isFunction(/abc/);
13790 * // => false
13791 */
13792 function isFunction(value) {
13793 if (!isObject(value)) {
13794 return false;
13795 }
13796 // The use of `Object#toString` avoids issues with the `typeof` operator
13797 // in Safari 9 which returns 'object' for typed arrays and other constructors.
13798 var tag = baseGetTag(value);
13799 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
13800 }
13801
13802 /**
13803 * Checks if `value` is an integer.
13804 *
13805 * **Note:** This method is based on
13806 * [`Number.isInteger`](https://mdn.io/Number/isInteger).
13807 *
13808 * @static
13809 * @memberOf _
13810 * @since 4.0.0
13811 * @category Lang
13812 * @param {*} value The value to check.
13813 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
13814 * @example
13815 *
13816 * _.isInteger(3);
13817 * // => true
13818 *
13819 * _.isInteger(Number.MIN_VALUE);
13820 * // => false
13821 *
13822 * _.isInteger(Infinity);
13823 * // => false
13824 *
13825 * _.isInteger('3');
13826 * // => false
13827 */
13828 function isInteger(value) {
13829 return typeof value == 'number' && value == toInteger(value);
13830 }
13831
13832 /**
13833 * Checks if `value` is a valid array-like length.
13834 *
13835 * **Note:** This method is loosely based on
13836 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
13837 *
13838 * @static
13839 * @memberOf _
13840 * @since 4.0.0
13841 * @category Lang
13842 * @param {*} value The value to check.
13843 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
13844 * @example
13845 *
13846 * _.isLength(3);
13847 * // => true
13848 *
13849 * _.isLength(Number.MIN_VALUE);
13850 * // => false
13851 *
13852 * _.isLength(Infinity);
13853 * // => false
13854 *
13855 * _.isLength('3');
13856 * // => false
13857 */
13858 function isLength(value) {
13859 return typeof value == 'number' &&
13860 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
13861 }
13862
13863 /**
13864 * Checks if `value` is the
13865 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
13866 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
13867 *
13868 * @static
13869 * @memberOf _
13870 * @since 0.1.0
13871 * @category Lang
13872 * @param {*} value The value to check.
13873 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
13874 * @example
13875 *
13876 * _.isObject({});
13877 * // => true
13878 *
13879 * _.isObject([1, 2, 3]);
13880 * // => true
13881 *
13882 * _.isObject(_.noop);
13883 * // => true
13884 *
13885 * _.isObject(null);
13886 * // => false
13887 */
13888 function isObject(value) {
13889 var type = typeof value;
13890 return value != null && (type == 'object' || type == 'function');
13891 }
13892
13893 /**
13894 * Checks if `value` is object-like. A value is object-like if it's not `null`
13895 * and has a `typeof` result of "object".
13896 *
13897 * @static
13898 * @memberOf _
13899 * @since 4.0.0
13900 * @category Lang
13901 * @param {*} value The value to check.
13902 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
13903 * @example
13904 *
13905 * _.isObjectLike({});
13906 * // => true
13907 *
13908 * _.isObjectLike([1, 2, 3]);
13909 * // => true
13910 *
13911 * _.isObjectLike(_.noop);
13912 * // => false
13913 *
13914 * _.isObjectLike(null);
13915 * // => false
13916 */
13917 function isObjectLike(value) {
13918 return value != null && typeof value == 'object';
13919 }
13920
13921 /**
13922 * Checks if `value` is classified as a `Map` object.
13923 *
13924 * @static
13925 * @memberOf _
13926 * @since 4.3.0
13927 * @category Lang
13928 * @param {*} value The value to check.
13929 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
13930 * @example
13931 *
13932 * _.isMap(new Map);
13933 * // => true
13934 *
13935 * _.isMap(new WeakMap);
13936 * // => false
13937 */
13938 var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
13939
13940 /**
13941 * Performs a partial deep comparison between `object` and `source` to
13942 * determine if `object` contains equivalent property values.
13943 *
13944 * **Note:** This method is equivalent to `_.matches` when `source` is
13945 * partially applied.
13946 *
13947 * Partial comparisons will match empty array and empty object `source`
13948 * values against any array or object value, respectively. See `_.isEqual`
13949 * for a list of supported value comparisons.
13950 *
13951 * @static
13952 * @memberOf _
13953 * @since 3.0.0
13954 * @category Lang
13955 * @param {Object} object The object to inspect.
13956 * @param {Object} source The object of property values to match.
13957 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13958 * @example
13959 *
13960 * var object = { 'a': 1, 'b': 2 };
13961 *
13962 * _.isMatch(object, { 'b': 2 });
13963 * // => true
13964 *
13965 * _.isMatch(object, { 'b': 1 });
13966 * // => false
13967 */
13968 function isMatch(object, source) {
13969 return object === source || baseIsMatch(object, source, getMatchData(source));
13970 }
13971
13972 /**
13973 * This method is like `_.isMatch` except that it accepts `customizer` which
13974 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13975 * are handled by the method instead. The `customizer` is invoked with five
13976 * arguments: (objValue, srcValue, index|key, object, source).
13977 *
13978 * @static
13979 * @memberOf _
13980 * @since 4.0.0
13981 * @category Lang
13982 * @param {Object} object The object to inspect.
13983 * @param {Object} source The object of property values to match.
13984 * @param {Function} [customizer] The function to customize comparisons.
13985 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13986 * @example
13987 *
13988 * function isGreeting(value) {
13989 * return /^h(?:i|ello)$/.test(value);
13990 * }
13991 *
13992 * function customizer(objValue, srcValue) {
13993 * if (isGreeting(objValue) && isGreeting(srcValue)) {
13994 * return true;
13995 * }
13996 * }
13997 *
13998 * var object = { 'greeting': 'hello' };
13999 * var source = { 'greeting': 'hi' };
14000 *
14001 * _.isMatchWith(object, source, customizer);
14002 * // => true
14003 */
14004 function isMatchWith(object, source, customizer) {
14005 customizer = typeof customizer == 'function' ? customizer : undefined;
14006 return baseIsMatch(object, source, getMatchData(source), customizer);
14007 }
14008
14009 /**
14010 * Checks if `value` is `NaN`.
14011 *
14012 * **Note:** This method is based on
14013 * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
14014 * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
14015 * `undefined` and other non-number values.
14016 *
14017 * @static
14018 * @memberOf _
14019 * @since 0.1.0
14020 * @category Lang
14021 * @param {*} value The value to check.
14022 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
14023 * @example
14024 *
14025 * _.isNaN(NaN);
14026 * // => true
14027 *
14028 * _.isNaN(new Number(NaN));
14029 * // => true
14030 *
14031 * isNaN(undefined);
14032 * // => true
14033 *
14034 * _.isNaN(undefined);
14035 * // => false
14036 */
14037 function isNaN(value) {
14038 // An `NaN` primitive is the only value that is not equal to itself.
14039 // Perform the `toStringTag` check first to avoid errors with some
14040 // ActiveX objects in IE.
14041 return isNumber(value) && value != +value;
14042 }
14043
14044 /**
14045 * Checks if `value` is a pristine native function.
14046 *
14047 * **Note:** This method can't reliably detect native functions in the presence
14048 * of the core-js package because core-js circumvents this kind of detection.
14049 * Despite multiple requests, the core-js maintainer has made it clear: any
14050 * attempt to fix the detection will be obstructed. As a result, we're left
14051 * with little choice but to throw an error. Unfortunately, this also affects
14052 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
14053 * which rely on core-js.
14054 *
14055 * @static
14056 * @memberOf _
14057 * @since 3.0.0
14058 * @category Lang
14059 * @param {*} value The value to check.
14060 * @returns {boolean} Returns `true` if `value` is a native function,
14061 * else `false`.
14062 * @example
14063 *
14064 * _.isNative(Array.prototype.push);
14065 * // => true
14066 *
14067 * _.isNative(_);
14068 * // => false
14069 */
14070 function isNative(value) {
14071 if (isMaskable(value)) {
14072 throw new Error(CORE_ERROR_TEXT);
14073 }
14074 return baseIsNative(value);
14075 }
14076
14077 /**
14078 * Checks if `value` is `null`.
14079 *
14080 * @static
14081 * @memberOf _
14082 * @since 0.1.0
14083 * @category Lang
14084 * @param {*} value The value to check.
14085 * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
14086 * @example
14087 *
14088 * _.isNull(null);
14089 * // => true
14090 *
14091 * _.isNull(void 0);
14092 * // => false
14093 */
14094 function isNull(value) {
14095 return value === null;
14096 }
14097
14098 /**
14099 * Checks if `value` is `null` or `undefined`.
14100 *
14101 * @static
14102 * @memberOf _
14103 * @since 4.0.0
14104 * @category Lang
14105 * @param {*} value The value to check.
14106 * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
14107 * @example
14108 *
14109 * _.isNil(null);
14110 * // => true
14111 *
14112 * _.isNil(void 0);
14113 * // => true
14114 *
14115 * _.isNil(NaN);
14116 * // => false
14117 */
14118 function isNil(value) {
14119 return value == null;
14120 }
14121
14122 /**
14123 * Checks if `value` is classified as a `Number` primitive or object.
14124 *
14125 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
14126 * classified as numbers, use the `_.isFinite` method.
14127 *
14128 * @static
14129 * @memberOf _
14130 * @since 0.1.0
14131 * @category Lang
14132 * @param {*} value The value to check.
14133 * @returns {boolean} Returns `true` if `value` is a number, else `false`.
14134 * @example
14135 *
14136 * _.isNumber(3);
14137 * // => true
14138 *
14139 * _.isNumber(Number.MIN_VALUE);
14140 * // => true
14141 *
14142 * _.isNumber(Infinity);
14143 * // => true
14144 *
14145 * _.isNumber('3');
14146 * // => false
14147 */
14148 function isNumber(value) {
14149 return typeof value == 'number' ||
14150 (isObjectLike(value) && baseGetTag(value) == numberTag);
14151 }
14152
14153 /**
14154 * Checks if `value` is a plain object, that is, an object created by the
14155 * `Object` constructor or one with a `[[Prototype]]` of `null`.
14156 *
14157 * @static
14158 * @memberOf _
14159 * @since 0.8.0
14160 * @category Lang
14161 * @param {*} value The value to check.
14162 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
14163 * @example
14164 *
14165 * function Foo() {
14166 * this.a = 1;
14167 * }
14168 *
14169 * _.isPlainObject(new Foo);
14170 * // => false
14171 *
14172 * _.isPlainObject([1, 2, 3]);
14173 * // => false
14174 *
14175 * _.isPlainObject({ 'x': 0, 'y': 0 });
14176 * // => true
14177 *
14178 * _.isPlainObject(Object.create(null));
14179 * // => true
14180 */
14181 function isPlainObject(value) {
14182 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
14183 return false;
14184 }
14185 var proto = getPrototype(value);
14186 if (proto === null) {
14187 return true;
14188 }
14189 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
14190 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
14191 funcToString.call(Ctor) == objectCtorString;
14192 }
14193
14194 /**
14195 * Checks if `value` is classified as a `RegExp` object.
14196 *
14197 * @static
14198 * @memberOf _
14199 * @since 0.1.0
14200 * @category Lang
14201 * @param {*} value The value to check.
14202 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
14203 * @example
14204 *
14205 * _.isRegExp(/abc/);
14206 * // => true
14207 *
14208 * _.isRegExp('/abc/');
14209 * // => false
14210 */
14211 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
14212
14213 /**
14214 * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
14215 * double precision number which isn't the result of a rounded unsafe integer.
14216 *
14217 * **Note:** This method is based on
14218 * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
14219 *
14220 * @static
14221 * @memberOf _
14222 * @since 4.0.0
14223 * @category Lang
14224 * @param {*} value The value to check.
14225 * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
14226 * @example
14227 *
14228 * _.isSafeInteger(3);
14229 * // => true
14230 *
14231 * _.isSafeInteger(Number.MIN_VALUE);
14232 * // => false
14233 *
14234 * _.isSafeInteger(Infinity);
14235 * // => false
14236 *
14237 * _.isSafeInteger('3');
14238 * // => false
14239 */
14240 function isSafeInteger(value) {
14241 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
14242 }
14243
14244 /**
14245 * Checks if `value` is classified as a `Set` object.
14246 *
14247 * @static
14248 * @memberOf _
14249 * @since 4.3.0
14250 * @category Lang
14251 * @param {*} value The value to check.
14252 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
14253 * @example
14254 *
14255 * _.isSet(new Set);
14256 * // => true
14257 *
14258 * _.isSet(new WeakSet);
14259 * // => false
14260 */
14261 var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
14262
14263 /**
14264 * Checks if `value` is classified as a `String` primitive or object.
14265 *
14266 * @static
14267 * @since 0.1.0
14268 * @memberOf _
14269 * @category Lang
14270 * @param {*} value The value to check.
14271 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
14272 * @example
14273 *
14274 * _.isString('abc');
14275 * // => true
14276 *
14277 * _.isString(1);
14278 * // => false
14279 */
14280 function isString(value) {
14281 return typeof value == 'string' ||
14282 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
14283 }
14284
14285 /**
14286 * Checks if `value` is classified as a `Symbol` primitive or object.
14287 *
14288 * @static
14289 * @memberOf _
14290 * @since 4.0.0
14291 * @category Lang
14292 * @param {*} value The value to check.
14293 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
14294 * @example
14295 *
14296 * _.isSymbol(Symbol.iterator);
14297 * // => true
14298 *
14299 * _.isSymbol('abc');
14300 * // => false
14301 */
14302 function isSymbol(value) {
14303 return typeof value == 'symbol' ||
14304 (isObjectLike(value) && baseGetTag(value) == symbolTag);
14305 }
14306
14307 /**
14308 * Checks if `value` is classified as a typed array.
14309 *
14310 * @static
14311 * @memberOf _
14312 * @since 3.0.0
14313 * @category Lang
14314 * @param {*} value The value to check.
14315 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
14316 * @example
14317 *
14318 * _.isTypedArray(new Uint8Array);
14319 * // => true
14320 *
14321 * _.isTypedArray([]);
14322 * // => false
14323 */
14324 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
14325
14326 /**
14327 * Checks if `value` is `undefined`.
14328 *
14329 * @static
14330 * @since 0.1.0
14331 * @memberOf _
14332 * @category Lang
14333 * @param {*} value The value to check.
14334 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
14335 * @example
14336 *
14337 * _.isUndefined(void 0);
14338 * // => true
14339 *
14340 * _.isUndefined(null);
14341 * // => false
14342 */
14343 function isUndefined(value) {
14344 return value === undefined;
14345 }
14346
14347 /**
14348 * Checks if `value` is classified as a `WeakMap` object.
14349 *
14350 * @static
14351 * @memberOf _
14352 * @since 4.3.0
14353 * @category Lang
14354 * @param {*} value The value to check.
14355 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
14356 * @example
14357 *
14358 * _.isWeakMap(new WeakMap);
14359 * // => true
14360 *
14361 * _.isWeakMap(new Map);
14362 * // => false
14363 */
14364 function isWeakMap(value) {
14365 return isObjectLike(value) && getTag(value) == weakMapTag;
14366 }
14367
14368 /**
14369 * Checks if `value` is classified as a `WeakSet` object.
14370 *
14371 * @static
14372 * @memberOf _
14373 * @since 4.3.0
14374 * @category Lang
14375 * @param {*} value The value to check.
14376 * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
14377 * @example
14378 *
14379 * _.isWeakSet(new WeakSet);
14380 * // => true
14381 *
14382 * _.isWeakSet(new Set);
14383 * // => false
14384 */
14385 function isWeakSet(value) {
14386 return isObjectLike(value) && baseGetTag(value) == weakSetTag;
14387 }
14388
14389 /**
14390 * Checks if `value` is less than `other`.
14391 *
14392 * @static
14393 * @memberOf _
14394 * @since 3.9.0
14395 * @category Lang
14396 * @param {*} value The value to compare.
14397 * @param {*} other The other value to compare.
14398 * @returns {boolean} Returns `true` if `value` is less than `other`,
14399 * else `false`.
14400 * @see _.gt
14401 * @example
14402 *
14403 * _.lt(1, 3);
14404 * // => true
14405 *
14406 * _.lt(3, 3);
14407 * // => false
14408 *
14409 * _.lt(3, 1);
14410 * // => false
14411 */
14412 var lt = createRelationalOperation(baseLt);
14413
14414 /**
14415 * Checks if `value` is less than or equal to `other`.
14416 *
14417 * @static
14418 * @memberOf _
14419 * @since 3.9.0
14420 * @category Lang
14421 * @param {*} value The value to compare.
14422 * @param {*} other The other value to compare.
14423 * @returns {boolean} Returns `true` if `value` is less than or equal to
14424 * `other`, else `false`.
14425 * @see _.gte
14426 * @example
14427 *
14428 * _.lte(1, 3);
14429 * // => true
14430 *
14431 * _.lte(3, 3);
14432 * // => true
14433 *
14434 * _.lte(3, 1);
14435 * // => false
14436 */
14437 var lte = createRelationalOperation(function(value, other) {
14438 return value <= other;
14439 });
14440
14441 /**
14442 * Converts `value` to an array.
14443 *
14444 * @static
14445 * @since 0.1.0
14446 * @memberOf _
14447 * @category Lang
14448 * @param {*} value The value to convert.
14449 * @returns {Array} Returns the converted array.
14450 * @example
14451 *
14452 * _.toArray({ 'a': 1, 'b': 2 });
14453 * // => [1, 2]
14454 *
14455 * _.toArray('abc');
14456 * // => ['a', 'b', 'c']
14457 *
14458 * _.toArray(1);
14459 * // => []
14460 *
14461 * _.toArray(null);
14462 * // => []
14463 */
14464 function toArray(value) {
14465 if (!value) {
14466 return [];
14467 }
14468 if (isArrayLike(value)) {
14469 return isString(value) ? stringToArray(value) : copyArray(value);
14470 }
14471 if (symIterator && value[symIterator]) {
14472 return iteratorToArray(value[symIterator]());
14473 }
14474 var tag = getTag(value),
14475 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
14476
14477 return func(value);
14478 }
14479
14480 /**
14481 * Converts `value` to a finite number.
14482 *
14483 * @static
14484 * @memberOf _
14485 * @since 4.12.0
14486 * @category Lang
14487 * @param {*} value The value to convert.
14488 * @returns {number} Returns the converted number.
14489 * @example
14490 *
14491 * _.toFinite(3.2);
14492 * // => 3.2
14493 *
14494 * _.toFinite(Number.MIN_VALUE);
14495 * // => 5e-324
14496 *
14497 * _.toFinite(Infinity);
14498 * // => 1.7976931348623157e+308
14499 *
14500 * _.toFinite('3.2');
14501 * // => 3.2
14502 */
14503 function toFinite(value) {
14504 if (!value) {
14505 return value === 0 ? value : 0;
14506 }
14507 value = toNumber(value);
14508 if (value === INFINITY || value === -INFINITY) {
14509 var sign = (value < 0 ? -1 : 1);
14510 return sign * MAX_INTEGER;
14511 }
14512 return value === value ? value : 0;
14513 }
14514
14515 /**
14516 * Converts `value` to an integer.
14517 *
14518 * **Note:** This method is loosely based on
14519 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
14520 *
14521 * @static
14522 * @memberOf _
14523 * @since 4.0.0
14524 * @category Lang
14525 * @param {*} value The value to convert.
14526 * @returns {number} Returns the converted integer.
14527 * @example
14528 *
14529 * _.toInteger(3.2);
14530 * // => 3
14531 *
14532 * _.toInteger(Number.MIN_VALUE);
14533 * // => 0
14534 *
14535 * _.toInteger(Infinity);
14536 * // => 1.7976931348623157e+308
14537 *
14538 * _.toInteger('3.2');
14539 * // => 3
14540 */
14541 function toInteger(value) {
14542 var result = toFinite(value),
14543 remainder = result % 1;
14544
14545 return result === result ? (remainder ? result - remainder : result) : 0;
14546 }
14547
14548 /**
14549 * Converts `value` to an integer suitable for use as the length of an
14550 * array-like object.
14551 *
14552 * **Note:** This method is based on
14553 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
14554 *
14555 * @static
14556 * @memberOf _
14557 * @since 4.0.0
14558 * @category Lang
14559 * @param {*} value The value to convert.
14560 * @returns {number} Returns the converted integer.
14561 * @example
14562 *
14563 * _.toLength(3.2);
14564 * // => 3
14565 *
14566 * _.toLength(Number.MIN_VALUE);
14567 * // => 0
14568 *
14569 * _.toLength(Infinity);
14570 * // => 4294967295
14571 *
14572 * _.toLength('3.2');
14573 * // => 3
14574 */
14575 function toLength(value) {
14576 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
14577 }
14578
14579 /**
14580 * Converts `value` to a number.
14581 *
14582 * @static
14583 * @memberOf _
14584 * @since 4.0.0
14585 * @category Lang
14586 * @param {*} value The value to process.
14587 * @returns {number} Returns the number.
14588 * @example
14589 *
14590 * _.toNumber(3.2);
14591 * // => 3.2
14592 *
14593 * _.toNumber(Number.MIN_VALUE);
14594 * // => 5e-324
14595 *
14596 * _.toNumber(Infinity);
14597 * // => Infinity
14598 *
14599 * _.toNumber('3.2');
14600 * // => 3.2
14601 */
14602 function toNumber(value) {
14603 if (typeof value == 'number') {
14604 return value;
14605 }
14606 if (isSymbol(value)) {
14607 return NAN;
14608 }
14609 if (isObject(value)) {
14610 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
14611 value = isObject(other) ? (other + '') : other;
14612 }
14613 if (typeof value != 'string') {
14614 return value === 0 ? value : +value;
14615 }
14616 value = value.replace(reTrim, '');
14617 var isBinary = reIsBinary.test(value);
14618 return (isBinary || reIsOctal.test(value))
14619 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
14620 : (reIsBadHex.test(value) ? NAN : +value);
14621 }
14622
14623 /**
14624 * Converts `value` to a plain object flattening inherited enumerable string
14625 * keyed properties of `value` to own properties of the plain object.
14626 *
14627 * @static
14628 * @memberOf _
14629 * @since 3.0.0
14630 * @category Lang
14631 * @param {*} value The value to convert.
14632 * @returns {Object} Returns the converted plain object.
14633 * @example
14634 *
14635 * function Foo() {
14636 * this.b = 2;
14637 * }
14638 *
14639 * Foo.prototype.c = 3;
14640 *
14641 * _.assign({ 'a': 1 }, new Foo);
14642 * // => { 'a': 1, 'b': 2 }
14643 *
14644 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
14645 * // => { 'a': 1, 'b': 2, 'c': 3 }
14646 */
14647 function toPlainObject(value) {
14648 return copyObject(value, keysIn(value));
14649 }
14650
14651 /**
14652 * Converts `value` to a safe integer. A safe integer can be compared and
14653 * represented correctly.
14654 *
14655 * @static
14656 * @memberOf _
14657 * @since 4.0.0
14658 * @category Lang
14659 * @param {*} value The value to convert.
14660 * @returns {number} Returns the converted integer.
14661 * @example
14662 *
14663 * _.toSafeInteger(3.2);
14664 * // => 3
14665 *
14666 * _.toSafeInteger(Number.MIN_VALUE);
14667 * // => 0
14668 *
14669 * _.toSafeInteger(Infinity);
14670 * // => 9007199254740991
14671 *
14672 * _.toSafeInteger('3.2');
14673 * // => 3
14674 */
14675 function toSafeInteger(value) {
14676 return value
14677 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
14678 : (value === 0 ? value : 0);
14679 }
14680
14681 /**
14682 * Converts `value` to a string. An empty string is returned for `null`
14683 * and `undefined` values. The sign of `-0` is preserved.
14684 *
14685 * @static
14686 * @memberOf _
14687 * @since 4.0.0
14688 * @category Lang
14689 * @param {*} value The value to convert.
14690 * @returns {string} Returns the converted string.
14691 * @example
14692 *
14693 * _.toString(null);
14694 * // => ''
14695 *
14696 * _.toString(-0);
14697 * // => '-0'
14698 *
14699 * _.toString([1, 2, 3]);
14700 * // => '1,2,3'
14701 */
14702 function toString(value) {
14703 return value == null ? '' : baseToString(value);
14704 }
14705
14706 /*------------------------------------------------------------------------*/
14707
14708 /**
14709 * Assigns own enumerable string keyed properties of source objects to the
14710 * destination object. Source objects are applied from left to right.
14711 * Subsequent sources overwrite property assignments of previous sources.
14712 *
14713 * **Note:** This method mutates `object` and is loosely based on
14714 * [`Object.assign`](https://mdn.io/Object/assign).
14715 *
14716 * @static
14717 * @memberOf _
14718 * @since 0.10.0
14719 * @category Object
14720 * @param {Object} object The destination object.
14721 * @param {...Object} [sources] The source objects.
14722 * @returns {Object} Returns `object`.
14723 * @see _.assignIn
14724 * @example
14725 *
14726 * function Foo() {
14727 * this.a = 1;
14728 * }
14729 *
14730 * function Bar() {
14731 * this.c = 3;
14732 * }
14733 *
14734 * Foo.prototype.b = 2;
14735 * Bar.prototype.d = 4;
14736 *
14737 * _.assign({ 'a': 0 }, new Foo, new Bar);
14738 * // => { 'a': 1, 'c': 3 }
14739 */
14740 var assign = createAssigner(function(object, source) {
14741 if (isPrototype(source) || isArrayLike(source)) {
14742 copyObject(source, keys(source), object);
14743 return;
14744 }
14745 for (var key in source) {
14746 if (hasOwnProperty.call(source, key)) {
14747 assignValue(object, key, source[key]);
14748 }
14749 }
14750 });
14751
14752 /**
14753 * This method is like `_.assign` except that it iterates over own and
14754 * inherited source properties.
14755 *
14756 * **Note:** This method mutates `object`.
14757 *
14758 * @static
14759 * @memberOf _
14760 * @since 4.0.0
14761 * @alias extend
14762 * @category Object
14763 * @param {Object} object The destination object.
14764 * @param {...Object} [sources] The source objects.
14765 * @returns {Object} Returns `object`.
14766 * @see _.assign
14767 * @example
14768 *
14769 * function Foo() {
14770 * this.a = 1;
14771 * }
14772 *
14773 * function Bar() {
14774 * this.c = 3;
14775 * }
14776 *
14777 * Foo.prototype.b = 2;
14778 * Bar.prototype.d = 4;
14779 *
14780 * _.assignIn({ 'a': 0 }, new Foo, new Bar);
14781 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
14782 */
14783 var assignIn = createAssigner(function(object, source) {
14784 copyObject(source, keysIn(source), object);
14785 });
14786
14787 /**
14788 * This method is like `_.assignIn` except that it accepts `customizer`
14789 * which is invoked to produce the assigned values. If `customizer` returns
14790 * `undefined`, assignment is handled by the method instead. The `customizer`
14791 * is invoked with five arguments: (objValue, srcValue, key, object, source).
14792 *
14793 * **Note:** This method mutates `object`.
14794 *
14795 * @static
14796 * @memberOf _
14797 * @since 4.0.0
14798 * @alias extendWith
14799 * @category Object
14800 * @param {Object} object The destination object.
14801 * @param {...Object} sources The source objects.
14802 * @param {Function} [customizer] The function to customize assigned values.
14803 * @returns {Object} Returns `object`.
14804 * @see _.assignWith
14805 * @example
14806 *
14807 * function customizer(objValue, srcValue) {
14808 * return _.isUndefined(objValue) ? srcValue : objValue;
14809 * }
14810 *
14811 * var defaults = _.partialRight(_.assignInWith, customizer);
14812 *
14813 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14814 * // => { 'a': 1, 'b': 2 }
14815 */
14816 var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
14817 copyObject(source, keysIn(source), object, customizer);
14818 });
14819
14820 /**
14821 * This method is like `_.assign` except that it accepts `customizer`
14822 * which is invoked to produce the assigned values. If `customizer` returns
14823 * `undefined`, assignment is handled by the method instead. The `customizer`
14824 * is invoked with five arguments: (objValue, srcValue, key, object, source).
14825 *
14826 * **Note:** This method mutates `object`.
14827 *
14828 * @static
14829 * @memberOf _
14830 * @since 4.0.0
14831 * @category Object
14832 * @param {Object} object The destination object.
14833 * @param {...Object} sources The source objects.
14834 * @param {Function} [customizer] The function to customize assigned values.
14835 * @returns {Object} Returns `object`.
14836 * @see _.assignInWith
14837 * @example
14838 *
14839 * function customizer(objValue, srcValue) {
14840 * return _.isUndefined(objValue) ? srcValue : objValue;
14841 * }
14842 *
14843 * var defaults = _.partialRight(_.assignWith, customizer);
14844 *
14845 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14846 * // => { 'a': 1, 'b': 2 }
14847 */
14848 var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
14849 copyObject(source, keys(source), object, customizer);
14850 });
14851
14852 /**
14853 * Creates an array of values corresponding to `paths` of `object`.
14854 *
14855 * @static
14856 * @memberOf _
14857 * @since 1.0.0
14858 * @category Object
14859 * @param {Object} object The object to iterate over.
14860 * @param {...(string|string[])} [paths] The property paths to pick.
14861 * @returns {Array} Returns the picked values.
14862 * @example
14863 *
14864 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
14865 *
14866 * _.at(object, ['a[0].b.c', 'a[1]']);
14867 * // => [3, 4]
14868 */
14869 var at = flatRest(baseAt);
14870
14871 /**
14872 * Creates an object that inherits from the `prototype` object. If a
14873 * `properties` object is given, its own enumerable string keyed properties
14874 * are assigned to the created object.
14875 *
14876 * @static
14877 * @memberOf _
14878 * @since 2.3.0
14879 * @category Object
14880 * @param {Object} prototype The object to inherit from.
14881 * @param {Object} [properties] The properties to assign to the object.
14882 * @returns {Object} Returns the new object.
14883 * @example
14884 *
14885 * function Shape() {
14886 * this.x = 0;
14887 * this.y = 0;
14888 * }
14889 *
14890 * function Circle() {
14891 * Shape.call(this);
14892 * }
14893 *
14894 * Circle.prototype = _.create(Shape.prototype, {
14895 * 'constructor': Circle
14896 * });
14897 *
14898 * var circle = new Circle;
14899 * circle instanceof Circle;
14900 * // => true
14901 *
14902 * circle instanceof Shape;
14903 * // => true
14904 */
14905 function create(prototype, properties) {
14906 var result = baseCreate(prototype);
14907 return properties == null ? result : baseAssign(result, properties);
14908 }
14909
14910 /**
14911 * Assigns own and inherited enumerable string keyed properties of source
14912 * objects to the destination object for all destination properties that
14913 * resolve to `undefined`. Source objects are applied from left to right.
14914 * Once a property is set, additional values of the same property are ignored.
14915 *
14916 * **Note:** This method mutates `object`.
14917 *
14918 * @static
14919 * @since 0.1.0
14920 * @memberOf _
14921 * @category Object
14922 * @param {Object} object The destination object.
14923 * @param {...Object} [sources] The source objects.
14924 * @returns {Object} Returns `object`.
14925 * @see _.defaultsDeep
14926 * @example
14927 *
14928 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14929 * // => { 'a': 1, 'b': 2 }
14930 */
14931 var defaults = baseRest(function(object, sources) {
14932 object = Object(object);
14933
14934 var index = -1;
14935 var length = sources.length;
14936 var guard = length > 2 ? sources[2] : undefined;
14937
14938 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
14939 length = 1;
14940 }
14941
14942 while (++index < length) {
14943 var source = sources[index];
14944 var props = keysIn(source);
14945 var propsIndex = -1;
14946 var propsLength = props.length;
14947
14948 while (++propsIndex < propsLength) {
14949 var key = props[propsIndex];
14950 var value = object[key];
14951
14952 if (value === undefined ||
14953 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
14954 object[key] = source[key];
14955 }
14956 }
14957 }
14958
14959 return object;
14960 });
14961
14962 /**
14963 * This method is like `_.defaults` except that it recursively assigns
14964 * default properties.
14965 *
14966 * **Note:** This method mutates `object`.
14967 *
14968 * @static
14969 * @memberOf _
14970 * @since 3.10.0
14971 * @category Object
14972 * @param {Object} object The destination object.
14973 * @param {...Object} [sources] The source objects.
14974 * @returns {Object} Returns `object`.
14975 * @see _.defaults
14976 * @example
14977 *
14978 * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
14979 * // => { 'a': { 'b': 2, 'c': 3 } }
14980 */
14981 var defaultsDeep = baseRest(function(args) {
14982 args.push(undefined, customDefaultsMerge);
14983 return apply(mergeWith, undefined, args);
14984 });
14985
14986 /**
14987 * This method is like `_.find` except that it returns the key of the first
14988 * element `predicate` returns truthy for instead of the element itself.
14989 *
14990 * @static
14991 * @memberOf _
14992 * @since 1.1.0
14993 * @category Object
14994 * @param {Object} object The object to inspect.
14995 * @param {Function} [predicate=_.identity] The function invoked per iteration.
14996 * @returns {string|undefined} Returns the key of the matched element,
14997 * else `undefined`.
14998 * @example
14999 *
15000 * var users = {
15001 * 'barney': { 'age': 36, 'active': true },
15002 * 'fred': { 'age': 40, 'active': false },
15003 * 'pebbles': { 'age': 1, 'active': true }
15004 * };
15005 *
15006 * _.findKey(users, function(o) { return o.age < 40; });
15007 * // => 'barney' (iteration order is not guaranteed)
15008 *
15009 * // The `_.matches` iteratee shorthand.
15010 * _.findKey(users, { 'age': 1, 'active': true });
15011 * // => 'pebbles'
15012 *
15013 * // The `_.matchesProperty` iteratee shorthand.
15014 * _.findKey(users, ['active', false]);
15015 * // => 'fred'
15016 *
15017 * // The `_.property` iteratee shorthand.
15018 * _.findKey(users, 'active');
15019 * // => 'barney'
15020 */
15021 function findKey(object, predicate) {
15022 return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
15023 }
15024
15025 /**
15026 * This method is like `_.findKey` except that it iterates over elements of
15027 * a collection in the opposite order.
15028 *
15029 * @static
15030 * @memberOf _
15031 * @since 2.0.0
15032 * @category Object
15033 * @param {Object} object The object to inspect.
15034 * @param {Function} [predicate=_.identity] The function invoked per iteration.
15035 * @returns {string|undefined} Returns the key of the matched element,
15036 * else `undefined`.
15037 * @example
15038 *
15039 * var users = {
15040 * 'barney': { 'age': 36, 'active': true },
15041 * 'fred': { 'age': 40, 'active': false },
15042 * 'pebbles': { 'age': 1, 'active': true }
15043 * };
15044 *
15045 * _.findLastKey(users, function(o) { return o.age < 40; });
15046 * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
15047 *
15048 * // The `_.matches` iteratee shorthand.
15049 * _.findLastKey(users, { 'age': 36, 'active': true });
15050 * // => 'barney'
15051 *
15052 * // The `_.matchesProperty` iteratee shorthand.
15053 * _.findLastKey(users, ['active', false]);
15054 * // => 'fred'
15055 *
15056 * // The `_.property` iteratee shorthand.
15057 * _.findLastKey(users, 'active');
15058 * // => 'pebbles'
15059 */
15060 function findLastKey(object, predicate) {
15061 return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
15062 }
15063
15064 /**
15065 * Iterates over own and inherited enumerable string keyed properties of an
15066 * object and invokes `iteratee` for each property. The iteratee is invoked
15067 * with three arguments: (value, key, object). Iteratee functions may exit
15068 * iteration early by explicitly returning `false`.
15069 *
15070 * @static
15071 * @memberOf _
15072 * @since 0.3.0
15073 * @category Object
15074 * @param {Object} object The object to iterate over.
15075 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15076 * @returns {Object} Returns `object`.
15077 * @see _.forInRight
15078 * @example
15079 *
15080 * function Foo() {
15081 * this.a = 1;
15082 * this.b = 2;
15083 * }
15084 *
15085 * Foo.prototype.c = 3;
15086 *
15087 * _.forIn(new Foo, function(value, key) {
15088 * console.log(key);
15089 * });
15090 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
15091 */
15092 function forIn(object, iteratee) {
15093 return object == null
15094 ? object
15095 : baseFor(object, getIteratee(iteratee, 3), keysIn);
15096 }
15097
15098 /**
15099 * This method is like `_.forIn` except that it iterates over properties of
15100 * `object` in the opposite order.
15101 *
15102 * @static
15103 * @memberOf _
15104 * @since 2.0.0
15105 * @category Object
15106 * @param {Object} object The object to iterate over.
15107 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15108 * @returns {Object} Returns `object`.
15109 * @see _.forIn
15110 * @example
15111 *
15112 * function Foo() {
15113 * this.a = 1;
15114 * this.b = 2;
15115 * }
15116 *
15117 * Foo.prototype.c = 3;
15118 *
15119 * _.forInRight(new Foo, function(value, key) {
15120 * console.log(key);
15121 * });
15122 * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
15123 */
15124 function forInRight(object, iteratee) {
15125 return object == null
15126 ? object
15127 : baseForRight(object, getIteratee(iteratee, 3), keysIn);
15128 }
15129
15130 /**
15131 * Iterates over own enumerable string keyed properties of an object and
15132 * invokes `iteratee` for each property. The iteratee is invoked with three
15133 * arguments: (value, key, object). Iteratee functions may exit iteration
15134 * early by explicitly returning `false`.
15135 *
15136 * @static
15137 * @memberOf _
15138 * @since 0.3.0
15139 * @category Object
15140 * @param {Object} object The object to iterate over.
15141 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15142 * @returns {Object} Returns `object`.
15143 * @see _.forOwnRight
15144 * @example
15145 *
15146 * function Foo() {
15147 * this.a = 1;
15148 * this.b = 2;
15149 * }
15150 *
15151 * Foo.prototype.c = 3;
15152 *
15153 * _.forOwn(new Foo, function(value, key) {
15154 * console.log(key);
15155 * });
15156 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
15157 */
15158 function forOwn(object, iteratee) {
15159 return object && baseForOwn(object, getIteratee(iteratee, 3));
15160 }
15161
15162 /**
15163 * This method is like `_.forOwn` except that it iterates over properties of
15164 * `object` in the opposite order.
15165 *
15166 * @static
15167 * @memberOf _
15168 * @since 2.0.0
15169 * @category Object
15170 * @param {Object} object The object to iterate over.
15171 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15172 * @returns {Object} Returns `object`.
15173 * @see _.forOwn
15174 * @example
15175 *
15176 * function Foo() {
15177 * this.a = 1;
15178 * this.b = 2;
15179 * }
15180 *
15181 * Foo.prototype.c = 3;
15182 *
15183 * _.forOwnRight(new Foo, function(value, key) {
15184 * console.log(key);
15185 * });
15186 * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
15187 */
15188 function forOwnRight(object, iteratee) {
15189 return object && baseForOwnRight(object, getIteratee(iteratee, 3));
15190 }
15191
15192 /**
15193 * Creates an array of function property names from own enumerable properties
15194 * of `object`.
15195 *
15196 * @static
15197 * @since 0.1.0
15198 * @memberOf _
15199 * @category Object
15200 * @param {Object} object The object to inspect.
15201 * @returns {Array} Returns the function names.
15202 * @see _.functionsIn
15203 * @example
15204 *
15205 * function Foo() {
15206 * this.a = _.constant('a');
15207 * this.b = _.constant('b');
15208 * }
15209 *
15210 * Foo.prototype.c = _.constant('c');
15211 *
15212 * _.functions(new Foo);
15213 * // => ['a', 'b']
15214 */
15215 function functions(object) {
15216 return object == null ? [] : baseFunctions(object, keys(object));
15217 }
15218
15219 /**
15220 * Creates an array of function property names from own and inherited
15221 * enumerable properties of `object`.
15222 *
15223 * @static
15224 * @memberOf _
15225 * @since 4.0.0
15226 * @category Object
15227 * @param {Object} object The object to inspect.
15228 * @returns {Array} Returns the function names.
15229 * @see _.functions
15230 * @example
15231 *
15232 * function Foo() {
15233 * this.a = _.constant('a');
15234 * this.b = _.constant('b');
15235 * }
15236 *
15237 * Foo.prototype.c = _.constant('c');
15238 *
15239 * _.functionsIn(new Foo);
15240 * // => ['a', 'b', 'c']
15241 */
15242 function functionsIn(object) {
15243 return object == null ? [] : baseFunctions(object, keysIn(object));
15244 }
15245
15246 /**
15247 * Gets the value at `path` of `object`. If the resolved value is
15248 * `undefined`, the `defaultValue` is returned in its place.
15249 *
15250 * @static
15251 * @memberOf _
15252 * @since 3.7.0
15253 * @category Object
15254 * @param {Object} object The object to query.
15255 * @param {Array|string} path The path of the property to get.
15256 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
15257 * @returns {*} Returns the resolved value.
15258 * @example
15259 *
15260 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
15261 *
15262 * _.get(object, 'a[0].b.c');
15263 * // => 3
15264 *
15265 * _.get(object, ['a', '0', 'b', 'c']);
15266 * // => 3
15267 *
15268 * _.get(object, 'a.b.c', 'default');
15269 * // => 'default'
15270 */
15271 function get(object, path, defaultValue) {
15272 var result = object == null ? undefined : baseGet(object, path);
15273 return result === undefined ? defaultValue : result;
15274 }
15275
15276 /**
15277 * Checks if `path` is a direct property of `object`.
15278 *
15279 * @static
15280 * @since 0.1.0
15281 * @memberOf _
15282 * @category Object
15283 * @param {Object} object The object to query.
15284 * @param {Array|string} path The path to check.
15285 * @returns {boolean} Returns `true` if `path` exists, else `false`.
15286 * @example
15287 *
15288 * var object = { 'a': { 'b': 2 } };
15289 * var other = _.create({ 'a': _.create({ 'b': 2 }) });
15290 *
15291 * _.has(object, 'a');
15292 * // => true
15293 *
15294 * _.has(object, 'a.b');
15295 * // => true
15296 *
15297 * _.has(object, ['a', 'b']);
15298 * // => true
15299 *
15300 * _.has(other, 'a');
15301 * // => false
15302 */
15303 function has(object, path) {
15304 return object != null && hasPath(object, path, baseHas);
15305 }
15306
15307 /**
15308 * Checks if `path` is a direct or inherited property of `object`.
15309 *
15310 * @static
15311 * @memberOf _
15312 * @since 4.0.0
15313 * @category Object
15314 * @param {Object} object The object to query.
15315 * @param {Array|string} path The path to check.
15316 * @returns {boolean} Returns `true` if `path` exists, else `false`.
15317 * @example
15318 *
15319 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
15320 *
15321 * _.hasIn(object, 'a');
15322 * // => true
15323 *
15324 * _.hasIn(object, 'a.b');
15325 * // => true
15326 *
15327 * _.hasIn(object, ['a', 'b']);
15328 * // => true
15329 *
15330 * _.hasIn(object, 'b');
15331 * // => false
15332 */
15333 function hasIn(object, path) {
15334 return object != null && hasPath(object, path, baseHasIn);
15335 }
15336
15337 /**
15338 * Creates an object composed of the inverted keys and values of `object`.
15339 * If `object` contains duplicate values, subsequent values overwrite
15340 * property assignments of previous values.
15341 *
15342 * @static
15343 * @memberOf _
15344 * @since 0.7.0
15345 * @category Object
15346 * @param {Object} object The object to invert.
15347 * @returns {Object} Returns the new inverted object.
15348 * @example
15349 *
15350 * var object = { 'a': 1, 'b': 2, 'c': 1 };
15351 *
15352 * _.invert(object);
15353 * // => { '1': 'c', '2': 'b' }
15354 */
15355 var invert = createInverter(function(result, value, key) {
15356 if (value != null &&
15357 typeof value.toString != 'function') {
15358 value = nativeObjectToString.call(value);
15359 }
15360
15361 result[value] = key;
15362 }, constant(identity));
15363
15364 /**
15365 * This method is like `_.invert` except that the inverted object is generated
15366 * from the results of running each element of `object` thru `iteratee`. The
15367 * corresponding inverted value of each inverted key is an array of keys
15368 * responsible for generating the inverted value. The iteratee is invoked
15369 * with one argument: (value).
15370 *
15371 * @static
15372 * @memberOf _
15373 * @since 4.1.0
15374 * @category Object
15375 * @param {Object} object The object to invert.
15376 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
15377 * @returns {Object} Returns the new inverted object.
15378 * @example
15379 *
15380 * var object = { 'a': 1, 'b': 2, 'c': 1 };
15381 *
15382 * _.invertBy(object);
15383 * // => { '1': ['a', 'c'], '2': ['b'] }
15384 *
15385 * _.invertBy(object, function(value) {
15386 * return 'group' + value;
15387 * });
15388 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
15389 */
15390 var invertBy = createInverter(function(result, value, key) {
15391 if (value != null &&
15392 typeof value.toString != 'function') {
15393 value = nativeObjectToString.call(value);
15394 }
15395
15396 if (hasOwnProperty.call(result, value)) {
15397 result[value].push(key);
15398 } else {
15399 result[value] = [key];
15400 }
15401 }, getIteratee);
15402
15403 /**
15404 * Invokes the method at `path` of `object`.
15405 *
15406 * @static
15407 * @memberOf _
15408 * @since 4.0.0
15409 * @category Object
15410 * @param {Object} object The object to query.
15411 * @param {Array|string} path The path of the method to invoke.
15412 * @param {...*} [args] The arguments to invoke the method with.
15413 * @returns {*} Returns the result of the invoked method.
15414 * @example
15415 *
15416 * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
15417 *
15418 * _.invoke(object, 'a[0].b.c.slice', 1, 3);
15419 * // => [2, 3]
15420 */
15421 var invoke = baseRest(baseInvoke);
15422
15423 /**
15424 * Creates an array of the own enumerable property names of `object`.
15425 *
15426 * **Note:** Non-object values are coerced to objects. See the
15427 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
15428 * for more details.
15429 *
15430 * @static
15431 * @since 0.1.0
15432 * @memberOf _
15433 * @category Object
15434 * @param {Object} object The object to query.
15435 * @returns {Array} Returns the array of property names.
15436 * @example
15437 *
15438 * function Foo() {
15439 * this.a = 1;
15440 * this.b = 2;
15441 * }
15442 *
15443 * Foo.prototype.c = 3;
15444 *
15445 * _.keys(new Foo);
15446 * // => ['a', 'b'] (iteration order is not guaranteed)
15447 *
15448 * _.keys('hi');
15449 * // => ['0', '1']
15450 */
15451 function keys(object) {
15452 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
15453 }
15454
15455 /**
15456 * Creates an array of the own and inherited enumerable property names of `object`.
15457 *
15458 * **Note:** Non-object values are coerced to objects.
15459 *
15460 * @static
15461 * @memberOf _
15462 * @since 3.0.0
15463 * @category Object
15464 * @param {Object} object The object to query.
15465 * @returns {Array} Returns the array of property names.
15466 * @example
15467 *
15468 * function Foo() {
15469 * this.a = 1;
15470 * this.b = 2;
15471 * }
15472 *
15473 * Foo.prototype.c = 3;
15474 *
15475 * _.keysIn(new Foo);
15476 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
15477 */
15478 function keysIn(object) {
15479 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
15480 }
15481
15482 /**
15483 * The opposite of `_.mapValues`; this method creates an object with the
15484 * same values as `object` and keys generated by running each own enumerable
15485 * string keyed property of `object` thru `iteratee`. The iteratee is invoked
15486 * with three arguments: (value, key, object).
15487 *
15488 * @static
15489 * @memberOf _
15490 * @since 3.8.0
15491 * @category Object
15492 * @param {Object} object The object to iterate over.
15493 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15494 * @returns {Object} Returns the new mapped object.
15495 * @see _.mapValues
15496 * @example
15497 *
15498 * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
15499 * return key + value;
15500 * });
15501 * // => { 'a1': 1, 'b2': 2 }
15502 */
15503 function mapKeys(object, iteratee) {
15504 var result = {};
15505 iteratee = getIteratee(iteratee, 3);
15506
15507 baseForOwn(object, function(value, key, object) {
15508 baseAssignValue(result, iteratee(value, key, object), value);
15509 });
15510 return result;
15511 }
15512
15513 /**
15514 * Creates an object with the same keys as `object` and values generated
15515 * by running each own enumerable string keyed property of `object` thru
15516 * `iteratee`. The iteratee is invoked with three arguments:
15517 * (value, key, object).
15518 *
15519 * @static
15520 * @memberOf _
15521 * @since 2.4.0
15522 * @category Object
15523 * @param {Object} object The object to iterate over.
15524 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15525 * @returns {Object} Returns the new mapped object.
15526 * @see _.mapKeys
15527 * @example
15528 *
15529 * var users = {
15530 * 'fred': { 'user': 'fred', 'age': 40 },
15531 * 'pebbles': { 'user': 'pebbles', 'age': 1 }
15532 * };
15533 *
15534 * _.mapValues(users, function(o) { return o.age; });
15535 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
15536 *
15537 * // The `_.property` iteratee shorthand.
15538 * _.mapValues(users, 'age');
15539 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
15540 */
15541 function mapValues(object, iteratee) {
15542 var result = {};
15543 iteratee = getIteratee(iteratee, 3);
15544
15545 baseForOwn(object, function(value, key, object) {
15546 baseAssignValue(result, key, iteratee(value, key, object));
15547 });
15548 return result;
15549 }
15550
15551 /**
15552 * This method is like `_.assign` except that it recursively merges own and
15553 * inherited enumerable string keyed properties of source objects into the
15554 * destination object. Source properties that resolve to `undefined` are
15555 * skipped if a destination value exists. Array and plain object properties
15556 * are merged recursively. Other objects and value types are overridden by
15557 * assignment. Source objects are applied from left to right. Subsequent
15558 * sources overwrite property assignments of previous sources.
15559 *
15560 * **Note:** This method mutates `object`.
15561 *
15562 * @static
15563 * @memberOf _
15564 * @since 0.5.0
15565 * @category Object
15566 * @param {Object} object The destination object.
15567 * @param {...Object} [sources] The source objects.
15568 * @returns {Object} Returns `object`.
15569 * @example
15570 *
15571 * var object = {
15572 * 'a': [{ 'b': 2 }, { 'd': 4 }]
15573 * };
15574 *
15575 * var other = {
15576 * 'a': [{ 'c': 3 }, { 'e': 5 }]
15577 * };
15578 *
15579 * _.merge(object, other);
15580 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
15581 */
15582 var merge = createAssigner(function(object, source, srcIndex) {
15583 baseMerge(object, source, srcIndex);
15584 });
15585
15586 /**
15587 * This method is like `_.merge` except that it accepts `customizer` which
15588 * is invoked to produce the merged values of the destination and source
15589 * properties. If `customizer` returns `undefined`, merging is handled by the
15590 * method instead. The `customizer` is invoked with six arguments:
15591 * (objValue, srcValue, key, object, source, stack).
15592 *
15593 * **Note:** This method mutates `object`.
15594 *
15595 * @static
15596 * @memberOf _
15597 * @since 4.0.0
15598 * @category Object
15599 * @param {Object} object The destination object.
15600 * @param {...Object} sources The source objects.
15601 * @param {Function} customizer The function to customize assigned values.
15602 * @returns {Object} Returns `object`.
15603 * @example
15604 *
15605 * function customizer(objValue, srcValue) {
15606 * if (_.isArray(objValue)) {
15607 * return objValue.concat(srcValue);
15608 * }
15609 * }
15610 *
15611 * var object = { 'a': [1], 'b': [2] };
15612 * var other = { 'a': [3], 'b': [4] };
15613 *
15614 * _.mergeWith(object, other, customizer);
15615 * // => { 'a': [1, 3], 'b': [2, 4] }
15616 */
15617 var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
15618 baseMerge(object, source, srcIndex, customizer);
15619 });
15620
15621 /**
15622 * The opposite of `_.pick`; this method creates an object composed of the
15623 * own and inherited enumerable property paths of `object` that are not omitted.
15624 *
15625 * **Note:** This method is considerably slower than `_.pick`.
15626 *
15627 * @static
15628 * @since 0.1.0
15629 * @memberOf _
15630 * @category Object
15631 * @param {Object} object The source object.
15632 * @param {...(string|string[])} [paths] The property paths to omit.
15633 * @returns {Object} Returns the new object.
15634 * @example
15635 *
15636 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15637 *
15638 * _.omit(object, ['a', 'c']);
15639 * // => { 'b': '2' }
15640 */
15641 var omit = flatRest(function(object, paths) {
15642 var result = {};
15643 if (object == null) {
15644 return result;
15645 }
15646 var isDeep = false;
15647 paths = arrayMap(paths, function(path) {
15648 path = castPath(path, object);
15649 isDeep || (isDeep = path.length > 1);
15650 return path;
15651 });
15652 copyObject(object, getAllKeysIn(object), result);
15653 if (isDeep) {
15654 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
15655 }
15656 var length = paths.length;
15657 while (length--) {
15658 baseUnset(result, paths[length]);
15659 }
15660 return result;
15661 });
15662
15663 /**
15664 * The opposite of `_.pickBy`; this method creates an object composed of
15665 * the own and inherited enumerable string keyed properties of `object` that
15666 * `predicate` doesn't return truthy for. The predicate is invoked with two
15667 * arguments: (value, key).
15668 *
15669 * @static
15670 * @memberOf _
15671 * @since 4.0.0
15672 * @category Object
15673 * @param {Object} object The source object.
15674 * @param {Function} [predicate=_.identity] The function invoked per property.
15675 * @returns {Object} Returns the new object.
15676 * @example
15677 *
15678 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15679 *
15680 * _.omitBy(object, _.isNumber);
15681 * // => { 'b': '2' }
15682 */
15683 function omitBy(object, predicate) {
15684 return pickBy(object, negate(getIteratee(predicate)));
15685 }
15686
15687 /**
15688 * Creates an object composed of the picked `object` properties.
15689 *
15690 * @static
15691 * @since 0.1.0
15692 * @memberOf _
15693 * @category Object
15694 * @param {Object} object The source object.
15695 * @param {...(string|string[])} [paths] The property paths to pick.
15696 * @returns {Object} Returns the new object.
15697 * @example
15698 *
15699 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15700 *
15701 * _.pick(object, ['a', 'c']);
15702 * // => { 'a': 1, 'c': 3 }
15703 */
15704 var pick = flatRest(function(object, paths) {
15705 return object == null ? {} : basePick(object, paths);
15706 });
15707
15708 /**
15709 * Creates an object composed of the `object` properties `predicate` returns
15710 * truthy for. The predicate is invoked with two arguments: (value, key).
15711 *
15712 * @static
15713 * @memberOf _
15714 * @since 4.0.0
15715 * @category Object
15716 * @param {Object} object The source object.
15717 * @param {Function} [predicate=_.identity] The function invoked per property.
15718 * @returns {Object} Returns the new object.
15719 * @example
15720 *
15721 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15722 *
15723 * _.pickBy(object, _.isNumber);
15724 * // => { 'a': 1, 'c': 3 }
15725 */
15726 function pickBy(object, predicate) {
15727 if (object == null) {
15728 return {};
15729 }
15730 var props = arrayMap(getAllKeysIn(object), function(prop) {
15731 return [prop];
15732 });
15733 predicate = getIteratee(predicate);
15734 return basePickBy(object, props, function(value, path) {
15735 return predicate(value, path[0]);
15736 });
15737 }
15738
15739 /**
15740 * This method is like `_.get` except that if the resolved value is a
15741 * function it's invoked with the `this` binding of its parent object and
15742 * its result is returned.
15743 *
15744 * @static
15745 * @since 0.1.0
15746 * @memberOf _
15747 * @category Object
15748 * @param {Object} object The object to query.
15749 * @param {Array|string} path The path of the property to resolve.
15750 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
15751 * @returns {*} Returns the resolved value.
15752 * @example
15753 *
15754 * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
15755 *
15756 * _.result(object, 'a[0].b.c1');
15757 * // => 3
15758 *
15759 * _.result(object, 'a[0].b.c2');
15760 * // => 4
15761 *
15762 * _.result(object, 'a[0].b.c3', 'default');
15763 * // => 'default'
15764 *
15765 * _.result(object, 'a[0].b.c3', _.constant('default'));
15766 * // => 'default'
15767 */
15768 function result(object, path, defaultValue) {
15769 path = castPath(path, object);
15770
15771 var index = -1,
15772 length = path.length;
15773
15774 // Ensure the loop is entered when path is empty.
15775 if (!length) {
15776 length = 1;
15777 object = undefined;
15778 }
15779 while (++index < length) {
15780 var value = object == null ? undefined : object[toKey(path[index])];
15781 if (value === undefined) {
15782 index = length;
15783 value = defaultValue;
15784 }
15785 object = isFunction(value) ? value.call(object) : value;
15786 }
15787 return object;
15788 }
15789
15790 /**
15791 * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
15792 * it's created. Arrays are created for missing index properties while objects
15793 * are created for all other missing properties. Use `_.setWith` to customize
15794 * `path` creation.
15795 *
15796 * **Note:** This method mutates `object`.
15797 *
15798 * @static
15799 * @memberOf _
15800 * @since 3.7.0
15801 * @category Object
15802 * @param {Object} object The object to modify.
15803 * @param {Array|string} path The path of the property to set.
15804 * @param {*} value The value to set.
15805 * @returns {Object} Returns `object`.
15806 * @example
15807 *
15808 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
15809 *
15810 * _.set(object, 'a[0].b.c', 4);
15811 * console.log(object.a[0].b.c);
15812 * // => 4
15813 *
15814 * _.set(object, ['x', '0', 'y', 'z'], 5);
15815 * console.log(object.x[0].y.z);
15816 * // => 5
15817 */
15818 function set(object, path, value) {
15819 return object == null ? object : baseSet(object, path, value);
15820 }
15821
15822 /**
15823 * This method is like `_.set` except that it accepts `customizer` which is
15824 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
15825 * path creation is handled by the method instead. The `customizer` is invoked
15826 * with three arguments: (nsValue, key, nsObject).
15827 *
15828 * **Note:** This method mutates `object`.
15829 *
15830 * @static
15831 * @memberOf _
15832 * @since 4.0.0
15833 * @category Object
15834 * @param {Object} object The object to modify.
15835 * @param {Array|string} path The path of the property to set.
15836 * @param {*} value The value to set.
15837 * @param {Function} [customizer] The function to customize assigned values.
15838 * @returns {Object} Returns `object`.
15839 * @example
15840 *
15841 * var object = {};
15842 *
15843 * _.setWith(object, '[0][1]', 'a', Object);
15844 * // => { '0': { '1': 'a' } }
15845 */
15846 function setWith(object, path, value, customizer) {
15847 customizer = typeof customizer == 'function' ? customizer : undefined;
15848 return object == null ? object : baseSet(object, path, value, customizer);
15849 }
15850
15851 /**
15852 * Creates an array of own enumerable string keyed-value pairs for `object`
15853 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
15854 * entries are returned.
15855 *
15856 * @static
15857 * @memberOf _
15858 * @since 4.0.0
15859 * @alias entries
15860 * @category Object
15861 * @param {Object} object The object to query.
15862 * @returns {Array} Returns the key-value pairs.
15863 * @example
15864 *
15865 * function Foo() {
15866 * this.a = 1;
15867 * this.b = 2;
15868 * }
15869 *
15870 * Foo.prototype.c = 3;
15871 *
15872 * _.toPairs(new Foo);
15873 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
15874 */
15875 var toPairs = createToPairs(keys);
15876
15877 /**
15878 * Creates an array of own and inherited enumerable string keyed-value pairs
15879 * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
15880 * or set, its entries are returned.
15881 *
15882 * @static
15883 * @memberOf _
15884 * @since 4.0.0
15885 * @alias entriesIn
15886 * @category Object
15887 * @param {Object} object The object to query.
15888 * @returns {Array} Returns the key-value pairs.
15889 * @example
15890 *
15891 * function Foo() {
15892 * this.a = 1;
15893 * this.b = 2;
15894 * }
15895 *
15896 * Foo.prototype.c = 3;
15897 *
15898 * _.toPairsIn(new Foo);
15899 * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
15900 */
15901 var toPairsIn = createToPairs(keysIn);
15902
15903 /**
15904 * An alternative to `_.reduce`; this method transforms `object` to a new
15905 * `accumulator` object which is the result of running each of its own
15906 * enumerable string keyed properties thru `iteratee`, with each invocation
15907 * potentially mutating the `accumulator` object. If `accumulator` is not
15908 * provided, a new object with the same `[[Prototype]]` will be used. The
15909 * iteratee is invoked with four arguments: (accumulator, value, key, object).
15910 * Iteratee functions may exit iteration early by explicitly returning `false`.
15911 *
15912 * @static
15913 * @memberOf _
15914 * @since 1.3.0
15915 * @category Object
15916 * @param {Object} object The object to iterate over.
15917 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15918 * @param {*} [accumulator] The custom accumulator value.
15919 * @returns {*} Returns the accumulated value.
15920 * @example
15921 *
15922 * _.transform([2, 3, 4], function(result, n) {
15923 * result.push(n *= n);
15924 * return n % 2 == 0;
15925 * }, []);
15926 * // => [4, 9]
15927 *
15928 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
15929 * (result[value] || (result[value] = [])).push(key);
15930 * }, {});
15931 * // => { '1': ['a', 'c'], '2': ['b'] }
15932 */
15933 function transform(object, iteratee, accumulator) {
15934 var isArr = isArray(object),
15935 isArrLike = isArr || isBuffer(object) || isTypedArray(object);
15936
15937 iteratee = getIteratee(iteratee, 4);
15938 if (accumulator == null) {
15939 var Ctor = object && object.constructor;
15940 if (isArrLike) {
15941 accumulator = isArr ? new Ctor : [];
15942 }
15943 else if (isObject(object)) {
15944 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
15945 }
15946 else {
15947 accumulator = {};
15948 }
15949 }
15950 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
15951 return iteratee(accumulator, value, index, object);
15952 });
15953 return accumulator;
15954 }
15955
15956 /**
15957 * Removes the property at `path` of `object`.
15958 *
15959 * **Note:** This method mutates `object`.
15960 *
15961 * @static
15962 * @memberOf _
15963 * @since 4.0.0
15964 * @category Object
15965 * @param {Object} object The object to modify.
15966 * @param {Array|string} path The path of the property to unset.
15967 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
15968 * @example
15969 *
15970 * var object = { 'a': [{ 'b': { 'c': 7 } }] };
15971 * _.unset(object, 'a[0].b.c');
15972 * // => true
15973 *
15974 * console.log(object);
15975 * // => { 'a': [{ 'b': {} }] };
15976 *
15977 * _.unset(object, ['a', '0', 'b', 'c']);
15978 * // => true
15979 *
15980 * console.log(object);
15981 * // => { 'a': [{ 'b': {} }] };
15982 */
15983 function unset(object, path) {
15984 return object == null ? true : baseUnset(object, path);
15985 }
15986
15987 /**
15988 * This method is like `_.set` except that accepts `updater` to produce the
15989 * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
15990 * is invoked with one argument: (value).
15991 *
15992 * **Note:** This method mutates `object`.
15993 *
15994 * @static
15995 * @memberOf _
15996 * @since 4.6.0
15997 * @category Object
15998 * @param {Object} object The object to modify.
15999 * @param {Array|string} path The path of the property to set.
16000 * @param {Function} updater The function to produce the updated value.
16001 * @returns {Object} Returns `object`.
16002 * @example
16003 *
16004 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
16005 *
16006 * _.update(object, 'a[0].b.c', function(n) { return n * n; });
16007 * console.log(object.a[0].b.c);
16008 * // => 9
16009 *
16010 * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
16011 * console.log(object.x[0].y.z);
16012 * // => 0
16013 */
16014 function update(object, path, updater) {
16015 return object == null ? object : baseUpdate(object, path, castFunction(updater));
16016 }
16017
16018 /**
16019 * This method is like `_.update` except that it accepts `customizer` which is
16020 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
16021 * path creation is handled by the method instead. The `customizer` is invoked
16022 * with three arguments: (nsValue, key, nsObject).
16023 *
16024 * **Note:** This method mutates `object`.
16025 *
16026 * @static
16027 * @memberOf _
16028 * @since 4.6.0
16029 * @category Object
16030 * @param {Object} object The object to modify.
16031 * @param {Array|string} path The path of the property to set.
16032 * @param {Function} updater The function to produce the updated value.
16033 * @param {Function} [customizer] The function to customize assigned values.
16034 * @returns {Object} Returns `object`.
16035 * @example
16036 *
16037 * var object = {};
16038 *
16039 * _.updateWith(object, '[0][1]', _.constant('a'), Object);
16040 * // => { '0': { '1': 'a' } }
16041 */
16042 function updateWith(object, path, updater, customizer) {
16043 customizer = typeof customizer == 'function' ? customizer : undefined;
16044 return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
16045 }
16046
16047 /**
16048 * Creates an array of the own enumerable string keyed property values of `object`.
16049 *
16050 * **Note:** Non-object values are coerced to objects.
16051 *
16052 * @static
16053 * @since 0.1.0
16054 * @memberOf _
16055 * @category Object
16056 * @param {Object} object The object to query.
16057 * @returns {Array} Returns the array of property values.
16058 * @example
16059 *
16060 * function Foo() {
16061 * this.a = 1;
16062 * this.b = 2;
16063 * }
16064 *
16065 * Foo.prototype.c = 3;
16066 *
16067 * _.values(new Foo);
16068 * // => [1, 2] (iteration order is not guaranteed)
16069 *
16070 * _.values('hi');
16071 * // => ['h', 'i']
16072 */
16073 function values(object) {
16074 return object == null ? [] : baseValues(object, keys(object));
16075 }
16076
16077 /**
16078 * Creates an array of the own and inherited enumerable string keyed property
16079 * values of `object`.
16080 *
16081 * **Note:** Non-object values are coerced to objects.
16082 *
16083 * @static
16084 * @memberOf _
16085 * @since 3.0.0
16086 * @category Object
16087 * @param {Object} object The object to query.
16088 * @returns {Array} Returns the array of property values.
16089 * @example
16090 *
16091 * function Foo() {
16092 * this.a = 1;
16093 * this.b = 2;
16094 * }
16095 *
16096 * Foo.prototype.c = 3;
16097 *
16098 * _.valuesIn(new Foo);
16099 * // => [1, 2, 3] (iteration order is not guaranteed)
16100 */
16101 function valuesIn(object) {
16102 return object == null ? [] : baseValues(object, keysIn(object));
16103 }
16104
16105 /*------------------------------------------------------------------------*/
16106
16107 /**
16108 * Clamps `number` within the inclusive `lower` and `upper` bounds.
16109 *
16110 * @static
16111 * @memberOf _
16112 * @since 4.0.0
16113 * @category Number
16114 * @param {number} number The number to clamp.
16115 * @param {number} [lower] The lower bound.
16116 * @param {number} upper The upper bound.
16117 * @returns {number} Returns the clamped number.
16118 * @example
16119 *
16120 * _.clamp(-10, -5, 5);
16121 * // => -5
16122 *
16123 * _.clamp(10, -5, 5);
16124 * // => 5
16125 */
16126 function clamp(number, lower, upper) {
16127 if (upper === undefined) {
16128 upper = lower;
16129 lower = undefined;
16130 }
16131 if (upper !== undefined) {
16132 upper = toNumber(upper);
16133 upper = upper === upper ? upper : 0;
16134 }
16135 if (lower !== undefined) {
16136 lower = toNumber(lower);
16137 lower = lower === lower ? lower : 0;
16138 }
16139 return baseClamp(toNumber(number), lower, upper);
16140 }
16141
16142 /**
16143 * Checks if `n` is between `start` and up to, but not including, `end`. If
16144 * `end` is not specified, it's set to `start` with `start` then set to `0`.
16145 * If `start` is greater than `end` the params are swapped to support
16146 * negative ranges.
16147 *
16148 * @static
16149 * @memberOf _
16150 * @since 3.3.0
16151 * @category Number
16152 * @param {number} number The number to check.
16153 * @param {number} [start=0] The start of the range.
16154 * @param {number} end The end of the range.
16155 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
16156 * @see _.range, _.rangeRight
16157 * @example
16158 *
16159 * _.inRange(3, 2, 4);
16160 * // => true
16161 *
16162 * _.inRange(4, 8);
16163 * // => true
16164 *
16165 * _.inRange(4, 2);
16166 * // => false
16167 *
16168 * _.inRange(2, 2);
16169 * // => false
16170 *
16171 * _.inRange(1.2, 2);
16172 * // => true
16173 *
16174 * _.inRange(5.2, 4);
16175 * // => false
16176 *
16177 * _.inRange(-3, -2, -6);
16178 * // => true
16179 */
16180 function inRange(number, start, end) {
16181 start = toFinite(start);
16182 if (end === undefined) {
16183 end = start;
16184 start = 0;
16185 } else {
16186 end = toFinite(end);
16187 }
16188 number = toNumber(number);
16189 return baseInRange(number, start, end);
16190 }
16191
16192 /**
16193 * Produces a random number between the inclusive `lower` and `upper` bounds.
16194 * If only one argument is provided a number between `0` and the given number
16195 * is returned. If `floating` is `true`, or either `lower` or `upper` are
16196 * floats, a floating-point number is returned instead of an integer.
16197 *
16198 * **Note:** JavaScript follows the IEEE-754 standard for resolving
16199 * floating-point values which can produce unexpected results.
16200 *
16201 * @static
16202 * @memberOf _
16203 * @since 0.7.0
16204 * @category Number
16205 * @param {number} [lower=0] The lower bound.
16206 * @param {number} [upper=1] The upper bound.
16207 * @param {boolean} [floating] Specify returning a floating-point number.
16208 * @returns {number} Returns the random number.
16209 * @example
16210 *
16211 * _.random(0, 5);
16212 * // => an integer between 0 and 5
16213 *
16214 * _.random(5);
16215 * // => also an integer between 0 and 5
16216 *
16217 * _.random(5, true);
16218 * // => a floating-point number between 0 and 5
16219 *
16220 * _.random(1.2, 5.2);
16221 * // => a floating-point number between 1.2 and 5.2
16222 */
16223 function random(lower, upper, floating) {
16224 if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
16225 upper = floating = undefined;
16226 }
16227 if (floating === undefined) {
16228 if (typeof upper == 'boolean') {
16229 floating = upper;
16230 upper = undefined;
16231 }
16232 else if (typeof lower == 'boolean') {
16233 floating = lower;
16234 lower = undefined;
16235 }
16236 }
16237 if (lower === undefined && upper === undefined) {
16238 lower = 0;
16239 upper = 1;
16240 }
16241 else {
16242 lower = toFinite(lower);
16243 if (upper === undefined) {
16244 upper = lower;
16245 lower = 0;
16246 } else {
16247 upper = toFinite(upper);
16248 }
16249 }
16250 if (lower > upper) {
16251 var temp = lower;
16252 lower = upper;
16253 upper = temp;
16254 }
16255 if (floating || lower % 1 || upper % 1) {
16256 var rand = nativeRandom();
16257 return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
16258 }
16259 return baseRandom(lower, upper);
16260 }
16261
16262 /*------------------------------------------------------------------------*/
16263
16264 /**
16265 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
16266 *
16267 * @static
16268 * @memberOf _
16269 * @since 3.0.0
16270 * @category String
16271 * @param {string} [string=''] The string to convert.
16272 * @returns {string} Returns the camel cased string.
16273 * @example
16274 *
16275 * _.camelCase('Foo Bar');
16276 * // => 'fooBar'
16277 *
16278 * _.camelCase('--foo-bar--');
16279 * // => 'fooBar'
16280 *
16281 * _.camelCase('__FOO_BAR__');
16282 * // => 'fooBar'
16283 */
16284 var camelCase = createCompounder(function(result, word, index) {
16285 word = word.toLowerCase();
16286 return result + (index ? capitalize(word) : word);
16287 });
16288
16289 /**
16290 * Converts the first character of `string` to upper case and the remaining
16291 * to lower case.
16292 *
16293 * @static
16294 * @memberOf _
16295 * @since 3.0.0
16296 * @category String
16297 * @param {string} [string=''] The string to capitalize.
16298 * @returns {string} Returns the capitalized string.
16299 * @example
16300 *
16301 * _.capitalize('FRED');
16302 * // => 'Fred'
16303 */
16304 function capitalize(string) {
16305 return upperFirst(toString(string).toLowerCase());
16306 }
16307
16308 /**
16309 * Deburrs `string` by converting
16310 * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
16311 * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
16312 * letters to basic Latin letters and removing
16313 * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
16314 *
16315 * @static
16316 * @memberOf _
16317 * @since 3.0.0
16318 * @category String
16319 * @param {string} [string=''] The string to deburr.
16320 * @returns {string} Returns the deburred string.
16321 * @example
16322 *
16323 * _.deburr('déjà vu');
16324 * // => 'deja vu'
16325 */
16326 function deburr(string) {
16327 string = toString(string);
16328 return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
16329 }
16330
16331 /**
16332 * Checks if `string` ends with the given target string.
16333 *
16334 * @static
16335 * @memberOf _
16336 * @since 3.0.0
16337 * @category String
16338 * @param {string} [string=''] The string to inspect.
16339 * @param {string} [target] The string to search for.
16340 * @param {number} [position=string.length] The position to search up to.
16341 * @returns {boolean} Returns `true` if `string` ends with `target`,
16342 * else `false`.
16343 * @example
16344 *
16345 * _.endsWith('abc', 'c');
16346 * // => true
16347 *
16348 * _.endsWith('abc', 'b');
16349 * // => false
16350 *
16351 * _.endsWith('abc', 'b', 2);
16352 * // => true
16353 */
16354 function endsWith(string, target, position) {
16355 string = toString(string);
16356 target = baseToString(target);
16357
16358 var length = string.length;
16359 position = position === undefined
16360 ? length
16361 : baseClamp(toInteger(position), 0, length);
16362
16363 var end = position;
16364 position -= target.length;
16365 return position >= 0 && string.slice(position, end) == target;
16366 }
16367
16368 /**
16369 * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
16370 * corresponding HTML entities.
16371 *
16372 * **Note:** No other characters are escaped. To escape additional
16373 * characters use a third-party library like [_he_](https://mths.be/he).
16374 *
16375 * Though the ">" character is escaped for symmetry, characters like
16376 * ">" and "/" don't need escaping in HTML and have no special meaning
16377 * unless they're part of a tag or unquoted attribute value. See
16378 * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
16379 * (under "semi-related fun fact") for more details.
16380 *
16381 * When working with HTML you should always
16382 * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
16383 * XSS vectors.
16384 *
16385 * @static
16386 * @since 0.1.0
16387 * @memberOf _
16388 * @category String
16389 * @param {string} [string=''] The string to escape.
16390 * @returns {string} Returns the escaped string.
16391 * @example
16392 *
16393 * _.escape('fred, barney, & pebbles');
16394 * // => 'fred, barney, &amp; pebbles'
16395 */
16396 function escape(string) {
16397 string = toString(string);
16398 return (string && reHasUnescapedHtml.test(string))
16399 ? string.replace(reUnescapedHtml, escapeHtmlChar)
16400 : string;
16401 }
16402
16403 /**
16404 * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
16405 * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
16406 *
16407 * @static
16408 * @memberOf _
16409 * @since 3.0.0
16410 * @category String
16411 * @param {string} [string=''] The string to escape.
16412 * @returns {string} Returns the escaped string.
16413 * @example
16414 *
16415 * _.escapeRegExp('[lodash](https://lodash.com/)');
16416 * // => '\[lodash\]\(https://lodash\.com/\)'
16417 */
16418 function escapeRegExp(string) {
16419 string = toString(string);
16420 return (string && reHasRegExpChar.test(string))
16421 ? string.replace(reRegExpChar, '\\$&')
16422 : string;
16423 }
16424
16425 /**
16426 * Converts `string` to
16427 * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
16428 *
16429 * @static
16430 * @memberOf _
16431 * @since 3.0.0
16432 * @category String
16433 * @param {string} [string=''] The string to convert.
16434 * @returns {string} Returns the kebab cased string.
16435 * @example
16436 *
16437 * _.kebabCase('Foo Bar');
16438 * // => 'foo-bar'
16439 *
16440 * _.kebabCase('fooBar');
16441 * // => 'foo-bar'
16442 *
16443 * _.kebabCase('__FOO_BAR__');
16444 * // => 'foo-bar'
16445 */
16446 var kebabCase = createCompounder(function(result, word, index) {
16447 return result + (index ? '-' : '') + word.toLowerCase();
16448 });
16449
16450 /**
16451 * Converts `string`, as space separated words, to lower case.
16452 *
16453 * @static
16454 * @memberOf _
16455 * @since 4.0.0
16456 * @category String
16457 * @param {string} [string=''] The string to convert.
16458 * @returns {string} Returns the lower cased string.
16459 * @example
16460 *
16461 * _.lowerCase('--Foo-Bar--');
16462 * // => 'foo bar'
16463 *
16464 * _.lowerCase('fooBar');
16465 * // => 'foo bar'
16466 *
16467 * _.lowerCase('__FOO_BAR__');
16468 * // => 'foo bar'
16469 */
16470 var lowerCase = createCompounder(function(result, word, index) {
16471 return result + (index ? ' ' : '') + word.toLowerCase();
16472 });
16473
16474 /**
16475 * Converts the first character of `string` to lower case.
16476 *
16477 * @static
16478 * @memberOf _
16479 * @since 4.0.0
16480 * @category String
16481 * @param {string} [string=''] The string to convert.
16482 * @returns {string} Returns the converted string.
16483 * @example
16484 *
16485 * _.lowerFirst('Fred');
16486 * // => 'fred'
16487 *
16488 * _.lowerFirst('FRED');
16489 * // => 'fRED'
16490 */
16491 var lowerFirst = createCaseFirst('toLowerCase');
16492
16493 /**
16494 * Pads `string` on the left and right sides if it's shorter than `length`.
16495 * Padding characters are truncated if they can't be evenly divided by `length`.
16496 *
16497 * @static
16498 * @memberOf _
16499 * @since 3.0.0
16500 * @category String
16501 * @param {string} [string=''] The string to pad.
16502 * @param {number} [length=0] The padding length.
16503 * @param {string} [chars=' '] The string used as padding.
16504 * @returns {string} Returns the padded string.
16505 * @example
16506 *
16507 * _.pad('abc', 8);
16508 * // => ' abc '
16509 *
16510 * _.pad('abc', 8, '_-');
16511 * // => '_-abc_-_'
16512 *
16513 * _.pad('abc', 3);
16514 * // => 'abc'
16515 */
16516 function pad(string, length, chars) {
16517 string = toString(string);
16518 length = toInteger(length);
16519
16520 var strLength = length ? stringSize(string) : 0;
16521 if (!length || strLength >= length) {
16522 return string;
16523 }
16524 var mid = (length - strLength) / 2;
16525 return (
16526 createPadding(nativeFloor(mid), chars) +
16527 string +
16528 createPadding(nativeCeil(mid), chars)
16529 );
16530 }
16531
16532 /**
16533 * Pads `string` on the right side if it's shorter than `length`. Padding
16534 * characters are truncated if they exceed `length`.
16535 *
16536 * @static
16537 * @memberOf _
16538 * @since 4.0.0
16539 * @category String
16540 * @param {string} [string=''] The string to pad.
16541 * @param {number} [length=0] The padding length.
16542 * @param {string} [chars=' '] The string used as padding.
16543 * @returns {string} Returns the padded string.
16544 * @example
16545 *
16546 * _.padEnd('abc', 6);
16547 * // => 'abc '
16548 *
16549 * _.padEnd('abc', 6, '_-');
16550 * // => 'abc_-_'
16551 *
16552 * _.padEnd('abc', 3);
16553 * // => 'abc'
16554 */
16555 function padEnd(string, length, chars) {
16556 string = toString(string);
16557 length = toInteger(length);
16558
16559 var strLength = length ? stringSize(string) : 0;
16560 return (length && strLength < length)
16561 ? (string + createPadding(length - strLength, chars))
16562 : string;
16563 }
16564
16565 /**
16566 * Pads `string` on the left side if it's shorter than `length`. Padding
16567 * characters are truncated if they exceed `length`.
16568 *
16569 * @static
16570 * @memberOf _
16571 * @since 4.0.0
16572 * @category String
16573 * @param {string} [string=''] The string to pad.
16574 * @param {number} [length=0] The padding length.
16575 * @param {string} [chars=' '] The string used as padding.
16576 * @returns {string} Returns the padded string.
16577 * @example
16578 *
16579 * _.padStart('abc', 6);
16580 * // => ' abc'
16581 *
16582 * _.padStart('abc', 6, '_-');
16583 * // => '_-_abc'
16584 *
16585 * _.padStart('abc', 3);
16586 * // => 'abc'
16587 */
16588 function padStart(string, length, chars) {
16589 string = toString(string);
16590 length = toInteger(length);
16591
16592 var strLength = length ? stringSize(string) : 0;
16593 return (length && strLength < length)
16594 ? (createPadding(length - strLength, chars) + string)
16595 : string;
16596 }
16597
16598 /**
16599 * Converts `string` to an integer of the specified radix. If `radix` is
16600 * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
16601 * hexadecimal, in which case a `radix` of `16` is used.
16602 *
16603 * **Note:** This method aligns with the
16604 * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
16605 *
16606 * @static
16607 * @memberOf _
16608 * @since 1.1.0
16609 * @category String
16610 * @param {string} string The string to convert.
16611 * @param {number} [radix=10] The radix to interpret `value` by.
16612 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16613 * @returns {number} Returns the converted integer.
16614 * @example
16615 *
16616 * _.parseInt('08');
16617 * // => 8
16618 *
16619 * _.map(['6', '08', '10'], _.parseInt);
16620 * // => [6, 8, 10]
16621 */
16622 function parseInt(string, radix, guard) {
16623 if (guard || radix == null) {
16624 radix = 0;
16625 } else if (radix) {
16626 radix = +radix;
16627 }
16628 return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
16629 }
16630
16631 /**
16632 * Repeats the given string `n` times.
16633 *
16634 * @static
16635 * @memberOf _
16636 * @since 3.0.0
16637 * @category String
16638 * @param {string} [string=''] The string to repeat.
16639 * @param {number} [n=1] The number of times to repeat the string.
16640 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16641 * @returns {string} Returns the repeated string.
16642 * @example
16643 *
16644 * _.repeat('*', 3);
16645 * // => '***'
16646 *
16647 * _.repeat('abc', 2);
16648 * // => 'abcabc'
16649 *
16650 * _.repeat('abc', 0);
16651 * // => ''
16652 */
16653 function repeat(string, n, guard) {
16654 if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
16655 n = 1;
16656 } else {
16657 n = toInteger(n);
16658 }
16659 return baseRepeat(toString(string), n);
16660 }
16661
16662 /**
16663 * Replaces matches for `pattern` in `string` with `replacement`.
16664 *
16665 * **Note:** This method is based on
16666 * [`String#replace`](https://mdn.io/String/replace).
16667 *
16668 * @static
16669 * @memberOf _
16670 * @since 4.0.0
16671 * @category String
16672 * @param {string} [string=''] The string to modify.
16673 * @param {RegExp|string} pattern The pattern to replace.
16674 * @param {Function|string} replacement The match replacement.
16675 * @returns {string} Returns the modified string.
16676 * @example
16677 *
16678 * _.replace('Hi Fred', 'Fred', 'Barney');
16679 * // => 'Hi Barney'
16680 */
16681 function replace() {
16682 var args = arguments,
16683 string = toString(args[0]);
16684
16685 return args.length < 3 ? string : string.replace(args[1], args[2]);
16686 }
16687
16688 /**
16689 * Converts `string` to
16690 * [snake case](https://en.wikipedia.org/wiki/Snake_case).
16691 *
16692 * @static
16693 * @memberOf _
16694 * @since 3.0.0
16695 * @category String
16696 * @param {string} [string=''] The string to convert.
16697 * @returns {string} Returns the snake cased string.
16698 * @example
16699 *
16700 * _.snakeCase('Foo Bar');
16701 * // => 'foo_bar'
16702 *
16703 * _.snakeCase('fooBar');
16704 * // => 'foo_bar'
16705 *
16706 * _.snakeCase('--FOO-BAR--');
16707 * // => 'foo_bar'
16708 */
16709 var snakeCase = createCompounder(function(result, word, index) {
16710 return result + (index ? '_' : '') + word.toLowerCase();
16711 });
16712
16713 /**
16714 * Splits `string` by `separator`.
16715 *
16716 * **Note:** This method is based on
16717 * [`String#split`](https://mdn.io/String/split).
16718 *
16719 * @static
16720 * @memberOf _
16721 * @since 4.0.0
16722 * @category String
16723 * @param {string} [string=''] The string to split.
16724 * @param {RegExp|string} separator The separator pattern to split by.
16725 * @param {number} [limit] The length to truncate results to.
16726 * @returns {Array} Returns the string segments.
16727 * @example
16728 *
16729 * _.split('a-b-c', '-', 2);
16730 * // => ['a', 'b']
16731 */
16732 function split(string, separator, limit) {
16733 if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
16734 separator = limit = undefined;
16735 }
16736 limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
16737 if (!limit) {
16738 return [];
16739 }
16740 string = toString(string);
16741 if (string && (
16742 typeof separator == 'string' ||
16743 (separator != null && !isRegExp(separator))
16744 )) {
16745 separator = baseToString(separator);
16746 if (!separator && hasUnicode(string)) {
16747 return castSlice(stringToArray(string), 0, limit);
16748 }
16749 }
16750 return string.split(separator, limit);
16751 }
16752
16753 /**
16754 * Converts `string` to
16755 * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
16756 *
16757 * @static
16758 * @memberOf _
16759 * @since 3.1.0
16760 * @category String
16761 * @param {string} [string=''] The string to convert.
16762 * @returns {string} Returns the start cased string.
16763 * @example
16764 *
16765 * _.startCase('--foo-bar--');
16766 * // => 'Foo Bar'
16767 *
16768 * _.startCase('fooBar');
16769 * // => 'Foo Bar'
16770 *
16771 * _.startCase('__FOO_BAR__');
16772 * // => 'FOO BAR'
16773 */
16774 var startCase = createCompounder(function(result, word, index) {
16775 return result + (index ? ' ' : '') + upperFirst(word);
16776 });
16777
16778 /**
16779 * Checks if `string` starts with the given target string.
16780 *
16781 * @static
16782 * @memberOf _
16783 * @since 3.0.0
16784 * @category String
16785 * @param {string} [string=''] The string to inspect.
16786 * @param {string} [target] The string to search for.
16787 * @param {number} [position=0] The position to search from.
16788 * @returns {boolean} Returns `true` if `string` starts with `target`,
16789 * else `false`.
16790 * @example
16791 *
16792 * _.startsWith('abc', 'a');
16793 * // => true
16794 *
16795 * _.startsWith('abc', 'b');
16796 * // => false
16797 *
16798 * _.startsWith('abc', 'b', 1);
16799 * // => true
16800 */
16801 function startsWith(string, target, position) {
16802 string = toString(string);
16803 position = position == null
16804 ? 0
16805 : baseClamp(toInteger(position), 0, string.length);
16806
16807 target = baseToString(target);
16808 return string.slice(position, position + target.length) == target;
16809 }
16810
16811 /**
16812 * Creates a compiled template function that can interpolate data properties
16813 * in "interpolate" delimiters, HTML-escape interpolated data properties in
16814 * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
16815 * properties may be accessed as free variables in the template. If a setting
16816 * object is given, it takes precedence over `_.templateSettings` values.
16817 *
16818 * **Note:** In the development build `_.template` utilizes
16819 * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
16820 * for easier debugging.
16821 *
16822 * For more information on precompiling templates see
16823 * [lodash's custom builds documentation](https://lodash.com/custom-builds).
16824 *
16825 * For more information on Chrome extension sandboxes see
16826 * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
16827 *
16828 * @static
16829 * @since 0.1.0
16830 * @memberOf _
16831 * @category String
16832 * @param {string} [string=''] The template string.
16833 * @param {Object} [options={}] The options object.
16834 * @param {RegExp} [options.escape=_.templateSettings.escape]
16835 * The HTML "escape" delimiter.
16836 * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
16837 * The "evaluate" delimiter.
16838 * @param {Object} [options.imports=_.templateSettings.imports]
16839 * An object to import into the template as free variables.
16840 * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
16841 * The "interpolate" delimiter.
16842 * @param {string} [options.sourceURL='lodash.templateSources[n]']
16843 * The sourceURL of the compiled template.
16844 * @param {string} [options.variable='obj']
16845 * The data object variable name.
16846 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16847 * @returns {Function} Returns the compiled template function.
16848 * @example
16849 *
16850 * // Use the "interpolate" delimiter to create a compiled template.
16851 * var compiled = _.template('hello <%= user %>!');
16852 * compiled({ 'user': 'fred' });
16853 * // => 'hello fred!'
16854 *
16855 * // Use the HTML "escape" delimiter to escape data property values.
16856 * var compiled = _.template('<b><%- value %></b>');
16857 * compiled({ 'value': '<script>' });
16858 * // => '<b>&lt;script&gt;</b>'
16859 *
16860 * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
16861 * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
16862 * compiled({ 'users': ['fred', 'barney'] });
16863 * // => '<li>fred</li><li>barney</li>'
16864 *
16865 * // Use the internal `print` function in "evaluate" delimiters.
16866 * var compiled = _.template('<% print("hello " + user); %>!');
16867 * compiled({ 'user': 'barney' });
16868 * // => 'hello barney!'
16869 *
16870 * // Use the ES template literal delimiter as an "interpolate" delimiter.
16871 * // Disable support by replacing the "interpolate" delimiter.
16872 * var compiled = _.template('hello ${ user }!');
16873 * compiled({ 'user': 'pebbles' });
16874 * // => 'hello pebbles!'
16875 *
16876 * // Use backslashes to treat delimiters as plain text.
16877 * var compiled = _.template('<%= "\\<%- value %\\>" %>');
16878 * compiled({ 'value': 'ignored' });
16879 * // => '<%- value %>'
16880 *
16881 * // Use the `imports` option to import `jQuery` as `jq`.
16882 * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
16883 * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
16884 * compiled({ 'users': ['fred', 'barney'] });
16885 * // => '<li>fred</li><li>barney</li>'
16886 *
16887 * // Use the `sourceURL` option to specify a custom sourceURL for the template.
16888 * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
16889 * compiled(data);
16890 * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
16891 *
16892 * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
16893 * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
16894 * compiled.source;
16895 * // => function(data) {
16896 * // var __t, __p = '';
16897 * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
16898 * // return __p;
16899 * // }
16900 *
16901 * // Use custom template delimiters.
16902 * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
16903 * var compiled = _.template('hello {{ user }}!');
16904 * compiled({ 'user': 'mustache' });
16905 * // => 'hello mustache!'
16906 *
16907 * // Use the `source` property to inline compiled templates for meaningful
16908 * // line numbers in error messages and stack traces.
16909 * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
16910 * var JST = {\
16911 * "main": ' + _.template(mainText).source + '\
16912 * };\
16913 * ');
16914 */
16915 function template(string, options, guard) {
16916 // Based on John Resig's `tmpl` implementation
16917 // (http://ejohn.org/blog/javascript-micro-templating/)
16918 // and Laura Doktorova's doT.js (https://github.com/olado/doT).
16919 var settings = lodash.templateSettings;
16920
16921 if (guard && isIterateeCall(string, options, guard)) {
16922 options = undefined;
16923 }
16924 string = toString(string);
16925 options = assignInWith({}, options, settings, customDefaultsAssignIn);
16926
16927 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
16928 importsKeys = keys(imports),
16929 importsValues = baseValues(imports, importsKeys);
16930
16931 var isEscaping,
16932 isEvaluating,
16933 index = 0,
16934 interpolate = options.interpolate || reNoMatch,
16935 source = "__p += '";
16936
16937 // Compile the regexp to match each delimiter.
16938 var reDelimiters = RegExp(
16939 (options.escape || reNoMatch).source + '|' +
16940 interpolate.source + '|' +
16941 (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
16942 (options.evaluate || reNoMatch).source + '|$'
16943 , 'g');
16944
16945 // Use a sourceURL for easier debugging.
16946 var sourceURL = '//# sourceURL=' +
16947 ('sourceURL' in options
16948 ? options.sourceURL
16949 : ('lodash.templateSources[' + (++templateCounter) + ']')
16950 ) + '\n';
16951
16952 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
16953 interpolateValue || (interpolateValue = esTemplateValue);
16954
16955 // Escape characters that can't be included in string literals.
16956 source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
16957
16958 // Replace delimiters with snippets.
16959 if (escapeValue) {
16960 isEscaping = true;
16961 source += "' +\n__e(" + escapeValue + ") +\n'";
16962 }
16963 if (evaluateValue) {
16964 isEvaluating = true;
16965 source += "';\n" + evaluateValue + ";\n__p += '";
16966 }
16967 if (interpolateValue) {
16968 source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
16969 }
16970 index = offset + match.length;
16971
16972 // The JS engine embedded in Adobe products needs `match` returned in
16973 // order to produce the correct `offset` value.
16974 return match;
16975 });
16976
16977 source += "';\n";
16978
16979 // If `variable` is not specified wrap a with-statement around the generated
16980 // code to add the data object to the top of the scope chain.
16981 var variable = options.variable;
16982 if (!variable) {
16983 source = 'with (obj) {\n' + source + '\n}\n';
16984 }
16985 // Cleanup code by stripping empty strings.
16986 source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
16987 .replace(reEmptyStringMiddle, '$1')
16988 .replace(reEmptyStringTrailing, '$1;');
16989
16990 // Frame code as the function body.
16991 source = 'function(' + (variable || 'obj') + ') {\n' +
16992 (variable
16993 ? ''
16994 : 'obj || (obj = {});\n'
16995 ) +
16996 "var __t, __p = ''" +
16997 (isEscaping
16998 ? ', __e = _.escape'
16999 : ''
17000 ) +
17001 (isEvaluating
17002 ? ', __j = Array.prototype.join;\n' +
17003 "function print() { __p += __j.call(arguments, '') }\n"
17004 : ';\n'
17005 ) +
17006 source +
17007 'return __p\n}';
17008
17009 var result = attempt(function() {
17010 return Function(importsKeys, sourceURL + 'return ' + source)
17011 .apply(undefined, importsValues);
17012 });
17013
17014 // Provide the compiled function's source by its `toString` method or
17015 // the `source` property as a convenience for inlining compiled templates.
17016 result.source = source;
17017 if (isError(result)) {
17018 throw result;
17019 }
17020 return result;
17021 }
17022
17023 /**
17024 * Converts `string`, as a whole, to lower case just like
17025 * [String#toLowerCase](https://mdn.io/toLowerCase).
17026 *
17027 * @static
17028 * @memberOf _
17029 * @since 4.0.0
17030 * @category String
17031 * @param {string} [string=''] The string to convert.
17032 * @returns {string} Returns the lower cased string.
17033 * @example
17034 *
17035 * _.toLower('--Foo-Bar--');
17036 * // => '--foo-bar--'
17037 *
17038 * _.toLower('fooBar');
17039 * // => 'foobar'
17040 *
17041 * _.toLower('__FOO_BAR__');
17042 * // => '__foo_bar__'
17043 */
17044 function toLower(value) {
17045 return toString(value).toLowerCase();
17046 }
17047
17048 /**
17049 * Converts `string`, as a whole, to upper case just like
17050 * [String#toUpperCase](https://mdn.io/toUpperCase).
17051 *
17052 * @static
17053 * @memberOf _
17054 * @since 4.0.0
17055 * @category String
17056 * @param {string} [string=''] The string to convert.
17057 * @returns {string} Returns the upper cased string.
17058 * @example
17059 *
17060 * _.toUpper('--foo-bar--');
17061 * // => '--FOO-BAR--'
17062 *
17063 * _.toUpper('fooBar');
17064 * // => 'FOOBAR'
17065 *
17066 * _.toUpper('__foo_bar__');
17067 * // => '__FOO_BAR__'
17068 */
17069 function toUpper(value) {
17070 return toString(value).toUpperCase();
17071 }
17072
17073 /**
17074 * Removes leading and trailing whitespace or specified characters from `string`.
17075 *
17076 * @static
17077 * @memberOf _
17078 * @since 3.0.0
17079 * @category String
17080 * @param {string} [string=''] The string to trim.
17081 * @param {string} [chars=whitespace] The characters to trim.
17082 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
17083 * @returns {string} Returns the trimmed string.
17084 * @example
17085 *
17086 * _.trim(' abc ');
17087 * // => 'abc'
17088 *
17089 * _.trim('-_-abc-_-', '_-');
17090 * // => 'abc'
17091 *
17092 * _.map([' foo ', ' bar '], _.trim);
17093 * // => ['foo', 'bar']
17094 */
17095 function trim(string, chars, guard) {
17096 string = toString(string);
17097 if (string && (guard || chars === undefined)) {
17098 return string.replace(reTrim, '');
17099 }
17100 if (!string || !(chars = baseToString(chars))) {
17101 return string;
17102 }
17103 var strSymbols = stringToArray(string),
17104 chrSymbols = stringToArray(chars),
17105 start = charsStartIndex(strSymbols, chrSymbols),
17106 end = charsEndIndex(strSymbols, chrSymbols) + 1;
17107
17108 return castSlice(strSymbols, start, end).join('');
17109 }
17110
17111 /**
17112 * Removes trailing whitespace or specified characters from `string`.
17113 *
17114 * @static
17115 * @memberOf _
17116 * @since 4.0.0
17117 * @category String
17118 * @param {string} [string=''] The string to trim.
17119 * @param {string} [chars=whitespace] The characters to trim.
17120 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
17121 * @returns {string} Returns the trimmed string.
17122 * @example
17123 *
17124 * _.trimEnd(' abc ');
17125 * // => ' abc'
17126 *
17127 * _.trimEnd('-_-abc-_-', '_-');
17128 * // => '-_-abc'
17129 */
17130 function trimEnd(string, chars, guard) {
17131 string = toString(string);
17132 if (string && (guard || chars === undefined)) {
17133 return string.replace(reTrimEnd, '');
17134 }
17135 if (!string || !(chars = baseToString(chars))) {
17136 return string;
17137 }
17138 var strSymbols = stringToArray(string),
17139 end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
17140
17141 return castSlice(strSymbols, 0, end).join('');
17142 }
17143
17144 /**
17145 * Removes leading whitespace or specified characters from `string`.
17146 *
17147 * @static
17148 * @memberOf _
17149 * @since 4.0.0
17150 * @category String
17151 * @param {string} [string=''] The string to trim.
17152 * @param {string} [chars=whitespace] The characters to trim.
17153 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
17154 * @returns {string} Returns the trimmed string.
17155 * @example
17156 *
17157 * _.trimStart(' abc ');
17158 * // => 'abc '
17159 *
17160 * _.trimStart('-_-abc-_-', '_-');
17161 * // => 'abc-_-'
17162 */
17163 function trimStart(string, chars, guard) {
17164 string = toString(string);
17165 if (string && (guard || chars === undefined)) {
17166 return string.replace(reTrimStart, '');
17167 }
17168 if (!string || !(chars = baseToString(chars))) {
17169 return string;
17170 }
17171 var strSymbols = stringToArray(string),
17172 start = charsStartIndex(strSymbols, stringToArray(chars));
17173
17174 return castSlice(strSymbols, start).join('');
17175 }
17176
17177 /**
17178 * Truncates `string` if it's longer than the given maximum string length.
17179 * The last characters of the truncated string are replaced with the omission
17180 * string which defaults to "...".
17181 *
17182 * @static
17183 * @memberOf _
17184 * @since 4.0.0
17185 * @category String
17186 * @param {string} [string=''] The string to truncate.
17187 * @param {Object} [options={}] The options object.
17188 * @param {number} [options.length=30] The maximum string length.
17189 * @param {string} [options.omission='...'] The string to indicate text is omitted.
17190 * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
17191 * @returns {string} Returns the truncated string.
17192 * @example
17193 *
17194 * _.truncate('hi-diddly-ho there, neighborino');
17195 * // => 'hi-diddly-ho there, neighbo...'
17196 *
17197 * _.truncate('hi-diddly-ho there, neighborino', {
17198 * 'length': 24,
17199 * 'separator': ' '
17200 * });
17201 * // => 'hi-diddly-ho there,...'
17202 *
17203 * _.truncate('hi-diddly-ho there, neighborino', {
17204 * 'length': 24,
17205 * 'separator': /,? +/
17206 * });
17207 * // => 'hi-diddly-ho there...'
17208 *
17209 * _.truncate('hi-diddly-ho there, neighborino', {
17210 * 'omission': ' [...]'
17211 * });
17212 * // => 'hi-diddly-ho there, neig [...]'
17213 */
17214 function truncate(string, options) {
17215 var length = DEFAULT_TRUNC_LENGTH,
17216 omission = DEFAULT_TRUNC_OMISSION;
17217
17218 if (isObject(options)) {
17219 var separator = 'separator' in options ? options.separator : separator;
17220 length = 'length' in options ? toInteger(options.length) : length;
17221 omission = 'omission' in options ? baseToString(options.omission) : omission;
17222 }
17223 string = toString(string);
17224
17225 var strLength = string.length;
17226 if (hasUnicode(string)) {
17227 var strSymbols = stringToArray(string);
17228 strLength = strSymbols.length;
17229 }
17230 if (length >= strLength) {
17231 return string;
17232 }
17233 var end = length - stringSize(omission);
17234 if (end < 1) {
17235 return omission;
17236 }
17237 var result = strSymbols
17238 ? castSlice(strSymbols, 0, end).join('')
17239 : string.slice(0, end);
17240
17241 if (separator === undefined) {
17242 return result + omission;
17243 }
17244 if (strSymbols) {
17245 end += (result.length - end);
17246 }
17247 if (isRegExp(separator)) {
17248 if (string.slice(end).search(separator)) {
17249 var match,
17250 substring = result;
17251
17252 if (!separator.global) {
17253 separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
17254 }
17255 separator.lastIndex = 0;
17256 while ((match = separator.exec(substring))) {
17257 var newEnd = match.index;
17258 }
17259 result = result.slice(0, newEnd === undefined ? end : newEnd);
17260 }
17261 } else if (string.indexOf(baseToString(separator), end) != end) {
17262 var index = result.lastIndexOf(separator);
17263 if (index > -1) {
17264 result = result.slice(0, index);
17265 }
17266 }
17267 return result + omission;
17268 }
17269
17270 /**
17271 * The inverse of `_.escape`; this method converts the HTML entities
17272 * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
17273 * their corresponding characters.
17274 *
17275 * **Note:** No other HTML entities are unescaped. To unescape additional
17276 * HTML entities use a third-party library like [_he_](https://mths.be/he).
17277 *
17278 * @static
17279 * @memberOf _
17280 * @since 0.6.0
17281 * @category String
17282 * @param {string} [string=''] The string to unescape.
17283 * @returns {string} Returns the unescaped string.
17284 * @example
17285 *
17286 * _.unescape('fred, barney, &amp; pebbles');
17287 * // => 'fred, barney, & pebbles'
17288 */
17289 function unescape(string) {
17290 string = toString(string);
17291 return (string && reHasEscapedHtml.test(string))
17292 ? string.replace(reEscapedHtml, unescapeHtmlChar)
17293 : string;
17294 }
17295
17296 /**
17297 * Converts `string`, as space separated words, to upper case.
17298 *
17299 * @static
17300 * @memberOf _
17301 * @since 4.0.0
17302 * @category String
17303 * @param {string} [string=''] The string to convert.
17304 * @returns {string} Returns the upper cased string.
17305 * @example
17306 *
17307 * _.upperCase('--foo-bar');
17308 * // => 'FOO BAR'
17309 *
17310 * _.upperCase('fooBar');
17311 * // => 'FOO BAR'
17312 *
17313 * _.upperCase('__foo_bar__');
17314 * // => 'FOO BAR'
17315 */
17316 var upperCase = createCompounder(function(result, word, index) {
17317 return result + (index ? ' ' : '') + word.toUpperCase();
17318 });
17319
17320 /**
17321 * Converts the first character of `string` to upper case.
17322 *
17323 * @static
17324 * @memberOf _
17325 * @since 4.0.0
17326 * @category String
17327 * @param {string} [string=''] The string to convert.
17328 * @returns {string} Returns the converted string.
17329 * @example
17330 *
17331 * _.upperFirst('fred');
17332 * // => 'Fred'
17333 *
17334 * _.upperFirst('FRED');
17335 * // => 'FRED'
17336 */
17337 var upperFirst = createCaseFirst('toUpperCase');
17338
17339 /**
17340 * Splits `string` into an array of its words.
17341 *
17342 * @static
17343 * @memberOf _
17344 * @since 3.0.0
17345 * @category String
17346 * @param {string} [string=''] The string to inspect.
17347 * @param {RegExp|string} [pattern] The pattern to match words.
17348 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
17349 * @returns {Array} Returns the words of `string`.
17350 * @example
17351 *
17352 * _.words('fred, barney, & pebbles');
17353 * // => ['fred', 'barney', 'pebbles']
17354 *
17355 * _.words('fred, barney, & pebbles', /[^, ]+/g);
17356 * // => ['fred', 'barney', '&', 'pebbles']
17357 */
17358 function words(string, pattern, guard) {
17359 string = toString(string);
17360 pattern = guard ? undefined : pattern;
17361
17362 if (pattern === undefined) {
17363 return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
17364 }
17365 return string.match(pattern) || [];
17366 }
17367
17368 /*------------------------------------------------------------------------*/
17369
17370 /**
17371 * Attempts to invoke `func`, returning either the result or the caught error
17372 * object. Any additional arguments are provided to `func` when it's invoked.
17373 *
17374 * @static
17375 * @memberOf _
17376 * @since 3.0.0
17377 * @category Util
17378 * @param {Function} func The function to attempt.
17379 * @param {...*} [args] The arguments to invoke `func` with.
17380 * @returns {*} Returns the `func` result or error object.
17381 * @example
17382 *
17383 * // Avoid throwing errors for invalid selectors.
17384 * var elements = _.attempt(function(selector) {
17385 * return document.querySelectorAll(selector);
17386 * }, '>_>');
17387 *
17388 * if (_.isError(elements)) {
17389 * elements = [];
17390 * }
17391 */
17392 var attempt = baseRest(function(func, args) {
17393 try {
17394 return apply(func, undefined, args);
17395 } catch (e) {
17396 return isError(e) ? e : new Error(e);
17397 }
17398 });
17399
17400 /**
17401 * Binds methods of an object to the object itself, overwriting the existing
17402 * method.
17403 *
17404 * **Note:** This method doesn't set the "length" property of bound functions.
17405 *
17406 * @static
17407 * @since 0.1.0
17408 * @memberOf _
17409 * @category Util
17410 * @param {Object} object The object to bind and assign the bound methods to.
17411 * @param {...(string|string[])} methodNames The object method names to bind.
17412 * @returns {Object} Returns `object`.
17413 * @example
17414 *
17415 * var view = {
17416 * 'label': 'docs',
17417 * 'click': function() {
17418 * console.log('clicked ' + this.label);
17419 * }
17420 * };
17421 *
17422 * _.bindAll(view, ['click']);
17423 * jQuery(element).on('click', view.click);
17424 * // => Logs 'clicked docs' when clicked.
17425 */
17426 var bindAll = flatRest(function(object, methodNames) {
17427 arrayEach(methodNames, function(key) {
17428 key = toKey(key);
17429 baseAssignValue(object, key, bind(object[key], object));
17430 });
17431 return object;
17432 });
17433
17434 /**
17435 * Creates a function that iterates over `pairs` and invokes the corresponding
17436 * function of the first predicate to return truthy. The predicate-function
17437 * pairs are invoked with the `this` binding and arguments of the created
17438 * function.
17439 *
17440 * @static
17441 * @memberOf _
17442 * @since 4.0.0
17443 * @category Util
17444 * @param {Array} pairs The predicate-function pairs.
17445 * @returns {Function} Returns the new composite function.
17446 * @example
17447 *
17448 * var func = _.cond([
17449 * [_.matches({ 'a': 1 }), _.constant('matches A')],
17450 * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
17451 * [_.stubTrue, _.constant('no match')]
17452 * ]);
17453 *
17454 * func({ 'a': 1, 'b': 2 });
17455 * // => 'matches A'
17456 *
17457 * func({ 'a': 0, 'b': 1 });
17458 * // => 'matches B'
17459 *
17460 * func({ 'a': '1', 'b': '2' });
17461 * // => 'no match'
17462 */
17463 function cond(pairs) {
17464 var length = pairs == null ? 0 : pairs.length,
17465 toIteratee = getIteratee();
17466
17467 pairs = !length ? [] : arrayMap(pairs, function(pair) {
17468 if (typeof pair[1] != 'function') {
17469 throw new TypeError(FUNC_ERROR_TEXT);
17470 }
17471 return [toIteratee(pair[0]), pair[1]];
17472 });
17473
17474 return baseRest(function(args) {
17475 var index = -1;
17476 while (++index < length) {
17477 var pair = pairs[index];
17478 if (apply(pair[0], this, args)) {
17479 return apply(pair[1], this, args);
17480 }
17481 }
17482 });
17483 }
17484
17485 /**
17486 * Creates a function that invokes the predicate properties of `source` with
17487 * the corresponding property values of a given object, returning `true` if
17488 * all predicates return truthy, else `false`.
17489 *
17490 * **Note:** The created function is equivalent to `_.conformsTo` with
17491 * `source` partially applied.
17492 *
17493 * @static
17494 * @memberOf _
17495 * @since 4.0.0
17496 * @category Util
17497 * @param {Object} source The object of property predicates to conform to.
17498 * @returns {Function} Returns the new spec function.
17499 * @example
17500 *
17501 * var objects = [
17502 * { 'a': 2, 'b': 1 },
17503 * { 'a': 1, 'b': 2 }
17504 * ];
17505 *
17506 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
17507 * // => [{ 'a': 1, 'b': 2 }]
17508 */
17509 function conforms(source) {
17510 return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
17511 }
17512
17513 /**
17514 * Creates a function that returns `value`.
17515 *
17516 * @static
17517 * @memberOf _
17518 * @since 2.4.0
17519 * @category Util
17520 * @param {*} value The value to return from the new function.
17521 * @returns {Function} Returns the new constant function.
17522 * @example
17523 *
17524 * var objects = _.times(2, _.constant({ 'a': 1 }));
17525 *
17526 * console.log(objects);
17527 * // => [{ 'a': 1 }, { 'a': 1 }]
17528 *
17529 * console.log(objects[0] === objects[1]);
17530 * // => true
17531 */
17532 function constant(value) {
17533 return function() {
17534 return value;
17535 };
17536 }
17537
17538 /**
17539 * Checks `value` to determine whether a default value should be returned in
17540 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
17541 * or `undefined`.
17542 *
17543 * @static
17544 * @memberOf _
17545 * @since 4.14.0
17546 * @category Util
17547 * @param {*} value The value to check.
17548 * @param {*} defaultValue The default value.
17549 * @returns {*} Returns the resolved value.
17550 * @example
17551 *
17552 * _.defaultTo(1, 10);
17553 * // => 1
17554 *
17555 * _.defaultTo(undefined, 10);
17556 * // => 10
17557 */
17558 function defaultTo(value, defaultValue) {
17559 return (value == null || value !== value) ? defaultValue : value;
17560 }
17561
17562 /**
17563 * Creates a function that returns the result of invoking the given functions
17564 * with the `this` binding of the created function, where each successive
17565 * invocation is supplied the return value of the previous.
17566 *
17567 * @static
17568 * @memberOf _
17569 * @since 3.0.0
17570 * @category Util
17571 * @param {...(Function|Function[])} [funcs] The functions to invoke.
17572 * @returns {Function} Returns the new composite function.
17573 * @see _.flowRight
17574 * @example
17575 *
17576 * function square(n) {
17577 * return n * n;
17578 * }
17579 *
17580 * var addSquare = _.flow([_.add, square]);
17581 * addSquare(1, 2);
17582 * // => 9
17583 */
17584 var flow = createFlow();
17585
17586 /**
17587 * This method is like `_.flow` except that it creates a function that
17588 * invokes the given functions from right to left.
17589 *
17590 * @static
17591 * @since 3.0.0
17592 * @memberOf _
17593 * @category Util
17594 * @param {...(Function|Function[])} [funcs] The functions to invoke.
17595 * @returns {Function} Returns the new composite function.
17596 * @see _.flow
17597 * @example
17598 *
17599 * function square(n) {
17600 * return n * n;
17601 * }
17602 *
17603 * var addSquare = _.flowRight([square, _.add]);
17604 * addSquare(1, 2);
17605 * // => 9
17606 */
17607 var flowRight = createFlow(true);
17608
17609 /**
17610 * This method returns the first argument it receives.
17611 *
17612 * @static
17613 * @since 0.1.0
17614 * @memberOf _
17615 * @category Util
17616 * @param {*} value Any value.
17617 * @returns {*} Returns `value`.
17618 * @example
17619 *
17620 * var object = { 'a': 1 };
17621 *
17622 * console.log(_.identity(object) === object);
17623 * // => true
17624 */
17625 function identity(value) {
17626 return value;
17627 }
17628
17629 /**
17630 * Creates a function that invokes `func` with the arguments of the created
17631 * function. If `func` is a property name, the created function returns the
17632 * property value for a given element. If `func` is an array or object, the
17633 * created function returns `true` for elements that contain the equivalent
17634 * source properties, otherwise it returns `false`.
17635 *
17636 * @static
17637 * @since 4.0.0
17638 * @memberOf _
17639 * @category Util
17640 * @param {*} [func=_.identity] The value to convert to a callback.
17641 * @returns {Function} Returns the callback.
17642 * @example
17643 *
17644 * var users = [
17645 * { 'user': 'barney', 'age': 36, 'active': true },
17646 * { 'user': 'fred', 'age': 40, 'active': false }
17647 * ];
17648 *
17649 * // The `_.matches` iteratee shorthand.
17650 * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
17651 * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
17652 *
17653 * // The `_.matchesProperty` iteratee shorthand.
17654 * _.filter(users, _.iteratee(['user', 'fred']));
17655 * // => [{ 'user': 'fred', 'age': 40 }]
17656 *
17657 * // The `_.property` iteratee shorthand.
17658 * _.map(users, _.iteratee('user'));
17659 * // => ['barney', 'fred']
17660 *
17661 * // Create custom iteratee shorthands.
17662 * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
17663 * return !_.isRegExp(func) ? iteratee(func) : function(string) {
17664 * return func.test(string);
17665 * };
17666 * });
17667 *
17668 * _.filter(['abc', 'def'], /ef/);
17669 * // => ['def']
17670 */
17671 function iteratee(func) {
17672 return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
17673 }
17674
17675 /**
17676 * Creates a function that performs a partial deep comparison between a given
17677 * object and `source`, returning `true` if the given object has equivalent
17678 * property values, else `false`.
17679 *
17680 * **Note:** The created function is equivalent to `_.isMatch` with `source`
17681 * partially applied.
17682 *
17683 * Partial comparisons will match empty array and empty object `source`
17684 * values against any array or object value, respectively. See `_.isEqual`
17685 * for a list of supported value comparisons.
17686 *
17687 * @static
17688 * @memberOf _
17689 * @since 3.0.0
17690 * @category Util
17691 * @param {Object} source The object of property values to match.
17692 * @returns {Function} Returns the new spec function.
17693 * @example
17694 *
17695 * var objects = [
17696 * { 'a': 1, 'b': 2, 'c': 3 },
17697 * { 'a': 4, 'b': 5, 'c': 6 }
17698 * ];
17699 *
17700 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
17701 * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
17702 */
17703 function matches(source) {
17704 return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
17705 }
17706
17707 /**
17708 * Creates a function that performs a partial deep comparison between the
17709 * value at `path` of a given object to `srcValue`, returning `true` if the
17710 * object value is equivalent, else `false`.
17711 *
17712 * **Note:** Partial comparisons will match empty array and empty object
17713 * `srcValue` values against any array or object value, respectively. See
17714 * `_.isEqual` for a list of supported value comparisons.
17715 *
17716 * @static
17717 * @memberOf _
17718 * @since 3.2.0
17719 * @category Util
17720 * @param {Array|string} path The path of the property to get.
17721 * @param {*} srcValue The value to match.
17722 * @returns {Function} Returns the new spec function.
17723 * @example
17724 *
17725 * var objects = [
17726 * { 'a': 1, 'b': 2, 'c': 3 },
17727 * { 'a': 4, 'b': 5, 'c': 6 }
17728 * ];
17729 *
17730 * _.find(objects, _.matchesProperty('a', 4));
17731 * // => { 'a': 4, 'b': 5, 'c': 6 }
17732 */
17733 function matchesProperty(path, srcValue) {
17734 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
17735 }
17736
17737 /**
17738 * Creates a function that invokes the method at `path` of a given object.
17739 * Any additional arguments are provided to the invoked method.
17740 *
17741 * @static
17742 * @memberOf _
17743 * @since 3.7.0
17744 * @category Util
17745 * @param {Array|string} path The path of the method to invoke.
17746 * @param {...*} [args] The arguments to invoke the method with.
17747 * @returns {Function} Returns the new invoker function.
17748 * @example
17749 *
17750 * var objects = [
17751 * { 'a': { 'b': _.constant(2) } },
17752 * { 'a': { 'b': _.constant(1) } }
17753 * ];
17754 *
17755 * _.map(objects, _.method('a.b'));
17756 * // => [2, 1]
17757 *
17758 * _.map(objects, _.method(['a', 'b']));
17759 * // => [2, 1]
17760 */
17761 var method = baseRest(function(path, args) {
17762 return function(object) {
17763 return baseInvoke(object, path, args);
17764 };
17765 });
17766
17767 /**
17768 * The opposite of `_.method`; this method creates a function that invokes
17769 * the method at a given path of `object`. Any additional arguments are
17770 * provided to the invoked method.
17771 *
17772 * @static
17773 * @memberOf _
17774 * @since 3.7.0
17775 * @category Util
17776 * @param {Object} object The object to query.
17777 * @param {...*} [args] The arguments to invoke the method with.
17778 * @returns {Function} Returns the new invoker function.
17779 * @example
17780 *
17781 * var array = _.times(3, _.constant),
17782 * object = { 'a': array, 'b': array, 'c': array };
17783 *
17784 * _.map(['a[2]', 'c[0]'], _.methodOf(object));
17785 * // => [2, 0]
17786 *
17787 * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
17788 * // => [2, 0]
17789 */
17790 var methodOf = baseRest(function(object, args) {
17791 return function(path) {
17792 return baseInvoke(object, path, args);
17793 };
17794 });
17795
17796 /**
17797 * Adds all own enumerable string keyed function properties of a source
17798 * object to the destination object. If `object` is a function, then methods
17799 * are added to its prototype as well.
17800 *
17801 * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
17802 * avoid conflicts caused by modifying the original.
17803 *
17804 * @static
17805 * @since 0.1.0
17806 * @memberOf _
17807 * @category Util
17808 * @param {Function|Object} [object=lodash] The destination object.
17809 * @param {Object} source The object of functions to add.
17810 * @param {Object} [options={}] The options object.
17811 * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
17812 * @returns {Function|Object} Returns `object`.
17813 * @example
17814 *
17815 * function vowels(string) {
17816 * return _.filter(string, function(v) {
17817 * return /[aeiou]/i.test(v);
17818 * });
17819 * }
17820 *
17821 * _.mixin({ 'vowels': vowels });
17822 * _.vowels('fred');
17823 * // => ['e']
17824 *
17825 * _('fred').vowels().value();
17826 * // => ['e']
17827 *
17828 * _.mixin({ 'vowels': vowels }, { 'chain': false });
17829 * _('fred').vowels();
17830 * // => ['e']
17831 */
17832 function mixin(object, source, options) {
17833 var props = keys(source),
17834 methodNames = baseFunctions(source, props);
17835
17836 if (options == null &&
17837 !(isObject(source) && (methodNames.length || !props.length))) {
17838 options = source;
17839 source = object;
17840 object = this;
17841 methodNames = baseFunctions(source, keys(source));
17842 }
17843 var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
17844 isFunc = isFunction(object);
17845
17846 arrayEach(methodNames, function(methodName) {
17847 var func = source[methodName];
17848 object[methodName] = func;
17849 if (isFunc) {
17850 object.prototype[methodName] = function() {
17851 var chainAll = this.__chain__;
17852 if (chain || chainAll) {
17853 var result = object(this.__wrapped__),
17854 actions = result.__actions__ = copyArray(this.__actions__);
17855
17856 actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
17857 result.__chain__ = chainAll;
17858 return result;
17859 }
17860 return func.apply(object, arrayPush([this.value()], arguments));
17861 };
17862 }
17863 });
17864
17865 return object;
17866 }
17867
17868 /**
17869 * Reverts the `_` variable to its previous value and returns a reference to
17870 * the `lodash` function.
17871 *
17872 * @static
17873 * @since 0.1.0
17874 * @memberOf _
17875 * @category Util
17876 * @returns {Function} Returns the `lodash` function.
17877 * @example
17878 *
17879 * var lodash = _.noConflict();
17880 */
17881 function noConflict() {
17882 if (root._ === this) {
17883 root._ = oldDash;
17884 }
17885 return this;
17886 }
17887
17888 /**
17889 * This method returns `undefined`.
17890 *
17891 * @static
17892 * @memberOf _
17893 * @since 2.3.0
17894 * @category Util
17895 * @example
17896 *
17897 * _.times(2, _.noop);
17898 * // => [undefined, undefined]
17899 */
17900 function noop() {
17901 // No operation performed.
17902 }
17903
17904 /**
17905 * Creates a function that gets the argument at index `n`. If `n` is negative,
17906 * the nth argument from the end is returned.
17907 *
17908 * @static
17909 * @memberOf _
17910 * @since 4.0.0
17911 * @category Util
17912 * @param {number} [n=0] The index of the argument to return.
17913 * @returns {Function} Returns the new pass-thru function.
17914 * @example
17915 *
17916 * var func = _.nthArg(1);
17917 * func('a', 'b', 'c', 'd');
17918 * // => 'b'
17919 *
17920 * var func = _.nthArg(-2);
17921 * func('a', 'b', 'c', 'd');
17922 * // => 'c'
17923 */
17924 function nthArg(n) {
17925 n = toInteger(n);
17926 return baseRest(function(args) {
17927 return baseNth(args, n);
17928 });
17929 }
17930
17931 /**
17932 * Creates a function that invokes `iteratees` with the arguments it receives
17933 * and returns their results.
17934 *
17935 * @static
17936 * @memberOf _
17937 * @since 4.0.0
17938 * @category Util
17939 * @param {...(Function|Function[])} [iteratees=[_.identity]]
17940 * The iteratees to invoke.
17941 * @returns {Function} Returns the new function.
17942 * @example
17943 *
17944 * var func = _.over([Math.max, Math.min]);
17945 *
17946 * func(1, 2, 3, 4);
17947 * // => [4, 1]
17948 */
17949 var over = createOver(arrayMap);
17950
17951 /**
17952 * Creates a function that checks if **all** of the `predicates` return
17953 * truthy when invoked with the arguments it receives.
17954 *
17955 * @static
17956 * @memberOf _
17957 * @since 4.0.0
17958 * @category Util
17959 * @param {...(Function|Function[])} [predicates=[_.identity]]
17960 * The predicates to check.
17961 * @returns {Function} Returns the new function.
17962 * @example
17963 *
17964 * var func = _.overEvery([Boolean, isFinite]);
17965 *
17966 * func('1');
17967 * // => true
17968 *
17969 * func(null);
17970 * // => false
17971 *
17972 * func(NaN);
17973 * // => false
17974 */
17975 var overEvery = createOver(arrayEvery);
17976
17977 /**
17978 * Creates a function that checks if **any** of the `predicates` return
17979 * truthy when invoked with the arguments it receives.
17980 *
17981 * @static
17982 * @memberOf _
17983 * @since 4.0.0
17984 * @category Util
17985 * @param {...(Function|Function[])} [predicates=[_.identity]]
17986 * The predicates to check.
17987 * @returns {Function} Returns the new function.
17988 * @example
17989 *
17990 * var func = _.overSome([Boolean, isFinite]);
17991 *
17992 * func('1');
17993 * // => true
17994 *
17995 * func(null);
17996 * // => true
17997 *
17998 * func(NaN);
17999 * // => false
18000 */
18001 var overSome = createOver(arraySome);
18002
18003 /**
18004 * Creates a function that returns the value at `path` of a given object.
18005 *
18006 * @static
18007 * @memberOf _
18008 * @since 2.4.0
18009 * @category Util
18010 * @param {Array|string} path The path of the property to get.
18011 * @returns {Function} Returns the new accessor function.
18012 * @example
18013 *
18014 * var objects = [
18015 * { 'a': { 'b': 2 } },
18016 * { 'a': { 'b': 1 } }
18017 * ];
18018 *
18019 * _.map(objects, _.property('a.b'));
18020 * // => [2, 1]
18021 *
18022 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
18023 * // => [1, 2]
18024 */
18025 function property(path) {
18026 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
18027 }
18028
18029 /**
18030 * The opposite of `_.property`; this method creates a function that returns
18031 * the value at a given path of `object`.
18032 *
18033 * @static
18034 * @memberOf _
18035 * @since 3.0.0
18036 * @category Util
18037 * @param {Object} object The object to query.
18038 * @returns {Function} Returns the new accessor function.
18039 * @example
18040 *
18041 * var array = [0, 1, 2],
18042 * object = { 'a': array, 'b': array, 'c': array };
18043 *
18044 * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
18045 * // => [2, 0]
18046 *
18047 * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
18048 * // => [2, 0]
18049 */
18050 function propertyOf(object) {
18051 return function(path) {
18052 return object == null ? undefined : baseGet(object, path);
18053 };
18054 }
18055
18056 /**
18057 * Creates an array of numbers (positive and/or negative) progressing from
18058 * `start` up to, but not including, `end`. A step of `-1` is used if a negative
18059 * `start` is specified without an `end` or `step`. If `end` is not specified,
18060 * it's set to `start` with `start` then set to `0`.
18061 *
18062 * **Note:** JavaScript follows the IEEE-754 standard for resolving
18063 * floating-point values which can produce unexpected results.
18064 *
18065 * @static
18066 * @since 0.1.0
18067 * @memberOf _
18068 * @category Util
18069 * @param {number} [start=0] The start of the range.
18070 * @param {number} end The end of the range.
18071 * @param {number} [step=1] The value to increment or decrement by.
18072 * @returns {Array} Returns the range of numbers.
18073 * @see _.inRange, _.rangeRight
18074 * @example
18075 *
18076 * _.range(4);
18077 * // => [0, 1, 2, 3]
18078 *
18079 * _.range(-4);
18080 * // => [0, -1, -2, -3]
18081 *
18082 * _.range(1, 5);
18083 * // => [1, 2, 3, 4]
18084 *
18085 * _.range(0, 20, 5);
18086 * // => [0, 5, 10, 15]
18087 *
18088 * _.range(0, -4, -1);
18089 * // => [0, -1, -2, -3]
18090 *
18091 * _.range(1, 4, 0);
18092 * // => [1, 1, 1]
18093 *
18094 * _.range(0);
18095 * // => []
18096 */
18097 var range = createRange();
18098
18099 /**
18100 * This method is like `_.range` except that it populates values in
18101 * descending order.
18102 *
18103 * @static
18104 * @memberOf _
18105 * @since 4.0.0
18106 * @category Util
18107 * @param {number} [start=0] The start of the range.
18108 * @param {number} end The end of the range.
18109 * @param {number} [step=1] The value to increment or decrement by.
18110 * @returns {Array} Returns the range of numbers.
18111 * @see _.inRange, _.range
18112 * @example
18113 *
18114 * _.rangeRight(4);
18115 * // => [3, 2, 1, 0]
18116 *
18117 * _.rangeRight(-4);
18118 * // => [-3, -2, -1, 0]
18119 *
18120 * _.rangeRight(1, 5);
18121 * // => [4, 3, 2, 1]
18122 *
18123 * _.rangeRight(0, 20, 5);
18124 * // => [15, 10, 5, 0]
18125 *
18126 * _.rangeRight(0, -4, -1);
18127 * // => [-3, -2, -1, 0]
18128 *
18129 * _.rangeRight(1, 4, 0);
18130 * // => [1, 1, 1]
18131 *
18132 * _.rangeRight(0);
18133 * // => []
18134 */
18135 var rangeRight = createRange(true);
18136
18137 /**
18138 * This method returns a new empty array.
18139 *
18140 * @static
18141 * @memberOf _
18142 * @since 4.13.0
18143 * @category Util
18144 * @returns {Array} Returns the new empty array.
18145 * @example
18146 *
18147 * var arrays = _.times(2, _.stubArray);
18148 *
18149 * console.log(arrays);
18150 * // => [[], []]
18151 *
18152 * console.log(arrays[0] === arrays[1]);
18153 * // => false
18154 */
18155 function stubArray() {
18156 return [];
18157 }
18158
18159 /**
18160 * This method returns `false`.
18161 *
18162 * @static
18163 * @memberOf _
18164 * @since 4.13.0
18165 * @category Util
18166 * @returns {boolean} Returns `false`.
18167 * @example
18168 *
18169 * _.times(2, _.stubFalse);
18170 * // => [false, false]
18171 */
18172 function stubFalse() {
18173 return false;
18174 }
18175
18176 /**
18177 * This method returns a new empty object.
18178 *
18179 * @static
18180 * @memberOf _
18181 * @since 4.13.0
18182 * @category Util
18183 * @returns {Object} Returns the new empty object.
18184 * @example
18185 *
18186 * var objects = _.times(2, _.stubObject);
18187 *
18188 * console.log(objects);
18189 * // => [{}, {}]
18190 *
18191 * console.log(objects[0] === objects[1]);
18192 * // => false
18193 */
18194 function stubObject() {
18195 return {};
18196 }
18197
18198 /**
18199 * This method returns an empty string.
18200 *
18201 * @static
18202 * @memberOf _
18203 * @since 4.13.0
18204 * @category Util
18205 * @returns {string} Returns the empty string.
18206 * @example
18207 *
18208 * _.times(2, _.stubString);
18209 * // => ['', '']
18210 */
18211 function stubString() {
18212 return '';
18213 }
18214
18215 /**
18216 * This method returns `true`.
18217 *
18218 * @static
18219 * @memberOf _
18220 * @since 4.13.0
18221 * @category Util
18222 * @returns {boolean} Returns `true`.
18223 * @example
18224 *
18225 * _.times(2, _.stubTrue);
18226 * // => [true, true]
18227 */
18228 function stubTrue() {
18229 return true;
18230 }
18231
18232 /**
18233 * Invokes the iteratee `n` times, returning an array of the results of
18234 * each invocation. The iteratee is invoked with one argument; (index).
18235 *
18236 * @static
18237 * @since 0.1.0
18238 * @memberOf _
18239 * @category Util
18240 * @param {number} n The number of times to invoke `iteratee`.
18241 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
18242 * @returns {Array} Returns the array of results.
18243 * @example
18244 *
18245 * _.times(3, String);
18246 * // => ['0', '1', '2']
18247 *
18248 * _.times(4, _.constant(0));
18249 * // => [0, 0, 0, 0]
18250 */
18251 function times(n, iteratee) {
18252 n = toInteger(n);
18253 if (n < 1 || n > MAX_SAFE_INTEGER) {
18254 return [];
18255 }
18256 var index = MAX_ARRAY_LENGTH,
18257 length = nativeMin(n, MAX_ARRAY_LENGTH);
18258
18259 iteratee = getIteratee(iteratee);
18260 n -= MAX_ARRAY_LENGTH;
18261
18262 var result = baseTimes(length, iteratee);
18263 while (++index < n) {
18264 iteratee(index);
18265 }
18266 return result;
18267 }
18268
18269 /**
18270 * Converts `value` to a property path array.
18271 *
18272 * @static
18273 * @memberOf _
18274 * @since 4.0.0
18275 * @category Util
18276 * @param {*} value The value to convert.
18277 * @returns {Array} Returns the new property path array.
18278 * @example
18279 *
18280 * _.toPath('a.b.c');
18281 * // => ['a', 'b', 'c']
18282 *
18283 * _.toPath('a[0].b.c');
18284 * // => ['a', '0', 'b', 'c']
18285 */
18286 function toPath(value) {
18287 if (isArray(value)) {
18288 return arrayMap(value, toKey);
18289 }
18290 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
18291 }
18292
18293 /**
18294 * Generates a unique ID. If `prefix` is given, the ID is appended to it.
18295 *
18296 * @static
18297 * @since 0.1.0
18298 * @memberOf _
18299 * @category Util
18300 * @param {string} [prefix=''] The value to prefix the ID with.
18301 * @returns {string} Returns the unique ID.
18302 * @example
18303 *
18304 * _.uniqueId('contact_');
18305 * // => 'contact_104'
18306 *
18307 * _.uniqueId();
18308 * // => '105'
18309 */
18310 function uniqueId(prefix) {
18311 var id = ++idCounter;
18312 return toString(prefix) + id;
18313 }
18314
18315 /*------------------------------------------------------------------------*/
18316
18317 /**
18318 * Adds two numbers.
18319 *
18320 * @static
18321 * @memberOf _
18322 * @since 3.4.0
18323 * @category Math
18324 * @param {number} augend The first number in an addition.
18325 * @param {number} addend The second number in an addition.
18326 * @returns {number} Returns the total.
18327 * @example
18328 *
18329 * _.add(6, 4);
18330 * // => 10
18331 */
18332 var add = createMathOperation(function(augend, addend) {
18333 return augend + addend;
18334 }, 0);
18335
18336 /**
18337 * Computes `number` rounded up to `precision`.
18338 *
18339 * @static
18340 * @memberOf _
18341 * @since 3.10.0
18342 * @category Math
18343 * @param {number} number The number to round up.
18344 * @param {number} [precision=0] The precision to round up to.
18345 * @returns {number} Returns the rounded up number.
18346 * @example
18347 *
18348 * _.ceil(4.006);
18349 * // => 5
18350 *
18351 * _.ceil(6.004, 2);
18352 * // => 6.01
18353 *
18354 * _.ceil(6040, -2);
18355 * // => 6100
18356 */
18357 var ceil = createRound('ceil');
18358
18359 /**
18360 * Divide two numbers.
18361 *
18362 * @static
18363 * @memberOf _
18364 * @since 4.7.0
18365 * @category Math
18366 * @param {number} dividend The first number in a division.
18367 * @param {number} divisor The second number in a division.
18368 * @returns {number} Returns the quotient.
18369 * @example
18370 *
18371 * _.divide(6, 4);
18372 * // => 1.5
18373 */
18374 var divide = createMathOperation(function(dividend, divisor) {
18375 return dividend / divisor;
18376 }, 1);
18377
18378 /**
18379 * Computes `number` rounded down to `precision`.
18380 *
18381 * @static
18382 * @memberOf _
18383 * @since 3.10.0
18384 * @category Math
18385 * @param {number} number The number to round down.
18386 * @param {number} [precision=0] The precision to round down to.
18387 * @returns {number} Returns the rounded down number.
18388 * @example
18389 *
18390 * _.floor(4.006);
18391 * // => 4
18392 *
18393 * _.floor(0.046, 2);
18394 * // => 0.04
18395 *
18396 * _.floor(4060, -2);
18397 * // => 4000
18398 */
18399 var floor = createRound('floor');
18400
18401 /**
18402 * Computes the maximum value of `array`. If `array` is empty or falsey,
18403 * `undefined` is returned.
18404 *
18405 * @static
18406 * @since 0.1.0
18407 * @memberOf _
18408 * @category Math
18409 * @param {Array} array The array to iterate over.
18410 * @returns {*} Returns the maximum value.
18411 * @example
18412 *
18413 * _.max([4, 2, 8, 6]);
18414 * // => 8
18415 *
18416 * _.max([]);
18417 * // => undefined
18418 */
18419 function max(array) {
18420 return (array && array.length)
18421 ? baseExtremum(array, identity, baseGt)
18422 : undefined;
18423 }
18424
18425 /**
18426 * This method is like `_.max` except that it accepts `iteratee` which is
18427 * invoked for each element in `array` to generate the criterion by which
18428 * the value is ranked. The iteratee is invoked with one argument: (value).
18429 *
18430 * @static
18431 * @memberOf _
18432 * @since 4.0.0
18433 * @category Math
18434 * @param {Array} array The array to iterate over.
18435 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
18436 * @returns {*} Returns the maximum value.
18437 * @example
18438 *
18439 * var objects = [{ 'n': 1 }, { 'n': 2 }];
18440 *
18441 * _.maxBy(objects, function(o) { return o.n; });
18442 * // => { 'n': 2 }
18443 *
18444 * // The `_.property` iteratee shorthand.
18445 * _.maxBy(objects, 'n');
18446 * // => { 'n': 2 }
18447 */
18448 function maxBy(array, iteratee) {
18449 return (array && array.length)
18450 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
18451 : undefined;
18452 }
18453
18454 /**
18455 * Computes the mean of the values in `array`.
18456 *
18457 * @static
18458 * @memberOf _
18459 * @since 4.0.0
18460 * @category Math
18461 * @param {Array} array The array to iterate over.
18462 * @returns {number} Returns the mean.
18463 * @example
18464 *
18465 * _.mean([4, 2, 8, 6]);
18466 * // => 5
18467 */
18468 function mean(array) {
18469 return baseMean(array, identity);
18470 }
18471
18472 /**
18473 * This method is like `_.mean` except that it accepts `iteratee` which is
18474 * invoked for each element in `array` to generate the value to be averaged.
18475 * The iteratee is invoked with one argument: (value).
18476 *
18477 * @static
18478 * @memberOf _
18479 * @since 4.7.0
18480 * @category Math
18481 * @param {Array} array The array to iterate over.
18482 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
18483 * @returns {number} Returns the mean.
18484 * @example
18485 *
18486 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
18487 *
18488 * _.meanBy(objects, function(o) { return o.n; });
18489 * // => 5
18490 *
18491 * // The `_.property` iteratee shorthand.
18492 * _.meanBy(objects, 'n');
18493 * // => 5
18494 */
18495 function meanBy(array, iteratee) {
18496 return baseMean(array, getIteratee(iteratee, 2));
18497 }
18498
18499 /**
18500 * Computes the minimum value of `array`. If `array` is empty or falsey,
18501 * `undefined` is returned.
18502 *
18503 * @static
18504 * @since 0.1.0
18505 * @memberOf _
18506 * @category Math
18507 * @param {Array} array The array to iterate over.
18508 * @returns {*} Returns the minimum value.
18509 * @example
18510 *
18511 * _.min([4, 2, 8, 6]);
18512 * // => 2
18513 *
18514 * _.min([]);
18515 * // => undefined
18516 */
18517 function min(array) {
18518 return (array && array.length)
18519 ? baseExtremum(array, identity, baseLt)
18520 : undefined;
18521 }
18522
18523 /**
18524 * This method is like `_.min` except that it accepts `iteratee` which is
18525 * invoked for each element in `array` to generate the criterion by which
18526 * the value is ranked. The iteratee is invoked with one argument: (value).
18527 *
18528 * @static
18529 * @memberOf _
18530 * @since 4.0.0
18531 * @category Math
18532 * @param {Array} array The array to iterate over.
18533 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
18534 * @returns {*} Returns the minimum value.
18535 * @example
18536 *
18537 * var objects = [{ 'n': 1 }, { 'n': 2 }];
18538 *
18539 * _.minBy(objects, function(o) { return o.n; });
18540 * // => { 'n': 1 }
18541 *
18542 * // The `_.property` iteratee shorthand.
18543 * _.minBy(objects, 'n');
18544 * // => { 'n': 1 }
18545 */
18546 function minBy(array, iteratee) {
18547 return (array && array.length)
18548 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
18549 : undefined;
18550 }
18551
18552 /**
18553 * Multiply two numbers.
18554 *
18555 * @static
18556 * @memberOf _
18557 * @since 4.7.0
18558 * @category Math
18559 * @param {number} multiplier The first number in a multiplication.
18560 * @param {number} multiplicand The second number in a multiplication.
18561 * @returns {number} Returns the product.
18562 * @example
18563 *
18564 * _.multiply(6, 4);
18565 * // => 24
18566 */
18567 var multiply = createMathOperation(function(multiplier, multiplicand) {
18568 return multiplier * multiplicand;
18569 }, 1);
18570
18571 /**
18572 * Computes `number` rounded to `precision`.
18573 *
18574 * @static
18575 * @memberOf _
18576 * @since 3.10.0
18577 * @category Math
18578 * @param {number} number The number to round.
18579 * @param {number} [precision=0] The precision to round to.
18580 * @returns {number} Returns the rounded number.
18581 * @example
18582 *
18583 * _.round(4.006);
18584 * // => 4
18585 *
18586 * _.round(4.006, 2);
18587 * // => 4.01
18588 *
18589 * _.round(4060, -2);
18590 * // => 4100
18591 */
18592 var round = createRound('round');
18593
18594 /**
18595 * Subtract two numbers.
18596 *
18597 * @static
18598 * @memberOf _
18599 * @since 4.0.0
18600 * @category Math
18601 * @param {number} minuend The first number in a subtraction.
18602 * @param {number} subtrahend The second number in a subtraction.
18603 * @returns {number} Returns the difference.
18604 * @example
18605 *
18606 * _.subtract(6, 4);
18607 * // => 2
18608 */
18609 var subtract = createMathOperation(function(minuend, subtrahend) {
18610 return minuend - subtrahend;
18611 }, 0);
18612
18613 /**
18614 * Computes the sum of the values in `array`.
18615 *
18616 * @static
18617 * @memberOf _
18618 * @since 3.4.0
18619 * @category Math
18620 * @param {Array} array The array to iterate over.
18621 * @returns {number} Returns the sum.
18622 * @example
18623 *
18624 * _.sum([4, 2, 8, 6]);
18625 * // => 20
18626 */
18627 function sum(array) {
18628 return (array && array.length)
18629 ? baseSum(array, identity)
18630 : 0;
18631 }
18632
18633 /**
18634 * This method is like `_.sum` except that it accepts `iteratee` which is
18635 * invoked for each element in `array` to generate the value to be summed.
18636 * The iteratee is invoked with one argument: (value).
18637 *
18638 * @static
18639 * @memberOf _
18640 * @since 4.0.0
18641 * @category Math
18642 * @param {Array} array The array to iterate over.
18643 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
18644 * @returns {number} Returns the sum.
18645 * @example
18646 *
18647 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
18648 *
18649 * _.sumBy(objects, function(o) { return o.n; });
18650 * // => 20
18651 *
18652 * // The `_.property` iteratee shorthand.
18653 * _.sumBy(objects, 'n');
18654 * // => 20
18655 */
18656 function sumBy(array, iteratee) {
18657 return (array && array.length)
18658 ? baseSum(array, getIteratee(iteratee, 2))
18659 : 0;
18660 }
18661
18662 /*------------------------------------------------------------------------*/
18663
18664 // Add methods that return wrapped values in chain sequences.
18665 lodash.after = after;
18666 lodash.ary = ary;
18667 lodash.assign = assign;
18668 lodash.assignIn = assignIn;
18669 lodash.assignInWith = assignInWith;
18670 lodash.assignWith = assignWith;
18671 lodash.at = at;
18672 lodash.before = before;
18673 lodash.bind = bind;
18674 lodash.bindAll = bindAll;
18675 lodash.bindKey = bindKey;
18676 lodash.castArray = castArray;
18677 lodash.chain = chain;
18678 lodash.chunk = chunk;
18679 lodash.compact = compact;
18680 lodash.concat = concat;
18681 lodash.cond = cond;
18682 lodash.conforms = conforms;
18683 lodash.constant = constant;
18684 lodash.countBy = countBy;
18685 lodash.create = create;
18686 lodash.curry = curry;
18687 lodash.curryRight = curryRight;
18688 lodash.debounce = debounce;
18689 lodash.defaults = defaults;
18690 lodash.defaultsDeep = defaultsDeep;
18691 lodash.defer = defer;
18692 lodash.delay = delay;
18693 lodash.difference = difference;
18694 lodash.differenceBy = differenceBy;
18695 lodash.differenceWith = differenceWith;
18696 lodash.drop = drop;
18697 lodash.dropRight = dropRight;
18698 lodash.dropRightWhile = dropRightWhile;
18699 lodash.dropWhile = dropWhile;
18700 lodash.fill = fill;
18701 lodash.filter = filter;
18702 lodash.flatMap = flatMap;
18703 lodash.flatMapDeep = flatMapDeep;
18704 lodash.flatMapDepth = flatMapDepth;
18705 lodash.flatten = flatten;
18706 lodash.flattenDeep = flattenDeep;
18707 lodash.flattenDepth = flattenDepth;
18708 lodash.flip = flip;
18709 lodash.flow = flow;
18710 lodash.flowRight = flowRight;
18711 lodash.fromPairs = fromPairs;
18712 lodash.functions = functions;
18713 lodash.functionsIn = functionsIn;
18714 lodash.groupBy = groupBy;
18715 lodash.initial = initial;
18716 lodash.intersection = intersection;
18717 lodash.intersectionBy = intersectionBy;
18718 lodash.intersectionWith = intersectionWith;
18719 lodash.invert = invert;
18720 lodash.invertBy = invertBy;
18721 lodash.invokeMap = invokeMap;
18722 lodash.iteratee = iteratee;
18723 lodash.keyBy = keyBy;
18724 lodash.keys = keys;
18725 lodash.keysIn = keysIn;
18726 lodash.map = map;
18727 lodash.mapKeys = mapKeys;
18728 lodash.mapValues = mapValues;
18729 lodash.matches = matches;
18730 lodash.matchesProperty = matchesProperty;
18731 lodash.memoize = memoize;
18732 lodash.merge = merge;
18733 lodash.mergeWith = mergeWith;
18734 lodash.method = method;
18735 lodash.methodOf = methodOf;
18736 lodash.mixin = mixin;
18737 lodash.negate = negate;
18738 lodash.nthArg = nthArg;
18739 lodash.omit = omit;
18740 lodash.omitBy = omitBy;
18741 lodash.once = once;
18742 lodash.orderBy = orderBy;
18743 lodash.over = over;
18744 lodash.overArgs = overArgs;
18745 lodash.overEvery = overEvery;
18746 lodash.overSome = overSome;
18747 lodash.partial = partial;
18748 lodash.partialRight = partialRight;
18749 lodash.partition = partition;
18750 lodash.pick = pick;
18751 lodash.pickBy = pickBy;
18752 lodash.property = property;
18753 lodash.propertyOf = propertyOf;
18754 lodash.pull = pull;
18755 lodash.pullAll = pullAll;
18756 lodash.pullAllBy = pullAllBy;
18757 lodash.pullAllWith = pullAllWith;
18758 lodash.pullAt = pullAt;
18759 lodash.range = range;
18760 lodash.rangeRight = rangeRight;
18761 lodash.rearg = rearg;
18762 lodash.reject = reject;
18763 lodash.remove = remove;
18764 lodash.rest = rest;
18765 lodash.reverse = reverse;
18766 lodash.sampleSize = sampleSize;
18767 lodash.set = set;
18768 lodash.setWith = setWith;
18769 lodash.shuffle = shuffle;
18770 lodash.slice = slice;
18771 lodash.sortBy = sortBy;
18772 lodash.sortedUniq = sortedUniq;
18773 lodash.sortedUniqBy = sortedUniqBy;
18774 lodash.split = split;
18775 lodash.spread = spread;
18776 lodash.tail = tail;
18777 lodash.take = take;
18778 lodash.takeRight = takeRight;
18779 lodash.takeRightWhile = takeRightWhile;
18780 lodash.takeWhile = takeWhile;
18781 lodash.tap = tap;
18782 lodash.throttle = throttle;
18783 lodash.thru = thru;
18784 lodash.toArray = toArray;
18785 lodash.toPairs = toPairs;
18786 lodash.toPairsIn = toPairsIn;
18787 lodash.toPath = toPath;
18788 lodash.toPlainObject = toPlainObject;
18789 lodash.transform = transform;
18790 lodash.unary = unary;
18791 lodash.union = union;
18792 lodash.unionBy = unionBy;
18793 lodash.unionWith = unionWith;
18794 lodash.uniq = uniq;
18795 lodash.uniqBy = uniqBy;
18796 lodash.uniqWith = uniqWith;
18797 lodash.unset = unset;
18798 lodash.unzip = unzip;
18799 lodash.unzipWith = unzipWith;
18800 lodash.update = update;
18801 lodash.updateWith = updateWith;
18802 lodash.values = values;
18803 lodash.valuesIn = valuesIn;
18804 lodash.without = without;
18805 lodash.words = words;
18806 lodash.wrap = wrap;
18807 lodash.xor = xor;
18808 lodash.xorBy = xorBy;
18809 lodash.xorWith = xorWith;
18810 lodash.zip = zip;
18811 lodash.zipObject = zipObject;
18812 lodash.zipObjectDeep = zipObjectDeep;
18813 lodash.zipWith = zipWith;
18814
18815 // Add aliases.
18816 lodash.entries = toPairs;
18817 lodash.entriesIn = toPairsIn;
18818 lodash.extend = assignIn;
18819 lodash.extendWith = assignInWith;
18820
18821 // Add methods to `lodash.prototype`.
18822 mixin(lodash, lodash);
18823
18824 /*------------------------------------------------------------------------*/
18825
18826 // Add methods that return unwrapped values in chain sequences.
18827 lodash.add = add;
18828 lodash.attempt = attempt;
18829 lodash.camelCase = camelCase;
18830 lodash.capitalize = capitalize;
18831 lodash.ceil = ceil;
18832 lodash.clamp = clamp;
18833 lodash.clone = clone;
18834 lodash.cloneDeep = cloneDeep;
18835 lodash.cloneDeepWith = cloneDeepWith;
18836 lodash.cloneWith = cloneWith;
18837 lodash.conformsTo = conformsTo;
18838 lodash.deburr = deburr;
18839 lodash.defaultTo = defaultTo;
18840 lodash.divide = divide;
18841 lodash.endsWith = endsWith;
18842 lodash.eq = eq;
18843 lodash.escape = escape;
18844 lodash.escapeRegExp = escapeRegExp;
18845 lodash.every = every;
18846 lodash.find = find;
18847 lodash.findIndex = findIndex;
18848 lodash.findKey = findKey;
18849 lodash.findLast = findLast;
18850 lodash.findLastIndex = findLastIndex;
18851 lodash.findLastKey = findLastKey;
18852 lodash.floor = floor;
18853 lodash.forEach = forEach;
18854 lodash.forEachRight = forEachRight;
18855 lodash.forIn = forIn;
18856 lodash.forInRight = forInRight;
18857 lodash.forOwn = forOwn;
18858 lodash.forOwnRight = forOwnRight;
18859 lodash.get = get;
18860 lodash.gt = gt;
18861 lodash.gte = gte;
18862 lodash.has = has;
18863 lodash.hasIn = hasIn;
18864 lodash.head = head;
18865 lodash.identity = identity;
18866 lodash.includes = includes;
18867 lodash.indexOf = indexOf;
18868 lodash.inRange = inRange;
18869 lodash.invoke = invoke;
18870 lodash.isArguments = isArguments;
18871 lodash.isArray = isArray;
18872 lodash.isArrayBuffer = isArrayBuffer;
18873 lodash.isArrayLike = isArrayLike;
18874 lodash.isArrayLikeObject = isArrayLikeObject;
18875 lodash.isBoolean = isBoolean;
18876 lodash.isBuffer = isBuffer;
18877 lodash.isDate = isDate;
18878 lodash.isElement = isElement;
18879 lodash.isEmpty = isEmpty;
18880 lodash.isEqual = isEqual;
18881 lodash.isEqualWith = isEqualWith;
18882 lodash.isError = isError;
18883 lodash.isFinite = isFinite;
18884 lodash.isFunction = isFunction;
18885 lodash.isInteger = isInteger;
18886 lodash.isLength = isLength;
18887 lodash.isMap = isMap;
18888 lodash.isMatch = isMatch;
18889 lodash.isMatchWith = isMatchWith;
18890 lodash.isNaN = isNaN;
18891 lodash.isNative = isNative;
18892 lodash.isNil = isNil;
18893 lodash.isNull = isNull;
18894 lodash.isNumber = isNumber;
18895 lodash.isObject = isObject;
18896 lodash.isObjectLike = isObjectLike;
18897 lodash.isPlainObject = isPlainObject;
18898 lodash.isRegExp = isRegExp;
18899 lodash.isSafeInteger = isSafeInteger;
18900 lodash.isSet = isSet;
18901 lodash.isString = isString;
18902 lodash.isSymbol = isSymbol;
18903 lodash.isTypedArray = isTypedArray;
18904 lodash.isUndefined = isUndefined;
18905 lodash.isWeakMap = isWeakMap;
18906 lodash.isWeakSet = isWeakSet;
18907 lodash.join = join;
18908 lodash.kebabCase = kebabCase;
18909 lodash.last = last;
18910 lodash.lastIndexOf = lastIndexOf;
18911 lodash.lowerCase = lowerCase;
18912 lodash.lowerFirst = lowerFirst;
18913 lodash.lt = lt;
18914 lodash.lte = lte;
18915 lodash.max = max;
18916 lodash.maxBy = maxBy;
18917 lodash.mean = mean;
18918 lodash.meanBy = meanBy;
18919 lodash.min = min;
18920 lodash.minBy = minBy;
18921 lodash.stubArray = stubArray;
18922 lodash.stubFalse = stubFalse;
18923 lodash.stubObject = stubObject;
18924 lodash.stubString = stubString;
18925 lodash.stubTrue = stubTrue;
18926 lodash.multiply = multiply;
18927 lodash.nth = nth;
18928 lodash.noConflict = noConflict;
18929 lodash.noop = noop;
18930 lodash.now = now;
18931 lodash.pad = pad;
18932 lodash.padEnd = padEnd;
18933 lodash.padStart = padStart;
18934 lodash.parseInt = parseInt;
18935 lodash.random = random;
18936 lodash.reduce = reduce;
18937 lodash.reduceRight = reduceRight;
18938 lodash.repeat = repeat;
18939 lodash.replace = replace;
18940 lodash.result = result;
18941 lodash.round = round;
18942 lodash.runInContext = runInContext;
18943 lodash.sample = sample;
18944 lodash.size = size;
18945 lodash.snakeCase = snakeCase;
18946 lodash.some = some;
18947 lodash.sortedIndex = sortedIndex;
18948 lodash.sortedIndexBy = sortedIndexBy;
18949 lodash.sortedIndexOf = sortedIndexOf;
18950 lodash.sortedLastIndex = sortedLastIndex;
18951 lodash.sortedLastIndexBy = sortedLastIndexBy;
18952 lodash.sortedLastIndexOf = sortedLastIndexOf;
18953 lodash.startCase = startCase;
18954 lodash.startsWith = startsWith;
18955 lodash.subtract = subtract;
18956 lodash.sum = sum;
18957 lodash.sumBy = sumBy;
18958 lodash.template = template;
18959 lodash.times = times;
18960 lodash.toFinite = toFinite;
18961 lodash.toInteger = toInteger;
18962 lodash.toLength = toLength;
18963 lodash.toLower = toLower;
18964 lodash.toNumber = toNumber;
18965 lodash.toSafeInteger = toSafeInteger;
18966 lodash.toString = toString;
18967 lodash.toUpper = toUpper;
18968 lodash.trim = trim;
18969 lodash.trimEnd = trimEnd;
18970 lodash.trimStart = trimStart;
18971 lodash.truncate = truncate;
18972 lodash.unescape = unescape;
18973 lodash.uniqueId = uniqueId;
18974 lodash.upperCase = upperCase;
18975 lodash.upperFirst = upperFirst;
18976
18977 // Add aliases.
18978 lodash.each = forEach;
18979 lodash.eachRight = forEachRight;
18980 lodash.first = head;
18981
18982 mixin(lodash, (function() {
18983 var source = {};
18984 baseForOwn(lodash, function(func, methodName) {
18985 if (!hasOwnProperty.call(lodash.prototype, methodName)) {
18986 source[methodName] = func;
18987 }
18988 });
18989 return source;
18990 }()), { 'chain': false });
18991
18992 /*------------------------------------------------------------------------*/
18993
18994 /**
18995 * The semantic version number.
18996 *
18997 * @static
18998 * @memberOf _
18999 * @type {string}
19000 */
19001 lodash.VERSION = VERSION;
19002
19003 // Assign default placeholders.
19004 arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
19005 lodash[methodName].placeholder = lodash;
19006 });
19007
19008 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
19009 arrayEach(['drop', 'take'], function(methodName, index) {
19010 LazyWrapper.prototype[methodName] = function(n) {
19011 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
19012
19013 var result = (this.__filtered__ && !index)
19014 ? new LazyWrapper(this)
19015 : this.clone();
19016
19017 if (result.__filtered__) {
19018 result.__takeCount__ = nativeMin(n, result.__takeCount__);
19019 } else {
19020 result.__views__.push({
19021 'size': nativeMin(n, MAX_ARRAY_LENGTH),
19022 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
19023 });
19024 }
19025 return result;
19026 };
19027
19028 LazyWrapper.prototype[methodName + 'Right'] = function(n) {
19029 return this.reverse()[methodName](n).reverse();
19030 };
19031 });
19032
19033 // Add `LazyWrapper` methods that accept an `iteratee` value.
19034 arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
19035 var type = index + 1,
19036 isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
19037
19038 LazyWrapper.prototype[methodName] = function(iteratee) {
19039 var result = this.clone();
19040 result.__iteratees__.push({
19041 'iteratee': getIteratee(iteratee, 3),
19042 'type': type
19043 });
19044 result.__filtered__ = result.__filtered__ || isFilter;
19045 return result;
19046 };
19047 });
19048
19049 // Add `LazyWrapper` methods for `_.head` and `_.last`.
19050 arrayEach(['head', 'last'], function(methodName, index) {
19051 var takeName = 'take' + (index ? 'Right' : '');
19052
19053 LazyWrapper.prototype[methodName] = function() {
19054 return this[takeName](1).value()[0];
19055 };
19056 });
19057
19058 // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
19059 arrayEach(['initial', 'tail'], function(methodName, index) {
19060 var dropName = 'drop' + (index ? '' : 'Right');
19061
19062 LazyWrapper.prototype[methodName] = function() {
19063 return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
19064 };
19065 });
19066
19067 LazyWrapper.prototype.compact = function() {
19068 return this.filter(identity);
19069 };
19070
19071 LazyWrapper.prototype.find = function(predicate) {
19072 return this.filter(predicate).head();
19073 };
19074
19075 LazyWrapper.prototype.findLast = function(predicate) {
19076 return this.reverse().find(predicate);
19077 };
19078
19079 LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
19080 if (typeof path == 'function') {
19081 return new LazyWrapper(this);
19082 }
19083 return this.map(function(value) {
19084 return baseInvoke(value, path, args);
19085 });
19086 });
19087
19088 LazyWrapper.prototype.reject = function(predicate) {
19089 return this.filter(negate(getIteratee(predicate)));
19090 };
19091
19092 LazyWrapper.prototype.slice = function(start, end) {
19093 start = toInteger(start);
19094
19095 var result = this;
19096 if (result.__filtered__ && (start > 0 || end < 0)) {
19097 return new LazyWrapper(result);
19098 }
19099 if (start < 0) {
19100 result = result.takeRight(-start);
19101 } else if (start) {
19102 result = result.drop(start);
19103 }
19104 if (end !== undefined) {
19105 end = toInteger(end);
19106 result = end < 0 ? result.dropRight(-end) : result.take(end - start);
19107 }
19108 return result;
19109 };
19110
19111 LazyWrapper.prototype.takeRightWhile = function(predicate) {
19112 return this.reverse().takeWhile(predicate).reverse();
19113 };
19114
19115 LazyWrapper.prototype.toArray = function() {
19116 return this.take(MAX_ARRAY_LENGTH);
19117 };
19118
19119 // Add `LazyWrapper` methods to `lodash.prototype`.
19120 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
19121 var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
19122 isTaker = /^(?:head|last)$/.test(methodName),
19123 lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
19124 retUnwrapped = isTaker || /^find/.test(methodName);
19125
19126 if (!lodashFunc) {
19127 return;
19128 }
19129 lodash.prototype[methodName] = function() {
19130 var value = this.__wrapped__,
19131 args = isTaker ? [1] : arguments,
19132 isLazy = value instanceof LazyWrapper,
19133 iteratee = args[0],
19134 useLazy = isLazy || isArray(value);
19135
19136 var interceptor = function(value) {
19137 var result = lodashFunc.apply(lodash, arrayPush([value], args));
19138 return (isTaker && chainAll) ? result[0] : result;
19139 };
19140
19141 if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
19142 // Avoid lazy use if the iteratee has a "length" value other than `1`.
19143 isLazy = useLazy = false;
19144 }
19145 var chainAll = this.__chain__,
19146 isHybrid = !!this.__actions__.length,
19147 isUnwrapped = retUnwrapped && !chainAll,
19148 onlyLazy = isLazy && !isHybrid;
19149
19150 if (!retUnwrapped && useLazy) {
19151 value = onlyLazy ? value : new LazyWrapper(this);
19152 var result = func.apply(value, args);
19153 result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
19154 return new LodashWrapper(result, chainAll);
19155 }
19156 if (isUnwrapped && onlyLazy) {
19157 return func.apply(this, args);
19158 }
19159 result = this.thru(interceptor);
19160 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
19161 };
19162 });
19163
19164 // Add `Array` methods to `lodash.prototype`.
19165 arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
19166 var func = arrayProto[methodName],
19167 chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
19168 retUnwrapped = /^(?:pop|shift)$/.test(methodName);
19169
19170 lodash.prototype[methodName] = function() {
19171 var args = arguments;
19172 if (retUnwrapped && !this.__chain__) {
19173 var value = this.value();
19174 return func.apply(isArray(value) ? value : [], args);
19175 }
19176 return this[chainName](function(value) {
19177 return func.apply(isArray(value) ? value : [], args);
19178 });
19179 };
19180 });
19181
19182 // Map minified method names to their real names.
19183 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
19184 var lodashFunc = lodash[methodName];
19185 if (lodashFunc) {
19186 var key = (lodashFunc.name + ''),
19187 names = realNames[key] || (realNames[key] = []);
19188
19189 names.push({ 'name': methodName, 'func': lodashFunc });
19190 }
19191 });
19192
19193 realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
19194 'name': 'wrapper',
19195 'func': undefined
19196 }];
19197
19198 // Add methods to `LazyWrapper`.
19199 LazyWrapper.prototype.clone = lazyClone;
19200 LazyWrapper.prototype.reverse = lazyReverse;
19201 LazyWrapper.prototype.value = lazyValue;
19202
19203 // Add chain sequence methods to the `lodash` wrapper.
19204 lodash.prototype.at = wrapperAt;
19205 lodash.prototype.chain = wrapperChain;
19206 lodash.prototype.commit = wrapperCommit;
19207 lodash.prototype.next = wrapperNext;
19208 lodash.prototype.plant = wrapperPlant;
19209 lodash.prototype.reverse = wrapperReverse;
19210 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
19211
19212 // Add lazy aliases.
19213 lodash.prototype.first = lodash.prototype.head;
19214
19215 if (symIterator) {
19216 lodash.prototype[symIterator] = wrapperToIterator;
19217 }
19218 return lodash;
19219 });
19220
19221 /*--------------------------------------------------------------------------*/
19222
19223 // Export lodash.
19224 var _ = runInContext();
19225
19226 // Some AMD build optimizers, like r.js, check for condition patterns like:
19227 if (true) {
19228 // Expose Lodash on the global object to prevent errors when Lodash is
19229 // loaded by a script tag in the presence of an AMD loader.
19230 // See http://requirejs.org/docs/errors.html#mismatch for more details.
19231 // Use `_.noConflict` to remove Lodash from the global object.
19232 root._ = _;
19233
19234 // Define as an anonymous module so, through path mapping, it can be
19235 // referenced as the "underscore" module.
19236 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
19237 return _;
19238 }).call(exports, __webpack_require__, exports, module),
19239 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
19240 }
19241 // Check for `exports` after `define` in case a build optimizer adds it.
19242 else {}
19243}.call(this));
19244
19245/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"), __webpack_require__("62e4")(module)))
19246
19247/***/ }),
19248
19249/***/ "452a":
19250/***/ (function(module, __webpack_exports__, __webpack_require__) {
19251
19252"use strict";
19253/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WidgetView_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("67f0");
19254/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WidgetView_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WidgetView_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
19255/* unused harmony reexport * */
19256 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WidgetView_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
19257
19258/***/ }),
19259
19260/***/ "4d89":
19261/***/ (function(module, exports) {
19262
19263module.exports = (function () {
19264 'use strict';
19265
19266 /**
19267 * Sort an array using the merge sort algorithm.
19268 *
19269 * @param {function} comparatorFn The comparator function.
19270 * @param {array} arr The array to sort.
19271 * @returns {array} The sorted array.
19272 */
19273 function mergeSort(comparatorFn, arr) {
19274 var len = arr.length, firstHalf, secondHalf;
19275 if (len >= 2) {
19276 firstHalf = arr.slice(0, len / 2);
19277 secondHalf = arr.slice(len / 2, len);
19278 return merge(comparatorFn, mergeSort(comparatorFn, firstHalf), mergeSort(comparatorFn, secondHalf));
19279 } else {
19280 return arr.slice();
19281 }
19282 }
19283
19284 /**
19285 * The merge part of the merge sort algorithm.
19286 *
19287 * @param {function} comparatorFn The comparator function.
19288 * @param {array} arr1 The first sorted array.
19289 * @param {array} arr2 The second sorted array.
19290 * @returns {array} The merged and sorted array.
19291 */
19292 function merge(comparatorFn, arr1, arr2) {
19293 var result = [], left1 = arr1.length, left2 = arr2.length;
19294 while (left1 > 0 && left2 > 0) {
19295 if (comparatorFn(arr1[0], arr2[0]) <= 0) {
19296 result.push(arr1.shift());
19297 left1--;
19298 } else {
19299 result.push(arr2.shift());
19300 left2--;
19301 }
19302 }
19303 if (left1 > 0) {
19304 result.push.apply(result, arr1);
19305 } else {
19306 result.push.apply(result, arr2);
19307 }
19308 return result;
19309 }
19310
19311 return mergeSort;
19312})();
19313
19314
19315/***/ }),
19316
19317/***/ "52bf":
19318/***/ (function(module, exports, __webpack_require__) {
19319
19320// extracted by mini-css-extract-plugin
19321
19322/***/ }),
19323
19324/***/ "5c7d":
19325/***/ (function(module, exports, __webpack_require__) {
19326
19327var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
19328* loglevel - https://github.com/pimterry/loglevel
19329*
19330* Copyright (c) 2013 Tim Perry
19331* Licensed under the MIT license.
19332*/
19333(function (root, definition) {
19334 "use strict";
19335 if (true) {
19336 !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),
19337 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
19338 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
19339 __WEBPACK_AMD_DEFINE_FACTORY__),
19340 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
19341 } else {}
19342}(this, function () {
19343 "use strict";
19344
19345 // Slightly dubious tricks to cut down minimized file size
19346 var noop = function() {};
19347 var undefinedType = "undefined";
19348
19349 var logMethods = [
19350 "trace",
19351 "debug",
19352 "info",
19353 "warn",
19354 "error"
19355 ];
19356
19357 // Cross-browser bind equivalent that works at least back to IE6
19358 function bindMethod(obj, methodName) {
19359 var method = obj[methodName];
19360 if (typeof method.bind === 'function') {
19361 return method.bind(obj);
19362 } else {
19363 try {
19364 return Function.prototype.bind.call(method, obj);
19365 } catch (e) {
19366 // Missing bind shim or IE8 + Modernizr, fallback to wrapping
19367 return function() {
19368 return Function.prototype.apply.apply(method, [obj, arguments]);
19369 };
19370 }
19371 }
19372 }
19373
19374 // Build the best logging method possible for this env
19375 // Wherever possible we want to bind, not wrap, to preserve stack traces
19376 function realMethod(methodName) {
19377 if (methodName === 'debug') {
19378 methodName = 'log';
19379 }
19380
19381 if (typeof console === undefinedType) {
19382 return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
19383 } else if (console[methodName] !== undefined) {
19384 return bindMethod(console, methodName);
19385 } else if (console.log !== undefined) {
19386 return bindMethod(console, 'log');
19387 } else {
19388 return noop;
19389 }
19390 }
19391
19392 // These private functions always need `this` to be set properly
19393
19394 function replaceLoggingMethods(level, loggerName) {
19395 /*jshint validthis:true */
19396 for (var i = 0; i < logMethods.length; i++) {
19397 var methodName = logMethods[i];
19398 this[methodName] = (i < level) ?
19399 noop :
19400 this.methodFactory(methodName, level, loggerName);
19401 }
19402
19403 // Define log.log as an alias for log.debug
19404 this.log = this.debug;
19405 }
19406
19407 // In old IE versions, the console isn't present until you first open it.
19408 // We build realMethod() replacements here that regenerate logging methods
19409 function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
19410 return function () {
19411 if (typeof console !== undefinedType) {
19412 replaceLoggingMethods.call(this, level, loggerName);
19413 this[methodName].apply(this, arguments);
19414 }
19415 };
19416 }
19417
19418 // By default, we use closely bound real methods wherever possible, and
19419 // otherwise we wait for a console to appear, and then try again.
19420 function defaultMethodFactory(methodName, level, loggerName) {
19421 /*jshint validthis:true */
19422 return realMethod(methodName) ||
19423 enableLoggingWhenConsoleArrives.apply(this, arguments);
19424 }
19425
19426 function Logger(name, defaultLevel, factory) {
19427 var self = this;
19428 var currentLevel;
19429 var storageKey = "loglevel";
19430 if (name) {
19431 storageKey += ":" + name;
19432 }
19433
19434 function persistLevelIfPossible(levelNum) {
19435 var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
19436
19437 if (typeof window === undefinedType) return;
19438
19439 // Use localStorage if available
19440 try {
19441 window.localStorage[storageKey] = levelName;
19442 return;
19443 } catch (ignore) {}
19444
19445 // Use session cookie as fallback
19446 try {
19447 window.document.cookie =
19448 encodeURIComponent(storageKey) + "=" + levelName + ";";
19449 } catch (ignore) {}
19450 }
19451
19452 function getPersistedLevel() {
19453 var storedLevel;
19454
19455 if (typeof window === undefinedType) return;
19456
19457 try {
19458 storedLevel = window.localStorage[storageKey];
19459 } catch (ignore) {}
19460
19461 // Fallback to cookies if local storage gives us nothing
19462 if (typeof storedLevel === undefinedType) {
19463 try {
19464 var cookie = window.document.cookie;
19465 var location = cookie.indexOf(
19466 encodeURIComponent(storageKey) + "=");
19467 if (location !== -1) {
19468 storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
19469 }
19470 } catch (ignore) {}
19471 }
19472
19473 // If the stored level is not valid, treat it as if nothing was stored.
19474 if (self.levels[storedLevel] === undefined) {
19475 storedLevel = undefined;
19476 }
19477
19478 return storedLevel;
19479 }
19480
19481 /*
19482 *
19483 * Public logger API - see https://github.com/pimterry/loglevel for details
19484 *
19485 */
19486
19487 self.name = name;
19488
19489 self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
19490 "ERROR": 4, "SILENT": 5};
19491
19492 self.methodFactory = factory || defaultMethodFactory;
19493
19494 self.getLevel = function () {
19495 return currentLevel;
19496 };
19497
19498 self.setLevel = function (level, persist) {
19499 if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
19500 level = self.levels[level.toUpperCase()];
19501 }
19502 if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
19503 currentLevel = level;
19504 if (persist !== false) { // defaults to true
19505 persistLevelIfPossible(level);
19506 }
19507 replaceLoggingMethods.call(self, level, name);
19508 if (typeof console === undefinedType && level < self.levels.SILENT) {
19509 return "No console available for logging";
19510 }
19511 } else {
19512 throw "log.setLevel() called with invalid level: " + level;
19513 }
19514 };
19515
19516 self.setDefaultLevel = function (level) {
19517 if (!getPersistedLevel()) {
19518 self.setLevel(level, false);
19519 }
19520 };
19521
19522 self.enableAll = function(persist) {
19523 self.setLevel(self.levels.TRACE, persist);
19524 };
19525
19526 self.disableAll = function(persist) {
19527 self.setLevel(self.levels.SILENT, persist);
19528 };
19529
19530 // Initialize with the right level
19531 var initialLevel = getPersistedLevel();
19532 if (initialLevel == null) {
19533 initialLevel = defaultLevel == null ? "WARN" : defaultLevel;
19534 }
19535 self.setLevel(initialLevel, false);
19536 }
19537
19538 /*
19539 *
19540 * Top-level API
19541 *
19542 */
19543
19544 var defaultLogger = new Logger();
19545
19546 var _loggersByName = {};
19547 defaultLogger.getLogger = function getLogger(name) {
19548 if (typeof name !== "string" || name === "") {
19549 throw new TypeError("You must supply a name when creating a logger.");
19550 }
19551
19552 var logger = _loggersByName[name];
19553 if (!logger) {
19554 logger = _loggersByName[name] = new Logger(
19555 name, defaultLogger.getLevel(), defaultLogger.methodFactory);
19556 }
19557 return logger;
19558 };
19559
19560 // Grab the current global log variable in case of overwrite
19561 var _log = (typeof window !== undefinedType) ? window.log : undefined;
19562 defaultLogger.noConflict = function() {
19563 if (typeof window !== undefinedType &&
19564 window.log === defaultLogger) {
19565 window.log = _log;
19566 }
19567
19568 return defaultLogger;
19569 };
19570
19571 defaultLogger.getLoggers = function getLoggers() {
19572 return _loggersByName;
19573 };
19574
19575 return defaultLogger;
19576}));
19577
19578
19579/***/ }),
19580
19581/***/ "6072":
19582/***/ (function(module, exports, __webpack_require__) {
19583
19584// extracted by mini-css-extract-plugin
19585
19586/***/ }),
19587
19588/***/ "62e4":
19589/***/ (function(module, exports) {
19590
19591module.exports = function(module) {
19592 if (!module.webpackPolyfill) {
19593 module.deprecate = function() {};
19594 module.paths = [];
19595 // module.parent = undefined by default
19596 if (!module.children) module.children = [];
19597 Object.defineProperty(module, "loaded", {
19598 enumerable: true,
19599 get: function() {
19600 return module.l;
19601 }
19602 });
19603 Object.defineProperty(module, "id", {
19604 enumerable: true,
19605 get: function() {
19606 return module.i;
19607 }
19608 });
19609 module.webpackPolyfill = 1;
19610 }
19611 return module;
19612};
19613
19614
19615/***/ }),
19616
19617/***/ "67f0":
19618/***/ (function(module, exports, __webpack_require__) {
19619
19620// extracted by mini-css-extract-plugin
19621
19622/***/ }),
19623
19624/***/ "73ec":
19625/***/ (function(module, exports, __webpack_require__) {
19626
19627var mergeSort, findInsertIndex;
19628mergeSort = __webpack_require__("4d89");
19629findInsertIndex = __webpack_require__("f742");
19630
19631module.exports = (function () {
19632 'use strict';
19633
19634 var walkStrategies;
19635
19636 walkStrategies = {};
19637
19638 function k(result) {
19639 return function () {
19640 return result;
19641 };
19642 }
19643
19644 function TreeModel(config) {
19645 config = config || {};
19646 this.config = config;
19647 this.config.childrenPropertyName = config.childrenPropertyName || 'children';
19648 this.config.modelComparatorFn = config.modelComparatorFn;
19649 }
19650
19651 function addChildToNode(node, child) {
19652 child.parent = node;
19653 node.children.push(child);
19654 return child;
19655 }
19656
19657 function Node(config, model) {
19658 this.config = config;
19659 this.model = model;
19660 this.children = [];
19661 }
19662
19663 TreeModel.prototype.parse = function (model) {
19664 var i, childCount, node;
19665
19666 if (!(model instanceof Object)) {
19667 throw new TypeError('Model must be of type object.');
19668 }
19669
19670 node = new Node(this.config, model);
19671 if (model[this.config.childrenPropertyName] instanceof Array) {
19672 if (this.config.modelComparatorFn) {
19673 model[this.config.childrenPropertyName] = mergeSort(
19674 this.config.modelComparatorFn,
19675 model[this.config.childrenPropertyName]);
19676 }
19677 for (i = 0, childCount = model[this.config.childrenPropertyName].length; i < childCount; i++) {
19678 addChildToNode(node, this.parse(model[this.config.childrenPropertyName][i]));
19679 }
19680 }
19681 return node;
19682 };
19683
19684 function hasComparatorFunction(node) {
19685 return typeof node.config.modelComparatorFn === 'function';
19686 }
19687
19688 Node.prototype.isRoot = function () {
19689 return this.parent === undefined;
19690 };
19691
19692 Node.prototype.hasChildren = function () {
19693 return this.children.length > 0;
19694 };
19695
19696 function addChild(self, child, insertIndex) {
19697 var index;
19698
19699 if (!(child instanceof Node)) {
19700 throw new TypeError('Child must be of type Node.');
19701 }
19702
19703 child.parent = self;
19704 if (!(self.model[self.config.childrenPropertyName] instanceof Array)) {
19705 self.model[self.config.childrenPropertyName] = [];
19706 }
19707
19708 if (hasComparatorFunction(self)) {
19709 // Find the index to insert the child
19710 index = findInsertIndex(
19711 self.config.modelComparatorFn,
19712 self.model[self.config.childrenPropertyName],
19713 child.model);
19714
19715 // Add to the model children
19716 self.model[self.config.childrenPropertyName].splice(index, 0, child.model);
19717
19718 // Add to the node children
19719 self.children.splice(index, 0, child);
19720 } else {
19721 if (insertIndex === undefined) {
19722 self.model[self.config.childrenPropertyName].push(child.model);
19723 self.children.push(child);
19724 } else {
19725 if (insertIndex < 0 || insertIndex > self.children.length) {
19726 throw new Error('Invalid index.');
19727 }
19728 self.model[self.config.childrenPropertyName].splice(insertIndex, 0, child.model);
19729 self.children.splice(insertIndex, 0, child);
19730 }
19731 }
19732 return child;
19733 }
19734
19735 Node.prototype.addChild = function (child) {
19736 return addChild(this, child);
19737 };
19738
19739 Node.prototype.addChildAtIndex = function (child, index) {
19740 if (hasComparatorFunction(this)) {
19741 throw new Error('Cannot add child at index when using a comparator function.');
19742 }
19743
19744 return addChild(this, child, index);
19745 };
19746
19747 Node.prototype.setIndex = function (index) {
19748 if (hasComparatorFunction(this)) {
19749 throw new Error('Cannot set node index when using a comparator function.');
19750 }
19751
19752 if (this.isRoot()) {
19753 if (index === 0) {
19754 return this;
19755 }
19756 throw new Error('Invalid index.');
19757 }
19758
19759 if (index < 0 || index >= this.parent.children.length) {
19760 throw new Error('Invalid index.');
19761 }
19762
19763 var oldIndex = this.parent.children.indexOf(this);
19764
19765 this.parent.children.splice(index, 0, this.parent.children.splice(oldIndex, 1)[0]);
19766
19767 this.parent.model[this.parent.config.childrenPropertyName]
19768 .splice(index, 0, this.parent.model[this.parent.config.childrenPropertyName].splice(oldIndex, 1)[0]);
19769
19770 return this;
19771 };
19772
19773 Node.prototype.getPath = function () {
19774 var path = [];
19775 (function addToPath(node) {
19776 path.unshift(node);
19777 if (!node.isRoot()) {
19778 addToPath(node.parent);
19779 }
19780 })(this);
19781 return path;
19782 };
19783
19784 Node.prototype.getIndex = function () {
19785 if (this.isRoot()) {
19786 return 0;
19787 }
19788 return this.parent.children.indexOf(this);
19789 };
19790
19791 /**
19792 * Parse the arguments of traversal functions. These functions can take one optional
19793 * first argument which is an options object. If present, this object will be stored
19794 * in args.options. The only mandatory argument is the callback function which can
19795 * appear in the first or second position (if an options object is given). This
19796 * function will be saved to args.fn. The last optional argument is the context on
19797 * which the callback function will be called. It will be available in args.ctx.
19798 *
19799 * @returns Parsed arguments.
19800 */
19801 function parseArgs() {
19802 var args = {};
19803 if (arguments.length === 1) {
19804 if (typeof arguments[0] === 'function') {
19805 args.fn = arguments[0];
19806 } else {
19807 args.options = arguments[0];
19808 }
19809 } else if (arguments.length === 2) {
19810 if (typeof arguments[0] === 'function') {
19811 args.fn = arguments[0];
19812 args.ctx = arguments[1];
19813 } else {
19814 args.options = arguments[0];
19815 args.fn = arguments[1];
19816 }
19817 } else {
19818 args.options = arguments[0];
19819 args.fn = arguments[1];
19820 args.ctx = arguments[2];
19821 }
19822 args.options = args.options || {};
19823 if (!args.options.strategy) {
19824 args.options.strategy = 'pre';
19825 }
19826 if (!walkStrategies[args.options.strategy]) {
19827 throw new Error('Unknown tree walk strategy. Valid strategies are \'pre\' [default], \'post\' and \'breadth\'.');
19828 }
19829 return args;
19830 }
19831
19832 Node.prototype.walk = function () {
19833 var args;
19834 args = parseArgs.apply(this, arguments);
19835 walkStrategies[args.options.strategy].call(this, args.fn, args.ctx);
19836 };
19837
19838 walkStrategies.pre = function depthFirstPreOrder(callback, context) {
19839 var i, childCount, keepGoing;
19840 keepGoing = callback.call(context, this);
19841 for (i = 0, childCount = this.children.length; i < childCount; i++) {
19842 if (keepGoing === false) {
19843 return false;
19844 }
19845 keepGoing = depthFirstPreOrder.call(this.children[i], callback, context);
19846 }
19847 return keepGoing;
19848 };
19849
19850 walkStrategies.post = function depthFirstPostOrder(callback, context) {
19851 var i, childCount, keepGoing;
19852 for (i = 0, childCount = this.children.length; i < childCount; i++) {
19853 keepGoing = depthFirstPostOrder.call(this.children[i], callback, context);
19854 if (keepGoing === false) {
19855 return false;
19856 }
19857 }
19858 keepGoing = callback.call(context, this);
19859 return keepGoing;
19860 };
19861
19862 walkStrategies.breadth = function breadthFirst(callback, context) {
19863 var queue = [this];
19864 (function processQueue() {
19865 var i, childCount, node;
19866 if (queue.length === 0) {
19867 return;
19868 }
19869 node = queue.shift();
19870 for (i = 0, childCount = node.children.length; i < childCount; i++) {
19871 queue.push(node.children[i]);
19872 }
19873 if (callback.call(context, node) !== false) {
19874 processQueue();
19875 }
19876 })();
19877 };
19878
19879 Node.prototype.all = function () {
19880 var args, all = [];
19881 args = parseArgs.apply(this, arguments);
19882 args.fn = args.fn || k(true);
19883 walkStrategies[args.options.strategy].call(this, function (node) {
19884 if (args.fn.call(args.ctx, node)) {
19885 all.push(node);
19886 }
19887 }, args.ctx);
19888 return all;
19889 };
19890
19891 Node.prototype.first = function () {
19892 var args, first;
19893 args = parseArgs.apply(this, arguments);
19894 args.fn = args.fn || k(true);
19895 walkStrategies[args.options.strategy].call(this, function (node) {
19896 if (args.fn.call(args.ctx, node)) {
19897 first = node;
19898 return false;
19899 }
19900 }, args.ctx);
19901 return first;
19902 };
19903
19904 Node.prototype.drop = function () {
19905 var indexOfChild;
19906 if (!this.isRoot()) {
19907 indexOfChild = this.parent.children.indexOf(this);
19908 this.parent.children.splice(indexOfChild, 1);
19909 this.parent.model[this.config.childrenPropertyName].splice(indexOfChild, 1);
19910 this.parent = undefined;
19911 delete this.parent;
19912 }
19913 return this;
19914 };
19915
19916 return TreeModel;
19917})();
19918
19919
19920/***/ }),
19921
19922/***/ "7da8":
19923/***/ (function(module, exports, __webpack_require__) {
19924
19925// extracted by mini-css-extract-plugin
19926
19927/***/ }),
19928
19929/***/ "8bbf":
19930/***/ (function(module, exports) {
19931
19932module.exports = require("vue");
19933
19934/***/ }),
19935
19936/***/ "92fa":
19937/***/ (function(module, exports) {
19938
19939var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/
19940
19941module.exports = function mergeJSXProps (objs) {
19942 return objs.reduce(function (a, b) {
19943 var aa, bb, key, nestedKey, temp
19944 for (key in b) {
19945 aa = a[key]
19946 bb = b[key]
19947 if (aa && nestRE.test(key)) {
19948 // normalize class
19949 if (key === 'class') {
19950 if (typeof aa === 'string') {
19951 temp = aa
19952 a[key] = aa = {}
19953 aa[temp] = true
19954 }
19955 if (typeof bb === 'string') {
19956 temp = bb
19957 b[key] = bb = {}
19958 bb[temp] = true
19959 }
19960 }
19961 if (key === 'on' || key === 'nativeOn' || key === 'hook') {
19962 // merge functions
19963 for (nestedKey in bb) {
19964 aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])
19965 }
19966 } else if (Array.isArray(aa)) {
19967 a[key] = aa.concat(bb)
19968 } else if (Array.isArray(bb)) {
19969 a[key] = [aa].concat(bb)
19970 } else {
19971 for (nestedKey in bb) {
19972 aa[nestedKey] = bb[nestedKey]
19973 }
19974 }
19975 } else {
19976 a[key] = b[key]
19977 }
19978 }
19979 return a
19980 }, {})
19981}
19982
19983function mergeFn (a, b) {
19984 return function () {
19985 a && a.apply(this, arguments)
19986 b && b.apply(this, arguments)
19987 }
19988}
19989
19990
19991/***/ }),
19992
19993/***/ "93f8":
19994/***/ (function(module, __webpack_exports__, __webpack_require__) {
19995
19996"use strict";
19997/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DistanceIndicator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fb64");
19998/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DistanceIndicator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DistanceIndicator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
19999/* unused harmony reexport * */
20000 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DistanceIndicator_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
20001
20002/***/ }),
20003
20004/***/ "a10e":
20005/***/ (function(module, exports, __webpack_require__) {
20006
20007// extracted by mini-css-extract-plugin
20008
20009/***/ }),
20010
20011/***/ "aa68":
20012/***/ (function(module, __webpack_exports__, __webpack_require__) {
20013
20014"use strict";
20015/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidget_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6072");
20016/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidget_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidget_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
20017/* unused harmony reexport * */
20018 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CompoundWidget_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
20019
20020/***/ }),
20021
20022/***/ "bdc0":
20023/***/ (function(module, exports, __webpack_require__) {
20024
20025// extracted by mini-css-extract-plugin
20026
20027/***/ }),
20028
20029/***/ "c3ad":
20030/***/ (function(module, exports, __webpack_require__) {
20031
20032// extracted by mini-css-extract-plugin
20033
20034/***/ }),
20035
20036/***/ "c8ba":
20037/***/ (function(module, exports) {
20038
20039var g;
20040
20041// This works in non-strict mode
20042g = (function() {
20043 return this;
20044})();
20045
20046try {
20047 // This works if eval is allowed (see CSP)
20048 g = g || Function("return this")() || (1, eval)("this");
20049} catch (e) {
20050 // This works if the window reference is available
20051 if (typeof window === "object") g = window;
20052}
20053
20054// g can still be undefined, but nothing to do about it...
20055// We return undefined, instead of nothing here, so it's
20056// easier to handle this case. if(!global) { ...}
20057
20058module.exports = g;
20059
20060
20061/***/ }),
20062
20063/***/ "d21f":
20064/***/ (function(module, __webpack_exports__, __webpack_require__) {
20065
20066"use strict";
20067/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_MoveIcon_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c3ad");
20068/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_MoveIcon_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_MoveIcon_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0__);
20069/* unused harmony reexport * */
20070 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_index_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_MoveIcon_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
20071
20072/***/ }),
20073
20074/***/ "dd40":
20075/***/ (function(module, exports) {
20076
20077module.exports = function(originalModule) {
20078 if (!originalModule.webpackPolyfill) {
20079 var module = Object.create(originalModule);
20080 // module.parent = undefined by default
20081 if (!module.children) module.children = [];
20082 Object.defineProperty(module, "loaded", {
20083 enumerable: true,
20084 get: function() {
20085 return module.l;
20086 }
20087 });
20088 Object.defineProperty(module, "id", {
20089 enumerable: true,
20090 get: function() {
20091 return module.i;
20092 }
20093 });
20094 Object.defineProperty(module, "exports", {
20095 enumerable: true
20096 });
20097 module.webpackPolyfill = 1;
20098 }
20099 return module;
20100};
20101
20102
20103/***/ }),
20104
20105/***/ "f742":
20106/***/ (function(module, exports) {
20107
20108module.exports = (function () {
20109 'use strict';
20110
20111 /**
20112 * Find the index to insert an element in array keeping the sort order.
20113 *
20114 * @param {function} comparatorFn The comparator function which sorted the array.
20115 * @param {array} arr The sorted array.
20116 * @param {object} el The element to insert.
20117 */
20118 function findInsertIndex(comparatorFn, arr, el) {
20119 var i, len;
20120 for (i = 0, len = arr.length; i < len; i++) {
20121 if (comparatorFn(arr[i], el) > 0) {
20122 break;
20123 }
20124 }
20125 return i;
20126 }
20127
20128 return findInsertIndex;
20129})();
20130
20131
20132/***/ }),
20133
20134/***/ "fae3":
20135/***/ (function(module, __webpack_exports__, __webpack_require__) {
20136
20137"use strict";
20138__webpack_require__.r(__webpack_exports__);
20139
20140// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
20141// This file is imported into lib/wc client bundles.
20142
20143if (typeof window !== 'undefined') {
20144 var setPublicPath_i
20145 if ((setPublicPath_i = window.document.currentScript) && (setPublicPath_i = setPublicPath_i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) {
20146 __webpack_require__.p = setPublicPath_i[1] // eslint-disable-line
20147 }
20148}
20149
20150// Indicate to webpack that this file can be concatenated
20151/* harmony default export */ var setPublicPath = (null);
20152
20153// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/WidgetView.vue?vue&type=template&id=89990cc4&
20154var WidgetViewvue_type_template_id_89990cc4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.renderCount},[_c('div',{ref:"mainViewContainer",staticClass:"main-view-container"},_vm._l((_vm.compoundWidgets),function(compoundWidgetDefinition,index){return _c('div',{staticClass:"widget-group-column"},[_c('compound-widget',{ref:"compoundWidgets",refInFor:true,attrs:{"compound-widget-index":index,"taxon-style-overrides":_vm.widgetStyle[compoundWidgetDefinition.taxonomyRef],"taxonomy-ref":compoundWidgetDefinition.taxonomyRef}}),(index < (_vm.compoundWidgets.length - 1))?_c('serif-operator'):_vm._e()],1)}))])}
20155var staticRenderFns = []
20156
20157
20158// CONCATENATED MODULE: ./src/components/WidgetView.vue?vue&type=template&id=89990cc4&
20159
20160// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.js
20161/*! *****************************************************************************
20162Copyright (c) Microsoft Corporation. All rights reserved.
20163Licensed under the Apache License, Version 2.0 (the "License"); you may not use
20164this file except in compliance with the License. You may obtain a copy of the
20165License at http://www.apache.org/licenses/LICENSE-2.0
20166
20167THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20168KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20169WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
20170MERCHANTABLITY OR NON-INFRINGEMENT.
20171
20172See the Apache Version 2.0 License for specific language governing permissions
20173and limitations under the License.
20174***************************************************************************** */
20175/* global Reflect, Promise */
20176
20177var extendStatics = function(d, b) {
20178 extendStatics = Object.setPrototypeOf ||
20179 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20180 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20181 return extendStatics(d, b);
20182};
20183
20184function __extends(d, b) {
20185 extendStatics(d, b);
20186 function __() { this.constructor = d; }
20187 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20188}
20189
20190var __assign = function() {
20191 __assign = Object.assign || function __assign(t) {
20192 for (var s, i = 1, n = arguments.length; i < n; i++) {
20193 s = arguments[i];
20194 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
20195 }
20196 return t;
20197 }
20198 return __assign.apply(this, arguments);
20199}
20200
20201function __rest(s, e) {
20202 var t = {};
20203 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20204 t[p] = s[p];
20205 if (s != null && typeof Object.getOwnPropertySymbols === "function")
20206 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
20207 t[p[i]] = s[p[i]];
20208 return t;
20209}
20210
20211function __decorate(decorators, target, key, desc) {
20212 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20213 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20214 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
20215 return c > 3 && r && Object.defineProperty(target, key, r), r;
20216}
20217
20218function __param(paramIndex, decorator) {
20219 return function (target, key) { decorator(target, key, paramIndex); }
20220}
20221
20222function __metadata(metadataKey, metadataValue) {
20223 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
20224}
20225
20226function __awaiter(thisArg, _arguments, P, generator) {
20227 return new (P || (P = Promise))(function (resolve, reject) {
20228 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20229 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20230 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
20231 step((generator = generator.apply(thisArg, _arguments || [])).next());
20232 });
20233}
20234
20235function __generator(thisArg, body) {
20236 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
20237 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
20238 function verb(n) { return function (v) { return step([n, v]); }; }
20239 function step(op) {
20240 if (f) throw new TypeError("Generator is already executing.");
20241 while (_) try {
20242 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
20243 if (y = 0, t) op = [op[0] & 2, t.value];
20244 switch (op[0]) {
20245 case 0: case 1: t = op; break;
20246 case 4: _.label++; return { value: op[1], done: false };
20247 case 5: _.label++; y = op[1]; op = [0]; continue;
20248 case 7: op = _.ops.pop(); _.trys.pop(); continue;
20249 default:
20250 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
20251 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
20252 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20253 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
20254 if (t[2]) _.ops.pop();
20255 _.trys.pop(); continue;
20256 }
20257 op = body.call(thisArg, _);
20258 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
20259 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
20260 }
20261}
20262
20263function __exportStar(m, exports) {
20264 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
20265}
20266
20267function __values(o) {
20268 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
20269 if (m) return m.call(o);
20270 return {
20271 next: function () {
20272 if (o && i >= o.length) o = void 0;
20273 return { value: o && o[i++], done: !o };
20274 }
20275 };
20276}
20277
20278function __read(o, n) {
20279 var m = typeof Symbol === "function" && o[Symbol.iterator];
20280 if (!m) return o;
20281 var i = m.call(o), r, ar = [], e;
20282 try {
20283 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
20284 }
20285 catch (error) { e = { error: error }; }
20286 finally {
20287 try {
20288 if (r && !r.done && (m = i["return"])) m.call(i);
20289 }
20290 finally { if (e) throw e.error; }
20291 }
20292 return ar;
20293}
20294
20295function __spread() {
20296 for (var ar = [], i = 0; i < arguments.length; i++)
20297 ar = ar.concat(__read(arguments[i]));
20298 return ar;
20299}
20300
20301function __await(v) {
20302 return this instanceof __await ? (this.v = v, this) : new __await(v);
20303}
20304
20305function __asyncGenerator(thisArg, _arguments, generator) {
20306 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
20307 var g = generator.apply(thisArg, _arguments || []), i, q = [];
20308 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
20309 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
20310 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
20311 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
20312 function fulfill(value) { resume("next", value); }
20313 function reject(value) { resume("throw", value); }
20314 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
20315}
20316
20317function __asyncDelegator(o) {
20318 var i, p;
20319 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
20320 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
20321}
20322
20323function __asyncValues(o) {
20324 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
20325 var m = o[Symbol.asyncIterator], i;
20326 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
20327 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
20328 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
20329}
20330
20331function __makeTemplateObject(cooked, raw) {
20332 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
20333 return cooked;
20334};
20335
20336function __importStar(mod) {
20337 if (mod && mod.__esModule) return mod;
20338 var result = {};
20339 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
20340 result.default = mod;
20341 return result;
20342}
20343
20344function __importDefault(mod) {
20345 return (mod && mod.__esModule) ? mod : { default: mod };
20346}
20347
20348// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
20349var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
20350var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
20351
20352// CONCATENATED MODULE: ./node_modules/vuex/dist/vuex.esm.js
20353/**
20354 * vuex v3.0.1
20355 * (c) 2017 Evan You
20356 * @license MIT
20357 */
20358var applyMixin = function (Vue) {
20359 var version = Number(Vue.version.split('.')[0]);
20360
20361 if (version >= 2) {
20362 Vue.mixin({ beforeCreate: vuexInit });
20363 } else {
20364 // override init and inject vuex init procedure
20365 // for 1.x backwards compatibility.
20366 var _init = Vue.prototype._init;
20367 Vue.prototype._init = function (options) {
20368 if ( options === void 0 ) options = {};
20369
20370 options.init = options.init
20371 ? [vuexInit].concat(options.init)
20372 : vuexInit;
20373 _init.call(this, options);
20374 };
20375 }
20376
20377 /**
20378 * Vuex init hook, injected into each instances init hooks list.
20379 */
20380
20381 function vuexInit () {
20382 var options = this.$options;
20383 // store injection
20384 if (options.store) {
20385 this.$store = typeof options.store === 'function'
20386 ? options.store()
20387 : options.store;
20388 } else if (options.parent && options.parent.$store) {
20389 this.$store = options.parent.$store;
20390 }
20391 }
20392};
20393
20394var devtoolHook =
20395 typeof window !== 'undefined' &&
20396 window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
20397
20398function devtoolPlugin (store) {
20399 if (!devtoolHook) { return }
20400
20401 store._devtoolHook = devtoolHook;
20402
20403 devtoolHook.emit('vuex:init', store);
20404
20405 devtoolHook.on('vuex:travel-to-state', function (targetState) {
20406 store.replaceState(targetState);
20407 });
20408
20409 store.subscribe(function (mutation, state) {
20410 devtoolHook.emit('vuex:mutation', mutation, state);
20411 });
20412}
20413
20414/**
20415 * Get the first item that pass the test
20416 * by second argument function
20417 *
20418 * @param {Array} list
20419 * @param {Function} f
20420 * @return {*}
20421 */
20422/**
20423 * Deep copy the given object considering circular structure.
20424 * This function caches all nested objects and its copies.
20425 * If it detects circular structure, use cached copy to avoid infinite loop.
20426 *
20427 * @param {*} obj
20428 * @param {Array<Object>} cache
20429 * @return {*}
20430 */
20431
20432
20433/**
20434 * forEach for object
20435 */
20436function forEachValue (obj, fn) {
20437 Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
20438}
20439
20440function isObject (obj) {
20441 return obj !== null && typeof obj === 'object'
20442}
20443
20444function isPromise (val) {
20445 return val && typeof val.then === 'function'
20446}
20447
20448function assert (condition, msg) {
20449 if (!condition) { throw new Error(("[vuex] " + msg)) }
20450}
20451
20452var Module = function Module (rawModule, runtime) {
20453 this.runtime = runtime;
20454 this._children = Object.create(null);
20455 this._rawModule = rawModule;
20456 var rawState = rawModule.state;
20457 this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
20458};
20459
20460var prototypeAccessors$1 = { namespaced: { configurable: true } };
20461
20462prototypeAccessors$1.namespaced.get = function () {
20463 return !!this._rawModule.namespaced
20464};
20465
20466Module.prototype.addChild = function addChild (key, module) {
20467 this._children[key] = module;
20468};
20469
20470Module.prototype.removeChild = function removeChild (key) {
20471 delete this._children[key];
20472};
20473
20474Module.prototype.getChild = function getChild (key) {
20475 return this._children[key]
20476};
20477
20478Module.prototype.update = function update (rawModule) {
20479 this._rawModule.namespaced = rawModule.namespaced;
20480 if (rawModule.actions) {
20481 this._rawModule.actions = rawModule.actions;
20482 }
20483 if (rawModule.mutations) {
20484 this._rawModule.mutations = rawModule.mutations;
20485 }
20486 if (rawModule.getters) {
20487 this._rawModule.getters = rawModule.getters;
20488 }
20489};
20490
20491Module.prototype.forEachChild = function forEachChild (fn) {
20492 forEachValue(this._children, fn);
20493};
20494
20495Module.prototype.forEachGetter = function forEachGetter (fn) {
20496 if (this._rawModule.getters) {
20497 forEachValue(this._rawModule.getters, fn);
20498 }
20499};
20500
20501Module.prototype.forEachAction = function forEachAction (fn) {
20502 if (this._rawModule.actions) {
20503 forEachValue(this._rawModule.actions, fn);
20504 }
20505};
20506
20507Module.prototype.forEachMutation = function forEachMutation (fn) {
20508 if (this._rawModule.mutations) {
20509 forEachValue(this._rawModule.mutations, fn);
20510 }
20511};
20512
20513Object.defineProperties( Module.prototype, prototypeAccessors$1 );
20514
20515var ModuleCollection = function ModuleCollection (rawRootModule) {
20516 // register root module (Vuex.Store options)
20517 this.register([], rawRootModule, false);
20518};
20519
20520ModuleCollection.prototype.get = function get (path) {
20521 return path.reduce(function (module, key) {
20522 return module.getChild(key)
20523 }, this.root)
20524};
20525
20526ModuleCollection.prototype.getNamespace = function getNamespace (path) {
20527 var module = this.root;
20528 return path.reduce(function (namespace, key) {
20529 module = module.getChild(key);
20530 return namespace + (module.namespaced ? key + '/' : '')
20531 }, '')
20532};
20533
20534ModuleCollection.prototype.update = function update$1 (rawRootModule) {
20535 update([], this.root, rawRootModule);
20536};
20537
20538ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
20539 var this$1 = this;
20540 if ( runtime === void 0 ) runtime = true;
20541
20542 if (false) {}
20543
20544 var newModule = new Module(rawModule, runtime);
20545 if (path.length === 0) {
20546 this.root = newModule;
20547 } else {
20548 var parent = this.get(path.slice(0, -1));
20549 parent.addChild(path[path.length - 1], newModule);
20550 }
20551
20552 // register nested modules
20553 if (rawModule.modules) {
20554 forEachValue(rawModule.modules, function (rawChildModule, key) {
20555 this$1.register(path.concat(key), rawChildModule, runtime);
20556 });
20557 }
20558};
20559
20560ModuleCollection.prototype.unregister = function unregister (path) {
20561 var parent = this.get(path.slice(0, -1));
20562 var key = path[path.length - 1];
20563 if (!parent.getChild(key).runtime) { return }
20564
20565 parent.removeChild(key);
20566};
20567
20568function update (path, targetModule, newModule) {
20569 if (false) {}
20570
20571 // update target module
20572 targetModule.update(newModule);
20573
20574 // update nested modules
20575 if (newModule.modules) {
20576 for (var key in newModule.modules) {
20577 if (!targetModule.getChild(key)) {
20578 if (false) {}
20579 return
20580 }
20581 update(
20582 path.concat(key),
20583 targetModule.getChild(key),
20584 newModule.modules[key]
20585 );
20586 }
20587 }
20588}
20589
20590var functionAssert = {
20591 assert: function (value) { return typeof value === 'function'; },
20592 expected: 'function'
20593};
20594
20595var objectAssert = {
20596 assert: function (value) { return typeof value === 'function' ||
20597 (typeof value === 'object' && typeof value.handler === 'function'); },
20598 expected: 'function or object with "handler" function'
20599};
20600
20601var assertTypes = {
20602 getters: functionAssert,
20603 mutations: functionAssert,
20604 actions: objectAssert
20605};
20606
20607function assertRawModule (path, rawModule) {
20608 Object.keys(assertTypes).forEach(function (key) {
20609 if (!rawModule[key]) { return }
20610
20611 var assertOptions = assertTypes[key];
20612
20613 forEachValue(rawModule[key], function (value, type) {
20614 assert(
20615 assertOptions.assert(value),
20616 makeAssertionMessage(path, key, type, value, assertOptions.expected)
20617 );
20618 });
20619 });
20620}
20621
20622function makeAssertionMessage (path, key, type, value, expected) {
20623 var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
20624 if (path.length > 0) {
20625 buf += " in module \"" + (path.join('.')) + "\"";
20626 }
20627 buf += " is " + (JSON.stringify(value)) + ".";
20628 return buf
20629}
20630
20631var Vue; // bind on install
20632
20633var Store = function Store (options) {
20634 var this$1 = this;
20635 if ( options === void 0 ) options = {};
20636
20637 // Auto install if it is not done yet and `window` has `Vue`.
20638 // To allow users to avoid auto-installation in some cases,
20639 // this code should be placed here. See #731
20640 if (!Vue && typeof window !== 'undefined' && window.Vue) {
20641 install(window.Vue);
20642 }
20643
20644 if (false) {}
20645
20646 var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
20647 var strict = options.strict; if ( strict === void 0 ) strict = false;
20648
20649 var state = options.state; if ( state === void 0 ) state = {};
20650 if (typeof state === 'function') {
20651 state = state() || {};
20652 }
20653
20654 // store internal state
20655 this._committing = false;
20656 this._actions = Object.create(null);
20657 this._actionSubscribers = [];
20658 this._mutations = Object.create(null);
20659 this._wrappedGetters = Object.create(null);
20660 this._modules = new ModuleCollection(options);
20661 this._modulesNamespaceMap = Object.create(null);
20662 this._subscribers = [];
20663 this._watcherVM = new Vue();
20664
20665 // bind commit and dispatch to self
20666 var store = this;
20667 var ref = this;
20668 var dispatch = ref.dispatch;
20669 var commit = ref.commit;
20670 this.dispatch = function boundDispatch (type, payload) {
20671 return dispatch.call(store, type, payload)
20672 };
20673 this.commit = function boundCommit (type, payload, options) {
20674 return commit.call(store, type, payload, options)
20675 };
20676
20677 // strict mode
20678 this.strict = strict;
20679
20680 // init root module.
20681 // this also recursively registers all sub-modules
20682 // and collects all module getters inside this._wrappedGetters
20683 installModule(this, state, [], this._modules.root);
20684
20685 // initialize the store vm, which is responsible for the reactivity
20686 // (also registers _wrappedGetters as computed properties)
20687 resetStoreVM(this, state);
20688
20689 // apply plugins
20690 plugins.forEach(function (plugin) { return plugin(this$1); });
20691
20692 if (Vue.config.devtools) {
20693 devtoolPlugin(this);
20694 }
20695};
20696
20697var prototypeAccessors = { state: { configurable: true } };
20698
20699prototypeAccessors.state.get = function () {
20700 return this._vm._data.$$state
20701};
20702
20703prototypeAccessors.state.set = function (v) {
20704 if (false) {}
20705};
20706
20707Store.prototype.commit = function commit (_type, _payload, _options) {
20708 var this$1 = this;
20709
20710 // check object-style commit
20711 var ref = unifyObjectStyle(_type, _payload, _options);
20712 var type = ref.type;
20713 var payload = ref.payload;
20714 var options = ref.options;
20715
20716 var mutation = { type: type, payload: payload };
20717 var entry = this._mutations[type];
20718 if (!entry) {
20719 if (false) {}
20720 return
20721 }
20722 this._withCommit(function () {
20723 entry.forEach(function commitIterator (handler) {
20724 handler(payload);
20725 });
20726 });
20727 this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });
20728
20729 if (
20730 false
20731 ) {}
20732};
20733
20734Store.prototype.dispatch = function dispatch (_type, _payload) {
20735 var this$1 = this;
20736
20737 // check object-style dispatch
20738 var ref = unifyObjectStyle(_type, _payload);
20739 var type = ref.type;
20740 var payload = ref.payload;
20741
20742 var action = { type: type, payload: payload };
20743 var entry = this._actions[type];
20744 if (!entry) {
20745 if (false) {}
20746 return
20747 }
20748
20749 this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); });
20750
20751 return entry.length > 1
20752 ? Promise.all(entry.map(function (handler) { return handler(payload); }))
20753 : entry[0](payload)
20754};
20755
20756Store.prototype.subscribe = function subscribe (fn) {
20757 return genericSubscribe(fn, this._subscribers)
20758};
20759
20760Store.prototype.subscribeAction = function subscribeAction (fn) {
20761 return genericSubscribe(fn, this._actionSubscribers)
20762};
20763
20764Store.prototype.watch = function watch (getter, cb, options) {
20765 var this$1 = this;
20766
20767 if (false) {}
20768 return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
20769};
20770
20771Store.prototype.replaceState = function replaceState (state) {
20772 var this$1 = this;
20773
20774 this._withCommit(function () {
20775 this$1._vm._data.$$state = state;
20776 });
20777};
20778
20779Store.prototype.registerModule = function registerModule (path, rawModule, options) {
20780 if ( options === void 0 ) options = {};
20781
20782 if (typeof path === 'string') { path = [path]; }
20783
20784 if (false) {}
20785
20786 this._modules.register(path, rawModule);
20787 installModule(this, this.state, path, this._modules.get(path), options.preserveState);
20788 // reset store to update getters...
20789 resetStoreVM(this, this.state);
20790};
20791
20792Store.prototype.unregisterModule = function unregisterModule (path) {
20793 var this$1 = this;
20794
20795 if (typeof path === 'string') { path = [path]; }
20796
20797 if (false) {}
20798
20799 this._modules.unregister(path);
20800 this._withCommit(function () {
20801 var parentState = getNestedState(this$1.state, path.slice(0, -1));
20802 Vue.delete(parentState, path[path.length - 1]);
20803 });
20804 resetStore(this);
20805};
20806
20807Store.prototype.hotUpdate = function hotUpdate (newOptions) {
20808 this._modules.update(newOptions);
20809 resetStore(this, true);
20810};
20811
20812Store.prototype._withCommit = function _withCommit (fn) {
20813 var committing = this._committing;
20814 this._committing = true;
20815 fn();
20816 this._committing = committing;
20817};
20818
20819Object.defineProperties( Store.prototype, prototypeAccessors );
20820
20821function genericSubscribe (fn, subs) {
20822 if (subs.indexOf(fn) < 0) {
20823 subs.push(fn);
20824 }
20825 return function () {
20826 var i = subs.indexOf(fn);
20827 if (i > -1) {
20828 subs.splice(i, 1);
20829 }
20830 }
20831}
20832
20833function resetStore (store, hot) {
20834 store._actions = Object.create(null);
20835 store._mutations = Object.create(null);
20836 store._wrappedGetters = Object.create(null);
20837 store._modulesNamespaceMap = Object.create(null);
20838 var state = store.state;
20839 // init all modules
20840 installModule(store, state, [], store._modules.root, true);
20841 // reset vm
20842 resetStoreVM(store, state, hot);
20843}
20844
20845function resetStoreVM (store, state, hot) {
20846 var oldVm = store._vm;
20847
20848 // bind store public getters
20849 store.getters = {};
20850 var wrappedGetters = store._wrappedGetters;
20851 var computed = {};
20852 forEachValue(wrappedGetters, function (fn, key) {
20853 // use computed to leverage its lazy-caching mechanism
20854 computed[key] = function () { return fn(store); };
20855 Object.defineProperty(store.getters, key, {
20856 get: function () { return store._vm[key]; },
20857 enumerable: true // for local getters
20858 });
20859 });
20860
20861 // use a Vue instance to store the state tree
20862 // suppress warnings just in case the user has added
20863 // some funky global mixins
20864 var silent = Vue.config.silent;
20865 Vue.config.silent = true;
20866 store._vm = new Vue({
20867 data: {
20868 $$state: state
20869 },
20870 computed: computed
20871 });
20872 Vue.config.silent = silent;
20873
20874 // enable strict mode for new vm
20875 if (store.strict) {
20876 enableStrictMode(store);
20877 }
20878
20879 if (oldVm) {
20880 if (hot) {
20881 // dispatch changes in all subscribed watchers
20882 // to force getter re-evaluation for hot reloading.
20883 store._withCommit(function () {
20884 oldVm._data.$$state = null;
20885 });
20886 }
20887 Vue.nextTick(function () { return oldVm.$destroy(); });
20888 }
20889}
20890
20891function installModule (store, rootState, path, module, hot) {
20892 var isRoot = !path.length;
20893 var namespace = store._modules.getNamespace(path);
20894
20895 // register in namespace map
20896 if (module.namespaced) {
20897 store._modulesNamespaceMap[namespace] = module;
20898 }
20899
20900 // set state
20901 if (!isRoot && !hot) {
20902 var parentState = getNestedState(rootState, path.slice(0, -1));
20903 var moduleName = path[path.length - 1];
20904 store._withCommit(function () {
20905 Vue.set(parentState, moduleName, module.state);
20906 });
20907 }
20908
20909 var local = module.context = makeLocalContext(store, namespace, path);
20910
20911 module.forEachMutation(function (mutation, key) {
20912 var namespacedType = namespace + key;
20913 registerMutation(store, namespacedType, mutation, local);
20914 });
20915
20916 module.forEachAction(function (action, key) {
20917 var type = action.root ? key : namespace + key;
20918 var handler = action.handler || action;
20919 registerAction(store, type, handler, local);
20920 });
20921
20922 module.forEachGetter(function (getter, key) {
20923 var namespacedType = namespace + key;
20924 registerGetter(store, namespacedType, getter, local);
20925 });
20926
20927 module.forEachChild(function (child, key) {
20928 installModule(store, rootState, path.concat(key), child, hot);
20929 });
20930}
20931
20932/**
20933 * make localized dispatch, commit, getters and state
20934 * if there is no namespace, just use root ones
20935 */
20936function makeLocalContext (store, namespace, path) {
20937 var noNamespace = namespace === '';
20938
20939 var local = {
20940 dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
20941 var args = unifyObjectStyle(_type, _payload, _options);
20942 var payload = args.payload;
20943 var options = args.options;
20944 var type = args.type;
20945
20946 if (!options || !options.root) {
20947 type = namespace + type;
20948 if (false) {}
20949 }
20950
20951 return store.dispatch(type, payload)
20952 },
20953
20954 commit: noNamespace ? store.commit : function (_type, _payload, _options) {
20955 var args = unifyObjectStyle(_type, _payload, _options);
20956 var payload = args.payload;
20957 var options = args.options;
20958 var type = args.type;
20959
20960 if (!options || !options.root) {
20961 type = namespace + type;
20962 if (false) {}
20963 }
20964
20965 store.commit(type, payload, options);
20966 }
20967 };
20968
20969 // getters and state object must be gotten lazily
20970 // because they will be changed by vm update
20971 Object.defineProperties(local, {
20972 getters: {
20973 get: noNamespace
20974 ? function () { return store.getters; }
20975 : function () { return makeLocalGetters(store, namespace); }
20976 },
20977 state: {
20978 get: function () { return getNestedState(store.state, path); }
20979 }
20980 });
20981
20982 return local
20983}
20984
20985function makeLocalGetters (store, namespace) {
20986 var gettersProxy = {};
20987
20988 var splitPos = namespace.length;
20989 Object.keys(store.getters).forEach(function (type) {
20990 // skip if the target getter is not match this namespace
20991 if (type.slice(0, splitPos) !== namespace) { return }
20992
20993 // extract local getter type
20994 var localType = type.slice(splitPos);
20995
20996 // Add a port to the getters proxy.
20997 // Define as getter property because
20998 // we do not want to evaluate the getters in this time.
20999 Object.defineProperty(gettersProxy, localType, {
21000 get: function () { return store.getters[type]; },
21001 enumerable: true
21002 });
21003 });
21004
21005 return gettersProxy
21006}
21007
21008function registerMutation (store, type, handler, local) {
21009 var entry = store._mutations[type] || (store._mutations[type] = []);
21010 entry.push(function wrappedMutationHandler (payload) {
21011 handler.call(store, local.state, payload);
21012 });
21013}
21014
21015function registerAction (store, type, handler, local) {
21016 var entry = store._actions[type] || (store._actions[type] = []);
21017 entry.push(function wrappedActionHandler (payload, cb) {
21018 var res = handler.call(store, {
21019 dispatch: local.dispatch,
21020 commit: local.commit,
21021 getters: local.getters,
21022 state: local.state,
21023 rootGetters: store.getters,
21024 rootState: store.state
21025 }, payload, cb);
21026 if (!isPromise(res)) {
21027 res = Promise.resolve(res);
21028 }
21029 if (store._devtoolHook) {
21030 return res.catch(function (err) {
21031 store._devtoolHook.emit('vuex:error', err);
21032 throw err
21033 })
21034 } else {
21035 return res
21036 }
21037 });
21038}
21039
21040function registerGetter (store, type, rawGetter, local) {
21041 if (store._wrappedGetters[type]) {
21042 if (false) {}
21043 return
21044 }
21045 store._wrappedGetters[type] = function wrappedGetter (store) {
21046 return rawGetter(
21047 local.state, // local state
21048 local.getters, // local getters
21049 store.state, // root state
21050 store.getters // root getters
21051 )
21052 };
21053}
21054
21055function enableStrictMode (store) {
21056 store._vm.$watch(function () { return this._data.$$state }, function () {
21057 if (false) {}
21058 }, { deep: true, sync: true });
21059}
21060
21061function getNestedState (state, path) {
21062 return path.length
21063 ? path.reduce(function (state, key) { return state[key]; }, state)
21064 : state
21065}
21066
21067function unifyObjectStyle (type, payload, options) {
21068 if (isObject(type) && type.type) {
21069 options = payload;
21070 payload = type;
21071 type = type.type;
21072 }
21073
21074 if (false) {}
21075
21076 return { type: type, payload: payload, options: options }
21077}
21078
21079function install (_Vue) {
21080 if (Vue && _Vue === Vue) {
21081 if (false) {}
21082 return
21083 }
21084 Vue = _Vue;
21085 applyMixin(Vue);
21086}
21087
21088var mapState = normalizeNamespace(function (namespace, states) {
21089 var res = {};
21090 normalizeMap(states).forEach(function (ref) {
21091 var key = ref.key;
21092 var val = ref.val;
21093
21094 res[key] = function mappedState () {
21095 var state = this.$store.state;
21096 var getters = this.$store.getters;
21097 if (namespace) {
21098 var module = getModuleByNamespace(this.$store, 'mapState', namespace);
21099 if (!module) {
21100 return
21101 }
21102 state = module.context.state;
21103 getters = module.context.getters;
21104 }
21105 return typeof val === 'function'
21106 ? val.call(this, state, getters)
21107 : state[val]
21108 };
21109 // mark vuex getter for devtools
21110 res[key].vuex = true;
21111 });
21112 return res
21113});
21114
21115var mapMutations = normalizeNamespace(function (namespace, mutations) {
21116 var res = {};
21117 normalizeMap(mutations).forEach(function (ref) {
21118 var key = ref.key;
21119 var val = ref.val;
21120
21121 res[key] = function mappedMutation () {
21122 var args = [], len = arguments.length;
21123 while ( len-- ) args[ len ] = arguments[ len ];
21124
21125 var commit = this.$store.commit;
21126 if (namespace) {
21127 var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
21128 if (!module) {
21129 return
21130 }
21131 commit = module.context.commit;
21132 }
21133 return typeof val === 'function'
21134 ? val.apply(this, [commit].concat(args))
21135 : commit.apply(this.$store, [val].concat(args))
21136 };
21137 });
21138 return res
21139});
21140
21141var mapGetters = normalizeNamespace(function (namespace, getters) {
21142 var res = {};
21143 normalizeMap(getters).forEach(function (ref) {
21144 var key = ref.key;
21145 var val = ref.val;
21146
21147 val = namespace + val;
21148 res[key] = function mappedGetter () {
21149 if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
21150 return
21151 }
21152 if (false) {}
21153 return this.$store.getters[val]
21154 };
21155 // mark vuex getter for devtools
21156 res[key].vuex = true;
21157 });
21158 return res
21159});
21160
21161var mapActions = normalizeNamespace(function (namespace, actions) {
21162 var res = {};
21163 normalizeMap(actions).forEach(function (ref) {
21164 var key = ref.key;
21165 var val = ref.val;
21166
21167 res[key] = function mappedAction () {
21168 var args = [], len = arguments.length;
21169 while ( len-- ) args[ len ] = arguments[ len ];
21170
21171 var dispatch = this.$store.dispatch;
21172 if (namespace) {
21173 var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
21174 if (!module) {
21175 return
21176 }
21177 dispatch = module.context.dispatch;
21178 }
21179 return typeof val === 'function'
21180 ? val.apply(this, [dispatch].concat(args))
21181 : dispatch.apply(this.$store, [val].concat(args))
21182 };
21183 });
21184 return res
21185});
21186
21187var createNamespacedHelpers = function (namespace) { return ({
21188 mapState: mapState.bind(null, namespace),
21189 mapGetters: mapGetters.bind(null, namespace),
21190 mapMutations: mapMutations.bind(null, namespace),
21191 mapActions: mapActions.bind(null, namespace)
21192}); };
21193
21194function normalizeMap (map) {
21195 return Array.isArray(map)
21196 ? map.map(function (key) { return ({ key: key, val: key }); })
21197 : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
21198}
21199
21200function normalizeNamespace (fn) {
21201 return function (namespace, map) {
21202 if (typeof namespace !== 'string') {
21203 map = namespace;
21204 namespace = '';
21205 } else if (namespace.charAt(namespace.length - 1) !== '/') {
21206 namespace += '/';
21207 }
21208 return fn(namespace, map)
21209 }
21210}
21211
21212function getModuleByNamespace (store, helper, namespace) {
21213 var module = store._modulesNamespaceMap[namespace];
21214 if (false) {}
21215 return module
21216}
21217
21218var index_esm = {
21219 Store: Store,
21220 install: install,
21221 version: '3.0.1',
21222 mapState: mapState,
21223 mapMutations: mapMutations,
21224 mapGetters: mapGetters,
21225 mapActions: mapActions,
21226 createNamespacedHelpers: createNamespacedHelpers
21227};
21228
21229
21230/* harmony default export */ var vuex_esm = (index_esm);
21231
21232// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CompoundWidget.vue?vue&type=template&id=4144179b&
21233var CompoundWidgetvue_type_template_id_4144179b_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"compoundWidgetElement",staticClass:"compound-widget-container",style:(_vm.dynamicStyles)},[_c('move-icon',{staticClass:"move-handle"}),_c('transition-group',{attrs:{"name":"taxon","tag":"div"}},[_c('compound-widget-taxonomy-assigner',{key:"taxonomyAssigner",attrs:{"index":_vm.compoundWidgetIndex,"selected-path":_vm.selectedPath}}),_vm._l((_vm.taxons),function(taxon,index){return (taxon.isVisible)?_c('taxon-selector',{key:taxon.level,attrs:{"taxon":taxon,"index":index,"selected-path":_vm.selectedPath,"taxonomy-ref":_vm.taxonomyRef,"compound-widget-index":_vm.compoundWidgetIndex,"style-overrides":_vm.taxonStyleOverrides},on:{"killed":_vm.killTaxonSelector}}):_vm._e()})],2)],1)}
21234var CompoundWidgetvue_type_template_id_4144179b_staticRenderFns = []
21235
21236
21237// CONCATENATED MODULE: ./src/components/CompoundWidget.vue?vue&type=template&id=4144179b&
21238
21239// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MoveIcon.vue?vue&type=template&id=3d0fb9bc&
21240var MoveIconvue_type_template_id_3d0fb9bc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{staticClass:"feather feather-move",attrs:{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[_c('circle',{attrs:{"cx":"12","cy":"12","r":"11","stroke-width":"2"}}),_c('polyline',{attrs:{"points":"5 9 2 12 5 15"}}),_c('polyline',{attrs:{"points":"9 5 12 2 15 5"}}),_c('polyline',{attrs:{"points":"15 19 12 22 9 19"}}),_c('polyline',{attrs:{"points":"19 9 22 12 19 15"}}),_c('line',{attrs:{"x1":"2","y1":"12","x2":"22","y2":"12"}}),_c('line',{attrs:{"x1":"12","y1":"2","x2":"12","y2":"22"}})])}
21241var MoveIconvue_type_template_id_3d0fb9bc_staticRenderFns = []
21242
21243
21244// CONCATENATED MODULE: ./src/components/MoveIcon.vue?vue&type=template&id=3d0fb9bc&
21245
21246// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MoveIcon.vue?vue&type=script&lang=ts&
21247
21248/* harmony default export */ var MoveIconvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({}));
21249
21250// CONCATENATED MODULE: ./src/components/MoveIcon.vue?vue&type=script&lang=ts&
21251 /* harmony default export */ var components_MoveIconvue_type_script_lang_ts_ = (MoveIconvue_type_script_lang_ts_);
21252// EXTERNAL MODULE: ./src/components/MoveIcon.vue?vue&type=style&index=0&lang=less&
21253var MoveIconvue_type_style_index_0_lang_less_ = __webpack_require__("d21f");
21254
21255// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
21256/* globals __VUE_SSR_CONTEXT__ */
21257
21258// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
21259// This module is a runtime utility for cleaner component module output and will
21260// be included in the final webpack user bundle.
21261
21262function normalizeComponent (
21263 scriptExports,
21264 render,
21265 staticRenderFns,
21266 functionalTemplate,
21267 injectStyles,
21268 scopeId,
21269 moduleIdentifier, /* server only */
21270 shadowMode /* vue-cli only */
21271) {
21272 // Vue.extend constructor export interop
21273 var options = typeof scriptExports === 'function'
21274 ? scriptExports.options
21275 : scriptExports
21276
21277 // render functions
21278 if (render) {
21279 options.render = render
21280 options.staticRenderFns = staticRenderFns
21281 options._compiled = true
21282 }
21283
21284 // functional template
21285 if (functionalTemplate) {
21286 options.functional = true
21287 }
21288
21289 // scopedId
21290 if (scopeId) {
21291 options._scopeId = 'data-v-' + scopeId
21292 }
21293
21294 var hook
21295 if (moduleIdentifier) { // server build
21296 hook = function (context) {
21297 // 2.3 injection
21298 context =
21299 context || // cached call
21300 (this.$vnode && this.$vnode.ssrContext) || // stateful
21301 (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
21302 // 2.2 with runInNewContext: true
21303 if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
21304 context = __VUE_SSR_CONTEXT__
21305 }
21306 // inject component styles
21307 if (injectStyles) {
21308 injectStyles.call(this, context)
21309 }
21310 // register component module identifier for async chunk inferrence
21311 if (context && context._registeredComponents) {
21312 context._registeredComponents.add(moduleIdentifier)
21313 }
21314 }
21315 // used by ssr in case component is cached and beforeCreate
21316 // never gets called
21317 options._ssrRegister = hook
21318 } else if (injectStyles) {
21319 hook = shadowMode
21320 ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
21321 : injectStyles
21322 }
21323
21324 if (hook) {
21325 if (options.functional) {
21326 // for template-only hot-reload because in that case the render fn doesn't
21327 // go through the normalizer
21328 options._injectStyles = hook
21329 // register for functioal component in vue file
21330 var originalRender = options.render
21331 options.render = function renderWithStyleInjection (h, context) {
21332 hook.call(context)
21333 return originalRender(h, context)
21334 }
21335 } else {
21336 // inject component registration as beforeCreate hook
21337 var existing = options.beforeCreate
21338 options.beforeCreate = existing
21339 ? [].concat(existing, hook)
21340 : [hook]
21341 }
21342 }
21343
21344 return {
21345 exports: scriptExports,
21346 options: options
21347 }
21348}
21349
21350// CONCATENATED MODULE: ./src/components/MoveIcon.vue
21351
21352
21353
21354
21355
21356
21357/* normalize component */
21358
21359var MoveIcon_component = normalizeComponent(
21360 components_MoveIconvue_type_script_lang_ts_,
21361 MoveIconvue_type_template_id_3d0fb9bc_render,
21362 MoveIconvue_type_template_id_3d0fb9bc_staticRenderFns,
21363 false,
21364 null,
21365 null,
21366 null
21367
21368)
21369
21370MoveIcon_component.options.__file = "MoveIcon.vue"
21371/* harmony default export */ var MoveIcon = (MoveIcon_component.exports);
21372// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CompoundWidgetTaxonomyAssigner.vue?vue&type=template&id=7f6d22df&
21373var CompoundWidgetTaxonomyAssignervue_type_template_id_7f6d22df_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"widgets",staticClass:"widget compound-widget-taxonomy-assigner"},[_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.chosenTaxonomy),expression:"chosenTaxonomy"}],staticClass:"taxon-select",on:{"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.chosenTaxonomy=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.availableTaxonomies),function(taxonomy){return _c('option',[_vm._v(_vm._s(taxonomy))])})),_c('div',{staticClass:"level-container"},[_c('x-circle-icon',{staticClass:"widget-close-icon",on:{"click":_vm.killCompoundWidget}}),_c('plus-circle-icon',{class:_vm.plusCircleClasses,attrs:{"width":16,"height":16},on:{"click":_vm.addTaxonSelector}})],1)])}
21374var CompoundWidgetTaxonomyAssignervue_type_template_id_7f6d22df_staticRenderFns = []
21375
21376
21377// CONCATENATED MODULE: ./src/components/CompoundWidgetTaxonomyAssigner.vue?vue&type=template&id=7f6d22df&
21378
21379// EXTERNAL MODULE: ./node_modules/babel-helper-vue-jsx-merge-props/index.js
21380var babel_helper_vue_jsx_merge_props = __webpack_require__("92fa");
21381var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props);
21382
21383// CONCATENATED MODULE: ./node_modules/vue-feather-icons/dist/vue-feather-icons.es.js
21384
21385
21386var ActivityIcon = {
21387 name: 'activity-icon',
21388
21389 functional: true,
21390
21391 render: function render(h, ctx) {
21392 return h(
21393 "svg",
21394 babel_helper_vue_jsx_merge_props_default()([{
21395 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21396 "class": "feather feather-activity" }, ctx.data]),
21397 [h(
21398 "polyline",
21399 {
21400 attrs: { points: "22 12 18 12 15 21 9 3 6 12 2 12" }
21401 },
21402 []
21403 )]
21404 );
21405 }
21406};
21407
21408var AirplayIcon = {
21409 name: 'airplay-icon',
21410
21411 functional: true,
21412
21413 render: function render(h, ctx) {
21414 return h(
21415 "svg",
21416 babel_helper_vue_jsx_merge_props_default()([{
21417 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21418 "class": "feather feather-airplay" }, ctx.data]),
21419 [h(
21420 "path",
21421 {
21422 attrs: { d: "M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1" }
21423 },
21424 []
21425 ), h(
21426 "polygon",
21427 {
21428 attrs: { points: "12 15 17 21 7 21 12 15" }
21429 },
21430 []
21431 )]
21432 );
21433 }
21434};
21435
21436var AlertCircleIcon = {
21437 name: 'alert-circle-icon',
21438
21439 functional: true,
21440
21441 render: function render(h, ctx) {
21442 return h(
21443 "svg",
21444 babel_helper_vue_jsx_merge_props_default()([{
21445 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21446 "class": "feather feather-alert-circle" }, ctx.data]),
21447 [h(
21448 "circle",
21449 {
21450 attrs: { cx: "12", cy: "12", r: "10" }
21451 },
21452 []
21453 ), h(
21454 "line",
21455 {
21456 attrs: { x1: "12", y1: "8", x2: "12", y2: "12" }
21457 },
21458 []
21459 ), h(
21460 "line",
21461 {
21462 attrs: { x1: "12", y1: "16", x2: "12", y2: "16" }
21463 },
21464 []
21465 )]
21466 );
21467 }
21468};
21469
21470var AlertOctagonIcon = {
21471 name: 'alert-octagon-icon',
21472
21473 functional: true,
21474
21475 render: function render(h, ctx) {
21476 return h(
21477 "svg",
21478 babel_helper_vue_jsx_merge_props_default()([{
21479 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21480 "class": "feather feather-alert-octagon" }, ctx.data]),
21481 [h(
21482 "polygon",
21483 {
21484 attrs: { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }
21485 },
21486 []
21487 ), h(
21488 "line",
21489 {
21490 attrs: { x1: "12", y1: "8", x2: "12", y2: "12" }
21491 },
21492 []
21493 ), h(
21494 "line",
21495 {
21496 attrs: { x1: "12", y1: "16", x2: "12", y2: "16" }
21497 },
21498 []
21499 )]
21500 );
21501 }
21502};
21503
21504var AlertTriangleIcon = {
21505 name: 'alert-triangle-icon',
21506
21507 functional: true,
21508
21509 render: function render(h, ctx) {
21510 return h(
21511 "svg",
21512 babel_helper_vue_jsx_merge_props_default()([{
21513 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21514 "class": "feather feather-alert-triangle" }, ctx.data]),
21515 [h(
21516 "path",
21517 {
21518 attrs: { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }
21519 },
21520 []
21521 ), h(
21522 "line",
21523 {
21524 attrs: { x1: "12", y1: "9", x2: "12", y2: "13" }
21525 },
21526 []
21527 ), h(
21528 "line",
21529 {
21530 attrs: { x1: "12", y1: "17", x2: "12", y2: "17" }
21531 },
21532 []
21533 )]
21534 );
21535 }
21536};
21537
21538var AlignCenterIcon = {
21539 name: 'align-center-icon',
21540
21541 functional: true,
21542
21543 render: function render(h, ctx) {
21544 return h(
21545 "svg",
21546 babel_helper_vue_jsx_merge_props_default()([{
21547 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21548 "class": "feather feather-align-center" }, ctx.data]),
21549 [h(
21550 "line",
21551 {
21552 attrs: { x1: "18", y1: "10", x2: "6", y2: "10" }
21553 },
21554 []
21555 ), h(
21556 "line",
21557 {
21558 attrs: { x1: "21", y1: "6", x2: "3", y2: "6" }
21559 },
21560 []
21561 ), h(
21562 "line",
21563 {
21564 attrs: { x1: "21", y1: "14", x2: "3", y2: "14" }
21565 },
21566 []
21567 ), h(
21568 "line",
21569 {
21570 attrs: { x1: "18", y1: "18", x2: "6", y2: "18" }
21571 },
21572 []
21573 )]
21574 );
21575 }
21576};
21577
21578var AlignJustifyIcon = {
21579 name: 'align-justify-icon',
21580
21581 functional: true,
21582
21583 render: function render(h, ctx) {
21584 return h(
21585 "svg",
21586 babel_helper_vue_jsx_merge_props_default()([{
21587 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21588 "class": "feather feather-align-justify" }, ctx.data]),
21589 [h(
21590 "line",
21591 {
21592 attrs: { x1: "21", y1: "10", x2: "3", y2: "10" }
21593 },
21594 []
21595 ), h(
21596 "line",
21597 {
21598 attrs: { x1: "21", y1: "6", x2: "3", y2: "6" }
21599 },
21600 []
21601 ), h(
21602 "line",
21603 {
21604 attrs: { x1: "21", y1: "14", x2: "3", y2: "14" }
21605 },
21606 []
21607 ), h(
21608 "line",
21609 {
21610 attrs: { x1: "21", y1: "18", x2: "3", y2: "18" }
21611 },
21612 []
21613 )]
21614 );
21615 }
21616};
21617
21618var AlignLeftIcon = {
21619 name: 'align-left-icon',
21620
21621 functional: true,
21622
21623 render: function render(h, ctx) {
21624 return h(
21625 "svg",
21626 babel_helper_vue_jsx_merge_props_default()([{
21627 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21628 "class": "feather feather-align-left" }, ctx.data]),
21629 [h(
21630 "line",
21631 {
21632 attrs: { x1: "17", y1: "10", x2: "3", y2: "10" }
21633 },
21634 []
21635 ), h(
21636 "line",
21637 {
21638 attrs: { x1: "21", y1: "6", x2: "3", y2: "6" }
21639 },
21640 []
21641 ), h(
21642 "line",
21643 {
21644 attrs: { x1: "21", y1: "14", x2: "3", y2: "14" }
21645 },
21646 []
21647 ), h(
21648 "line",
21649 {
21650 attrs: { x1: "17", y1: "18", x2: "3", y2: "18" }
21651 },
21652 []
21653 )]
21654 );
21655 }
21656};
21657
21658var AlignRightIcon = {
21659 name: 'align-right-icon',
21660
21661 functional: true,
21662
21663 render: function render(h, ctx) {
21664 return h(
21665 "svg",
21666 babel_helper_vue_jsx_merge_props_default()([{
21667 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21668 "class": "feather feather-align-right" }, ctx.data]),
21669 [h(
21670 "line",
21671 {
21672 attrs: { x1: "21", y1: "10", x2: "7", y2: "10" }
21673 },
21674 []
21675 ), h(
21676 "line",
21677 {
21678 attrs: { x1: "21", y1: "6", x2: "3", y2: "6" }
21679 },
21680 []
21681 ), h(
21682 "line",
21683 {
21684 attrs: { x1: "21", y1: "14", x2: "3", y2: "14" }
21685 },
21686 []
21687 ), h(
21688 "line",
21689 {
21690 attrs: { x1: "21", y1: "18", x2: "7", y2: "18" }
21691 },
21692 []
21693 )]
21694 );
21695 }
21696};
21697
21698var AnchorIcon = {
21699 name: 'anchor-icon',
21700
21701 functional: true,
21702
21703 render: function render(h, ctx) {
21704 return h(
21705 "svg",
21706 babel_helper_vue_jsx_merge_props_default()([{
21707 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21708 "class": "feather feather-anchor" }, ctx.data]),
21709 [h(
21710 "circle",
21711 {
21712 attrs: { cx: "12", cy: "5", r: "3" }
21713 },
21714 []
21715 ), h(
21716 "line",
21717 {
21718 attrs: { x1: "12", y1: "22", x2: "12", y2: "8" }
21719 },
21720 []
21721 ), h(
21722 "path",
21723 {
21724 attrs: { d: "M5 12H2a10 10 0 0 0 20 0h-3" }
21725 },
21726 []
21727 )]
21728 );
21729 }
21730};
21731
21732var ApertureIcon = {
21733 name: 'aperture-icon',
21734
21735 functional: true,
21736
21737 render: function render(h, ctx) {
21738 return h(
21739 "svg",
21740 babel_helper_vue_jsx_merge_props_default()([{
21741 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21742 "class": "feather feather-aperture" }, ctx.data]),
21743 [h(
21744 "circle",
21745 {
21746 attrs: { cx: "12", cy: "12", r: "10" }
21747 },
21748 []
21749 ), h(
21750 "line",
21751 {
21752 attrs: { x1: "14.31", y1: "8", x2: "20.05", y2: "17.94" }
21753 },
21754 []
21755 ), h(
21756 "line",
21757 {
21758 attrs: { x1: "9.69", y1: "8", x2: "21.17", y2: "8" }
21759 },
21760 []
21761 ), h(
21762 "line",
21763 {
21764 attrs: { x1: "7.38", y1: "12", x2: "13.12", y2: "2.06" }
21765 },
21766 []
21767 ), h(
21768 "line",
21769 {
21770 attrs: { x1: "9.69", y1: "16", x2: "3.95", y2: "6.06" }
21771 },
21772 []
21773 ), h(
21774 "line",
21775 {
21776 attrs: { x1: "14.31", y1: "16", x2: "2.83", y2: "16" }
21777 },
21778 []
21779 ), h(
21780 "line",
21781 {
21782 attrs: { x1: "16.62", y1: "12", x2: "10.88", y2: "21.94" }
21783 },
21784 []
21785 )]
21786 );
21787 }
21788};
21789
21790var ArchiveIcon = {
21791 name: 'archive-icon',
21792
21793 functional: true,
21794
21795 render: function render(h, ctx) {
21796 return h(
21797 "svg",
21798 babel_helper_vue_jsx_merge_props_default()([{
21799 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21800 "class": "feather feather-archive" }, ctx.data]),
21801 [h(
21802 "polyline",
21803 {
21804 attrs: { points: "21 8 21 21 3 21 3 8" }
21805 },
21806 []
21807 ), h(
21808 "rect",
21809 {
21810 attrs: { x: "1", y: "3", width: "22", height: "5" }
21811 },
21812 []
21813 ), h(
21814 "line",
21815 {
21816 attrs: { x1: "10", y1: "12", x2: "14", y2: "12" }
21817 },
21818 []
21819 )]
21820 );
21821 }
21822};
21823
21824var ArrowDownCircleIcon = {
21825 name: 'arrow-down-circle-icon',
21826
21827 functional: true,
21828
21829 render: function render(h, ctx) {
21830 return h(
21831 "svg",
21832 babel_helper_vue_jsx_merge_props_default()([{
21833 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21834 "class": "feather feather-arrow-down-circle" }, ctx.data]),
21835 [h(
21836 "circle",
21837 {
21838 attrs: { cx: "12", cy: "12", r: "10" }
21839 },
21840 []
21841 ), h(
21842 "polyline",
21843 {
21844 attrs: { points: "8 12 12 16 16 12" }
21845 },
21846 []
21847 ), h(
21848 "line",
21849 {
21850 attrs: { x1: "12", y1: "8", x2: "12", y2: "16" }
21851 },
21852 []
21853 )]
21854 );
21855 }
21856};
21857
21858var ArrowDownLeftIcon = {
21859 name: 'arrow-down-left-icon',
21860
21861 functional: true,
21862
21863 render: function render(h, ctx) {
21864 return h(
21865 "svg",
21866 babel_helper_vue_jsx_merge_props_default()([{
21867 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21868 "class": "feather feather-arrow-down-left" }, ctx.data]),
21869 [h(
21870 "line",
21871 {
21872 attrs: { x1: "17", y1: "7", x2: "7", y2: "17" }
21873 },
21874 []
21875 ), h(
21876 "polyline",
21877 {
21878 attrs: { points: "17 17 7 17 7 7" }
21879 },
21880 []
21881 )]
21882 );
21883 }
21884};
21885
21886var ArrowDownRightIcon = {
21887 name: 'arrow-down-right-icon',
21888
21889 functional: true,
21890
21891 render: function render(h, ctx) {
21892 return h(
21893 "svg",
21894 babel_helper_vue_jsx_merge_props_default()([{
21895 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21896 "class": "feather feather-arrow-down-right" }, ctx.data]),
21897 [h(
21898 "line",
21899 {
21900 attrs: { x1: "7", y1: "7", x2: "17", y2: "17" }
21901 },
21902 []
21903 ), h(
21904 "polyline",
21905 {
21906 attrs: { points: "17 7 17 17 7 17" }
21907 },
21908 []
21909 )]
21910 );
21911 }
21912};
21913
21914var ArrowDownIcon = {
21915 name: 'arrow-down-icon',
21916
21917 functional: true,
21918
21919 render: function render(h, ctx) {
21920 return h(
21921 "svg",
21922 babel_helper_vue_jsx_merge_props_default()([{
21923 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21924 "class": "feather feather-arrow-down" }, ctx.data]),
21925 [h(
21926 "line",
21927 {
21928 attrs: { x1: "12", y1: "5", x2: "12", y2: "19" }
21929 },
21930 []
21931 ), h(
21932 "polyline",
21933 {
21934 attrs: { points: "19 12 12 19 5 12" }
21935 },
21936 []
21937 )]
21938 );
21939 }
21940};
21941
21942var ArrowLeftCircleIcon = {
21943 name: 'arrow-left-circle-icon',
21944
21945 functional: true,
21946
21947 render: function render(h, ctx) {
21948 return h(
21949 "svg",
21950 babel_helper_vue_jsx_merge_props_default()([{
21951 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21952 "class": "feather feather-arrow-left-circle" }, ctx.data]),
21953 [h(
21954 "circle",
21955 {
21956 attrs: { cx: "12", cy: "12", r: "10" }
21957 },
21958 []
21959 ), h(
21960 "polyline",
21961 {
21962 attrs: { points: "12 8 8 12 12 16" }
21963 },
21964 []
21965 ), h(
21966 "line",
21967 {
21968 attrs: { x1: "16", y1: "12", x2: "8", y2: "12" }
21969 },
21970 []
21971 )]
21972 );
21973 }
21974};
21975
21976var ArrowLeftIcon = {
21977 name: 'arrow-left-icon',
21978
21979 functional: true,
21980
21981 render: function render(h, ctx) {
21982 return h(
21983 "svg",
21984 babel_helper_vue_jsx_merge_props_default()([{
21985 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
21986 "class": "feather feather-arrow-left" }, ctx.data]),
21987 [h(
21988 "line",
21989 {
21990 attrs: { x1: "19", y1: "12", x2: "5", y2: "12" }
21991 },
21992 []
21993 ), h(
21994 "polyline",
21995 {
21996 attrs: { points: "12 19 5 12 12 5" }
21997 },
21998 []
21999 )]
22000 );
22001 }
22002};
22003
22004var ArrowRightCircleIcon = {
22005 name: 'arrow-right-circle-icon',
22006
22007 functional: true,
22008
22009 render: function render(h, ctx) {
22010 return h(
22011 "svg",
22012 babel_helper_vue_jsx_merge_props_default()([{
22013 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22014 "class": "feather feather-arrow-right-circle" }, ctx.data]),
22015 [h(
22016 "circle",
22017 {
22018 attrs: { cx: "12", cy: "12", r: "10" }
22019 },
22020 []
22021 ), h(
22022 "polyline",
22023 {
22024 attrs: { points: "12 16 16 12 12 8" }
22025 },
22026 []
22027 ), h(
22028 "line",
22029 {
22030 attrs: { x1: "8", y1: "12", x2: "16", y2: "12" }
22031 },
22032 []
22033 )]
22034 );
22035 }
22036};
22037
22038var ArrowRightIcon = {
22039 name: 'arrow-right-icon',
22040
22041 functional: true,
22042
22043 render: function render(h, ctx) {
22044 return h(
22045 "svg",
22046 babel_helper_vue_jsx_merge_props_default()([{
22047 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22048 "class": "feather feather-arrow-right" }, ctx.data]),
22049 [h(
22050 "line",
22051 {
22052 attrs: { x1: "5", y1: "12", x2: "19", y2: "12" }
22053 },
22054 []
22055 ), h(
22056 "polyline",
22057 {
22058 attrs: { points: "12 5 19 12 12 19" }
22059 },
22060 []
22061 )]
22062 );
22063 }
22064};
22065
22066var ArrowUpCircleIcon = {
22067 name: 'arrow-up-circle-icon',
22068
22069 functional: true,
22070
22071 render: function render(h, ctx) {
22072 return h(
22073 "svg",
22074 babel_helper_vue_jsx_merge_props_default()([{
22075 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22076 "class": "feather feather-arrow-up-circle" }, ctx.data]),
22077 [h(
22078 "circle",
22079 {
22080 attrs: { cx: "12", cy: "12", r: "10" }
22081 },
22082 []
22083 ), h(
22084 "polyline",
22085 {
22086 attrs: { points: "16 12 12 8 8 12" }
22087 },
22088 []
22089 ), h(
22090 "line",
22091 {
22092 attrs: { x1: "12", y1: "16", x2: "12", y2: "8" }
22093 },
22094 []
22095 )]
22096 );
22097 }
22098};
22099
22100var ArrowUpLeftIcon = {
22101 name: 'arrow-up-left-icon',
22102
22103 functional: true,
22104
22105 render: function render(h, ctx) {
22106 return h(
22107 "svg",
22108 babel_helper_vue_jsx_merge_props_default()([{
22109 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22110 "class": "feather feather-arrow-up-left" }, ctx.data]),
22111 [h(
22112 "line",
22113 {
22114 attrs: { x1: "17", y1: "17", x2: "7", y2: "7" }
22115 },
22116 []
22117 ), h(
22118 "polyline",
22119 {
22120 attrs: { points: "7 17 7 7 17 7" }
22121 },
22122 []
22123 )]
22124 );
22125 }
22126};
22127
22128var ArrowUpRightIcon = {
22129 name: 'arrow-up-right-icon',
22130
22131 functional: true,
22132
22133 render: function render(h, ctx) {
22134 return h(
22135 "svg",
22136 babel_helper_vue_jsx_merge_props_default()([{
22137 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22138 "class": "feather feather-arrow-up-right" }, ctx.data]),
22139 [h(
22140 "line",
22141 {
22142 attrs: { x1: "7", y1: "17", x2: "17", y2: "7" }
22143 },
22144 []
22145 ), h(
22146 "polyline",
22147 {
22148 attrs: { points: "7 7 17 7 17 17" }
22149 },
22150 []
22151 )]
22152 );
22153 }
22154};
22155
22156var ArrowUpIcon = {
22157 name: 'arrow-up-icon',
22158
22159 functional: true,
22160
22161 render: function render(h, ctx) {
22162 return h(
22163 "svg",
22164 babel_helper_vue_jsx_merge_props_default()([{
22165 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22166 "class": "feather feather-arrow-up" }, ctx.data]),
22167 [h(
22168 "line",
22169 {
22170 attrs: { x1: "12", y1: "19", x2: "12", y2: "5" }
22171 },
22172 []
22173 ), h(
22174 "polyline",
22175 {
22176 attrs: { points: "5 12 12 5 19 12" }
22177 },
22178 []
22179 )]
22180 );
22181 }
22182};
22183
22184var AtSignIcon = {
22185 name: 'at-sign-icon',
22186
22187 functional: true,
22188
22189 render: function render(h, ctx) {
22190 return h(
22191 "svg",
22192 babel_helper_vue_jsx_merge_props_default()([{
22193 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22194 "class": "feather feather-at-sign" }, ctx.data]),
22195 [h(
22196 "circle",
22197 {
22198 attrs: { cx: "12", cy: "12", r: "4" }
22199 },
22200 []
22201 ), h(
22202 "path",
22203 {
22204 attrs: { d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94" }
22205 },
22206 []
22207 )]
22208 );
22209 }
22210};
22211
22212var AwardIcon = {
22213 name: 'award-icon',
22214
22215 functional: true,
22216
22217 render: function render(h, ctx) {
22218 return h(
22219 "svg",
22220 babel_helper_vue_jsx_merge_props_default()([{
22221 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22222 "class": "feather feather-award" }, ctx.data]),
22223 [h(
22224 "circle",
22225 {
22226 attrs: { cx: "12", cy: "8", r: "7" }
22227 },
22228 []
22229 ), h(
22230 "polyline",
22231 {
22232 attrs: { points: "8.21 13.89 7 23 12 20 17 23 15.79 13.88" }
22233 },
22234 []
22235 )]
22236 );
22237 }
22238};
22239
22240var BarChart2Icon = {
22241 name: 'bar-chart2-icon',
22242
22243 functional: true,
22244
22245 render: function render(h, ctx) {
22246 return h(
22247 "svg",
22248 babel_helper_vue_jsx_merge_props_default()([{
22249 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22250 "class": "feather feather-bar-chart-2" }, ctx.data]),
22251 [h(
22252 "line",
22253 {
22254 attrs: { x1: "18", y1: "20", x2: "18", y2: "10" }
22255 },
22256 []
22257 ), h(
22258 "line",
22259 {
22260 attrs: { x1: "12", y1: "20", x2: "12", y2: "4" }
22261 },
22262 []
22263 ), h(
22264 "line",
22265 {
22266 attrs: { x1: "6", y1: "20", x2: "6", y2: "14" }
22267 },
22268 []
22269 )]
22270 );
22271 }
22272};
22273
22274var BarChartIcon = {
22275 name: 'bar-chart-icon',
22276
22277 functional: true,
22278
22279 render: function render(h, ctx) {
22280 return h(
22281 "svg",
22282 babel_helper_vue_jsx_merge_props_default()([{
22283 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22284 "class": "feather feather-bar-chart" }, ctx.data]),
22285 [h(
22286 "line",
22287 {
22288 attrs: { x1: "12", y1: "20", x2: "12", y2: "10" }
22289 },
22290 []
22291 ), h(
22292 "line",
22293 {
22294 attrs: { x1: "18", y1: "20", x2: "18", y2: "4" }
22295 },
22296 []
22297 ), h(
22298 "line",
22299 {
22300 attrs: { x1: "6", y1: "20", x2: "6", y2: "16" }
22301 },
22302 []
22303 )]
22304 );
22305 }
22306};
22307
22308var BatteryChargingIcon = {
22309 name: 'battery-charging-icon',
22310
22311 functional: true,
22312
22313 render: function render(h, ctx) {
22314 return h(
22315 "svg",
22316 babel_helper_vue_jsx_merge_props_default()([{
22317 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22318 "class": "feather feather-battery-charging" }, ctx.data]),
22319 [h(
22320 "path",
22321 {
22322 attrs: { d: "M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19" }
22323 },
22324 []
22325 ), h(
22326 "line",
22327 {
22328 attrs: { x1: "23", y1: "13", x2: "23", y2: "11" }
22329 },
22330 []
22331 ), h(
22332 "polyline",
22333 {
22334 attrs: { points: "11 6 7 12 13 12 9 18" }
22335 },
22336 []
22337 )]
22338 );
22339 }
22340};
22341
22342var BatteryIcon = {
22343 name: 'battery-icon',
22344
22345 functional: true,
22346
22347 render: function render(h, ctx) {
22348 return h(
22349 "svg",
22350 babel_helper_vue_jsx_merge_props_default()([{
22351 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22352 "class": "feather feather-battery" }, ctx.data]),
22353 [h(
22354 "rect",
22355 {
22356 attrs: { x: "1", y: "6", width: "18", height: "12", rx: "2", ry: "2" }
22357 },
22358 []
22359 ), h(
22360 "line",
22361 {
22362 attrs: { x1: "23", y1: "13", x2: "23", y2: "11" }
22363 },
22364 []
22365 )]
22366 );
22367 }
22368};
22369
22370var BellOffIcon = {
22371 name: 'bell-off-icon',
22372
22373 functional: true,
22374
22375 render: function render(h, ctx) {
22376 return h(
22377 "svg",
22378 babel_helper_vue_jsx_merge_props_default()([{
22379 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22380 "class": "feather feather-bell-off" }, ctx.data]),
22381 [h(
22382 "path",
22383 {
22384 attrs: { d: "M8.56 2.9A7 7 0 0 1 19 9v4m-2 4H2a3 3 0 0 0 3-3V9a7 7 0 0 1 .78-3.22M13.73 21a2 2 0 0 1-3.46 0" }
22385 },
22386 []
22387 ), h(
22388 "line",
22389 {
22390 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
22391 },
22392 []
22393 )]
22394 );
22395 }
22396};
22397
22398var BellIcon = {
22399 name: 'bell-icon',
22400
22401 functional: true,
22402
22403 render: function render(h, ctx) {
22404 return h(
22405 "svg",
22406 babel_helper_vue_jsx_merge_props_default()([{
22407 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22408 "class": "feather feather-bell" }, ctx.data]),
22409 [h(
22410 "path",
22411 {
22412 attrs: { d: "M22 17H2a3 3 0 0 0 3-3V9a7 7 0 0 1 14 0v5a3 3 0 0 0 3 3zm-8.27 4a2 2 0 0 1-3.46 0" }
22413 },
22414 []
22415 )]
22416 );
22417 }
22418};
22419
22420var BluetoothIcon = {
22421 name: 'bluetooth-icon',
22422
22423 functional: true,
22424
22425 render: function render(h, ctx) {
22426 return h(
22427 "svg",
22428 babel_helper_vue_jsx_merge_props_default()([{
22429 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22430 "class": "feather feather-bluetooth" }, ctx.data]),
22431 [h(
22432 "polyline",
22433 {
22434 attrs: { points: "6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5" }
22435 },
22436 []
22437 )]
22438 );
22439 }
22440};
22441
22442var BoldIcon = {
22443 name: 'bold-icon',
22444
22445 functional: true,
22446
22447 render: function render(h, ctx) {
22448 return h(
22449 "svg",
22450 babel_helper_vue_jsx_merge_props_default()([{
22451 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22452 "class": "feather feather-bold" }, ctx.data]),
22453 [h(
22454 "path",
22455 {
22456 attrs: { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }
22457 },
22458 []
22459 ), h(
22460 "path",
22461 {
22462 attrs: { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }
22463 },
22464 []
22465 )]
22466 );
22467 }
22468};
22469
22470var BookOpenIcon = {
22471 name: 'book-open-icon',
22472
22473 functional: true,
22474
22475 render: function render(h, ctx) {
22476 return h(
22477 "svg",
22478 babel_helper_vue_jsx_merge_props_default()([{
22479 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22480 "class": "feather feather-book-open" }, ctx.data]),
22481 [h(
22482 "path",
22483 {
22484 attrs: { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }
22485 },
22486 []
22487 ), h(
22488 "path",
22489 {
22490 attrs: { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" }
22491 },
22492 []
22493 )]
22494 );
22495 }
22496};
22497
22498var BookIcon = {
22499 name: 'book-icon',
22500
22501 functional: true,
22502
22503 render: function render(h, ctx) {
22504 return h(
22505 "svg",
22506 babel_helper_vue_jsx_merge_props_default()([{
22507 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22508 "class": "feather feather-book" }, ctx.data]),
22509 [h(
22510 "path",
22511 {
22512 attrs: { d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20" }
22513 },
22514 []
22515 ), h(
22516 "path",
22517 {
22518 attrs: { d: "M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" }
22519 },
22520 []
22521 )]
22522 );
22523 }
22524};
22525
22526var BookmarkIcon = {
22527 name: 'bookmark-icon',
22528
22529 functional: true,
22530
22531 render: function render(h, ctx) {
22532 return h(
22533 "svg",
22534 babel_helper_vue_jsx_merge_props_default()([{
22535 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22536 "class": "feather feather-bookmark" }, ctx.data]),
22537 [h(
22538 "path",
22539 {
22540 attrs: { d: "M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" }
22541 },
22542 []
22543 )]
22544 );
22545 }
22546};
22547
22548var BoxIcon = {
22549 name: 'box-icon',
22550
22551 functional: true,
22552
22553 render: function render(h, ctx) {
22554 return h(
22555 "svg",
22556 babel_helper_vue_jsx_merge_props_default()([{
22557 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22558 "class": "feather feather-box" }, ctx.data]),
22559 [h(
22560 "path",
22561 {
22562 attrs: { d: "M12.89 1.45l8 4A2 2 0 0 1 22 7.24v9.53a2 2 0 0 1-1.11 1.79l-8 4a2 2 0 0 1-1.79 0l-8-4a2 2 0 0 1-1.1-1.8V7.24a2 2 0 0 1 1.11-1.79l8-4a2 2 0 0 1 1.78 0z" }
22563 },
22564 []
22565 ), h(
22566 "polyline",
22567 {
22568 attrs: { points: "2.32 6.16 12 11 21.68 6.16" }
22569 },
22570 []
22571 ), h(
22572 "line",
22573 {
22574 attrs: { x1: "12", y1: "22.76", x2: "12", y2: "11" }
22575 },
22576 []
22577 )]
22578 );
22579 }
22580};
22581
22582var BriefcaseIcon = {
22583 name: 'briefcase-icon',
22584
22585 functional: true,
22586
22587 render: function render(h, ctx) {
22588 return h(
22589 "svg",
22590 babel_helper_vue_jsx_merge_props_default()([{
22591 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22592 "class": "feather feather-briefcase" }, ctx.data]),
22593 [h(
22594 "rect",
22595 {
22596 attrs: { x: "2", y: "7", width: "20", height: "14", rx: "2", ry: "2" }
22597 },
22598 []
22599 ), h(
22600 "path",
22601 {
22602 attrs: { d: "M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" }
22603 },
22604 []
22605 )]
22606 );
22607 }
22608};
22609
22610var CalendarIcon = {
22611 name: 'calendar-icon',
22612
22613 functional: true,
22614
22615 render: function render(h, ctx) {
22616 return h(
22617 "svg",
22618 babel_helper_vue_jsx_merge_props_default()([{
22619 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22620 "class": "feather feather-calendar" }, ctx.data]),
22621 [h(
22622 "rect",
22623 {
22624 attrs: { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }
22625 },
22626 []
22627 ), h(
22628 "line",
22629 {
22630 attrs: { x1: "16", y1: "2", x2: "16", y2: "6" }
22631 },
22632 []
22633 ), h(
22634 "line",
22635 {
22636 attrs: { x1: "8", y1: "2", x2: "8", y2: "6" }
22637 },
22638 []
22639 ), h(
22640 "line",
22641 {
22642 attrs: { x1: "3", y1: "10", x2: "21", y2: "10" }
22643 },
22644 []
22645 )]
22646 );
22647 }
22648};
22649
22650var CameraOffIcon = {
22651 name: 'camera-off-icon',
22652
22653 functional: true,
22654
22655 render: function render(h, ctx) {
22656 return h(
22657 "svg",
22658 babel_helper_vue_jsx_merge_props_default()([{
22659 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22660 "class": "feather feather-camera-off" }, ctx.data]),
22661 [h(
22662 "line",
22663 {
22664 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
22665 },
22666 []
22667 ), h(
22668 "path",
22669 {
22670 attrs: { d: "M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56" }
22671 },
22672 []
22673 )]
22674 );
22675 }
22676};
22677
22678var CameraIcon = {
22679 name: 'camera-icon',
22680
22681 functional: true,
22682
22683 render: function render(h, ctx) {
22684 return h(
22685 "svg",
22686 babel_helper_vue_jsx_merge_props_default()([{
22687 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22688 "class": "feather feather-camera" }, ctx.data]),
22689 [h(
22690 "path",
22691 {
22692 attrs: { d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z" }
22693 },
22694 []
22695 ), h(
22696 "circle",
22697 {
22698 attrs: { cx: "12", cy: "13", r: "4" }
22699 },
22700 []
22701 )]
22702 );
22703 }
22704};
22705
22706var CastIcon = {
22707 name: 'cast-icon',
22708
22709 functional: true,
22710
22711 render: function render(h, ctx) {
22712 return h(
22713 "svg",
22714 babel_helper_vue_jsx_merge_props_default()([{
22715 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22716 "class": "feather feather-cast" }, ctx.data]),
22717 [h(
22718 "path",
22719 {
22720 attrs: { d: "M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }
22721 },
22722 []
22723 ), h(
22724 "line",
22725 {
22726 attrs: { x1: "2", y1: "20", x2: "2", y2: "20" }
22727 },
22728 []
22729 )]
22730 );
22731 }
22732};
22733
22734var CheckCircleIcon = {
22735 name: 'check-circle-icon',
22736
22737 functional: true,
22738
22739 render: function render(h, ctx) {
22740 return h(
22741 "svg",
22742 babel_helper_vue_jsx_merge_props_default()([{
22743 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22744 "class": "feather feather-check-circle" }, ctx.data]),
22745 [h(
22746 "path",
22747 {
22748 attrs: { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }
22749 },
22750 []
22751 ), h(
22752 "polyline",
22753 {
22754 attrs: { points: "22 4 12 14.01 9 11.01" }
22755 },
22756 []
22757 )]
22758 );
22759 }
22760};
22761
22762var CheckSquareIcon = {
22763 name: 'check-square-icon',
22764
22765 functional: true,
22766
22767 render: function render(h, ctx) {
22768 return h(
22769 "svg",
22770 babel_helper_vue_jsx_merge_props_default()([{
22771 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22772 "class": "feather feather-check-square" }, ctx.data]),
22773 [h(
22774 "polyline",
22775 {
22776 attrs: { points: "9 11 12 14 22 4" }
22777 },
22778 []
22779 ), h(
22780 "path",
22781 {
22782 attrs: { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" }
22783 },
22784 []
22785 )]
22786 );
22787 }
22788};
22789
22790var CheckIcon = {
22791 name: 'check-icon',
22792
22793 functional: true,
22794
22795 render: function render(h, ctx) {
22796 return h(
22797 "svg",
22798 babel_helper_vue_jsx_merge_props_default()([{
22799 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22800 "class": "feather feather-check" }, ctx.data]),
22801 [h(
22802 "polyline",
22803 {
22804 attrs: { points: "20 6 9 17 4 12" }
22805 },
22806 []
22807 )]
22808 );
22809 }
22810};
22811
22812var ChevronDownIcon = {
22813 name: 'chevron-down-icon',
22814
22815 functional: true,
22816
22817 render: function render(h, ctx) {
22818 return h(
22819 "svg",
22820 babel_helper_vue_jsx_merge_props_default()([{
22821 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22822 "class": "feather feather-chevron-down" }, ctx.data]),
22823 [h(
22824 "polyline",
22825 {
22826 attrs: { points: "6 9 12 15 18 9" }
22827 },
22828 []
22829 )]
22830 );
22831 }
22832};
22833
22834var ChevronLeftIcon = {
22835 name: 'chevron-left-icon',
22836
22837 functional: true,
22838
22839 render: function render(h, ctx) {
22840 return h(
22841 "svg",
22842 babel_helper_vue_jsx_merge_props_default()([{
22843 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22844 "class": "feather feather-chevron-left" }, ctx.data]),
22845 [h(
22846 "polyline",
22847 {
22848 attrs: { points: "15 18 9 12 15 6" }
22849 },
22850 []
22851 )]
22852 );
22853 }
22854};
22855
22856var ChevronRightIcon = {
22857 name: 'chevron-right-icon',
22858
22859 functional: true,
22860
22861 render: function render(h, ctx) {
22862 return h(
22863 "svg",
22864 babel_helper_vue_jsx_merge_props_default()([{
22865 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22866 "class": "feather feather-chevron-right" }, ctx.data]),
22867 [h(
22868 "polyline",
22869 {
22870 attrs: { points: "9 18 15 12 9 6" }
22871 },
22872 []
22873 )]
22874 );
22875 }
22876};
22877
22878var ChevronUpIcon = {
22879 name: 'chevron-up-icon',
22880
22881 functional: true,
22882
22883 render: function render(h, ctx) {
22884 return h(
22885 "svg",
22886 babel_helper_vue_jsx_merge_props_default()([{
22887 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22888 "class": "feather feather-chevron-up" }, ctx.data]),
22889 [h(
22890 "polyline",
22891 {
22892 attrs: { points: "18 15 12 9 6 15" }
22893 },
22894 []
22895 )]
22896 );
22897 }
22898};
22899
22900var ChevronsDownIcon = {
22901 name: 'chevrons-down-icon',
22902
22903 functional: true,
22904
22905 render: function render(h, ctx) {
22906 return h(
22907 "svg",
22908 babel_helper_vue_jsx_merge_props_default()([{
22909 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22910 "class": "feather feather-chevrons-down" }, ctx.data]),
22911 [h(
22912 "polyline",
22913 {
22914 attrs: { points: "7 13 12 18 17 13" }
22915 },
22916 []
22917 ), h(
22918 "polyline",
22919 {
22920 attrs: { points: "7 6 12 11 17 6" }
22921 },
22922 []
22923 )]
22924 );
22925 }
22926};
22927
22928var ChevronsLeftIcon = {
22929 name: 'chevrons-left-icon',
22930
22931 functional: true,
22932
22933 render: function render(h, ctx) {
22934 return h(
22935 "svg",
22936 babel_helper_vue_jsx_merge_props_default()([{
22937 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22938 "class": "feather feather-chevrons-left" }, ctx.data]),
22939 [h(
22940 "polyline",
22941 {
22942 attrs: { points: "11 17 6 12 11 7" }
22943 },
22944 []
22945 ), h(
22946 "polyline",
22947 {
22948 attrs: { points: "18 17 13 12 18 7" }
22949 },
22950 []
22951 )]
22952 );
22953 }
22954};
22955
22956var ChevronsRightIcon = {
22957 name: 'chevrons-right-icon',
22958
22959 functional: true,
22960
22961 render: function render(h, ctx) {
22962 return h(
22963 "svg",
22964 babel_helper_vue_jsx_merge_props_default()([{
22965 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22966 "class": "feather feather-chevrons-right" }, ctx.data]),
22967 [h(
22968 "polyline",
22969 {
22970 attrs: { points: "13 17 18 12 13 7" }
22971 },
22972 []
22973 ), h(
22974 "polyline",
22975 {
22976 attrs: { points: "6 17 11 12 6 7" }
22977 },
22978 []
22979 )]
22980 );
22981 }
22982};
22983
22984var ChevronsUpIcon = {
22985 name: 'chevrons-up-icon',
22986
22987 functional: true,
22988
22989 render: function render(h, ctx) {
22990 return h(
22991 "svg",
22992 babel_helper_vue_jsx_merge_props_default()([{
22993 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
22994 "class": "feather feather-chevrons-up" }, ctx.data]),
22995 [h(
22996 "polyline",
22997 {
22998 attrs: { points: "17 11 12 6 7 11" }
22999 },
23000 []
23001 ), h(
23002 "polyline",
23003 {
23004 attrs: { points: "17 18 12 13 7 18" }
23005 },
23006 []
23007 )]
23008 );
23009 }
23010};
23011
23012var ChromeIcon = {
23013 name: 'chrome-icon',
23014
23015 functional: true,
23016
23017 render: function render(h, ctx) {
23018 return h(
23019 "svg",
23020 babel_helper_vue_jsx_merge_props_default()([{
23021 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23022 "class": "feather feather-chrome" }, ctx.data]),
23023 [h(
23024 "circle",
23025 {
23026 attrs: { cx: "12", cy: "12", r: "10" }
23027 },
23028 []
23029 ), h(
23030 "circle",
23031 {
23032 attrs: { cx: "12", cy: "12", r: "4" }
23033 },
23034 []
23035 ), h(
23036 "line",
23037 {
23038 attrs: { x1: "21.17", y1: "8", x2: "12", y2: "8" }
23039 },
23040 []
23041 ), h(
23042 "line",
23043 {
23044 attrs: { x1: "3.95", y1: "6.06", x2: "8.54", y2: "14" }
23045 },
23046 []
23047 ), h(
23048 "line",
23049 {
23050 attrs: { x1: "10.88", y1: "21.94", x2: "15.46", y2: "14" }
23051 },
23052 []
23053 )]
23054 );
23055 }
23056};
23057
23058var CircleIcon = {
23059 name: 'circle-icon',
23060
23061 functional: true,
23062
23063 render: function render(h, ctx) {
23064 return h(
23065 "svg",
23066 babel_helper_vue_jsx_merge_props_default()([{
23067 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23068 "class": "feather feather-circle" }, ctx.data]),
23069 [h(
23070 "circle",
23071 {
23072 attrs: { cx: "12", cy: "12", r: "10" }
23073 },
23074 []
23075 )]
23076 );
23077 }
23078};
23079
23080var ClipboardIcon = {
23081 name: 'clipboard-icon',
23082
23083 functional: true,
23084
23085 render: function render(h, ctx) {
23086 return h(
23087 "svg",
23088 babel_helper_vue_jsx_merge_props_default()([{
23089 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23090 "class": "feather feather-clipboard" }, ctx.data]),
23091 [h(
23092 "path",
23093 {
23094 attrs: { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }
23095 },
23096 []
23097 ), h(
23098 "rect",
23099 {
23100 attrs: { x: "8", y: "2", width: "8", height: "4", rx: "1", ry: "1" }
23101 },
23102 []
23103 )]
23104 );
23105 }
23106};
23107
23108var ClockIcon = {
23109 name: 'clock-icon',
23110
23111 functional: true,
23112
23113 render: function render(h, ctx) {
23114 return h(
23115 "svg",
23116 babel_helper_vue_jsx_merge_props_default()([{
23117 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23118 "class": "feather feather-clock" }, ctx.data]),
23119 [h(
23120 "circle",
23121 {
23122 attrs: { cx: "12", cy: "12", r: "10" }
23123 },
23124 []
23125 ), h(
23126 "polyline",
23127 {
23128 attrs: { points: "12 6 12 12 16 14" }
23129 },
23130 []
23131 )]
23132 );
23133 }
23134};
23135
23136var CloudDrizzleIcon = {
23137 name: 'cloud-drizzle-icon',
23138
23139 functional: true,
23140
23141 render: function render(h, ctx) {
23142 return h(
23143 "svg",
23144 babel_helper_vue_jsx_merge_props_default()([{
23145 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23146 "class": "feather feather-cloud-drizzle" }, ctx.data]),
23147 [h(
23148 "line",
23149 {
23150 attrs: { x1: "8", y1: "19", x2: "8", y2: "21" }
23151 },
23152 []
23153 ), h(
23154 "line",
23155 {
23156 attrs: { x1: "8", y1: "13", x2: "8", y2: "15" }
23157 },
23158 []
23159 ), h(
23160 "line",
23161 {
23162 attrs: { x1: "16", y1: "19", x2: "16", y2: "21" }
23163 },
23164 []
23165 ), h(
23166 "line",
23167 {
23168 attrs: { x1: "16", y1: "13", x2: "16", y2: "15" }
23169 },
23170 []
23171 ), h(
23172 "line",
23173 {
23174 attrs: { x1: "12", y1: "21", x2: "12", y2: "23" }
23175 },
23176 []
23177 ), h(
23178 "line",
23179 {
23180 attrs: { x1: "12", y1: "15", x2: "12", y2: "17" }
23181 },
23182 []
23183 ), h(
23184 "path",
23185 {
23186 attrs: { d: "M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25" }
23187 },
23188 []
23189 )]
23190 );
23191 }
23192};
23193
23194var CloudLightningIcon = {
23195 name: 'cloud-lightning-icon',
23196
23197 functional: true,
23198
23199 render: function render(h, ctx) {
23200 return h(
23201 "svg",
23202 babel_helper_vue_jsx_merge_props_default()([{
23203 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23204 "class": "feather feather-cloud-lightning" }, ctx.data]),
23205 [h(
23206 "path",
23207 {
23208 attrs: { d: "M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9" }
23209 },
23210 []
23211 ), h(
23212 "polyline",
23213 {
23214 attrs: { points: "13 11 9 17 15 17 11 23" }
23215 },
23216 []
23217 )]
23218 );
23219 }
23220};
23221
23222var CloudOffIcon = {
23223 name: 'cloud-off-icon',
23224
23225 functional: true,
23226
23227 render: function render(h, ctx) {
23228 return h(
23229 "svg",
23230 babel_helper_vue_jsx_merge_props_default()([{
23231 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23232 "class": "feather feather-cloud-off" }, ctx.data]),
23233 [h(
23234 "path",
23235 {
23236 attrs: { d: "M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3" }
23237 },
23238 []
23239 ), h(
23240 "line",
23241 {
23242 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
23243 },
23244 []
23245 )]
23246 );
23247 }
23248};
23249
23250var CloudRainIcon = {
23251 name: 'cloud-rain-icon',
23252
23253 functional: true,
23254
23255 render: function render(h, ctx) {
23256 return h(
23257 "svg",
23258 babel_helper_vue_jsx_merge_props_default()([{
23259 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23260 "class": "feather feather-cloud-rain" }, ctx.data]),
23261 [h(
23262 "line",
23263 {
23264 attrs: { x1: "16", y1: "13", x2: "16", y2: "21" }
23265 },
23266 []
23267 ), h(
23268 "line",
23269 {
23270 attrs: { x1: "8", y1: "13", x2: "8", y2: "21" }
23271 },
23272 []
23273 ), h(
23274 "line",
23275 {
23276 attrs: { x1: "12", y1: "15", x2: "12", y2: "23" }
23277 },
23278 []
23279 ), h(
23280 "path",
23281 {
23282 attrs: { d: "M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25" }
23283 },
23284 []
23285 )]
23286 );
23287 }
23288};
23289
23290var CloudSnowIcon = {
23291 name: 'cloud-snow-icon',
23292
23293 functional: true,
23294
23295 render: function render(h, ctx) {
23296 return h(
23297 "svg",
23298 babel_helper_vue_jsx_merge_props_default()([{
23299 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23300 "class": "feather feather-cloud-snow" }, ctx.data]),
23301 [h(
23302 "path",
23303 {
23304 attrs: { d: "M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25" }
23305 },
23306 []
23307 ), h(
23308 "line",
23309 {
23310 attrs: { x1: "8", y1: "16", x2: "8", y2: "16" }
23311 },
23312 []
23313 ), h(
23314 "line",
23315 {
23316 attrs: { x1: "8", y1: "20", x2: "8", y2: "20" }
23317 },
23318 []
23319 ), h(
23320 "line",
23321 {
23322 attrs: { x1: "12", y1: "18", x2: "12", y2: "18" }
23323 },
23324 []
23325 ), h(
23326 "line",
23327 {
23328 attrs: { x1: "12", y1: "22", x2: "12", y2: "22" }
23329 },
23330 []
23331 ), h(
23332 "line",
23333 {
23334 attrs: { x1: "16", y1: "16", x2: "16", y2: "16" }
23335 },
23336 []
23337 ), h(
23338 "line",
23339 {
23340 attrs: { x1: "16", y1: "20", x2: "16", y2: "20" }
23341 },
23342 []
23343 )]
23344 );
23345 }
23346};
23347
23348var CloudIcon = {
23349 name: 'cloud-icon',
23350
23351 functional: true,
23352
23353 render: function render(h, ctx) {
23354 return h(
23355 "svg",
23356 babel_helper_vue_jsx_merge_props_default()([{
23357 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23358 "class": "feather feather-cloud" }, ctx.data]),
23359 [h(
23360 "path",
23361 {
23362 attrs: { d: "M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z" }
23363 },
23364 []
23365 )]
23366 );
23367 }
23368};
23369
23370var CodeIcon = {
23371 name: 'code-icon',
23372
23373 functional: true,
23374
23375 render: function render(h, ctx) {
23376 return h(
23377 "svg",
23378 babel_helper_vue_jsx_merge_props_default()([{
23379 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23380 "class": "feather feather-code" }, ctx.data]),
23381 [h(
23382 "polyline",
23383 {
23384 attrs: { points: "16 18 22 12 16 6" }
23385 },
23386 []
23387 ), h(
23388 "polyline",
23389 {
23390 attrs: { points: "8 6 2 12 8 18" }
23391 },
23392 []
23393 )]
23394 );
23395 }
23396};
23397
23398var CodepenIcon = {
23399 name: 'codepen-icon',
23400
23401 functional: true,
23402
23403 render: function render(h, ctx) {
23404 return h(
23405 "svg",
23406 babel_helper_vue_jsx_merge_props_default()([{
23407 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23408 "class": "feather feather-codepen" }, ctx.data]),
23409 [h(
23410 "polygon",
23411 {
23412 attrs: { points: "12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2" }
23413 },
23414 []
23415 ), h(
23416 "line",
23417 {
23418 attrs: { x1: "12", y1: "22", x2: "12", y2: "15.5" }
23419 },
23420 []
23421 ), h(
23422 "polyline",
23423 {
23424 attrs: { points: "22 8.5 12 15.5 2 8.5" }
23425 },
23426 []
23427 ), h(
23428 "polyline",
23429 {
23430 attrs: { points: "2 15.5 12 8.5 22 15.5" }
23431 },
23432 []
23433 ), h(
23434 "line",
23435 {
23436 attrs: { x1: "12", y1: "2", x2: "12", y2: "8.5" }
23437 },
23438 []
23439 )]
23440 );
23441 }
23442};
23443
23444var CommandIcon = {
23445 name: 'command-icon',
23446
23447 functional: true,
23448
23449 render: function render(h, ctx) {
23450 return h(
23451 "svg",
23452 babel_helper_vue_jsx_merge_props_default()([{
23453 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23454 "class": "feather feather-command" }, ctx.data]),
23455 [h(
23456 "path",
23457 {
23458 attrs: { d: "M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z" }
23459 },
23460 []
23461 )]
23462 );
23463 }
23464};
23465
23466var CompassIcon = {
23467 name: 'compass-icon',
23468
23469 functional: true,
23470
23471 render: function render(h, ctx) {
23472 return h(
23473 "svg",
23474 babel_helper_vue_jsx_merge_props_default()([{
23475 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23476 "class": "feather feather-compass" }, ctx.data]),
23477 [h(
23478 "circle",
23479 {
23480 attrs: { cx: "12", cy: "12", r: "10" }
23481 },
23482 []
23483 ), h(
23484 "polygon",
23485 {
23486 attrs: { points: "16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" }
23487 },
23488 []
23489 )]
23490 );
23491 }
23492};
23493
23494var CopyIcon = {
23495 name: 'copy-icon',
23496
23497 functional: true,
23498
23499 render: function render(h, ctx) {
23500 return h(
23501 "svg",
23502 babel_helper_vue_jsx_merge_props_default()([{
23503 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23504 "class": "feather feather-copy" }, ctx.data]),
23505 [h(
23506 "rect",
23507 {
23508 attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }
23509 },
23510 []
23511 ), h(
23512 "path",
23513 {
23514 attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }
23515 },
23516 []
23517 )]
23518 );
23519 }
23520};
23521
23522var CornerDownLeftIcon = {
23523 name: 'corner-down-left-icon',
23524
23525 functional: true,
23526
23527 render: function render(h, ctx) {
23528 return h(
23529 "svg",
23530 babel_helper_vue_jsx_merge_props_default()([{
23531 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23532 "class": "feather feather-corner-down-left" }, ctx.data]),
23533 [h(
23534 "polyline",
23535 {
23536 attrs: { points: "9 10 4 15 9 20" }
23537 },
23538 []
23539 ), h(
23540 "path",
23541 {
23542 attrs: { d: "M20 4v7a4 4 0 0 1-4 4H4" }
23543 },
23544 []
23545 )]
23546 );
23547 }
23548};
23549
23550var CornerDownRightIcon = {
23551 name: 'corner-down-right-icon',
23552
23553 functional: true,
23554
23555 render: function render(h, ctx) {
23556 return h(
23557 "svg",
23558 babel_helper_vue_jsx_merge_props_default()([{
23559 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23560 "class": "feather feather-corner-down-right" }, ctx.data]),
23561 [h(
23562 "polyline",
23563 {
23564 attrs: { points: "15 10 20 15 15 20" }
23565 },
23566 []
23567 ), h(
23568 "path",
23569 {
23570 attrs: { d: "M4 4v7a4 4 0 0 0 4 4h12" }
23571 },
23572 []
23573 )]
23574 );
23575 }
23576};
23577
23578var CornerLeftDownIcon = {
23579 name: 'corner-left-down-icon',
23580
23581 functional: true,
23582
23583 render: function render(h, ctx) {
23584 return h(
23585 "svg",
23586 babel_helper_vue_jsx_merge_props_default()([{
23587 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23588 "class": "feather feather-corner-left-down" }, ctx.data]),
23589 [h(
23590 "polyline",
23591 {
23592 attrs: { points: "14 15 9 20 4 15" }
23593 },
23594 []
23595 ), h(
23596 "path",
23597 {
23598 attrs: { d: "M20 4h-7a4 4 0 0 0-4 4v12" }
23599 },
23600 []
23601 )]
23602 );
23603 }
23604};
23605
23606var CornerLeftUpIcon = {
23607 name: 'corner-left-up-icon',
23608
23609 functional: true,
23610
23611 render: function render(h, ctx) {
23612 return h(
23613 "svg",
23614 babel_helper_vue_jsx_merge_props_default()([{
23615 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23616 "class": "feather feather-corner-left-up" }, ctx.data]),
23617 [h(
23618 "polyline",
23619 {
23620 attrs: { points: "14 9 9 4 4 9" }
23621 },
23622 []
23623 ), h(
23624 "path",
23625 {
23626 attrs: { d: "M20 20h-7a4 4 0 0 1-4-4V4" }
23627 },
23628 []
23629 )]
23630 );
23631 }
23632};
23633
23634var CornerRightDownIcon = {
23635 name: 'corner-right-down-icon',
23636
23637 functional: true,
23638
23639 render: function render(h, ctx) {
23640 return h(
23641 "svg",
23642 babel_helper_vue_jsx_merge_props_default()([{
23643 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23644 "class": "feather feather-corner-right-down" }, ctx.data]),
23645 [h(
23646 "polyline",
23647 {
23648 attrs: { points: "10 15 15 20 20 15" }
23649 },
23650 []
23651 ), h(
23652 "path",
23653 {
23654 attrs: { d: "M4 4h7a4 4 0 0 1 4 4v12" }
23655 },
23656 []
23657 )]
23658 );
23659 }
23660};
23661
23662var CornerRightUpIcon = {
23663 name: 'corner-right-up-icon',
23664
23665 functional: true,
23666
23667 render: function render(h, ctx) {
23668 return h(
23669 "svg",
23670 babel_helper_vue_jsx_merge_props_default()([{
23671 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23672 "class": "feather feather-corner-right-up" }, ctx.data]),
23673 [h(
23674 "polyline",
23675 {
23676 attrs: { points: "10 9 15 4 20 9" }
23677 },
23678 []
23679 ), h(
23680 "path",
23681 {
23682 attrs: { d: "M4 20h7a4 4 0 0 0 4-4V4" }
23683 },
23684 []
23685 )]
23686 );
23687 }
23688};
23689
23690var CornerUpLeftIcon = {
23691 name: 'corner-up-left-icon',
23692
23693 functional: true,
23694
23695 render: function render(h, ctx) {
23696 return h(
23697 "svg",
23698 babel_helper_vue_jsx_merge_props_default()([{
23699 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23700 "class": "feather feather-corner-up-left" }, ctx.data]),
23701 [h(
23702 "polyline",
23703 {
23704 attrs: { points: "9 14 4 9 9 4" }
23705 },
23706 []
23707 ), h(
23708 "path",
23709 {
23710 attrs: { d: "M20 20v-7a4 4 0 0 0-4-4H4" }
23711 },
23712 []
23713 )]
23714 );
23715 }
23716};
23717
23718var CornerUpRightIcon = {
23719 name: 'corner-up-right-icon',
23720
23721 functional: true,
23722
23723 render: function render(h, ctx) {
23724 return h(
23725 "svg",
23726 babel_helper_vue_jsx_merge_props_default()([{
23727 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23728 "class": "feather feather-corner-up-right" }, ctx.data]),
23729 [h(
23730 "polyline",
23731 {
23732 attrs: { points: "15 14 20 9 15 4" }
23733 },
23734 []
23735 ), h(
23736 "path",
23737 {
23738 attrs: { d: "M4 20v-7a4 4 0 0 1 4-4h12" }
23739 },
23740 []
23741 )]
23742 );
23743 }
23744};
23745
23746var CpuIcon = {
23747 name: 'cpu-icon',
23748
23749 functional: true,
23750
23751 render: function render(h, ctx) {
23752 return h(
23753 "svg",
23754 babel_helper_vue_jsx_merge_props_default()([{
23755 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23756 "class": "feather feather-cpu" }, ctx.data]),
23757 [h(
23758 "rect",
23759 {
23760 attrs: { x: "4", y: "4", width: "16", height: "16", rx: "2", ry: "2" }
23761 },
23762 []
23763 ), h(
23764 "rect",
23765 {
23766 attrs: { x: "9", y: "9", width: "6", height: "6" }
23767 },
23768 []
23769 ), h(
23770 "line",
23771 {
23772 attrs: { x1: "9", y1: "1", x2: "9", y2: "4" }
23773 },
23774 []
23775 ), h(
23776 "line",
23777 {
23778 attrs: { x1: "15", y1: "1", x2: "15", y2: "4" }
23779 },
23780 []
23781 ), h(
23782 "line",
23783 {
23784 attrs: { x1: "9", y1: "20", x2: "9", y2: "23" }
23785 },
23786 []
23787 ), h(
23788 "line",
23789 {
23790 attrs: { x1: "15", y1: "20", x2: "15", y2: "23" }
23791 },
23792 []
23793 ), h(
23794 "line",
23795 {
23796 attrs: { x1: "20", y1: "9", x2: "23", y2: "9" }
23797 },
23798 []
23799 ), h(
23800 "line",
23801 {
23802 attrs: { x1: "20", y1: "14", x2: "23", y2: "14" }
23803 },
23804 []
23805 ), h(
23806 "line",
23807 {
23808 attrs: { x1: "1", y1: "9", x2: "4", y2: "9" }
23809 },
23810 []
23811 ), h(
23812 "line",
23813 {
23814 attrs: { x1: "1", y1: "14", x2: "4", y2: "14" }
23815 },
23816 []
23817 )]
23818 );
23819 }
23820};
23821
23822var CreditCardIcon = {
23823 name: 'credit-card-icon',
23824
23825 functional: true,
23826
23827 render: function render(h, ctx) {
23828 return h(
23829 "svg",
23830 babel_helper_vue_jsx_merge_props_default()([{
23831 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23832 "class": "feather feather-credit-card" }, ctx.data]),
23833 [h(
23834 "rect",
23835 {
23836 attrs: { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }
23837 },
23838 []
23839 ), h(
23840 "line",
23841 {
23842 attrs: { x1: "1", y1: "10", x2: "23", y2: "10" }
23843 },
23844 []
23845 )]
23846 );
23847 }
23848};
23849
23850var CropIcon = {
23851 name: 'crop-icon',
23852
23853 functional: true,
23854
23855 render: function render(h, ctx) {
23856 return h(
23857 "svg",
23858 babel_helper_vue_jsx_merge_props_default()([{
23859 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23860 "class": "feather feather-crop" }, ctx.data]),
23861 [h(
23862 "path",
23863 {
23864 attrs: { d: "M6.13 1L6 16a2 2 0 0 0 2 2h15" }
23865 },
23866 []
23867 ), h(
23868 "path",
23869 {
23870 attrs: { d: "M1 6.13L16 6a2 2 0 0 1 2 2v15" }
23871 },
23872 []
23873 )]
23874 );
23875 }
23876};
23877
23878var CrosshairIcon = {
23879 name: 'crosshair-icon',
23880
23881 functional: true,
23882
23883 render: function render(h, ctx) {
23884 return h(
23885 "svg",
23886 babel_helper_vue_jsx_merge_props_default()([{
23887 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23888 "class": "feather feather-crosshair" }, ctx.data]),
23889 [h(
23890 "circle",
23891 {
23892 attrs: { cx: "12", cy: "12", r: "10" }
23893 },
23894 []
23895 ), h(
23896 "line",
23897 {
23898 attrs: { x1: "22", y1: "12", x2: "18", y2: "12" }
23899 },
23900 []
23901 ), h(
23902 "line",
23903 {
23904 attrs: { x1: "6", y1: "12", x2: "2", y2: "12" }
23905 },
23906 []
23907 ), h(
23908 "line",
23909 {
23910 attrs: { x1: "12", y1: "6", x2: "12", y2: "2" }
23911 },
23912 []
23913 ), h(
23914 "line",
23915 {
23916 attrs: { x1: "12", y1: "22", x2: "12", y2: "18" }
23917 },
23918 []
23919 )]
23920 );
23921 }
23922};
23923
23924var DatabaseIcon = {
23925 name: 'database-icon',
23926
23927 functional: true,
23928
23929 render: function render(h, ctx) {
23930 return h(
23931 "svg",
23932 babel_helper_vue_jsx_merge_props_default()([{
23933 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23934 "class": "feather feather-database" }, ctx.data]),
23935 [h(
23936 "ellipse",
23937 {
23938 attrs: { cx: "12", cy: "5", rx: "9", ry: "3" }
23939 },
23940 []
23941 ), h(
23942 "path",
23943 {
23944 attrs: { d: "M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" }
23945 },
23946 []
23947 ), h(
23948 "path",
23949 {
23950 attrs: { d: "M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" }
23951 },
23952 []
23953 )]
23954 );
23955 }
23956};
23957
23958var DeleteIcon = {
23959 name: 'delete-icon',
23960
23961 functional: true,
23962
23963 render: function render(h, ctx) {
23964 return h(
23965 "svg",
23966 babel_helper_vue_jsx_merge_props_default()([{
23967 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
23968 "class": "feather feather-delete" }, ctx.data]),
23969 [h(
23970 "path",
23971 {
23972 attrs: { d: "M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z" }
23973 },
23974 []
23975 ), h(
23976 "line",
23977 {
23978 attrs: { x1: "18", y1: "9", x2: "12", y2: "15" }
23979 },
23980 []
23981 ), h(
23982 "line",
23983 {
23984 attrs: { x1: "12", y1: "9", x2: "18", y2: "15" }
23985 },
23986 []
23987 )]
23988 );
23989 }
23990};
23991
23992var DiscIcon = {
23993 name: 'disc-icon',
23994
23995 functional: true,
23996
23997 render: function render(h, ctx) {
23998 return h(
23999 "svg",
24000 babel_helper_vue_jsx_merge_props_default()([{
24001 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24002 "class": "feather feather-disc" }, ctx.data]),
24003 [h(
24004 "circle",
24005 {
24006 attrs: { cx: "12", cy: "12", r: "10" }
24007 },
24008 []
24009 ), h(
24010 "circle",
24011 {
24012 attrs: { cx: "12", cy: "12", r: "3" }
24013 },
24014 []
24015 )]
24016 );
24017 }
24018};
24019
24020var DollarSignIcon = {
24021 name: 'dollar-sign-icon',
24022
24023 functional: true,
24024
24025 render: function render(h, ctx) {
24026 return h(
24027 "svg",
24028 babel_helper_vue_jsx_merge_props_default()([{
24029 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24030 "class": "feather feather-dollar-sign" }, ctx.data]),
24031 [h(
24032 "line",
24033 {
24034 attrs: { x1: "12", y1: "1", x2: "12", y2: "23" }
24035 },
24036 []
24037 ), h(
24038 "path",
24039 {
24040 attrs: { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" }
24041 },
24042 []
24043 )]
24044 );
24045 }
24046};
24047
24048var DownloadCloudIcon = {
24049 name: 'download-cloud-icon',
24050
24051 functional: true,
24052
24053 render: function render(h, ctx) {
24054 return h(
24055 "svg",
24056 babel_helper_vue_jsx_merge_props_default()([{
24057 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24058 "class": "feather feather-download-cloud" }, ctx.data]),
24059 [h(
24060 "polyline",
24061 {
24062 attrs: { points: "8 17 12 21 16 17" }
24063 },
24064 []
24065 ), h(
24066 "line",
24067 {
24068 attrs: { x1: "12", y1: "12", x2: "12", y2: "21" }
24069 },
24070 []
24071 ), h(
24072 "path",
24073 {
24074 attrs: { d: "M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29" }
24075 },
24076 []
24077 )]
24078 );
24079 }
24080};
24081
24082var DownloadIcon = {
24083 name: 'download-icon',
24084
24085 functional: true,
24086
24087 render: function render(h, ctx) {
24088 return h(
24089 "svg",
24090 babel_helper_vue_jsx_merge_props_default()([{
24091 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24092 "class": "feather feather-download" }, ctx.data]),
24093 [h(
24094 "path",
24095 {
24096 attrs: { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }
24097 },
24098 []
24099 ), h(
24100 "polyline",
24101 {
24102 attrs: { points: "7 10 12 15 17 10" }
24103 },
24104 []
24105 ), h(
24106 "line",
24107 {
24108 attrs: { x1: "12", y1: "15", x2: "12", y2: "3" }
24109 },
24110 []
24111 )]
24112 );
24113 }
24114};
24115
24116var DropletIcon = {
24117 name: 'droplet-icon',
24118
24119 functional: true,
24120
24121 render: function render(h, ctx) {
24122 return h(
24123 "svg",
24124 babel_helper_vue_jsx_merge_props_default()([{
24125 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24126 "class": "feather feather-droplet" }, ctx.data]),
24127 [h(
24128 "path",
24129 {
24130 attrs: { d: "M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z" }
24131 },
24132 []
24133 )]
24134 );
24135 }
24136};
24137
24138var Edit2Icon = {
24139 name: 'edit2-icon',
24140
24141 functional: true,
24142
24143 render: function render(h, ctx) {
24144 return h(
24145 "svg",
24146 babel_helper_vue_jsx_merge_props_default()([{
24147 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24148 "class": "feather feather-edit-2" }, ctx.data]),
24149 [h(
24150 "polygon",
24151 {
24152 attrs: { points: "16 3 21 8 8 21 3 21 3 16 16 3" }
24153 },
24154 []
24155 )]
24156 );
24157 }
24158};
24159
24160var Edit3Icon = {
24161 name: 'edit3-icon',
24162
24163 functional: true,
24164
24165 render: function render(h, ctx) {
24166 return h(
24167 "svg",
24168 babel_helper_vue_jsx_merge_props_default()([{
24169 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24170 "class": "feather feather-edit-3" }, ctx.data]),
24171 [h(
24172 "polygon",
24173 {
24174 attrs: { points: "14 2 18 6 7 17 3 17 3 13 14 2" }
24175 },
24176 []
24177 ), h(
24178 "line",
24179 {
24180 attrs: { x1: "3", y1: "22", x2: "21", y2: "22" }
24181 },
24182 []
24183 )]
24184 );
24185 }
24186};
24187
24188var EditIcon = {
24189 name: 'edit-icon',
24190
24191 functional: true,
24192
24193 render: function render(h, ctx) {
24194 return h(
24195 "svg",
24196 babel_helper_vue_jsx_merge_props_default()([{
24197 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24198 "class": "feather feather-edit" }, ctx.data]),
24199 [h(
24200 "path",
24201 {
24202 attrs: { d: "M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34" }
24203 },
24204 []
24205 ), h(
24206 "polygon",
24207 {
24208 attrs: { points: "18 2 22 6 12 16 8 16 8 12 18 2" }
24209 },
24210 []
24211 )]
24212 );
24213 }
24214};
24215
24216var ExternalLinkIcon = {
24217 name: 'external-link-icon',
24218
24219 functional: true,
24220
24221 render: function render(h, ctx) {
24222 return h(
24223 "svg",
24224 babel_helper_vue_jsx_merge_props_default()([{
24225 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24226 "class": "feather feather-external-link" }, ctx.data]),
24227 [h(
24228 "path",
24229 {
24230 attrs: { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }
24231 },
24232 []
24233 ), h(
24234 "polyline",
24235 {
24236 attrs: { points: "15 3 21 3 21 9" }
24237 },
24238 []
24239 ), h(
24240 "line",
24241 {
24242 attrs: { x1: "10", y1: "14", x2: "21", y2: "3" }
24243 },
24244 []
24245 )]
24246 );
24247 }
24248};
24249
24250var EyeOffIcon = {
24251 name: 'eye-off-icon',
24252
24253 functional: true,
24254
24255 render: function render(h, ctx) {
24256 return h(
24257 "svg",
24258 babel_helper_vue_jsx_merge_props_default()([{
24259 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24260 "class": "feather feather-eye-off" }, ctx.data]),
24261 [h(
24262 "path",
24263 {
24264 attrs: { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }
24265 },
24266 []
24267 ), h(
24268 "line",
24269 {
24270 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
24271 },
24272 []
24273 )]
24274 );
24275 }
24276};
24277
24278var EyeIcon = {
24279 name: 'eye-icon',
24280
24281 functional: true,
24282
24283 render: function render(h, ctx) {
24284 return h(
24285 "svg",
24286 babel_helper_vue_jsx_merge_props_default()([{
24287 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24288 "class": "feather feather-eye" }, ctx.data]),
24289 [h(
24290 "path",
24291 {
24292 attrs: { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
24293 },
24294 []
24295 ), h(
24296 "circle",
24297 {
24298 attrs: { cx: "12", cy: "12", r: "3" }
24299 },
24300 []
24301 )]
24302 );
24303 }
24304};
24305
24306var FacebookIcon = {
24307 name: 'facebook-icon',
24308
24309 functional: true,
24310
24311 render: function render(h, ctx) {
24312 return h(
24313 "svg",
24314 babel_helper_vue_jsx_merge_props_default()([{
24315 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24316 "class": "feather feather-facebook" }, ctx.data]),
24317 [h(
24318 "path",
24319 {
24320 attrs: { d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" }
24321 },
24322 []
24323 )]
24324 );
24325 }
24326};
24327
24328var FastForwardIcon = {
24329 name: 'fast-forward-icon',
24330
24331 functional: true,
24332
24333 render: function render(h, ctx) {
24334 return h(
24335 "svg",
24336 babel_helper_vue_jsx_merge_props_default()([{
24337 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24338 "class": "feather feather-fast-forward" }, ctx.data]),
24339 [h(
24340 "polygon",
24341 {
24342 attrs: { points: "13 19 22 12 13 5 13 19" }
24343 },
24344 []
24345 ), h(
24346 "polygon",
24347 {
24348 attrs: { points: "2 19 11 12 2 5 2 19" }
24349 },
24350 []
24351 )]
24352 );
24353 }
24354};
24355
24356var FeatherIcon = {
24357 name: 'feather-icon',
24358
24359 functional: true,
24360
24361 render: function render(h, ctx) {
24362 return h(
24363 "svg",
24364 babel_helper_vue_jsx_merge_props_default()([{
24365 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24366 "class": "feather feather-feather" }, ctx.data]),
24367 [h(
24368 "path",
24369 {
24370 attrs: { d: "M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z" }
24371 },
24372 []
24373 ), h(
24374 "line",
24375 {
24376 attrs: { x1: "16", y1: "8", x2: "2", y2: "22" }
24377 },
24378 []
24379 ), h(
24380 "line",
24381 {
24382 attrs: { x1: "17", y1: "15", x2: "9", y2: "15" }
24383 },
24384 []
24385 )]
24386 );
24387 }
24388};
24389
24390var FileMinusIcon = {
24391 name: 'file-minus-icon',
24392
24393 functional: true,
24394
24395 render: function render(h, ctx) {
24396 return h(
24397 "svg",
24398 babel_helper_vue_jsx_merge_props_default()([{
24399 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24400 "class": "feather feather-file-minus" }, ctx.data]),
24401 [h(
24402 "path",
24403 {
24404 attrs: { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }
24405 },
24406 []
24407 ), h(
24408 "polyline",
24409 {
24410 attrs: { points: "14 2 14 8 20 8" }
24411 },
24412 []
24413 ), h(
24414 "line",
24415 {
24416 attrs: { x1: "9", y1: "15", x2: "15", y2: "15" }
24417 },
24418 []
24419 )]
24420 );
24421 }
24422};
24423
24424var FilePlusIcon = {
24425 name: 'file-plus-icon',
24426
24427 functional: true,
24428
24429 render: function render(h, ctx) {
24430 return h(
24431 "svg",
24432 babel_helper_vue_jsx_merge_props_default()([{
24433 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24434 "class": "feather feather-file-plus" }, ctx.data]),
24435 [h(
24436 "path",
24437 {
24438 attrs: { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }
24439 },
24440 []
24441 ), h(
24442 "polyline",
24443 {
24444 attrs: { points: "14 2 14 8 20 8" }
24445 },
24446 []
24447 ), h(
24448 "line",
24449 {
24450 attrs: { x1: "12", y1: "18", x2: "12", y2: "12" }
24451 },
24452 []
24453 ), h(
24454 "line",
24455 {
24456 attrs: { x1: "9", y1: "15", x2: "15", y2: "15" }
24457 },
24458 []
24459 )]
24460 );
24461 }
24462};
24463
24464var FileTextIcon = {
24465 name: 'file-text-icon',
24466
24467 functional: true,
24468
24469 render: function render(h, ctx) {
24470 return h(
24471 "svg",
24472 babel_helper_vue_jsx_merge_props_default()([{
24473 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24474 "class": "feather feather-file-text" }, ctx.data]),
24475 [h(
24476 "path",
24477 {
24478 attrs: { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }
24479 },
24480 []
24481 ), h(
24482 "polyline",
24483 {
24484 attrs: { points: "14 2 14 8 20 8" }
24485 },
24486 []
24487 ), h(
24488 "line",
24489 {
24490 attrs: { x1: "16", y1: "13", x2: "8", y2: "13" }
24491 },
24492 []
24493 ), h(
24494 "line",
24495 {
24496 attrs: { x1: "16", y1: "17", x2: "8", y2: "17" }
24497 },
24498 []
24499 ), h(
24500 "polyline",
24501 {
24502 attrs: { points: "10 9 9 9 8 9" }
24503 },
24504 []
24505 )]
24506 );
24507 }
24508};
24509
24510var FileIcon = {
24511 name: 'file-icon',
24512
24513 functional: true,
24514
24515 render: function render(h, ctx) {
24516 return h(
24517 "svg",
24518 babel_helper_vue_jsx_merge_props_default()([{
24519 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24520 "class": "feather feather-file" }, ctx.data]),
24521 [h(
24522 "path",
24523 {
24524 attrs: { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }
24525 },
24526 []
24527 ), h(
24528 "polyline",
24529 {
24530 attrs: { points: "13 2 13 9 20 9" }
24531 },
24532 []
24533 )]
24534 );
24535 }
24536};
24537
24538var FilmIcon = {
24539 name: 'film-icon',
24540
24541 functional: true,
24542
24543 render: function render(h, ctx) {
24544 return h(
24545 "svg",
24546 babel_helper_vue_jsx_merge_props_default()([{
24547 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24548 "class": "feather feather-film" }, ctx.data]),
24549 [h(
24550 "rect",
24551 {
24552 attrs: { x: "2", y: "2", width: "20", height: "20", rx: "2.18", ry: "2.18" }
24553 },
24554 []
24555 ), h(
24556 "line",
24557 {
24558 attrs: { x1: "7", y1: "2", x2: "7", y2: "22" }
24559 },
24560 []
24561 ), h(
24562 "line",
24563 {
24564 attrs: { x1: "17", y1: "2", x2: "17", y2: "22" }
24565 },
24566 []
24567 ), h(
24568 "line",
24569 {
24570 attrs: { x1: "2", y1: "12", x2: "22", y2: "12" }
24571 },
24572 []
24573 ), h(
24574 "line",
24575 {
24576 attrs: { x1: "2", y1: "7", x2: "7", y2: "7" }
24577 },
24578 []
24579 ), h(
24580 "line",
24581 {
24582 attrs: { x1: "2", y1: "17", x2: "7", y2: "17" }
24583 },
24584 []
24585 ), h(
24586 "line",
24587 {
24588 attrs: { x1: "17", y1: "17", x2: "22", y2: "17" }
24589 },
24590 []
24591 ), h(
24592 "line",
24593 {
24594 attrs: { x1: "17", y1: "7", x2: "22", y2: "7" }
24595 },
24596 []
24597 )]
24598 );
24599 }
24600};
24601
24602var FilterIcon = {
24603 name: 'filter-icon',
24604
24605 functional: true,
24606
24607 render: function render(h, ctx) {
24608 return h(
24609 "svg",
24610 babel_helper_vue_jsx_merge_props_default()([{
24611 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24612 "class": "feather feather-filter" }, ctx.data]),
24613 [h(
24614 "polygon",
24615 {
24616 attrs: { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }
24617 },
24618 []
24619 )]
24620 );
24621 }
24622};
24623
24624var FlagIcon = {
24625 name: 'flag-icon',
24626
24627 functional: true,
24628
24629 render: function render(h, ctx) {
24630 return h(
24631 "svg",
24632 babel_helper_vue_jsx_merge_props_default()([{
24633 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24634 "class": "feather feather-flag" }, ctx.data]),
24635 [h(
24636 "path",
24637 {
24638 attrs: { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }
24639 },
24640 []
24641 ), h(
24642 "line",
24643 {
24644 attrs: { x1: "4", y1: "22", x2: "4", y2: "15" }
24645 },
24646 []
24647 )]
24648 );
24649 }
24650};
24651
24652var FolderMinusIcon = {
24653 name: 'folder-minus-icon',
24654
24655 functional: true,
24656
24657 render: function render(h, ctx) {
24658 return h(
24659 "svg",
24660 babel_helper_vue_jsx_merge_props_default()([{
24661 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24662 "class": "feather feather-folder-minus" }, ctx.data]),
24663 [h(
24664 "path",
24665 {
24666 attrs: { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }
24667 },
24668 []
24669 ), h(
24670 "line",
24671 {
24672 attrs: { x1: "9", y1: "14", x2: "15", y2: "14" }
24673 },
24674 []
24675 )]
24676 );
24677 }
24678};
24679
24680var FolderPlusIcon = {
24681 name: 'folder-plus-icon',
24682
24683 functional: true,
24684
24685 render: function render(h, ctx) {
24686 return h(
24687 "svg",
24688 babel_helper_vue_jsx_merge_props_default()([{
24689 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24690 "class": "feather feather-folder-plus" }, ctx.data]),
24691 [h(
24692 "path",
24693 {
24694 attrs: { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }
24695 },
24696 []
24697 ), h(
24698 "line",
24699 {
24700 attrs: { x1: "12", y1: "11", x2: "12", y2: "17" }
24701 },
24702 []
24703 ), h(
24704 "line",
24705 {
24706 attrs: { x1: "9", y1: "14", x2: "15", y2: "14" }
24707 },
24708 []
24709 )]
24710 );
24711 }
24712};
24713
24714var FolderIcon = {
24715 name: 'folder-icon',
24716
24717 functional: true,
24718
24719 render: function render(h, ctx) {
24720 return h(
24721 "svg",
24722 babel_helper_vue_jsx_merge_props_default()([{
24723 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24724 "class": "feather feather-folder" }, ctx.data]),
24725 [h(
24726 "path",
24727 {
24728 attrs: { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }
24729 },
24730 []
24731 )]
24732 );
24733 }
24734};
24735
24736var GiftIcon = {
24737 name: 'gift-icon',
24738
24739 functional: true,
24740
24741 render: function render(h, ctx) {
24742 return h(
24743 "svg",
24744 babel_helper_vue_jsx_merge_props_default()([{
24745 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24746 "class": "feather feather-gift" }, ctx.data]),
24747 [h(
24748 "polyline",
24749 {
24750 attrs: { points: "20 12 20 22 4 22 4 12" }
24751 },
24752 []
24753 ), h(
24754 "rect",
24755 {
24756 attrs: { x: "2", y: "7", width: "20", height: "5" }
24757 },
24758 []
24759 ), h(
24760 "line",
24761 {
24762 attrs: { x1: "12", y1: "22", x2: "12", y2: "7" }
24763 },
24764 []
24765 ), h(
24766 "path",
24767 {
24768 attrs: { d: "M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z" }
24769 },
24770 []
24771 ), h(
24772 "path",
24773 {
24774 attrs: { d: "M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z" }
24775 },
24776 []
24777 )]
24778 );
24779 }
24780};
24781
24782var GitBranchIcon = {
24783 name: 'git-branch-icon',
24784
24785 functional: true,
24786
24787 render: function render(h, ctx) {
24788 return h(
24789 "svg",
24790 babel_helper_vue_jsx_merge_props_default()([{
24791 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24792 "class": "feather feather-git-branch" }, ctx.data]),
24793 [h(
24794 "line",
24795 {
24796 attrs: { x1: "6", y1: "3", x2: "6", y2: "15" }
24797 },
24798 []
24799 ), h(
24800 "circle",
24801 {
24802 attrs: { cx: "18", cy: "6", r: "3" }
24803 },
24804 []
24805 ), h(
24806 "circle",
24807 {
24808 attrs: { cx: "6", cy: "18", r: "3" }
24809 },
24810 []
24811 ), h(
24812 "path",
24813 {
24814 attrs: { d: "M18 9a9 9 0 0 1-9 9" }
24815 },
24816 []
24817 )]
24818 );
24819 }
24820};
24821
24822var GitCommitIcon = {
24823 name: 'git-commit-icon',
24824
24825 functional: true,
24826
24827 render: function render(h, ctx) {
24828 return h(
24829 "svg",
24830 babel_helper_vue_jsx_merge_props_default()([{
24831 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24832 "class": "feather feather-git-commit" }, ctx.data]),
24833 [h(
24834 "circle",
24835 {
24836 attrs: { cx: "12", cy: "12", r: "4" }
24837 },
24838 []
24839 ), h(
24840 "line",
24841 {
24842 attrs: { x1: "1.05", y1: "12", x2: "7", y2: "12" }
24843 },
24844 []
24845 ), h(
24846 "line",
24847 {
24848 attrs: { x1: "17.01", y1: "12", x2: "22.96", y2: "12" }
24849 },
24850 []
24851 )]
24852 );
24853 }
24854};
24855
24856var GitMergeIcon = {
24857 name: 'git-merge-icon',
24858
24859 functional: true,
24860
24861 render: function render(h, ctx) {
24862 return h(
24863 "svg",
24864 babel_helper_vue_jsx_merge_props_default()([{
24865 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24866 "class": "feather feather-git-merge" }, ctx.data]),
24867 [h(
24868 "circle",
24869 {
24870 attrs: { cx: "18", cy: "18", r: "3" }
24871 },
24872 []
24873 ), h(
24874 "circle",
24875 {
24876 attrs: { cx: "6", cy: "6", r: "3" }
24877 },
24878 []
24879 ), h(
24880 "path",
24881 {
24882 attrs: { d: "M6 21V9a9 9 0 0 0 9 9" }
24883 },
24884 []
24885 )]
24886 );
24887 }
24888};
24889
24890var GitPullRequestIcon = {
24891 name: 'git-pull-request-icon',
24892
24893 functional: true,
24894
24895 render: function render(h, ctx) {
24896 return h(
24897 "svg",
24898 babel_helper_vue_jsx_merge_props_default()([{
24899 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24900 "class": "feather feather-git-pull-request" }, ctx.data]),
24901 [h(
24902 "circle",
24903 {
24904 attrs: { cx: "18", cy: "18", r: "3" }
24905 },
24906 []
24907 ), h(
24908 "circle",
24909 {
24910 attrs: { cx: "6", cy: "6", r: "3" }
24911 },
24912 []
24913 ), h(
24914 "path",
24915 {
24916 attrs: { d: "M13 6h3a2 2 0 0 1 2 2v7" }
24917 },
24918 []
24919 ), h(
24920 "line",
24921 {
24922 attrs: { x1: "6", y1: "9", x2: "6", y2: "21" }
24923 },
24924 []
24925 )]
24926 );
24927 }
24928};
24929
24930var GithubIcon = {
24931 name: 'github-icon',
24932
24933 functional: true,
24934
24935 render: function render(h, ctx) {
24936 return h(
24937 "svg",
24938 babel_helper_vue_jsx_merge_props_default()([{
24939 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24940 "class": "feather feather-github" }, ctx.data]),
24941 [h(
24942 "path",
24943 {
24944 attrs: { d: "M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" }
24945 },
24946 []
24947 )]
24948 );
24949 }
24950};
24951
24952var GitlabIcon = {
24953 name: 'gitlab-icon',
24954
24955 functional: true,
24956
24957 render: function render(h, ctx) {
24958 return h(
24959 "svg",
24960 babel_helper_vue_jsx_merge_props_default()([{
24961 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24962 "class": "feather feather-gitlab" }, ctx.data]),
24963 [h(
24964 "path",
24965 {
24966 attrs: { d: "M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z" }
24967 },
24968 []
24969 )]
24970 );
24971 }
24972};
24973
24974var GlobeIcon = {
24975 name: 'globe-icon',
24976
24977 functional: true,
24978
24979 render: function render(h, ctx) {
24980 return h(
24981 "svg",
24982 babel_helper_vue_jsx_merge_props_default()([{
24983 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
24984 "class": "feather feather-globe" }, ctx.data]),
24985 [h(
24986 "circle",
24987 {
24988 attrs: { cx: "12", cy: "12", r: "10" }
24989 },
24990 []
24991 ), h(
24992 "line",
24993 {
24994 attrs: { x1: "2", y1: "12", x2: "22", y2: "12" }
24995 },
24996 []
24997 ), h(
24998 "path",
24999 {
25000 attrs: { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" }
25001 },
25002 []
25003 )]
25004 );
25005 }
25006};
25007
25008var GridIcon = {
25009 name: 'grid-icon',
25010
25011 functional: true,
25012
25013 render: function render(h, ctx) {
25014 return h(
25015 "svg",
25016 babel_helper_vue_jsx_merge_props_default()([{
25017 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25018 "class": "feather feather-grid" }, ctx.data]),
25019 [h(
25020 "rect",
25021 {
25022 attrs: { x: "3", y: "3", width: "7", height: "7" }
25023 },
25024 []
25025 ), h(
25026 "rect",
25027 {
25028 attrs: { x: "14", y: "3", width: "7", height: "7" }
25029 },
25030 []
25031 ), h(
25032 "rect",
25033 {
25034 attrs: { x: "14", y: "14", width: "7", height: "7" }
25035 },
25036 []
25037 ), h(
25038 "rect",
25039 {
25040 attrs: { x: "3", y: "14", width: "7", height: "7" }
25041 },
25042 []
25043 )]
25044 );
25045 }
25046};
25047
25048var HardDriveIcon = {
25049 name: 'hard-drive-icon',
25050
25051 functional: true,
25052
25053 render: function render(h, ctx) {
25054 return h(
25055 "svg",
25056 babel_helper_vue_jsx_merge_props_default()([{
25057 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25058 "class": "feather feather-hard-drive" }, ctx.data]),
25059 [h(
25060 "line",
25061 {
25062 attrs: { x1: "22", y1: "12", x2: "2", y2: "12" }
25063 },
25064 []
25065 ), h(
25066 "path",
25067 {
25068 attrs: { d: "M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }
25069 },
25070 []
25071 ), h(
25072 "line",
25073 {
25074 attrs: { x1: "6", y1: "16", x2: "6", y2: "16" }
25075 },
25076 []
25077 ), h(
25078 "line",
25079 {
25080 attrs: { x1: "10", y1: "16", x2: "10", y2: "16" }
25081 },
25082 []
25083 )]
25084 );
25085 }
25086};
25087
25088var HashIcon = {
25089 name: 'hash-icon',
25090
25091 functional: true,
25092
25093 render: function render(h, ctx) {
25094 return h(
25095 "svg",
25096 babel_helper_vue_jsx_merge_props_default()([{
25097 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25098 "class": "feather feather-hash" }, ctx.data]),
25099 [h(
25100 "line",
25101 {
25102 attrs: { x1: "4", y1: "9", x2: "20", y2: "9" }
25103 },
25104 []
25105 ), h(
25106 "line",
25107 {
25108 attrs: { x1: "4", y1: "15", x2: "20", y2: "15" }
25109 },
25110 []
25111 ), h(
25112 "line",
25113 {
25114 attrs: { x1: "10", y1: "3", x2: "8", y2: "21" }
25115 },
25116 []
25117 ), h(
25118 "line",
25119 {
25120 attrs: { x1: "16", y1: "3", x2: "14", y2: "21" }
25121 },
25122 []
25123 )]
25124 );
25125 }
25126};
25127
25128var HeadphonesIcon = {
25129 name: 'headphones-icon',
25130
25131 functional: true,
25132
25133 render: function render(h, ctx) {
25134 return h(
25135 "svg",
25136 babel_helper_vue_jsx_merge_props_default()([{
25137 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25138 "class": "feather feather-headphones" }, ctx.data]),
25139 [h(
25140 "path",
25141 {
25142 attrs: { d: "M3 18v-6a9 9 0 0 1 18 0v6" }
25143 },
25144 []
25145 ), h(
25146 "path",
25147 {
25148 attrs: { d: "M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" }
25149 },
25150 []
25151 )]
25152 );
25153 }
25154};
25155
25156var HeartIcon = {
25157 name: 'heart-icon',
25158
25159 functional: true,
25160
25161 render: function render(h, ctx) {
25162 return h(
25163 "svg",
25164 babel_helper_vue_jsx_merge_props_default()([{
25165 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25166 "class": "feather feather-heart" }, ctx.data]),
25167 [h(
25168 "path",
25169 {
25170 attrs: { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }
25171 },
25172 []
25173 )]
25174 );
25175 }
25176};
25177
25178var HelpCircleIcon = {
25179 name: 'help-circle-icon',
25180
25181 functional: true,
25182
25183 render: function render(h, ctx) {
25184 return h(
25185 "svg",
25186 babel_helper_vue_jsx_merge_props_default()([{
25187 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25188 "class": "feather feather-help-circle" }, ctx.data]),
25189 [h(
25190 "circle",
25191 {
25192 attrs: { cx: "12", cy: "12", r: "10" }
25193 },
25194 []
25195 ), h(
25196 "path",
25197 {
25198 attrs: { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }
25199 },
25200 []
25201 ), h(
25202 "line",
25203 {
25204 attrs: { x1: "12", y1: "17", x2: "12", y2: "17" }
25205 },
25206 []
25207 )]
25208 );
25209 }
25210};
25211
25212var HomeIcon = {
25213 name: 'home-icon',
25214
25215 functional: true,
25216
25217 render: function render(h, ctx) {
25218 return h(
25219 "svg",
25220 babel_helper_vue_jsx_merge_props_default()([{
25221 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25222 "class": "feather feather-home" }, ctx.data]),
25223 [h(
25224 "path",
25225 {
25226 attrs: { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }
25227 },
25228 []
25229 ), h(
25230 "polyline",
25231 {
25232 attrs: { points: "9 22 9 12 15 12 15 22" }
25233 },
25234 []
25235 )]
25236 );
25237 }
25238};
25239
25240var ImageIcon = {
25241 name: 'image-icon',
25242
25243 functional: true,
25244
25245 render: function render(h, ctx) {
25246 return h(
25247 "svg",
25248 babel_helper_vue_jsx_merge_props_default()([{
25249 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25250 "class": "feather feather-image" }, ctx.data]),
25251 [h(
25252 "rect",
25253 {
25254 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
25255 },
25256 []
25257 ), h(
25258 "circle",
25259 {
25260 attrs: { cx: "8.5", cy: "8.5", r: "1.5" }
25261 },
25262 []
25263 ), h(
25264 "polyline",
25265 {
25266 attrs: { points: "21 15 16 10 5 21" }
25267 },
25268 []
25269 )]
25270 );
25271 }
25272};
25273
25274var InboxIcon = {
25275 name: 'inbox-icon',
25276
25277 functional: true,
25278
25279 render: function render(h, ctx) {
25280 return h(
25281 "svg",
25282 babel_helper_vue_jsx_merge_props_default()([{
25283 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25284 "class": "feather feather-inbox" }, ctx.data]),
25285 [h(
25286 "polyline",
25287 {
25288 attrs: { points: "22 12 16 12 14 15 10 15 8 12 2 12" }
25289 },
25290 []
25291 ), h(
25292 "path",
25293 {
25294 attrs: { d: "M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }
25295 },
25296 []
25297 )]
25298 );
25299 }
25300};
25301
25302var InfoIcon = {
25303 name: 'info-icon',
25304
25305 functional: true,
25306
25307 render: function render(h, ctx) {
25308 return h(
25309 "svg",
25310 babel_helper_vue_jsx_merge_props_default()([{
25311 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25312 "class": "feather feather-info" }, ctx.data]),
25313 [h(
25314 "circle",
25315 {
25316 attrs: { cx: "12", cy: "12", r: "10" }
25317 },
25318 []
25319 ), h(
25320 "line",
25321 {
25322 attrs: { x1: "12", y1: "16", x2: "12", y2: "12" }
25323 },
25324 []
25325 ), h(
25326 "line",
25327 {
25328 attrs: { x1: "12", y1: "8", x2: "12", y2: "8" }
25329 },
25330 []
25331 )]
25332 );
25333 }
25334};
25335
25336var InstagramIcon = {
25337 name: 'instagram-icon',
25338
25339 functional: true,
25340
25341 render: function render(h, ctx) {
25342 return h(
25343 "svg",
25344 babel_helper_vue_jsx_merge_props_default()([{
25345 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25346 "class": "feather feather-instagram" }, ctx.data]),
25347 [h(
25348 "rect",
25349 {
25350 attrs: { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }
25351 },
25352 []
25353 ), h(
25354 "path",
25355 {
25356 attrs: { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }
25357 },
25358 []
25359 ), h(
25360 "line",
25361 {
25362 attrs: { x1: "17.5", y1: "6.5", x2: "17.5", y2: "6.5" }
25363 },
25364 []
25365 )]
25366 );
25367 }
25368};
25369
25370var ItalicIcon = {
25371 name: 'italic-icon',
25372
25373 functional: true,
25374
25375 render: function render(h, ctx) {
25376 return h(
25377 "svg",
25378 babel_helper_vue_jsx_merge_props_default()([{
25379 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25380 "class": "feather feather-italic" }, ctx.data]),
25381 [h(
25382 "line",
25383 {
25384 attrs: { x1: "19", y1: "4", x2: "10", y2: "4" }
25385 },
25386 []
25387 ), h(
25388 "line",
25389 {
25390 attrs: { x1: "14", y1: "20", x2: "5", y2: "20" }
25391 },
25392 []
25393 ), h(
25394 "line",
25395 {
25396 attrs: { x1: "15", y1: "4", x2: "9", y2: "20" }
25397 },
25398 []
25399 )]
25400 );
25401 }
25402};
25403
25404var LayersIcon = {
25405 name: 'layers-icon',
25406
25407 functional: true,
25408
25409 render: function render(h, ctx) {
25410 return h(
25411 "svg",
25412 babel_helper_vue_jsx_merge_props_default()([{
25413 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25414 "class": "feather feather-layers" }, ctx.data]),
25415 [h(
25416 "polygon",
25417 {
25418 attrs: { points: "12 2 2 7 12 12 22 7 12 2" }
25419 },
25420 []
25421 ), h(
25422 "polyline",
25423 {
25424 attrs: { points: "2 17 12 22 22 17" }
25425 },
25426 []
25427 ), h(
25428 "polyline",
25429 {
25430 attrs: { points: "2 12 12 17 22 12" }
25431 },
25432 []
25433 )]
25434 );
25435 }
25436};
25437
25438var LayoutIcon = {
25439 name: 'layout-icon',
25440
25441 functional: true,
25442
25443 render: function render(h, ctx) {
25444 return h(
25445 "svg",
25446 babel_helper_vue_jsx_merge_props_default()([{
25447 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25448 "class": "feather feather-layout" }, ctx.data]),
25449 [h(
25450 "rect",
25451 {
25452 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
25453 },
25454 []
25455 ), h(
25456 "line",
25457 {
25458 attrs: { x1: "3", y1: "9", x2: "21", y2: "9" }
25459 },
25460 []
25461 ), h(
25462 "line",
25463 {
25464 attrs: { x1: "9", y1: "21", x2: "9", y2: "9" }
25465 },
25466 []
25467 )]
25468 );
25469 }
25470};
25471
25472var LifeBuoyIcon = {
25473 name: 'life-buoy-icon',
25474
25475 functional: true,
25476
25477 render: function render(h, ctx) {
25478 return h(
25479 "svg",
25480 babel_helper_vue_jsx_merge_props_default()([{
25481 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25482 "class": "feather feather-life-buoy" }, ctx.data]),
25483 [h(
25484 "circle",
25485 {
25486 attrs: { cx: "12", cy: "12", r: "10" }
25487 },
25488 []
25489 ), h(
25490 "circle",
25491 {
25492 attrs: { cx: "12", cy: "12", r: "4" }
25493 },
25494 []
25495 ), h(
25496 "line",
25497 {
25498 attrs: { x1: "4.93", y1: "4.93", x2: "9.17", y2: "9.17" }
25499 },
25500 []
25501 ), h(
25502 "line",
25503 {
25504 attrs: { x1: "14.83", y1: "14.83", x2: "19.07", y2: "19.07" }
25505 },
25506 []
25507 ), h(
25508 "line",
25509 {
25510 attrs: { x1: "14.83", y1: "9.17", x2: "19.07", y2: "4.93" }
25511 },
25512 []
25513 ), h(
25514 "line",
25515 {
25516 attrs: { x1: "14.83", y1: "9.17", x2: "18.36", y2: "5.64" }
25517 },
25518 []
25519 ), h(
25520 "line",
25521 {
25522 attrs: { x1: "4.93", y1: "19.07", x2: "9.17", y2: "14.83" }
25523 },
25524 []
25525 )]
25526 );
25527 }
25528};
25529
25530var Link2Icon = {
25531 name: 'link2-icon',
25532
25533 functional: true,
25534
25535 render: function render(h, ctx) {
25536 return h(
25537 "svg",
25538 babel_helper_vue_jsx_merge_props_default()([{
25539 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25540 "class": "feather feather-link-2" }, ctx.data]),
25541 [h(
25542 "path",
25543 {
25544 attrs: { d: "M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3" }
25545 },
25546 []
25547 ), h(
25548 "line",
25549 {
25550 attrs: { x1: "8", y1: "12", x2: "16", y2: "12" }
25551 },
25552 []
25553 )]
25554 );
25555 }
25556};
25557
25558var LinkIcon = {
25559 name: 'link-icon',
25560
25561 functional: true,
25562
25563 render: function render(h, ctx) {
25564 return h(
25565 "svg",
25566 babel_helper_vue_jsx_merge_props_default()([{
25567 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25568 "class": "feather feather-link" }, ctx.data]),
25569 [h(
25570 "path",
25571 {
25572 attrs: { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }
25573 },
25574 []
25575 ), h(
25576 "path",
25577 {
25578 attrs: { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }
25579 },
25580 []
25581 )]
25582 );
25583 }
25584};
25585
25586var LinkedinIcon = {
25587 name: 'linkedin-icon',
25588
25589 functional: true,
25590
25591 render: function render(h, ctx) {
25592 return h(
25593 "svg",
25594 babel_helper_vue_jsx_merge_props_default()([{
25595 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25596 "class": "feather feather-linkedin" }, ctx.data]),
25597 [h(
25598 "path",
25599 {
25600 attrs: { d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" }
25601 },
25602 []
25603 ), h(
25604 "rect",
25605 {
25606 attrs: { x: "2", y: "9", width: "4", height: "12" }
25607 },
25608 []
25609 ), h(
25610 "circle",
25611 {
25612 attrs: { cx: "4", cy: "4", r: "2" }
25613 },
25614 []
25615 )]
25616 );
25617 }
25618};
25619
25620var ListIcon = {
25621 name: 'list-icon',
25622
25623 functional: true,
25624
25625 render: function render(h, ctx) {
25626 return h(
25627 "svg",
25628 babel_helper_vue_jsx_merge_props_default()([{
25629 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25630 "class": "feather feather-list" }, ctx.data]),
25631 [h(
25632 "line",
25633 {
25634 attrs: { x1: "8", y1: "6", x2: "21", y2: "6" }
25635 },
25636 []
25637 ), h(
25638 "line",
25639 {
25640 attrs: { x1: "8", y1: "12", x2: "21", y2: "12" }
25641 },
25642 []
25643 ), h(
25644 "line",
25645 {
25646 attrs: { x1: "8", y1: "18", x2: "21", y2: "18" }
25647 },
25648 []
25649 ), h(
25650 "line",
25651 {
25652 attrs: { x1: "3", y1: "6", x2: "3", y2: "6" }
25653 },
25654 []
25655 ), h(
25656 "line",
25657 {
25658 attrs: { x1: "3", y1: "12", x2: "3", y2: "12" }
25659 },
25660 []
25661 ), h(
25662 "line",
25663 {
25664 attrs: { x1: "3", y1: "18", x2: "3", y2: "18" }
25665 },
25666 []
25667 )]
25668 );
25669 }
25670};
25671
25672var LoaderIcon = {
25673 name: 'loader-icon',
25674
25675 functional: true,
25676
25677 render: function render(h, ctx) {
25678 return h(
25679 "svg",
25680 babel_helper_vue_jsx_merge_props_default()([{
25681 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25682 "class": "feather feather-loader" }, ctx.data]),
25683 [h(
25684 "line",
25685 {
25686 attrs: { x1: "12", y1: "2", x2: "12", y2: "6" }
25687 },
25688 []
25689 ), h(
25690 "line",
25691 {
25692 attrs: { x1: "12", y1: "18", x2: "12", y2: "22" }
25693 },
25694 []
25695 ), h(
25696 "line",
25697 {
25698 attrs: { x1: "4.93", y1: "4.93", x2: "7.76", y2: "7.76" }
25699 },
25700 []
25701 ), h(
25702 "line",
25703 {
25704 attrs: { x1: "16.24", y1: "16.24", x2: "19.07", y2: "19.07" }
25705 },
25706 []
25707 ), h(
25708 "line",
25709 {
25710 attrs: { x1: "2", y1: "12", x2: "6", y2: "12" }
25711 },
25712 []
25713 ), h(
25714 "line",
25715 {
25716 attrs: { x1: "18", y1: "12", x2: "22", y2: "12" }
25717 },
25718 []
25719 ), h(
25720 "line",
25721 {
25722 attrs: { x1: "4.93", y1: "19.07", x2: "7.76", y2: "16.24" }
25723 },
25724 []
25725 ), h(
25726 "line",
25727 {
25728 attrs: { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" }
25729 },
25730 []
25731 )]
25732 );
25733 }
25734};
25735
25736var LockIcon = {
25737 name: 'lock-icon',
25738
25739 functional: true,
25740
25741 render: function render(h, ctx) {
25742 return h(
25743 "svg",
25744 babel_helper_vue_jsx_merge_props_default()([{
25745 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25746 "class": "feather feather-lock" }, ctx.data]),
25747 [h(
25748 "rect",
25749 {
25750 attrs: { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }
25751 },
25752 []
25753 ), h(
25754 "path",
25755 {
25756 attrs: { d: "M7 11V7a5 5 0 0 1 10 0v4" }
25757 },
25758 []
25759 )]
25760 );
25761 }
25762};
25763
25764var LogInIcon = {
25765 name: 'log-in-icon',
25766
25767 functional: true,
25768
25769 render: function render(h, ctx) {
25770 return h(
25771 "svg",
25772 babel_helper_vue_jsx_merge_props_default()([{
25773 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25774 "class": "feather feather-log-in" }, ctx.data]),
25775 [h(
25776 "path",
25777 {
25778 attrs: { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }
25779 },
25780 []
25781 ), h(
25782 "polyline",
25783 {
25784 attrs: { points: "10 17 15 12 10 7" }
25785 },
25786 []
25787 ), h(
25788 "line",
25789 {
25790 attrs: { x1: "15", y1: "12", x2: "3", y2: "12" }
25791 },
25792 []
25793 )]
25794 );
25795 }
25796};
25797
25798var LogOutIcon = {
25799 name: 'log-out-icon',
25800
25801 functional: true,
25802
25803 render: function render(h, ctx) {
25804 return h(
25805 "svg",
25806 babel_helper_vue_jsx_merge_props_default()([{
25807 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25808 "class": "feather feather-log-out" }, ctx.data]),
25809 [h(
25810 "path",
25811 {
25812 attrs: { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }
25813 },
25814 []
25815 ), h(
25816 "polyline",
25817 {
25818 attrs: { points: "16 17 21 12 16 7" }
25819 },
25820 []
25821 ), h(
25822 "line",
25823 {
25824 attrs: { x1: "21", y1: "12", x2: "9", y2: "12" }
25825 },
25826 []
25827 )]
25828 );
25829 }
25830};
25831
25832var MailIcon = {
25833 name: 'mail-icon',
25834
25835 functional: true,
25836
25837 render: function render(h, ctx) {
25838 return h(
25839 "svg",
25840 babel_helper_vue_jsx_merge_props_default()([{
25841 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25842 "class": "feather feather-mail" }, ctx.data]),
25843 [h(
25844 "path",
25845 {
25846 attrs: { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }
25847 },
25848 []
25849 ), h(
25850 "polyline",
25851 {
25852 attrs: { points: "22,6 12,13 2,6" }
25853 },
25854 []
25855 )]
25856 );
25857 }
25858};
25859
25860var MapPinIcon = {
25861 name: 'map-pin-icon',
25862
25863 functional: true,
25864
25865 render: function render(h, ctx) {
25866 return h(
25867 "svg",
25868 babel_helper_vue_jsx_merge_props_default()([{
25869 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25870 "class": "feather feather-map-pin" }, ctx.data]),
25871 [h(
25872 "path",
25873 {
25874 attrs: { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }
25875 },
25876 []
25877 ), h(
25878 "circle",
25879 {
25880 attrs: { cx: "12", cy: "10", r: "3" }
25881 },
25882 []
25883 )]
25884 );
25885 }
25886};
25887
25888var MapIcon = {
25889 name: 'map-icon',
25890
25891 functional: true,
25892
25893 render: function render(h, ctx) {
25894 return h(
25895 "svg",
25896 babel_helper_vue_jsx_merge_props_default()([{
25897 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25898 "class": "feather feather-map" }, ctx.data]),
25899 [h(
25900 "polygon",
25901 {
25902 attrs: { points: "1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6" }
25903 },
25904 []
25905 ), h(
25906 "line",
25907 {
25908 attrs: { x1: "8", y1: "2", x2: "8", y2: "18" }
25909 },
25910 []
25911 ), h(
25912 "line",
25913 {
25914 attrs: { x1: "16", y1: "6", x2: "16", y2: "22" }
25915 },
25916 []
25917 )]
25918 );
25919 }
25920};
25921
25922var Maximize2Icon = {
25923 name: 'maximize2-icon',
25924
25925 functional: true,
25926
25927 render: function render(h, ctx) {
25928 return h(
25929 "svg",
25930 babel_helper_vue_jsx_merge_props_default()([{
25931 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25932 "class": "feather feather-maximize-2" }, ctx.data]),
25933 [h(
25934 "polyline",
25935 {
25936 attrs: { points: "15 3 21 3 21 9" }
25937 },
25938 []
25939 ), h(
25940 "polyline",
25941 {
25942 attrs: { points: "9 21 3 21 3 15" }
25943 },
25944 []
25945 ), h(
25946 "line",
25947 {
25948 attrs: { x1: "21", y1: "3", x2: "14", y2: "10" }
25949 },
25950 []
25951 ), h(
25952 "line",
25953 {
25954 attrs: { x1: "3", y1: "21", x2: "10", y2: "14" }
25955 },
25956 []
25957 )]
25958 );
25959 }
25960};
25961
25962var MaximizeIcon = {
25963 name: 'maximize-icon',
25964
25965 functional: true,
25966
25967 render: function render(h, ctx) {
25968 return h(
25969 "svg",
25970 babel_helper_vue_jsx_merge_props_default()([{
25971 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25972 "class": "feather feather-maximize" }, ctx.data]),
25973 [h(
25974 "path",
25975 {
25976 attrs: { d: "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" }
25977 },
25978 []
25979 )]
25980 );
25981 }
25982};
25983
25984var MenuIcon = {
25985 name: 'menu-icon',
25986
25987 functional: true,
25988
25989 render: function render(h, ctx) {
25990 return h(
25991 "svg",
25992 babel_helper_vue_jsx_merge_props_default()([{
25993 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
25994 "class": "feather feather-menu" }, ctx.data]),
25995 [h(
25996 "line",
25997 {
25998 attrs: { x1: "3", y1: "12", x2: "21", y2: "12" }
25999 },
26000 []
26001 ), h(
26002 "line",
26003 {
26004 attrs: { x1: "3", y1: "6", x2: "21", y2: "6" }
26005 },
26006 []
26007 ), h(
26008 "line",
26009 {
26010 attrs: { x1: "3", y1: "18", x2: "21", y2: "18" }
26011 },
26012 []
26013 )]
26014 );
26015 }
26016};
26017
26018var MessageCircleIcon = {
26019 name: 'message-circle-icon',
26020
26021 functional: true,
26022
26023 render: function render(h, ctx) {
26024 return h(
26025 "svg",
26026 babel_helper_vue_jsx_merge_props_default()([{
26027 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26028 "class": "feather feather-message-circle" }, ctx.data]),
26029 [h(
26030 "path",
26031 {
26032 attrs: { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" }
26033 },
26034 []
26035 )]
26036 );
26037 }
26038};
26039
26040var MessageSquareIcon = {
26041 name: 'message-square-icon',
26042
26043 functional: true,
26044
26045 render: function render(h, ctx) {
26046 return h(
26047 "svg",
26048 babel_helper_vue_jsx_merge_props_default()([{
26049 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26050 "class": "feather feather-message-square" }, ctx.data]),
26051 [h(
26052 "path",
26053 {
26054 attrs: { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }
26055 },
26056 []
26057 )]
26058 );
26059 }
26060};
26061
26062var MicOffIcon = {
26063 name: 'mic-off-icon',
26064
26065 functional: true,
26066
26067 render: function render(h, ctx) {
26068 return h(
26069 "svg",
26070 babel_helper_vue_jsx_merge_props_default()([{
26071 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26072 "class": "feather feather-mic-off" }, ctx.data]),
26073 [h(
26074 "line",
26075 {
26076 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
26077 },
26078 []
26079 ), h(
26080 "path",
26081 {
26082 attrs: { d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6" }
26083 },
26084 []
26085 ), h(
26086 "path",
26087 {
26088 attrs: { d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23" }
26089 },
26090 []
26091 ), h(
26092 "line",
26093 {
26094 attrs: { x1: "12", y1: "19", x2: "12", y2: "23" }
26095 },
26096 []
26097 ), h(
26098 "line",
26099 {
26100 attrs: { x1: "8", y1: "23", x2: "16", y2: "23" }
26101 },
26102 []
26103 )]
26104 );
26105 }
26106};
26107
26108var MicIcon = {
26109 name: 'mic-icon',
26110
26111 functional: true,
26112
26113 render: function render(h, ctx) {
26114 return h(
26115 "svg",
26116 babel_helper_vue_jsx_merge_props_default()([{
26117 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26118 "class": "feather feather-mic" }, ctx.data]),
26119 [h(
26120 "path",
26121 {
26122 attrs: { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }
26123 },
26124 []
26125 ), h(
26126 "path",
26127 {
26128 attrs: { d: "M19 10v2a7 7 0 0 1-14 0v-2" }
26129 },
26130 []
26131 ), h(
26132 "line",
26133 {
26134 attrs: { x1: "12", y1: "19", x2: "12", y2: "23" }
26135 },
26136 []
26137 ), h(
26138 "line",
26139 {
26140 attrs: { x1: "8", y1: "23", x2: "16", y2: "23" }
26141 },
26142 []
26143 )]
26144 );
26145 }
26146};
26147
26148var Minimize2Icon = {
26149 name: 'minimize2-icon',
26150
26151 functional: true,
26152
26153 render: function render(h, ctx) {
26154 return h(
26155 "svg",
26156 babel_helper_vue_jsx_merge_props_default()([{
26157 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26158 "class": "feather feather-minimize-2" }, ctx.data]),
26159 [h(
26160 "polyline",
26161 {
26162 attrs: { points: "4 14 10 14 10 20" }
26163 },
26164 []
26165 ), h(
26166 "polyline",
26167 {
26168 attrs: { points: "20 10 14 10 14 4" }
26169 },
26170 []
26171 ), h(
26172 "line",
26173 {
26174 attrs: { x1: "14", y1: "10", x2: "21", y2: "3" }
26175 },
26176 []
26177 ), h(
26178 "line",
26179 {
26180 attrs: { x1: "3", y1: "21", x2: "10", y2: "14" }
26181 },
26182 []
26183 )]
26184 );
26185 }
26186};
26187
26188var MinimizeIcon = {
26189 name: 'minimize-icon',
26190
26191 functional: true,
26192
26193 render: function render(h, ctx) {
26194 return h(
26195 "svg",
26196 babel_helper_vue_jsx_merge_props_default()([{
26197 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26198 "class": "feather feather-minimize" }, ctx.data]),
26199 [h(
26200 "path",
26201 {
26202 attrs: { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }
26203 },
26204 []
26205 )]
26206 );
26207 }
26208};
26209
26210var MinusCircleIcon = {
26211 name: 'minus-circle-icon',
26212
26213 functional: true,
26214
26215 render: function render(h, ctx) {
26216 return h(
26217 "svg",
26218 babel_helper_vue_jsx_merge_props_default()([{
26219 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26220 "class": "feather feather-minus-circle" }, ctx.data]),
26221 [h(
26222 "circle",
26223 {
26224 attrs: { cx: "12", cy: "12", r: "10" }
26225 },
26226 []
26227 ), h(
26228 "line",
26229 {
26230 attrs: { x1: "8", y1: "12", x2: "16", y2: "12" }
26231 },
26232 []
26233 )]
26234 );
26235 }
26236};
26237
26238var MinusSquareIcon = {
26239 name: 'minus-square-icon',
26240
26241 functional: true,
26242
26243 render: function render(h, ctx) {
26244 return h(
26245 "svg",
26246 babel_helper_vue_jsx_merge_props_default()([{
26247 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26248 "class": "feather feather-minus-square" }, ctx.data]),
26249 [h(
26250 "rect",
26251 {
26252 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
26253 },
26254 []
26255 ), h(
26256 "line",
26257 {
26258 attrs: { x1: "8", y1: "12", x2: "16", y2: "12" }
26259 },
26260 []
26261 )]
26262 );
26263 }
26264};
26265
26266var MinusIcon = {
26267 name: 'minus-icon',
26268
26269 functional: true,
26270
26271 render: function render(h, ctx) {
26272 return h(
26273 "svg",
26274 babel_helper_vue_jsx_merge_props_default()([{
26275 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26276 "class": "feather feather-minus" }, ctx.data]),
26277 [h(
26278 "line",
26279 {
26280 attrs: { x1: "5", y1: "12", x2: "19", y2: "12" }
26281 },
26282 []
26283 )]
26284 );
26285 }
26286};
26287
26288var MonitorIcon = {
26289 name: 'monitor-icon',
26290
26291 functional: true,
26292
26293 render: function render(h, ctx) {
26294 return h(
26295 "svg",
26296 babel_helper_vue_jsx_merge_props_default()([{
26297 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26298 "class": "feather feather-monitor" }, ctx.data]),
26299 [h(
26300 "rect",
26301 {
26302 attrs: { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }
26303 },
26304 []
26305 ), h(
26306 "line",
26307 {
26308 attrs: { x1: "8", y1: "21", x2: "16", y2: "21" }
26309 },
26310 []
26311 ), h(
26312 "line",
26313 {
26314 attrs: { x1: "12", y1: "17", x2: "12", y2: "21" }
26315 },
26316 []
26317 )]
26318 );
26319 }
26320};
26321
26322var MoonIcon = {
26323 name: 'moon-icon',
26324
26325 functional: true,
26326
26327 render: function render(h, ctx) {
26328 return h(
26329 "svg",
26330 babel_helper_vue_jsx_merge_props_default()([{
26331 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26332 "class": "feather feather-moon" }, ctx.data]),
26333 [h(
26334 "path",
26335 {
26336 attrs: { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }
26337 },
26338 []
26339 )]
26340 );
26341 }
26342};
26343
26344var MoreHorizontalIcon = {
26345 name: 'more-horizontal-icon',
26346
26347 functional: true,
26348
26349 render: function render(h, ctx) {
26350 return h(
26351 "svg",
26352 babel_helper_vue_jsx_merge_props_default()([{
26353 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26354 "class": "feather feather-more-horizontal" }, ctx.data]),
26355 [h(
26356 "circle",
26357 {
26358 attrs: { cx: "12", cy: "12", r: "1" }
26359 },
26360 []
26361 ), h(
26362 "circle",
26363 {
26364 attrs: { cx: "19", cy: "12", r: "1" }
26365 },
26366 []
26367 ), h(
26368 "circle",
26369 {
26370 attrs: { cx: "5", cy: "12", r: "1" }
26371 },
26372 []
26373 )]
26374 );
26375 }
26376};
26377
26378var MoreVerticalIcon = {
26379 name: 'more-vertical-icon',
26380
26381 functional: true,
26382
26383 render: function render(h, ctx) {
26384 return h(
26385 "svg",
26386 babel_helper_vue_jsx_merge_props_default()([{
26387 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26388 "class": "feather feather-more-vertical" }, ctx.data]),
26389 [h(
26390 "circle",
26391 {
26392 attrs: { cx: "12", cy: "12", r: "1" }
26393 },
26394 []
26395 ), h(
26396 "circle",
26397 {
26398 attrs: { cx: "12", cy: "5", r: "1" }
26399 },
26400 []
26401 ), h(
26402 "circle",
26403 {
26404 attrs: { cx: "12", cy: "19", r: "1" }
26405 },
26406 []
26407 )]
26408 );
26409 }
26410};
26411
26412var vue_feather_icons_es_MoveIcon = {
26413 name: 'move-icon',
26414
26415 functional: true,
26416
26417 render: function render(h, ctx) {
26418 return h(
26419 "svg",
26420 babel_helper_vue_jsx_merge_props_default()([{
26421 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26422 "class": "feather feather-move" }, ctx.data]),
26423 [h(
26424 "polyline",
26425 {
26426 attrs: { points: "5 9 2 12 5 15" }
26427 },
26428 []
26429 ), h(
26430 "polyline",
26431 {
26432 attrs: { points: "9 5 12 2 15 5" }
26433 },
26434 []
26435 ), h(
26436 "polyline",
26437 {
26438 attrs: { points: "15 19 12 22 9 19" }
26439 },
26440 []
26441 ), h(
26442 "polyline",
26443 {
26444 attrs: { points: "19 9 22 12 19 15" }
26445 },
26446 []
26447 ), h(
26448 "line",
26449 {
26450 attrs: { x1: "2", y1: "12", x2: "22", y2: "12" }
26451 },
26452 []
26453 ), h(
26454 "line",
26455 {
26456 attrs: { x1: "12", y1: "2", x2: "12", y2: "22" }
26457 },
26458 []
26459 )]
26460 );
26461 }
26462};
26463
26464var MusicIcon = {
26465 name: 'music-icon',
26466
26467 functional: true,
26468
26469 render: function render(h, ctx) {
26470 return h(
26471 "svg",
26472 babel_helper_vue_jsx_merge_props_default()([{
26473 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26474 "class": "feather feather-music" }, ctx.data]),
26475 [h(
26476 "path",
26477 {
26478 attrs: { d: "M9 17H5a2 2 0 0 0-2 2 2 2 0 0 0 2 2h2a2 2 0 0 0 2-2zm12-2h-4a2 2 0 0 0-2 2 2 2 0 0 0 2 2h2a2 2 0 0 0 2-2z" }
26479 },
26480 []
26481 ), h(
26482 "polyline",
26483 {
26484 attrs: { points: "9 17 9 5 21 3 21 15" }
26485 },
26486 []
26487 )]
26488 );
26489 }
26490};
26491
26492var Navigation2Icon = {
26493 name: 'navigation2-icon',
26494
26495 functional: true,
26496
26497 render: function render(h, ctx) {
26498 return h(
26499 "svg",
26500 babel_helper_vue_jsx_merge_props_default()([{
26501 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26502 "class": "feather feather-navigation-2" }, ctx.data]),
26503 [h(
26504 "polygon",
26505 {
26506 attrs: { points: "12 2 19 21 12 17 5 21 12 2" }
26507 },
26508 []
26509 )]
26510 );
26511 }
26512};
26513
26514var NavigationIcon = {
26515 name: 'navigation-icon',
26516
26517 functional: true,
26518
26519 render: function render(h, ctx) {
26520 return h(
26521 "svg",
26522 babel_helper_vue_jsx_merge_props_default()([{
26523 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26524 "class": "feather feather-navigation" }, ctx.data]),
26525 [h(
26526 "polygon",
26527 {
26528 attrs: { points: "3 11 22 2 13 21 11 13 3 11" }
26529 },
26530 []
26531 )]
26532 );
26533 }
26534};
26535
26536var OctagonIcon = {
26537 name: 'octagon-icon',
26538
26539 functional: true,
26540
26541 render: function render(h, ctx) {
26542 return h(
26543 "svg",
26544 babel_helper_vue_jsx_merge_props_default()([{
26545 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26546 "class": "feather feather-octagon" }, ctx.data]),
26547 [h(
26548 "polygon",
26549 {
26550 attrs: { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }
26551 },
26552 []
26553 )]
26554 );
26555 }
26556};
26557
26558var PackageIcon = {
26559 name: 'package-icon',
26560
26561 functional: true,
26562
26563 render: function render(h, ctx) {
26564 return h(
26565 "svg",
26566 babel_helper_vue_jsx_merge_props_default()([{
26567 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26568 "class": "feather feather-package" }, ctx.data]),
26569 [h(
26570 "path",
26571 {
26572 attrs: { d: "M12.89 1.45l8 4A2 2 0 0 1 22 7.24v9.53a2 2 0 0 1-1.11 1.79l-8 4a2 2 0 0 1-1.79 0l-8-4a2 2 0 0 1-1.1-1.8V7.24a2 2 0 0 1 1.11-1.79l8-4a2 2 0 0 1 1.78 0z" }
26573 },
26574 []
26575 ), h(
26576 "polyline",
26577 {
26578 attrs: { points: "2.32 6.16 12 11 21.68 6.16" }
26579 },
26580 []
26581 ), h(
26582 "line",
26583 {
26584 attrs: { x1: "12", y1: "22.76", x2: "12", y2: "11" }
26585 },
26586 []
26587 ), h(
26588 "line",
26589 {
26590 attrs: { x1: "7", y1: "3.5", x2: "17", y2: "8.5" }
26591 },
26592 []
26593 )]
26594 );
26595 }
26596};
26597
26598var PaperclipIcon = {
26599 name: 'paperclip-icon',
26600
26601 functional: true,
26602
26603 render: function render(h, ctx) {
26604 return h(
26605 "svg",
26606 babel_helper_vue_jsx_merge_props_default()([{
26607 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26608 "class": "feather feather-paperclip" }, ctx.data]),
26609 [h(
26610 "path",
26611 {
26612 attrs: { d: "M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" }
26613 },
26614 []
26615 )]
26616 );
26617 }
26618};
26619
26620var PauseCircleIcon = {
26621 name: 'pause-circle-icon',
26622
26623 functional: true,
26624
26625 render: function render(h, ctx) {
26626 return h(
26627 "svg",
26628 babel_helper_vue_jsx_merge_props_default()([{
26629 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26630 "class": "feather feather-pause-circle" }, ctx.data]),
26631 [h(
26632 "circle",
26633 {
26634 attrs: { cx: "12", cy: "12", r: "10" }
26635 },
26636 []
26637 ), h(
26638 "line",
26639 {
26640 attrs: { x1: "10", y1: "15", x2: "10", y2: "9" }
26641 },
26642 []
26643 ), h(
26644 "line",
26645 {
26646 attrs: { x1: "14", y1: "15", x2: "14", y2: "9" }
26647 },
26648 []
26649 )]
26650 );
26651 }
26652};
26653
26654var PauseIcon = {
26655 name: 'pause-icon',
26656
26657 functional: true,
26658
26659 render: function render(h, ctx) {
26660 return h(
26661 "svg",
26662 babel_helper_vue_jsx_merge_props_default()([{
26663 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26664 "class": "feather feather-pause" }, ctx.data]),
26665 [h(
26666 "rect",
26667 {
26668 attrs: { x: "6", y: "4", width: "4", height: "16" }
26669 },
26670 []
26671 ), h(
26672 "rect",
26673 {
26674 attrs: { x: "14", y: "4", width: "4", height: "16" }
26675 },
26676 []
26677 )]
26678 );
26679 }
26680};
26681
26682var PercentIcon = {
26683 name: 'percent-icon',
26684
26685 functional: true,
26686
26687 render: function render(h, ctx) {
26688 return h(
26689 "svg",
26690 babel_helper_vue_jsx_merge_props_default()([{
26691 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26692 "class": "feather feather-percent" }, ctx.data]),
26693 [h(
26694 "line",
26695 {
26696 attrs: { x1: "19", y1: "5", x2: "5", y2: "19" }
26697 },
26698 []
26699 ), h(
26700 "circle",
26701 {
26702 attrs: { cx: "6.5", cy: "6.5", r: "2.5" }
26703 },
26704 []
26705 ), h(
26706 "circle",
26707 {
26708 attrs: { cx: "17.5", cy: "17.5", r: "2.5" }
26709 },
26710 []
26711 )]
26712 );
26713 }
26714};
26715
26716var PhoneCallIcon = {
26717 name: 'phone-call-icon',
26718
26719 functional: true,
26720
26721 render: function render(h, ctx) {
26722 return h(
26723 "svg",
26724 babel_helper_vue_jsx_merge_props_default()([{
26725 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26726 "class": "feather feather-phone-call" }, ctx.data]),
26727 [h(
26728 "path",
26729 {
26730 attrs: { d: "M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }
26731 },
26732 []
26733 )]
26734 );
26735 }
26736};
26737
26738var PhoneForwardedIcon = {
26739 name: 'phone-forwarded-icon',
26740
26741 functional: true,
26742
26743 render: function render(h, ctx) {
26744 return h(
26745 "svg",
26746 babel_helper_vue_jsx_merge_props_default()([{
26747 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26748 "class": "feather feather-phone-forwarded" }, ctx.data]),
26749 [h(
26750 "polyline",
26751 {
26752 attrs: { points: "19 1 23 5 19 9" }
26753 },
26754 []
26755 ), h(
26756 "line",
26757 {
26758 attrs: { x1: "15", y1: "5", x2: "23", y2: "5" }
26759 },
26760 []
26761 ), h(
26762 "path",
26763 {
26764 attrs: { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }
26765 },
26766 []
26767 )]
26768 );
26769 }
26770};
26771
26772var PhoneIncomingIcon = {
26773 name: 'phone-incoming-icon',
26774
26775 functional: true,
26776
26777 render: function render(h, ctx) {
26778 return h(
26779 "svg",
26780 babel_helper_vue_jsx_merge_props_default()([{
26781 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26782 "class": "feather feather-phone-incoming" }, ctx.data]),
26783 [h(
26784 "polyline",
26785 {
26786 attrs: { points: "16 2 16 8 22 8" }
26787 },
26788 []
26789 ), h(
26790 "line",
26791 {
26792 attrs: { x1: "23", y1: "1", x2: "16", y2: "8" }
26793 },
26794 []
26795 ), h(
26796 "path",
26797 {
26798 attrs: { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }
26799 },
26800 []
26801 )]
26802 );
26803 }
26804};
26805
26806var PhoneMissedIcon = {
26807 name: 'phone-missed-icon',
26808
26809 functional: true,
26810
26811 render: function render(h, ctx) {
26812 return h(
26813 "svg",
26814 babel_helper_vue_jsx_merge_props_default()([{
26815 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26816 "class": "feather feather-phone-missed" }, ctx.data]),
26817 [h(
26818 "line",
26819 {
26820 attrs: { x1: "23", y1: "1", x2: "17", y2: "7" }
26821 },
26822 []
26823 ), h(
26824 "line",
26825 {
26826 attrs: { x1: "17", y1: "1", x2: "23", y2: "7" }
26827 },
26828 []
26829 ), h(
26830 "path",
26831 {
26832 attrs: { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }
26833 },
26834 []
26835 )]
26836 );
26837 }
26838};
26839
26840var PhoneOffIcon = {
26841 name: 'phone-off-icon',
26842
26843 functional: true,
26844
26845 render: function render(h, ctx) {
26846 return h(
26847 "svg",
26848 babel_helper_vue_jsx_merge_props_default()([{
26849 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26850 "class": "feather feather-phone-off" }, ctx.data]),
26851 [h(
26852 "path",
26853 {
26854 attrs: { d: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91" }
26855 },
26856 []
26857 ), h(
26858 "line",
26859 {
26860 attrs: { x1: "23", y1: "1", x2: "1", y2: "23" }
26861 },
26862 []
26863 )]
26864 );
26865 }
26866};
26867
26868var PhoneOutgoingIcon = {
26869 name: 'phone-outgoing-icon',
26870
26871 functional: true,
26872
26873 render: function render(h, ctx) {
26874 return h(
26875 "svg",
26876 babel_helper_vue_jsx_merge_props_default()([{
26877 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26878 "class": "feather feather-phone-outgoing" }, ctx.data]),
26879 [h(
26880 "polyline",
26881 {
26882 attrs: { points: "23 7 23 1 17 1" }
26883 },
26884 []
26885 ), h(
26886 "line",
26887 {
26888 attrs: { x1: "16", y1: "8", x2: "23", y2: "1" }
26889 },
26890 []
26891 ), h(
26892 "path",
26893 {
26894 attrs: { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }
26895 },
26896 []
26897 )]
26898 );
26899 }
26900};
26901
26902var PhoneIcon = {
26903 name: 'phone-icon',
26904
26905 functional: true,
26906
26907 render: function render(h, ctx) {
26908 return h(
26909 "svg",
26910 babel_helper_vue_jsx_merge_props_default()([{
26911 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26912 "class": "feather feather-phone" }, ctx.data]),
26913 [h(
26914 "path",
26915 {
26916 attrs: { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" }
26917 },
26918 []
26919 )]
26920 );
26921 }
26922};
26923
26924var PieChartIcon = {
26925 name: 'pie-chart-icon',
26926
26927 functional: true,
26928
26929 render: function render(h, ctx) {
26930 return h(
26931 "svg",
26932 babel_helper_vue_jsx_merge_props_default()([{
26933 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26934 "class": "feather feather-pie-chart" }, ctx.data]),
26935 [h(
26936 "path",
26937 {
26938 attrs: { d: "M21.21 15.89A10 10 0 1 1 8 2.83" }
26939 },
26940 []
26941 ), h(
26942 "path",
26943 {
26944 attrs: { d: "M22 12A10 10 0 0 0 12 2v10z" }
26945 },
26946 []
26947 )]
26948 );
26949 }
26950};
26951
26952var PlayCircleIcon = {
26953 name: 'play-circle-icon',
26954
26955 functional: true,
26956
26957 render: function render(h, ctx) {
26958 return h(
26959 "svg",
26960 babel_helper_vue_jsx_merge_props_default()([{
26961 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26962 "class": "feather feather-play-circle" }, ctx.data]),
26963 [h(
26964 "circle",
26965 {
26966 attrs: { cx: "12", cy: "12", r: "10" }
26967 },
26968 []
26969 ), h(
26970 "polygon",
26971 {
26972 attrs: { points: "10 8 16 12 10 16 10 8" }
26973 },
26974 []
26975 )]
26976 );
26977 }
26978};
26979
26980var PlayIcon = {
26981 name: 'play-icon',
26982
26983 functional: true,
26984
26985 render: function render(h, ctx) {
26986 return h(
26987 "svg",
26988 babel_helper_vue_jsx_merge_props_default()([{
26989 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
26990 "class": "feather feather-play" }, ctx.data]),
26991 [h(
26992 "polygon",
26993 {
26994 attrs: { points: "5 3 19 12 5 21 5 3" }
26995 },
26996 []
26997 )]
26998 );
26999 }
27000};
27001
27002var PlusCircleIcon = {
27003 name: 'plus-circle-icon',
27004
27005 functional: true,
27006
27007 render: function render(h, ctx) {
27008 return h(
27009 "svg",
27010 babel_helper_vue_jsx_merge_props_default()([{
27011 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27012 "class": "feather feather-plus-circle" }, ctx.data]),
27013 [h(
27014 "circle",
27015 {
27016 attrs: { cx: "12", cy: "12", r: "10" }
27017 },
27018 []
27019 ), h(
27020 "line",
27021 {
27022 attrs: { x1: "12", y1: "8", x2: "12", y2: "16" }
27023 },
27024 []
27025 ), h(
27026 "line",
27027 {
27028 attrs: { x1: "8", y1: "12", x2: "16", y2: "12" }
27029 },
27030 []
27031 )]
27032 );
27033 }
27034};
27035
27036var PlusSquareIcon = {
27037 name: 'plus-square-icon',
27038
27039 functional: true,
27040
27041 render: function render(h, ctx) {
27042 return h(
27043 "svg",
27044 babel_helper_vue_jsx_merge_props_default()([{
27045 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27046 "class": "feather feather-plus-square" }, ctx.data]),
27047 [h(
27048 "rect",
27049 {
27050 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
27051 },
27052 []
27053 ), h(
27054 "line",
27055 {
27056 attrs: { x1: "12", y1: "8", x2: "12", y2: "16" }
27057 },
27058 []
27059 ), h(
27060 "line",
27061 {
27062 attrs: { x1: "8", y1: "12", x2: "16", y2: "12" }
27063 },
27064 []
27065 )]
27066 );
27067 }
27068};
27069
27070var PlusIcon = {
27071 name: 'plus-icon',
27072
27073 functional: true,
27074
27075 render: function render(h, ctx) {
27076 return h(
27077 "svg",
27078 babel_helper_vue_jsx_merge_props_default()([{
27079 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27080 "class": "feather feather-plus" }, ctx.data]),
27081 [h(
27082 "line",
27083 {
27084 attrs: { x1: "12", y1: "5", x2: "12", y2: "19" }
27085 },
27086 []
27087 ), h(
27088 "line",
27089 {
27090 attrs: { x1: "5", y1: "12", x2: "19", y2: "12" }
27091 },
27092 []
27093 )]
27094 );
27095 }
27096};
27097
27098var PocketIcon = {
27099 name: 'pocket-icon',
27100
27101 functional: true,
27102
27103 render: function render(h, ctx) {
27104 return h(
27105 "svg",
27106 babel_helper_vue_jsx_merge_props_default()([{
27107 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27108 "class": "feather feather-pocket" }, ctx.data]),
27109 [h(
27110 "path",
27111 {
27112 attrs: { d: "M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z" }
27113 },
27114 []
27115 ), h(
27116 "polyline",
27117 {
27118 attrs: { points: "8 10 12 14 16 10" }
27119 },
27120 []
27121 )]
27122 );
27123 }
27124};
27125
27126var PowerIcon = {
27127 name: 'power-icon',
27128
27129 functional: true,
27130
27131 render: function render(h, ctx) {
27132 return h(
27133 "svg",
27134 babel_helper_vue_jsx_merge_props_default()([{
27135 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27136 "class": "feather feather-power" }, ctx.data]),
27137 [h(
27138 "path",
27139 {
27140 attrs: { d: "M18.36 6.64a9 9 0 1 1-12.73 0" }
27141 },
27142 []
27143 ), h(
27144 "line",
27145 {
27146 attrs: { x1: "12", y1: "2", x2: "12", y2: "12" }
27147 },
27148 []
27149 )]
27150 );
27151 }
27152};
27153
27154var PrinterIcon = {
27155 name: 'printer-icon',
27156
27157 functional: true,
27158
27159 render: function render(h, ctx) {
27160 return h(
27161 "svg",
27162 babel_helper_vue_jsx_merge_props_default()([{
27163 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27164 "class": "feather feather-printer" }, ctx.data]),
27165 [h(
27166 "polyline",
27167 {
27168 attrs: { points: "6 9 6 2 18 2 18 9" }
27169 },
27170 []
27171 ), h(
27172 "path",
27173 {
27174 attrs: { d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" }
27175 },
27176 []
27177 ), h(
27178 "rect",
27179 {
27180 attrs: { x: "6", y: "14", width: "12", height: "8" }
27181 },
27182 []
27183 )]
27184 );
27185 }
27186};
27187
27188var RadioIcon = {
27189 name: 'radio-icon',
27190
27191 functional: true,
27192
27193 render: function render(h, ctx) {
27194 return h(
27195 "svg",
27196 babel_helper_vue_jsx_merge_props_default()([{
27197 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27198 "class": "feather feather-radio" }, ctx.data]),
27199 [h(
27200 "circle",
27201 {
27202 attrs: { cx: "12", cy: "12", r: "2" }
27203 },
27204 []
27205 ), h(
27206 "path",
27207 {
27208 attrs: { d: "M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14" }
27209 },
27210 []
27211 )]
27212 );
27213 }
27214};
27215
27216var RefreshCcwIcon = {
27217 name: 'refresh-ccw-icon',
27218
27219 functional: true,
27220
27221 render: function render(h, ctx) {
27222 return h(
27223 "svg",
27224 babel_helper_vue_jsx_merge_props_default()([{
27225 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27226 "class": "feather feather-refresh-ccw" }, ctx.data]),
27227 [h(
27228 "polyline",
27229 {
27230 attrs: { points: "1 4 1 10 7 10" }
27231 },
27232 []
27233 ), h(
27234 "polyline",
27235 {
27236 attrs: { points: "23 20 23 14 17 14" }
27237 },
27238 []
27239 ), h(
27240 "path",
27241 {
27242 attrs: { d: "M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15" }
27243 },
27244 []
27245 )]
27246 );
27247 }
27248};
27249
27250var RefreshCwIcon = {
27251 name: 'refresh-cw-icon',
27252
27253 functional: true,
27254
27255 render: function render(h, ctx) {
27256 return h(
27257 "svg",
27258 babel_helper_vue_jsx_merge_props_default()([{
27259 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27260 "class": "feather feather-refresh-cw" }, ctx.data]),
27261 [h(
27262 "polyline",
27263 {
27264 attrs: { points: "23 4 23 10 17 10" }
27265 },
27266 []
27267 ), h(
27268 "polyline",
27269 {
27270 attrs: { points: "1 20 1 14 7 14" }
27271 },
27272 []
27273 ), h(
27274 "path",
27275 {
27276 attrs: { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" }
27277 },
27278 []
27279 )]
27280 );
27281 }
27282};
27283
27284var RepeatIcon = {
27285 name: 'repeat-icon',
27286
27287 functional: true,
27288
27289 render: function render(h, ctx) {
27290 return h(
27291 "svg",
27292 babel_helper_vue_jsx_merge_props_default()([{
27293 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27294 "class": "feather feather-repeat" }, ctx.data]),
27295 [h(
27296 "polyline",
27297 {
27298 attrs: { points: "17 1 21 5 17 9" }
27299 },
27300 []
27301 ), h(
27302 "path",
27303 {
27304 attrs: { d: "M3 11V9a4 4 0 0 1 4-4h14" }
27305 },
27306 []
27307 ), h(
27308 "polyline",
27309 {
27310 attrs: { points: "7 23 3 19 7 15" }
27311 },
27312 []
27313 ), h(
27314 "path",
27315 {
27316 attrs: { d: "M21 13v2a4 4 0 0 1-4 4H3" }
27317 },
27318 []
27319 )]
27320 );
27321 }
27322};
27323
27324var RewindIcon = {
27325 name: 'rewind-icon',
27326
27327 functional: true,
27328
27329 render: function render(h, ctx) {
27330 return h(
27331 "svg",
27332 babel_helper_vue_jsx_merge_props_default()([{
27333 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27334 "class": "feather feather-rewind" }, ctx.data]),
27335 [h(
27336 "polygon",
27337 {
27338 attrs: { points: "11 19 2 12 11 5 11 19" }
27339 },
27340 []
27341 ), h(
27342 "polygon",
27343 {
27344 attrs: { points: "22 19 13 12 22 5 22 19" }
27345 },
27346 []
27347 )]
27348 );
27349 }
27350};
27351
27352var RotateCcwIcon = {
27353 name: 'rotate-ccw-icon',
27354
27355 functional: true,
27356
27357 render: function render(h, ctx) {
27358 return h(
27359 "svg",
27360 babel_helper_vue_jsx_merge_props_default()([{
27361 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27362 "class": "feather feather-rotate-ccw" }, ctx.data]),
27363 [h(
27364 "polyline",
27365 {
27366 attrs: { points: "1 4 1 10 7 10" }
27367 },
27368 []
27369 ), h(
27370 "path",
27371 {
27372 attrs: { d: "M3.51 15a9 9 0 1 0 2.13-9.36L1 10" }
27373 },
27374 []
27375 )]
27376 );
27377 }
27378};
27379
27380var RotateCwIcon = {
27381 name: 'rotate-cw-icon',
27382
27383 functional: true,
27384
27385 render: function render(h, ctx) {
27386 return h(
27387 "svg",
27388 babel_helper_vue_jsx_merge_props_default()([{
27389 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27390 "class": "feather feather-rotate-cw" }, ctx.data]),
27391 [h(
27392 "polyline",
27393 {
27394 attrs: { points: "23 4 23 10 17 10" }
27395 },
27396 []
27397 ), h(
27398 "path",
27399 {
27400 attrs: { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" }
27401 },
27402 []
27403 )]
27404 );
27405 }
27406};
27407
27408var RssIcon = {
27409 name: 'rss-icon',
27410
27411 functional: true,
27412
27413 render: function render(h, ctx) {
27414 return h(
27415 "svg",
27416 babel_helper_vue_jsx_merge_props_default()([{
27417 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27418 "class": "feather feather-rss" }, ctx.data]),
27419 [h(
27420 "path",
27421 {
27422 attrs: { d: "M4 11a9 9 0 0 1 9 9" }
27423 },
27424 []
27425 ), h(
27426 "path",
27427 {
27428 attrs: { d: "M4 4a16 16 0 0 1 16 16" }
27429 },
27430 []
27431 ), h(
27432 "circle",
27433 {
27434 attrs: { cx: "5", cy: "19", r: "1" }
27435 },
27436 []
27437 )]
27438 );
27439 }
27440};
27441
27442var SaveIcon = {
27443 name: 'save-icon',
27444
27445 functional: true,
27446
27447 render: function render(h, ctx) {
27448 return h(
27449 "svg",
27450 babel_helper_vue_jsx_merge_props_default()([{
27451 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27452 "class": "feather feather-save" }, ctx.data]),
27453 [h(
27454 "path",
27455 {
27456 attrs: { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }
27457 },
27458 []
27459 ), h(
27460 "polyline",
27461 {
27462 attrs: { points: "17 21 17 13 7 13 7 21" }
27463 },
27464 []
27465 ), h(
27466 "polyline",
27467 {
27468 attrs: { points: "7 3 7 8 15 8" }
27469 },
27470 []
27471 )]
27472 );
27473 }
27474};
27475
27476var ScissorsIcon = {
27477 name: 'scissors-icon',
27478
27479 functional: true,
27480
27481 render: function render(h, ctx) {
27482 return h(
27483 "svg",
27484 babel_helper_vue_jsx_merge_props_default()([{
27485 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27486 "class": "feather feather-scissors" }, ctx.data]),
27487 [h(
27488 "circle",
27489 {
27490 attrs: { cx: "6", cy: "6", r: "3" }
27491 },
27492 []
27493 ), h(
27494 "circle",
27495 {
27496 attrs: { cx: "6", cy: "18", r: "3" }
27497 },
27498 []
27499 ), h(
27500 "line",
27501 {
27502 attrs: { x1: "20", y1: "4", x2: "8.12", y2: "15.88" }
27503 },
27504 []
27505 ), h(
27506 "line",
27507 {
27508 attrs: { x1: "14.47", y1: "14.48", x2: "20", y2: "20" }
27509 },
27510 []
27511 ), h(
27512 "line",
27513 {
27514 attrs: { x1: "8.12", y1: "8.12", x2: "12", y2: "12" }
27515 },
27516 []
27517 )]
27518 );
27519 }
27520};
27521
27522var SearchIcon = {
27523 name: 'search-icon',
27524
27525 functional: true,
27526
27527 render: function render(h, ctx) {
27528 return h(
27529 "svg",
27530 babel_helper_vue_jsx_merge_props_default()([{
27531 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27532 "class": "feather feather-search" }, ctx.data]),
27533 [h(
27534 "circle",
27535 {
27536 attrs: { cx: "11", cy: "11", r: "8" }
27537 },
27538 []
27539 ), h(
27540 "line",
27541 {
27542 attrs: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }
27543 },
27544 []
27545 )]
27546 );
27547 }
27548};
27549
27550var SendIcon = {
27551 name: 'send-icon',
27552
27553 functional: true,
27554
27555 render: function render(h, ctx) {
27556 return h(
27557 "svg",
27558 babel_helper_vue_jsx_merge_props_default()([{
27559 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27560 "class": "feather feather-send" }, ctx.data]),
27561 [h(
27562 "line",
27563 {
27564 attrs: { x1: "22", y1: "2", x2: "11", y2: "13" }
27565 },
27566 []
27567 ), h(
27568 "polygon",
27569 {
27570 attrs: { points: "22 2 15 22 11 13 2 9 22 2" }
27571 },
27572 []
27573 )]
27574 );
27575 }
27576};
27577
27578var ServerIcon = {
27579 name: 'server-icon',
27580
27581 functional: true,
27582
27583 render: function render(h, ctx) {
27584 return h(
27585 "svg",
27586 babel_helper_vue_jsx_merge_props_default()([{
27587 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27588 "class": "feather feather-server" }, ctx.data]),
27589 [h(
27590 "rect",
27591 {
27592 attrs: { x: "2", y: "2", width: "20", height: "8", rx: "2", ry: "2" }
27593 },
27594 []
27595 ), h(
27596 "rect",
27597 {
27598 attrs: { x: "2", y: "14", width: "20", height: "8", rx: "2", ry: "2" }
27599 },
27600 []
27601 ), h(
27602 "line",
27603 {
27604 attrs: { x1: "6", y1: "6", x2: "6", y2: "6" }
27605 },
27606 []
27607 ), h(
27608 "line",
27609 {
27610 attrs: { x1: "6", y1: "18", x2: "6", y2: "18" }
27611 },
27612 []
27613 )]
27614 );
27615 }
27616};
27617
27618var SettingsIcon = {
27619 name: 'settings-icon',
27620
27621 functional: true,
27622
27623 render: function render(h, ctx) {
27624 return h(
27625 "svg",
27626 babel_helper_vue_jsx_merge_props_default()([{
27627 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27628 "class": "feather feather-settings" }, ctx.data]),
27629 [h(
27630 "circle",
27631 {
27632 attrs: { cx: "12", cy: "12", r: "3" }
27633 },
27634 []
27635 ), h(
27636 "path",
27637 {
27638 attrs: { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" }
27639 },
27640 []
27641 )]
27642 );
27643 }
27644};
27645
27646var Share2Icon = {
27647 name: 'share2-icon',
27648
27649 functional: true,
27650
27651 render: function render(h, ctx) {
27652 return h(
27653 "svg",
27654 babel_helper_vue_jsx_merge_props_default()([{
27655 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27656 "class": "feather feather-share-2" }, ctx.data]),
27657 [h(
27658 "circle",
27659 {
27660 attrs: { cx: "18", cy: "5", r: "3" }
27661 },
27662 []
27663 ), h(
27664 "circle",
27665 {
27666 attrs: { cx: "6", cy: "12", r: "3" }
27667 },
27668 []
27669 ), h(
27670 "circle",
27671 {
27672 attrs: { cx: "18", cy: "19", r: "3" }
27673 },
27674 []
27675 ), h(
27676 "line",
27677 {
27678 attrs: { x1: "8.59", y1: "13.51", x2: "15.42", y2: "17.49" }
27679 },
27680 []
27681 ), h(
27682 "line",
27683 {
27684 attrs: { x1: "15.41", y1: "6.51", x2: "8.59", y2: "10.49" }
27685 },
27686 []
27687 )]
27688 );
27689 }
27690};
27691
27692var ShareIcon = {
27693 name: 'share-icon',
27694
27695 functional: true,
27696
27697 render: function render(h, ctx) {
27698 return h(
27699 "svg",
27700 babel_helper_vue_jsx_merge_props_default()([{
27701 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27702 "class": "feather feather-share" }, ctx.data]),
27703 [h(
27704 "path",
27705 {
27706 attrs: { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" }
27707 },
27708 []
27709 ), h(
27710 "polyline",
27711 {
27712 attrs: { points: "16 6 12 2 8 6" }
27713 },
27714 []
27715 ), h(
27716 "line",
27717 {
27718 attrs: { x1: "12", y1: "2", x2: "12", y2: "15" }
27719 },
27720 []
27721 )]
27722 );
27723 }
27724};
27725
27726var ShieldOffIcon = {
27727 name: 'shield-off-icon',
27728
27729 functional: true,
27730
27731 render: function render(h, ctx) {
27732 return h(
27733 "svg",
27734 babel_helper_vue_jsx_merge_props_default()([{
27735 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27736 "class": "feather feather-shield-off" }, ctx.data]),
27737 [h(
27738 "path",
27739 {
27740 attrs: { d: "M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18" }
27741 },
27742 []
27743 ), h(
27744 "path",
27745 {
27746 attrs: { d: "M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38" }
27747 },
27748 []
27749 ), h(
27750 "line",
27751 {
27752 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
27753 },
27754 []
27755 )]
27756 );
27757 }
27758};
27759
27760var ShieldIcon = {
27761 name: 'shield-icon',
27762
27763 functional: true,
27764
27765 render: function render(h, ctx) {
27766 return h(
27767 "svg",
27768 babel_helper_vue_jsx_merge_props_default()([{
27769 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27770 "class": "feather feather-shield" }, ctx.data]),
27771 [h(
27772 "path",
27773 {
27774 attrs: { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }
27775 },
27776 []
27777 )]
27778 );
27779 }
27780};
27781
27782var ShoppingBagIcon = {
27783 name: 'shopping-bag-icon',
27784
27785 functional: true,
27786
27787 render: function render(h, ctx) {
27788 return h(
27789 "svg",
27790 babel_helper_vue_jsx_merge_props_default()([{
27791 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27792 "class": "feather feather-shopping-bag" }, ctx.data]),
27793 [h(
27794 "path",
27795 {
27796 attrs: { d: "M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z" }
27797 },
27798 []
27799 ), h(
27800 "line",
27801 {
27802 attrs: { x1: "3", y1: "6", x2: "21", y2: "6" }
27803 },
27804 []
27805 ), h(
27806 "path",
27807 {
27808 attrs: { d: "M16 10a4 4 0 0 1-8 0" }
27809 },
27810 []
27811 )]
27812 );
27813 }
27814};
27815
27816var ShoppingCartIcon = {
27817 name: 'shopping-cart-icon',
27818
27819 functional: true,
27820
27821 render: function render(h, ctx) {
27822 return h(
27823 "svg",
27824 babel_helper_vue_jsx_merge_props_default()([{
27825 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27826 "class": "feather feather-shopping-cart" }, ctx.data]),
27827 [h(
27828 "circle",
27829 {
27830 attrs: { cx: "9", cy: "21", r: "1" }
27831 },
27832 []
27833 ), h(
27834 "circle",
27835 {
27836 attrs: { cx: "20", cy: "21", r: "1" }
27837 },
27838 []
27839 ), h(
27840 "path",
27841 {
27842 attrs: { d: "M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6" }
27843 },
27844 []
27845 )]
27846 );
27847 }
27848};
27849
27850var ShuffleIcon = {
27851 name: 'shuffle-icon',
27852
27853 functional: true,
27854
27855 render: function render(h, ctx) {
27856 return h(
27857 "svg",
27858 babel_helper_vue_jsx_merge_props_default()([{
27859 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27860 "class": "feather feather-shuffle" }, ctx.data]),
27861 [h(
27862 "polyline",
27863 {
27864 attrs: { points: "16 3 21 3 21 8" }
27865 },
27866 []
27867 ), h(
27868 "line",
27869 {
27870 attrs: { x1: "4", y1: "20", x2: "21", y2: "3" }
27871 },
27872 []
27873 ), h(
27874 "polyline",
27875 {
27876 attrs: { points: "21 16 21 21 16 21" }
27877 },
27878 []
27879 ), h(
27880 "line",
27881 {
27882 attrs: { x1: "15", y1: "15", x2: "21", y2: "21" }
27883 },
27884 []
27885 ), h(
27886 "line",
27887 {
27888 attrs: { x1: "4", y1: "4", x2: "9", y2: "9" }
27889 },
27890 []
27891 )]
27892 );
27893 }
27894};
27895
27896var SidebarIcon = {
27897 name: 'sidebar-icon',
27898
27899 functional: true,
27900
27901 render: function render(h, ctx) {
27902 return h(
27903 "svg",
27904 babel_helper_vue_jsx_merge_props_default()([{
27905 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27906 "class": "feather feather-sidebar" }, ctx.data]),
27907 [h(
27908 "rect",
27909 {
27910 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
27911 },
27912 []
27913 ), h(
27914 "line",
27915 {
27916 attrs: { x1: "9", y1: "3", x2: "9", y2: "21" }
27917 },
27918 []
27919 )]
27920 );
27921 }
27922};
27923
27924var SkipBackIcon = {
27925 name: 'skip-back-icon',
27926
27927 functional: true,
27928
27929 render: function render(h, ctx) {
27930 return h(
27931 "svg",
27932 babel_helper_vue_jsx_merge_props_default()([{
27933 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27934 "class": "feather feather-skip-back" }, ctx.data]),
27935 [h(
27936 "polygon",
27937 {
27938 attrs: { points: "19 20 9 12 19 4 19 20" }
27939 },
27940 []
27941 ), h(
27942 "line",
27943 {
27944 attrs: { x1: "5", y1: "19", x2: "5", y2: "5" }
27945 },
27946 []
27947 )]
27948 );
27949 }
27950};
27951
27952var SkipForwardIcon = {
27953 name: 'skip-forward-icon',
27954
27955 functional: true,
27956
27957 render: function render(h, ctx) {
27958 return h(
27959 "svg",
27960 babel_helper_vue_jsx_merge_props_default()([{
27961 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27962 "class": "feather feather-skip-forward" }, ctx.data]),
27963 [h(
27964 "polygon",
27965 {
27966 attrs: { points: "5 4 15 12 5 20 5 4" }
27967 },
27968 []
27969 ), h(
27970 "line",
27971 {
27972 attrs: { x1: "19", y1: "5", x2: "19", y2: "19" }
27973 },
27974 []
27975 )]
27976 );
27977 }
27978};
27979
27980var SlackIcon = {
27981 name: 'slack-icon',
27982
27983 functional: true,
27984
27985 render: function render(h, ctx) {
27986 return h(
27987 "svg",
27988 babel_helper_vue_jsx_merge_props_default()([{
27989 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
27990 "class": "feather feather-slack" }, ctx.data]),
27991 [h(
27992 "path",
27993 {
27994 attrs: { d: "M22.08 9C19.81 1.41 16.54-.35 9 1.92S-.35 7.46 1.92 15 7.46 24.35 15 22.08 24.35 16.54 22.08 9z" }
27995 },
27996 []
27997 ), h(
27998 "line",
27999 {
28000 attrs: { x1: "12.57", y1: "5.99", x2: "16.15", y2: "16.39" }
28001 },
28002 []
28003 ), h(
28004 "line",
28005 {
28006 attrs: { x1: "7.85", y1: "7.61", x2: "11.43", y2: "18.01" }
28007 },
28008 []
28009 ), h(
28010 "line",
28011 {
28012 attrs: { x1: "16.39", y1: "7.85", x2: "5.99", y2: "11.43" }
28013 },
28014 []
28015 ), h(
28016 "line",
28017 {
28018 attrs: { x1: "18.01", y1: "12.57", x2: "7.61", y2: "16.15" }
28019 },
28020 []
28021 )]
28022 );
28023 }
28024};
28025
28026var SlashIcon = {
28027 name: 'slash-icon',
28028
28029 functional: true,
28030
28031 render: function render(h, ctx) {
28032 return h(
28033 "svg",
28034 babel_helper_vue_jsx_merge_props_default()([{
28035 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28036 "class": "feather feather-slash" }, ctx.data]),
28037 [h(
28038 "circle",
28039 {
28040 attrs: { cx: "12", cy: "12", r: "10" }
28041 },
28042 []
28043 ), h(
28044 "line",
28045 {
28046 attrs: { x1: "4.93", y1: "4.93", x2: "19.07", y2: "19.07" }
28047 },
28048 []
28049 )]
28050 );
28051 }
28052};
28053
28054var SlidersIcon = {
28055 name: 'sliders-icon',
28056
28057 functional: true,
28058
28059 render: function render(h, ctx) {
28060 return h(
28061 "svg",
28062 babel_helper_vue_jsx_merge_props_default()([{
28063 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28064 "class": "feather feather-sliders" }, ctx.data]),
28065 [h(
28066 "line",
28067 {
28068 attrs: { x1: "4", y1: "21", x2: "4", y2: "14" }
28069 },
28070 []
28071 ), h(
28072 "line",
28073 {
28074 attrs: { x1: "4", y1: "10", x2: "4", y2: "3" }
28075 },
28076 []
28077 ), h(
28078 "line",
28079 {
28080 attrs: { x1: "12", y1: "21", x2: "12", y2: "12" }
28081 },
28082 []
28083 ), h(
28084 "line",
28085 {
28086 attrs: { x1: "12", y1: "8", x2: "12", y2: "3" }
28087 },
28088 []
28089 ), h(
28090 "line",
28091 {
28092 attrs: { x1: "20", y1: "21", x2: "20", y2: "16" }
28093 },
28094 []
28095 ), h(
28096 "line",
28097 {
28098 attrs: { x1: "20", y1: "12", x2: "20", y2: "3" }
28099 },
28100 []
28101 ), h(
28102 "line",
28103 {
28104 attrs: { x1: "1", y1: "14", x2: "7", y2: "14" }
28105 },
28106 []
28107 ), h(
28108 "line",
28109 {
28110 attrs: { x1: "9", y1: "8", x2: "15", y2: "8" }
28111 },
28112 []
28113 ), h(
28114 "line",
28115 {
28116 attrs: { x1: "17", y1: "16", x2: "23", y2: "16" }
28117 },
28118 []
28119 )]
28120 );
28121 }
28122};
28123
28124var SmartphoneIcon = {
28125 name: 'smartphone-icon',
28126
28127 functional: true,
28128
28129 render: function render(h, ctx) {
28130 return h(
28131 "svg",
28132 babel_helper_vue_jsx_merge_props_default()([{
28133 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28134 "class": "feather feather-smartphone" }, ctx.data]),
28135 [h(
28136 "rect",
28137 {
28138 attrs: { x: "5", y: "2", width: "14", height: "20", rx: "2", ry: "2" }
28139 },
28140 []
28141 ), h(
28142 "line",
28143 {
28144 attrs: { x1: "12", y1: "18", x2: "12", y2: "18" }
28145 },
28146 []
28147 )]
28148 );
28149 }
28150};
28151
28152var SpeakerIcon = {
28153 name: 'speaker-icon',
28154
28155 functional: true,
28156
28157 render: function render(h, ctx) {
28158 return h(
28159 "svg",
28160 babel_helper_vue_jsx_merge_props_default()([{
28161 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28162 "class": "feather feather-speaker" }, ctx.data]),
28163 [h(
28164 "rect",
28165 {
28166 attrs: { x: "4", y: "2", width: "16", height: "20", rx: "2", ry: "2" }
28167 },
28168 []
28169 ), h(
28170 "circle",
28171 {
28172 attrs: { cx: "12", cy: "14", r: "4" }
28173 },
28174 []
28175 ), h(
28176 "line",
28177 {
28178 attrs: { x1: "12", y1: "6", x2: "12", y2: "6" }
28179 },
28180 []
28181 )]
28182 );
28183 }
28184};
28185
28186var SquareIcon = {
28187 name: 'square-icon',
28188
28189 functional: true,
28190
28191 render: function render(h, ctx) {
28192 return h(
28193 "svg",
28194 babel_helper_vue_jsx_merge_props_default()([{
28195 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28196 "class": "feather feather-square" }, ctx.data]),
28197 [h(
28198 "rect",
28199 {
28200 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
28201 },
28202 []
28203 )]
28204 );
28205 }
28206};
28207
28208var StarIcon = {
28209 name: 'star-icon',
28210
28211 functional: true,
28212
28213 render: function render(h, ctx) {
28214 return h(
28215 "svg",
28216 babel_helper_vue_jsx_merge_props_default()([{
28217 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28218 "class": "feather feather-star" }, ctx.data]),
28219 [h(
28220 "polygon",
28221 {
28222 attrs: { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }
28223 },
28224 []
28225 )]
28226 );
28227 }
28228};
28229
28230var StopCircleIcon = {
28231 name: 'stop-circle-icon',
28232
28233 functional: true,
28234
28235 render: function render(h, ctx) {
28236 return h(
28237 "svg",
28238 babel_helper_vue_jsx_merge_props_default()([{
28239 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28240 "class": "feather feather-stop-circle" }, ctx.data]),
28241 [h(
28242 "circle",
28243 {
28244 attrs: { cx: "12", cy: "12", r: "10" }
28245 },
28246 []
28247 ), h(
28248 "rect",
28249 {
28250 attrs: { x: "9", y: "9", width: "6", height: "6" }
28251 },
28252 []
28253 )]
28254 );
28255 }
28256};
28257
28258var SunIcon = {
28259 name: 'sun-icon',
28260
28261 functional: true,
28262
28263 render: function render(h, ctx) {
28264 return h(
28265 "svg",
28266 babel_helper_vue_jsx_merge_props_default()([{
28267 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28268 "class": "feather feather-sun" }, ctx.data]),
28269 [h(
28270 "circle",
28271 {
28272 attrs: { cx: "12", cy: "12", r: "5" }
28273 },
28274 []
28275 ), h(
28276 "line",
28277 {
28278 attrs: { x1: "12", y1: "1", x2: "12", y2: "3" }
28279 },
28280 []
28281 ), h(
28282 "line",
28283 {
28284 attrs: { x1: "12", y1: "21", x2: "12", y2: "23" }
28285 },
28286 []
28287 ), h(
28288 "line",
28289 {
28290 attrs: { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }
28291 },
28292 []
28293 ), h(
28294 "line",
28295 {
28296 attrs: { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }
28297 },
28298 []
28299 ), h(
28300 "line",
28301 {
28302 attrs: { x1: "1", y1: "12", x2: "3", y2: "12" }
28303 },
28304 []
28305 ), h(
28306 "line",
28307 {
28308 attrs: { x1: "21", y1: "12", x2: "23", y2: "12" }
28309 },
28310 []
28311 ), h(
28312 "line",
28313 {
28314 attrs: { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }
28315 },
28316 []
28317 ), h(
28318 "line",
28319 {
28320 attrs: { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" }
28321 },
28322 []
28323 )]
28324 );
28325 }
28326};
28327
28328var SunriseIcon = {
28329 name: 'sunrise-icon',
28330
28331 functional: true,
28332
28333 render: function render(h, ctx) {
28334 return h(
28335 "svg",
28336 babel_helper_vue_jsx_merge_props_default()([{
28337 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28338 "class": "feather feather-sunrise" }, ctx.data]),
28339 [h(
28340 "path",
28341 {
28342 attrs: { d: "M17 18a5 5 0 0 0-10 0" }
28343 },
28344 []
28345 ), h(
28346 "line",
28347 {
28348 attrs: { x1: "12", y1: "2", x2: "12", y2: "9" }
28349 },
28350 []
28351 ), h(
28352 "line",
28353 {
28354 attrs: { x1: "4.22", y1: "10.22", x2: "5.64", y2: "11.64" }
28355 },
28356 []
28357 ), h(
28358 "line",
28359 {
28360 attrs: { x1: "1", y1: "18", x2: "3", y2: "18" }
28361 },
28362 []
28363 ), h(
28364 "line",
28365 {
28366 attrs: { x1: "21", y1: "18", x2: "23", y2: "18" }
28367 },
28368 []
28369 ), h(
28370 "line",
28371 {
28372 attrs: { x1: "18.36", y1: "11.64", x2: "19.78", y2: "10.22" }
28373 },
28374 []
28375 ), h(
28376 "line",
28377 {
28378 attrs: { x1: "23", y1: "22", x2: "1", y2: "22" }
28379 },
28380 []
28381 ), h(
28382 "polyline",
28383 {
28384 attrs: { points: "8 6 12 2 16 6" }
28385 },
28386 []
28387 )]
28388 );
28389 }
28390};
28391
28392var SunsetIcon = {
28393 name: 'sunset-icon',
28394
28395 functional: true,
28396
28397 render: function render(h, ctx) {
28398 return h(
28399 "svg",
28400 babel_helper_vue_jsx_merge_props_default()([{
28401 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28402 "class": "feather feather-sunset" }, ctx.data]),
28403 [h(
28404 "path",
28405 {
28406 attrs: { d: "M17 18a5 5 0 0 0-10 0" }
28407 },
28408 []
28409 ), h(
28410 "line",
28411 {
28412 attrs: { x1: "12", y1: "9", x2: "12", y2: "2" }
28413 },
28414 []
28415 ), h(
28416 "line",
28417 {
28418 attrs: { x1: "4.22", y1: "10.22", x2: "5.64", y2: "11.64" }
28419 },
28420 []
28421 ), h(
28422 "line",
28423 {
28424 attrs: { x1: "1", y1: "18", x2: "3", y2: "18" }
28425 },
28426 []
28427 ), h(
28428 "line",
28429 {
28430 attrs: { x1: "21", y1: "18", x2: "23", y2: "18" }
28431 },
28432 []
28433 ), h(
28434 "line",
28435 {
28436 attrs: { x1: "18.36", y1: "11.64", x2: "19.78", y2: "10.22" }
28437 },
28438 []
28439 ), h(
28440 "line",
28441 {
28442 attrs: { x1: "23", y1: "22", x2: "1", y2: "22" }
28443 },
28444 []
28445 ), h(
28446 "polyline",
28447 {
28448 attrs: { points: "16 5 12 9 8 5" }
28449 },
28450 []
28451 )]
28452 );
28453 }
28454};
28455
28456var TabletIcon = {
28457 name: 'tablet-icon',
28458
28459 functional: true,
28460
28461 render: function render(h, ctx) {
28462 return h(
28463 "svg",
28464 babel_helper_vue_jsx_merge_props_default()([{
28465 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28466 "class": "feather feather-tablet" }, ctx.data]),
28467 [h(
28468 "rect",
28469 {
28470 attrs: { x: "4", y: "2", width: "16", height: "20", rx: "2", ry: "2", transform: "rotate(180 12 12)" }
28471 },
28472 []
28473 ), h(
28474 "line",
28475 {
28476 attrs: { x1: "12", y1: "18", x2: "12", y2: "18" }
28477 },
28478 []
28479 )]
28480 );
28481 }
28482};
28483
28484var TagIcon = {
28485 name: 'tag-icon',
28486
28487 functional: true,
28488
28489 render: function render(h, ctx) {
28490 return h(
28491 "svg",
28492 babel_helper_vue_jsx_merge_props_default()([{
28493 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28494 "class": "feather feather-tag" }, ctx.data]),
28495 [h(
28496 "path",
28497 {
28498 attrs: { d: "M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" }
28499 },
28500 []
28501 ), h(
28502 "line",
28503 {
28504 attrs: { x1: "7", y1: "7", x2: "7", y2: "7" }
28505 },
28506 []
28507 )]
28508 );
28509 }
28510};
28511
28512var TargetIcon = {
28513 name: 'target-icon',
28514
28515 functional: true,
28516
28517 render: function render(h, ctx) {
28518 return h(
28519 "svg",
28520 babel_helper_vue_jsx_merge_props_default()([{
28521 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28522 "class": "feather feather-target" }, ctx.data]),
28523 [h(
28524 "circle",
28525 {
28526 attrs: { cx: "12", cy: "12", r: "10" }
28527 },
28528 []
28529 ), h(
28530 "circle",
28531 {
28532 attrs: { cx: "12", cy: "12", r: "6" }
28533 },
28534 []
28535 ), h(
28536 "circle",
28537 {
28538 attrs: { cx: "12", cy: "12", r: "2" }
28539 },
28540 []
28541 )]
28542 );
28543 }
28544};
28545
28546var TerminalIcon = {
28547 name: 'terminal-icon',
28548
28549 functional: true,
28550
28551 render: function render(h, ctx) {
28552 return h(
28553 "svg",
28554 babel_helper_vue_jsx_merge_props_default()([{
28555 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28556 "class": "feather feather-terminal" }, ctx.data]),
28557 [h(
28558 "polyline",
28559 {
28560 attrs: { points: "4 17 10 11 4 5" }
28561 },
28562 []
28563 ), h(
28564 "line",
28565 {
28566 attrs: { x1: "12", y1: "19", x2: "20", y2: "19" }
28567 },
28568 []
28569 )]
28570 );
28571 }
28572};
28573
28574var ThermometerIcon = {
28575 name: 'thermometer-icon',
28576
28577 functional: true,
28578
28579 render: function render(h, ctx) {
28580 return h(
28581 "svg",
28582 babel_helper_vue_jsx_merge_props_default()([{
28583 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28584 "class": "feather feather-thermometer" }, ctx.data]),
28585 [h(
28586 "path",
28587 {
28588 attrs: { d: "M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z" }
28589 },
28590 []
28591 )]
28592 );
28593 }
28594};
28595
28596var ThumbsDownIcon = {
28597 name: 'thumbs-down-icon',
28598
28599 functional: true,
28600
28601 render: function render(h, ctx) {
28602 return h(
28603 "svg",
28604 babel_helper_vue_jsx_merge_props_default()([{
28605 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28606 "class": "feather feather-thumbs-down" }, ctx.data]),
28607 [h(
28608 "path",
28609 {
28610 attrs: { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" }
28611 },
28612 []
28613 )]
28614 );
28615 }
28616};
28617
28618var ThumbsUpIcon = {
28619 name: 'thumbs-up-icon',
28620
28621 functional: true,
28622
28623 render: function render(h, ctx) {
28624 return h(
28625 "svg",
28626 babel_helper_vue_jsx_merge_props_default()([{
28627 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28628 "class": "feather feather-thumbs-up" }, ctx.data]),
28629 [h(
28630 "path",
28631 {
28632 attrs: { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }
28633 },
28634 []
28635 )]
28636 );
28637 }
28638};
28639
28640var ToggleLeftIcon = {
28641 name: 'toggle-left-icon',
28642
28643 functional: true,
28644
28645 render: function render(h, ctx) {
28646 return h(
28647 "svg",
28648 babel_helper_vue_jsx_merge_props_default()([{
28649 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28650 "class": "feather feather-toggle-left" }, ctx.data]),
28651 [h(
28652 "rect",
28653 {
28654 attrs: { x: "1", y: "5", width: "22", height: "14", rx: "7", ry: "7" }
28655 },
28656 []
28657 ), h(
28658 "circle",
28659 {
28660 attrs: { cx: "8", cy: "12", r: "3" }
28661 },
28662 []
28663 )]
28664 );
28665 }
28666};
28667
28668var ToggleRightIcon = {
28669 name: 'toggle-right-icon',
28670
28671 functional: true,
28672
28673 render: function render(h, ctx) {
28674 return h(
28675 "svg",
28676 babel_helper_vue_jsx_merge_props_default()([{
28677 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28678 "class": "feather feather-toggle-right" }, ctx.data]),
28679 [h(
28680 "rect",
28681 {
28682 attrs: { x: "1", y: "5", width: "22", height: "14", rx: "7", ry: "7" }
28683 },
28684 []
28685 ), h(
28686 "circle",
28687 {
28688 attrs: { cx: "16", cy: "12", r: "3" }
28689 },
28690 []
28691 )]
28692 );
28693 }
28694};
28695
28696var Trash2Icon = {
28697 name: 'trash2-icon',
28698
28699 functional: true,
28700
28701 render: function render(h, ctx) {
28702 return h(
28703 "svg",
28704 babel_helper_vue_jsx_merge_props_default()([{
28705 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28706 "class": "feather feather-trash-2" }, ctx.data]),
28707 [h(
28708 "polyline",
28709 {
28710 attrs: { points: "3 6 5 6 21 6" }
28711 },
28712 []
28713 ), h(
28714 "path",
28715 {
28716 attrs: { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }
28717 },
28718 []
28719 ), h(
28720 "line",
28721 {
28722 attrs: { x1: "10", y1: "11", x2: "10", y2: "17" }
28723 },
28724 []
28725 ), h(
28726 "line",
28727 {
28728 attrs: { x1: "14", y1: "11", x2: "14", y2: "17" }
28729 },
28730 []
28731 )]
28732 );
28733 }
28734};
28735
28736var TrashIcon = {
28737 name: 'trash-icon',
28738
28739 functional: true,
28740
28741 render: function render(h, ctx) {
28742 return h(
28743 "svg",
28744 babel_helper_vue_jsx_merge_props_default()([{
28745 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28746 "class": "feather feather-trash" }, ctx.data]),
28747 [h(
28748 "polyline",
28749 {
28750 attrs: { points: "3 6 5 6 21 6" }
28751 },
28752 []
28753 ), h(
28754 "path",
28755 {
28756 attrs: { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }
28757 },
28758 []
28759 )]
28760 );
28761 }
28762};
28763
28764var TrendingDownIcon = {
28765 name: 'trending-down-icon',
28766
28767 functional: true,
28768
28769 render: function render(h, ctx) {
28770 return h(
28771 "svg",
28772 babel_helper_vue_jsx_merge_props_default()([{
28773 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28774 "class": "feather feather-trending-down" }, ctx.data]),
28775 [h(
28776 "polyline",
28777 {
28778 attrs: { points: "23 18 13.5 8.5 8.5 13.5 1 6" }
28779 },
28780 []
28781 ), h(
28782 "polyline",
28783 {
28784 attrs: { points: "17 18 23 18 23 12" }
28785 },
28786 []
28787 )]
28788 );
28789 }
28790};
28791
28792var TrendingUpIcon = {
28793 name: 'trending-up-icon',
28794
28795 functional: true,
28796
28797 render: function render(h, ctx) {
28798 return h(
28799 "svg",
28800 babel_helper_vue_jsx_merge_props_default()([{
28801 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28802 "class": "feather feather-trending-up" }, ctx.data]),
28803 [h(
28804 "polyline",
28805 {
28806 attrs: { points: "23 6 13.5 15.5 8.5 10.5 1 18" }
28807 },
28808 []
28809 ), h(
28810 "polyline",
28811 {
28812 attrs: { points: "17 6 23 6 23 12" }
28813 },
28814 []
28815 )]
28816 );
28817 }
28818};
28819
28820var TriangleIcon = {
28821 name: 'triangle-icon',
28822
28823 functional: true,
28824
28825 render: function render(h, ctx) {
28826 return h(
28827 "svg",
28828 babel_helper_vue_jsx_merge_props_default()([{
28829 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28830 "class": "feather feather-triangle" }, ctx.data]),
28831 [h(
28832 "path",
28833 {
28834 attrs: { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }
28835 },
28836 []
28837 )]
28838 );
28839 }
28840};
28841
28842var TruckIcon = {
28843 name: 'truck-icon',
28844
28845 functional: true,
28846
28847 render: function render(h, ctx) {
28848 return h(
28849 "svg",
28850 babel_helper_vue_jsx_merge_props_default()([{
28851 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28852 "class": "feather feather-truck" }, ctx.data]),
28853 [h(
28854 "rect",
28855 {
28856 attrs: { x: "1", y: "3", width: "15", height: "13" }
28857 },
28858 []
28859 ), h(
28860 "polygon",
28861 {
28862 attrs: { points: "16 8 20 8 23 11 23 16 16 16 16 8" }
28863 },
28864 []
28865 ), h(
28866 "circle",
28867 {
28868 attrs: { cx: "5.5", cy: "18.5", r: "2.5" }
28869 },
28870 []
28871 ), h(
28872 "circle",
28873 {
28874 attrs: { cx: "18.5", cy: "18.5", r: "2.5" }
28875 },
28876 []
28877 )]
28878 );
28879 }
28880};
28881
28882var TvIcon = {
28883 name: 'tv-icon',
28884
28885 functional: true,
28886
28887 render: function render(h, ctx) {
28888 return h(
28889 "svg",
28890 babel_helper_vue_jsx_merge_props_default()([{
28891 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28892 "class": "feather feather-tv" }, ctx.data]),
28893 [h(
28894 "rect",
28895 {
28896 attrs: { x: "2", y: "7", width: "20", height: "15", rx: "2", ry: "2" }
28897 },
28898 []
28899 ), h(
28900 "polyline",
28901 {
28902 attrs: { points: "17 2 12 7 7 2" }
28903 },
28904 []
28905 )]
28906 );
28907 }
28908};
28909
28910var TwitterIcon = {
28911 name: 'twitter-icon',
28912
28913 functional: true,
28914
28915 render: function render(h, ctx) {
28916 return h(
28917 "svg",
28918 babel_helper_vue_jsx_merge_props_default()([{
28919 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28920 "class": "feather feather-twitter" }, ctx.data]),
28921 [h(
28922 "path",
28923 {
28924 attrs: { d: "M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" }
28925 },
28926 []
28927 )]
28928 );
28929 }
28930};
28931
28932var TypeIcon = {
28933 name: 'type-icon',
28934
28935 functional: true,
28936
28937 render: function render(h, ctx) {
28938 return h(
28939 "svg",
28940 babel_helper_vue_jsx_merge_props_default()([{
28941 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28942 "class": "feather feather-type" }, ctx.data]),
28943 [h(
28944 "polyline",
28945 {
28946 attrs: { points: "4 7 4 4 20 4 20 7" }
28947 },
28948 []
28949 ), h(
28950 "line",
28951 {
28952 attrs: { x1: "9", y1: "20", x2: "15", y2: "20" }
28953 },
28954 []
28955 ), h(
28956 "line",
28957 {
28958 attrs: { x1: "12", y1: "4", x2: "12", y2: "20" }
28959 },
28960 []
28961 )]
28962 );
28963 }
28964};
28965
28966var UmbrellaIcon = {
28967 name: 'umbrella-icon',
28968
28969 functional: true,
28970
28971 render: function render(h, ctx) {
28972 return h(
28973 "svg",
28974 babel_helper_vue_jsx_merge_props_default()([{
28975 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28976 "class": "feather feather-umbrella" }, ctx.data]),
28977 [h(
28978 "path",
28979 {
28980 attrs: { d: "M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7" }
28981 },
28982 []
28983 )]
28984 );
28985 }
28986};
28987
28988var UnderlineIcon = {
28989 name: 'underline-icon',
28990
28991 functional: true,
28992
28993 render: function render(h, ctx) {
28994 return h(
28995 "svg",
28996 babel_helper_vue_jsx_merge_props_default()([{
28997 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
28998 "class": "feather feather-underline" }, ctx.data]),
28999 [h(
29000 "path",
29001 {
29002 attrs: { d: "M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3" }
29003 },
29004 []
29005 ), h(
29006 "line",
29007 {
29008 attrs: { x1: "4", y1: "21", x2: "20", y2: "21" }
29009 },
29010 []
29011 )]
29012 );
29013 }
29014};
29015
29016var UnlockIcon = {
29017 name: 'unlock-icon',
29018
29019 functional: true,
29020
29021 render: function render(h, ctx) {
29022 return h(
29023 "svg",
29024 babel_helper_vue_jsx_merge_props_default()([{
29025 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29026 "class": "feather feather-unlock" }, ctx.data]),
29027 [h(
29028 "rect",
29029 {
29030 attrs: { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }
29031 },
29032 []
29033 ), h(
29034 "path",
29035 {
29036 attrs: { d: "M7 11V7a5 5 0 0 1 9.9-1" }
29037 },
29038 []
29039 )]
29040 );
29041 }
29042};
29043
29044var UploadCloudIcon = {
29045 name: 'upload-cloud-icon',
29046
29047 functional: true,
29048
29049 render: function render(h, ctx) {
29050 return h(
29051 "svg",
29052 babel_helper_vue_jsx_merge_props_default()([{
29053 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29054 "class": "feather feather-upload-cloud" }, ctx.data]),
29055 [h(
29056 "polyline",
29057 {
29058 attrs: { points: "16 16 12 12 8 16" }
29059 },
29060 []
29061 ), h(
29062 "line",
29063 {
29064 attrs: { x1: "12", y1: "12", x2: "12", y2: "21" }
29065 },
29066 []
29067 ), h(
29068 "path",
29069 {
29070 attrs: { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" }
29071 },
29072 []
29073 ), h(
29074 "polyline",
29075 {
29076 attrs: { points: "16 16 12 12 8 16" }
29077 },
29078 []
29079 )]
29080 );
29081 }
29082};
29083
29084var UploadIcon = {
29085 name: 'upload-icon',
29086
29087 functional: true,
29088
29089 render: function render(h, ctx) {
29090 return h(
29091 "svg",
29092 babel_helper_vue_jsx_merge_props_default()([{
29093 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29094 "class": "feather feather-upload" }, ctx.data]),
29095 [h(
29096 "path",
29097 {
29098 attrs: { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }
29099 },
29100 []
29101 ), h(
29102 "polyline",
29103 {
29104 attrs: { points: "17 8 12 3 7 8" }
29105 },
29106 []
29107 ), h(
29108 "line",
29109 {
29110 attrs: { x1: "12", y1: "3", x2: "12", y2: "15" }
29111 },
29112 []
29113 )]
29114 );
29115 }
29116};
29117
29118var UserCheckIcon = {
29119 name: 'user-check-icon',
29120
29121 functional: true,
29122
29123 render: function render(h, ctx) {
29124 return h(
29125 "svg",
29126 babel_helper_vue_jsx_merge_props_default()([{
29127 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29128 "class": "feather feather-user-check" }, ctx.data]),
29129 [h(
29130 "path",
29131 {
29132 attrs: { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }
29133 },
29134 []
29135 ), h(
29136 "circle",
29137 {
29138 attrs: { cx: "8.5", cy: "7", r: "4" }
29139 },
29140 []
29141 ), h(
29142 "polyline",
29143 {
29144 attrs: { points: "17 11 19 13 23 9" }
29145 },
29146 []
29147 )]
29148 );
29149 }
29150};
29151
29152var UserMinusIcon = {
29153 name: 'user-minus-icon',
29154
29155 functional: true,
29156
29157 render: function render(h, ctx) {
29158 return h(
29159 "svg",
29160 babel_helper_vue_jsx_merge_props_default()([{
29161 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29162 "class": "feather feather-user-minus" }, ctx.data]),
29163 [h(
29164 "path",
29165 {
29166 attrs: { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }
29167 },
29168 []
29169 ), h(
29170 "circle",
29171 {
29172 attrs: { cx: "8.5", cy: "7", r: "4" }
29173 },
29174 []
29175 ), h(
29176 "line",
29177 {
29178 attrs: { x1: "23", y1: "11", x2: "17", y2: "11" }
29179 },
29180 []
29181 )]
29182 );
29183 }
29184};
29185
29186var UserPlusIcon = {
29187 name: 'user-plus-icon',
29188
29189 functional: true,
29190
29191 render: function render(h, ctx) {
29192 return h(
29193 "svg",
29194 babel_helper_vue_jsx_merge_props_default()([{
29195 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29196 "class": "feather feather-user-plus" }, ctx.data]),
29197 [h(
29198 "path",
29199 {
29200 attrs: { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }
29201 },
29202 []
29203 ), h(
29204 "circle",
29205 {
29206 attrs: { cx: "8.5", cy: "7", r: "4" }
29207 },
29208 []
29209 ), h(
29210 "line",
29211 {
29212 attrs: { x1: "20", y1: "8", x2: "20", y2: "14" }
29213 },
29214 []
29215 ), h(
29216 "line",
29217 {
29218 attrs: { x1: "23", y1: "11", x2: "17", y2: "11" }
29219 },
29220 []
29221 )]
29222 );
29223 }
29224};
29225
29226var UserXIcon = {
29227 name: 'user-x-icon',
29228
29229 functional: true,
29230
29231 render: function render(h, ctx) {
29232 return h(
29233 "svg",
29234 babel_helper_vue_jsx_merge_props_default()([{
29235 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29236 "class": "feather feather-user-x" }, ctx.data]),
29237 [h(
29238 "path",
29239 {
29240 attrs: { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }
29241 },
29242 []
29243 ), h(
29244 "circle",
29245 {
29246 attrs: { cx: "8.5", cy: "7", r: "4" }
29247 },
29248 []
29249 ), h(
29250 "line",
29251 {
29252 attrs: { x1: "18", y1: "8", x2: "23", y2: "13" }
29253 },
29254 []
29255 ), h(
29256 "line",
29257 {
29258 attrs: { x1: "23", y1: "8", x2: "18", y2: "13" }
29259 },
29260 []
29261 )]
29262 );
29263 }
29264};
29265
29266var UserIcon = {
29267 name: 'user-icon',
29268
29269 functional: true,
29270
29271 render: function render(h, ctx) {
29272 return h(
29273 "svg",
29274 babel_helper_vue_jsx_merge_props_default()([{
29275 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29276 "class": "feather feather-user" }, ctx.data]),
29277 [h(
29278 "path",
29279 {
29280 attrs: { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }
29281 },
29282 []
29283 ), h(
29284 "circle",
29285 {
29286 attrs: { cx: "12", cy: "7", r: "4" }
29287 },
29288 []
29289 )]
29290 );
29291 }
29292};
29293
29294var UsersIcon = {
29295 name: 'users-icon',
29296
29297 functional: true,
29298
29299 render: function render(h, ctx) {
29300 return h(
29301 "svg",
29302 babel_helper_vue_jsx_merge_props_default()([{
29303 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29304 "class": "feather feather-users" }, ctx.data]),
29305 [h(
29306 "path",
29307 {
29308 attrs: { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }
29309 },
29310 []
29311 ), h(
29312 "circle",
29313 {
29314 attrs: { cx: "9", cy: "7", r: "4" }
29315 },
29316 []
29317 ), h(
29318 "path",
29319 {
29320 attrs: { d: "M23 21v-2a4 4 0 0 0-3-3.87" }
29321 },
29322 []
29323 ), h(
29324 "path",
29325 {
29326 attrs: { d: "M16 3.13a4 4 0 0 1 0 7.75" }
29327 },
29328 []
29329 )]
29330 );
29331 }
29332};
29333
29334var VideoOffIcon = {
29335 name: 'video-off-icon',
29336
29337 functional: true,
29338
29339 render: function render(h, ctx) {
29340 return h(
29341 "svg",
29342 babel_helper_vue_jsx_merge_props_default()([{
29343 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29344 "class": "feather feather-video-off" }, ctx.data]),
29345 [h(
29346 "path",
29347 {
29348 attrs: { d: "M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10" }
29349 },
29350 []
29351 ), h(
29352 "line",
29353 {
29354 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
29355 },
29356 []
29357 )]
29358 );
29359 }
29360};
29361
29362var VideoIcon = {
29363 name: 'video-icon',
29364
29365 functional: true,
29366
29367 render: function render(h, ctx) {
29368 return h(
29369 "svg",
29370 babel_helper_vue_jsx_merge_props_default()([{
29371 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29372 "class": "feather feather-video" }, ctx.data]),
29373 [h(
29374 "polygon",
29375 {
29376 attrs: { points: "23 7 16 12 23 17 23 7" }
29377 },
29378 []
29379 ), h(
29380 "rect",
29381 {
29382 attrs: { x: "1", y: "5", width: "15", height: "14", rx: "2", ry: "2" }
29383 },
29384 []
29385 )]
29386 );
29387 }
29388};
29389
29390var VoicemailIcon = {
29391 name: 'voicemail-icon',
29392
29393 functional: true,
29394
29395 render: function render(h, ctx) {
29396 return h(
29397 "svg",
29398 babel_helper_vue_jsx_merge_props_default()([{
29399 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29400 "class": "feather feather-voicemail" }, ctx.data]),
29401 [h(
29402 "circle",
29403 {
29404 attrs: { cx: "5.5", cy: "11.5", r: "4.5" }
29405 },
29406 []
29407 ), h(
29408 "circle",
29409 {
29410 attrs: { cx: "18.5", cy: "11.5", r: "4.5" }
29411 },
29412 []
29413 ), h(
29414 "line",
29415 {
29416 attrs: { x1: "5.5", y1: "16", x2: "18.5", y2: "16" }
29417 },
29418 []
29419 )]
29420 );
29421 }
29422};
29423
29424var Volume1Icon = {
29425 name: 'volume1-icon',
29426
29427 functional: true,
29428
29429 render: function render(h, ctx) {
29430 return h(
29431 "svg",
29432 babel_helper_vue_jsx_merge_props_default()([{
29433 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29434 "class": "feather feather-volume-1" }, ctx.data]),
29435 [h(
29436 "polygon",
29437 {
29438 attrs: { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }
29439 },
29440 []
29441 ), h(
29442 "path",
29443 {
29444 attrs: { d: "M15.54 8.46a5 5 0 0 1 0 7.07" }
29445 },
29446 []
29447 )]
29448 );
29449 }
29450};
29451
29452var Volume2Icon = {
29453 name: 'volume2-icon',
29454
29455 functional: true,
29456
29457 render: function render(h, ctx) {
29458 return h(
29459 "svg",
29460 babel_helper_vue_jsx_merge_props_default()([{
29461 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29462 "class": "feather feather-volume-2" }, ctx.data]),
29463 [h(
29464 "polygon",
29465 {
29466 attrs: { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }
29467 },
29468 []
29469 ), h(
29470 "path",
29471 {
29472 attrs: { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" }
29473 },
29474 []
29475 )]
29476 );
29477 }
29478};
29479
29480var VolumeXIcon = {
29481 name: 'volume-x-icon',
29482
29483 functional: true,
29484
29485 render: function render(h, ctx) {
29486 return h(
29487 "svg",
29488 babel_helper_vue_jsx_merge_props_default()([{
29489 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29490 "class": "feather feather-volume-x" }, ctx.data]),
29491 [h(
29492 "polygon",
29493 {
29494 attrs: { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }
29495 },
29496 []
29497 ), h(
29498 "line",
29499 {
29500 attrs: { x1: "23", y1: "9", x2: "17", y2: "15" }
29501 },
29502 []
29503 ), h(
29504 "line",
29505 {
29506 attrs: { x1: "17", y1: "9", x2: "23", y2: "15" }
29507 },
29508 []
29509 )]
29510 );
29511 }
29512};
29513
29514var VolumeIcon = {
29515 name: 'volume-icon',
29516
29517 functional: true,
29518
29519 render: function render(h, ctx) {
29520 return h(
29521 "svg",
29522 babel_helper_vue_jsx_merge_props_default()([{
29523 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29524 "class": "feather feather-volume" }, ctx.data]),
29525 [h(
29526 "polygon",
29527 {
29528 attrs: { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }
29529 },
29530 []
29531 )]
29532 );
29533 }
29534};
29535
29536var WatchIcon = {
29537 name: 'watch-icon',
29538
29539 functional: true,
29540
29541 render: function render(h, ctx) {
29542 return h(
29543 "svg",
29544 babel_helper_vue_jsx_merge_props_default()([{
29545 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29546 "class": "feather feather-watch" }, ctx.data]),
29547 [h(
29548 "circle",
29549 {
29550 attrs: { cx: "12", cy: "12", r: "7" }
29551 },
29552 []
29553 ), h(
29554 "polyline",
29555 {
29556 attrs: { points: "12 9 12 12 13.5 13.5" }
29557 },
29558 []
29559 ), h(
29560 "path",
29561 {
29562 attrs: { d: "M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83" }
29563 },
29564 []
29565 )]
29566 );
29567 }
29568};
29569
29570var WifiOffIcon = {
29571 name: 'wifi-off-icon',
29572
29573 functional: true,
29574
29575 render: function render(h, ctx) {
29576 return h(
29577 "svg",
29578 babel_helper_vue_jsx_merge_props_default()([{
29579 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29580 "class": "feather feather-wifi-off" }, ctx.data]),
29581 [h(
29582 "line",
29583 {
29584 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
29585 },
29586 []
29587 ), h(
29588 "path",
29589 {
29590 attrs: { d: "M16.72 11.06A10.94 10.94 0 0 1 19 12.55" }
29591 },
29592 []
29593 ), h(
29594 "path",
29595 {
29596 attrs: { d: "M5 12.55a10.94 10.94 0 0 1 5.17-2.39" }
29597 },
29598 []
29599 ), h(
29600 "path",
29601 {
29602 attrs: { d: "M10.71 5.05A16 16 0 0 1 22.58 9" }
29603 },
29604 []
29605 ), h(
29606 "path",
29607 {
29608 attrs: { d: "M1.42 9a15.91 15.91 0 0 1 4.7-2.88" }
29609 },
29610 []
29611 ), h(
29612 "path",
29613 {
29614 attrs: { d: "M8.53 16.11a6 6 0 0 1 6.95 0" }
29615 },
29616 []
29617 ), h(
29618 "line",
29619 {
29620 attrs: { x1: "12", y1: "20", x2: "12", y2: "20" }
29621 },
29622 []
29623 )]
29624 );
29625 }
29626};
29627
29628var WifiIcon = {
29629 name: 'wifi-icon',
29630
29631 functional: true,
29632
29633 render: function render(h, ctx) {
29634 return h(
29635 "svg",
29636 babel_helper_vue_jsx_merge_props_default()([{
29637 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29638 "class": "feather feather-wifi" }, ctx.data]),
29639 [h(
29640 "path",
29641 {
29642 attrs: { d: "M5 12.55a11 11 0 0 1 14.08 0" }
29643 },
29644 []
29645 ), h(
29646 "path",
29647 {
29648 attrs: { d: "M1.42 9a16 16 0 0 1 21.16 0" }
29649 },
29650 []
29651 ), h(
29652 "path",
29653 {
29654 attrs: { d: "M8.53 16.11a6 6 0 0 1 6.95 0" }
29655 },
29656 []
29657 ), h(
29658 "line",
29659 {
29660 attrs: { x1: "12", y1: "20", x2: "12", y2: "20" }
29661 },
29662 []
29663 )]
29664 );
29665 }
29666};
29667
29668var WindIcon = {
29669 name: 'wind-icon',
29670
29671 functional: true,
29672
29673 render: function render(h, ctx) {
29674 return h(
29675 "svg",
29676 babel_helper_vue_jsx_merge_props_default()([{
29677 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29678 "class": "feather feather-wind" }, ctx.data]),
29679 [h(
29680 "path",
29681 {
29682 attrs: { d: "M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2" }
29683 },
29684 []
29685 )]
29686 );
29687 }
29688};
29689
29690var XCircleIcon = {
29691 name: 'x-circle-icon',
29692
29693 functional: true,
29694
29695 render: function render(h, ctx) {
29696 return h(
29697 "svg",
29698 babel_helper_vue_jsx_merge_props_default()([{
29699 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29700 "class": "feather feather-x-circle" }, ctx.data]),
29701 [h(
29702 "circle",
29703 {
29704 attrs: { cx: "12", cy: "12", r: "10" }
29705 },
29706 []
29707 ), h(
29708 "line",
29709 {
29710 attrs: { x1: "15", y1: "9", x2: "9", y2: "15" }
29711 },
29712 []
29713 ), h(
29714 "line",
29715 {
29716 attrs: { x1: "9", y1: "9", x2: "15", y2: "15" }
29717 },
29718 []
29719 )]
29720 );
29721 }
29722};
29723
29724var XSquareIcon = {
29725 name: 'x-square-icon',
29726
29727 functional: true,
29728
29729 render: function render(h, ctx) {
29730 return h(
29731 "svg",
29732 babel_helper_vue_jsx_merge_props_default()([{
29733 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29734 "class": "feather feather-x-square" }, ctx.data]),
29735 [h(
29736 "rect",
29737 {
29738 attrs: { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }
29739 },
29740 []
29741 ), h(
29742 "line",
29743 {
29744 attrs: { x1: "9", y1: "9", x2: "15", y2: "15" }
29745 },
29746 []
29747 ), h(
29748 "line",
29749 {
29750 attrs: { x1: "15", y1: "9", x2: "9", y2: "15" }
29751 },
29752 []
29753 )]
29754 );
29755 }
29756};
29757
29758var XIcon = {
29759 name: 'x-icon',
29760
29761 functional: true,
29762
29763 render: function render(h, ctx) {
29764 return h(
29765 "svg",
29766 babel_helper_vue_jsx_merge_props_default()([{
29767 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29768 "class": "feather feather-x" }, ctx.data]),
29769 [h(
29770 "line",
29771 {
29772 attrs: { x1: "18", y1: "6", x2: "6", y2: "18" }
29773 },
29774 []
29775 ), h(
29776 "line",
29777 {
29778 attrs: { x1: "6", y1: "6", x2: "18", y2: "18" }
29779 },
29780 []
29781 )]
29782 );
29783 }
29784};
29785
29786var YoutubeIcon = {
29787 name: 'youtube-icon',
29788
29789 functional: true,
29790
29791 render: function render(h, ctx) {
29792 return h(
29793 "svg",
29794 babel_helper_vue_jsx_merge_props_default()([{
29795 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29796 "class": "feather feather-youtube" }, ctx.data]),
29797 [h(
29798 "path",
29799 {
29800 attrs: { d: "M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z" }
29801 },
29802 []
29803 ), h(
29804 "polygon",
29805 {
29806 attrs: { points: "9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02" }
29807 },
29808 []
29809 )]
29810 );
29811 }
29812};
29813
29814var ZapOffIcon = {
29815 name: 'zap-off-icon',
29816
29817 functional: true,
29818
29819 render: function render(h, ctx) {
29820 return h(
29821 "svg",
29822 babel_helper_vue_jsx_merge_props_default()([{
29823 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29824 "class": "feather feather-zap-off" }, ctx.data]),
29825 [h(
29826 "polyline",
29827 {
29828 attrs: { points: "12.41 6.75 13 2 10.57 4.92" }
29829 },
29830 []
29831 ), h(
29832 "polyline",
29833 {
29834 attrs: { points: "18.57 12.91 21 10 15.66 10" }
29835 },
29836 []
29837 ), h(
29838 "polyline",
29839 {
29840 attrs: { points: "8 8 3 14 12 14 11 22 16 16" }
29841 },
29842 []
29843 ), h(
29844 "line",
29845 {
29846 attrs: { x1: "1", y1: "1", x2: "23", y2: "23" }
29847 },
29848 []
29849 )]
29850 );
29851 }
29852};
29853
29854var ZapIcon = {
29855 name: 'zap-icon',
29856
29857 functional: true,
29858
29859 render: function render(h, ctx) {
29860 return h(
29861 "svg",
29862 babel_helper_vue_jsx_merge_props_default()([{
29863 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29864 "class": "feather feather-zap" }, ctx.data]),
29865 [h(
29866 "polygon",
29867 {
29868 attrs: { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }
29869 },
29870 []
29871 )]
29872 );
29873 }
29874};
29875
29876var ZoomInIcon = {
29877 name: 'zoom-in-icon',
29878
29879 functional: true,
29880
29881 render: function render(h, ctx) {
29882 return h(
29883 "svg",
29884 babel_helper_vue_jsx_merge_props_default()([{
29885 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29886 "class": "feather feather-zoom-in" }, ctx.data]),
29887 [h(
29888 "circle",
29889 {
29890 attrs: { cx: "11", cy: "11", r: "8" }
29891 },
29892 []
29893 ), h(
29894 "line",
29895 {
29896 attrs: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }
29897 },
29898 []
29899 ), h(
29900 "line",
29901 {
29902 attrs: { x1: "11", y1: "8", x2: "11", y2: "14" }
29903 },
29904 []
29905 ), h(
29906 "line",
29907 {
29908 attrs: { x1: "8", y1: "11", x2: "14", y2: "11" }
29909 },
29910 []
29911 )]
29912 );
29913 }
29914};
29915
29916var ZoomOutIcon = {
29917 name: 'zoom-out-icon',
29918
29919 functional: true,
29920
29921 render: function render(h, ctx) {
29922 return h(
29923 "svg",
29924 babel_helper_vue_jsx_merge_props_default()([{
29925 attrs: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" },
29926 "class": "feather feather-zoom-out" }, ctx.data]),
29927 [h(
29928 "circle",
29929 {
29930 attrs: { cx: "11", cy: "11", r: "8" }
29931 },
29932 []
29933 ), h(
29934 "line",
29935 {
29936 attrs: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }
29937 },
29938 []
29939 ), h(
29940 "line",
29941 {
29942 attrs: { x1: "8", y1: "11", x2: "14", y2: "11" }
29943 },
29944 []
29945 )]
29946 );
29947 }
29948};
29949
29950
29951
29952// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CircleIcon.vue?vue&type=template&id=1cd25833&
29953var CircleIconvue_type_template_id_1cd25833_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',_vm._g({staticClass:"circle-icon",attrs:{"xmlns":"http://www.w3.org/2000/svg","width":_vm.width,"height":_vm.height,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},_vm.inputListeners),[_c('circle',{attrs:{"cx":"12","cy":"12","r":"10"}})])}
29954var CircleIconvue_type_template_id_1cd25833_staticRenderFns = []
29955
29956
29957// CONCATENATED MODULE: ./src/components/CircleIcon.vue?vue&type=template&id=1cd25833&
29958
29959// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CircleIcon.vue?vue&type=script&lang=ts&
29960
29961/* harmony default export */ var CircleIconvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
29962 props: {
29963 'width': { type: Number, required: true },
29964 'height': { type: Number, required: true }
29965 },
29966 computed: {
29967 inputListeners: function () {
29968 var customListeners = {};
29969 return Object.assign({}, this.$listeners, customListeners);
29970 }
29971 }
29972}));
29973
29974// CONCATENATED MODULE: ./src/components/CircleIcon.vue?vue&type=script&lang=ts&
29975 /* harmony default export */ var components_CircleIconvue_type_script_lang_ts_ = (CircleIconvue_type_script_lang_ts_);
29976// CONCATENATED MODULE: ./src/components/CircleIcon.vue
29977
29978
29979
29980
29981
29982/* normalize component */
29983
29984var CircleIcon_component = normalizeComponent(
29985 components_CircleIconvue_type_script_lang_ts_,
29986 CircleIconvue_type_template_id_1cd25833_render,
29987 CircleIconvue_type_template_id_1cd25833_staticRenderFns,
29988 false,
29989 null,
29990 null,
29991 null
29992
29993)
29994
29995CircleIcon_component.options.__file = "CircleIcon.vue"
29996/* harmony default export */ var components_CircleIcon = (CircleIcon_component.exports);
29997// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PlusCircleIcon.vue?vue&type=template&id=120fd116&
29998var PlusCircleIconvue_type_template_id_120fd116_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',_vm._g({attrs:{"xmlns":"http://www.w3.org/2000/svg","width":_vm.width,"height":_vm.height,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},_vm.inputListeners),[_c('circle',{attrs:{"cx":"12","cy":"12","r":"10"}}),_c('line',{attrs:{"x1":"12","y1":"8","x2":"12","y2":"16"}}),_c('line',{attrs:{"x1":"8","y1":"12","x2":"16","y2":"12"}})])}
29999var PlusCircleIconvue_type_template_id_120fd116_staticRenderFns = []
30000
30001
30002// CONCATENATED MODULE: ./src/components/PlusCircleIcon.vue?vue&type=template&id=120fd116&
30003
30004// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PlusCircleIcon.vue?vue&type=script&lang=ts&
30005
30006/* harmony default export */ var PlusCircleIconvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
30007 props: {
30008 'width': { type: Number, required: true },
30009 'height': { type: Number, required: true }
30010 },
30011 computed: {
30012 inputListeners: function () {
30013 var customListeners = {};
30014 return Object.assign({}, this.$listeners, customListeners);
30015 }
30016 }
30017}));
30018
30019// CONCATENATED MODULE: ./src/components/PlusCircleIcon.vue?vue&type=script&lang=ts&
30020 /* harmony default export */ var components_PlusCircleIconvue_type_script_lang_ts_ = (PlusCircleIconvue_type_script_lang_ts_);
30021// CONCATENATED MODULE: ./src/components/PlusCircleIcon.vue
30022
30023
30024
30025
30026
30027/* normalize component */
30028
30029var PlusCircleIcon_component = normalizeComponent(
30030 components_PlusCircleIconvue_type_script_lang_ts_,
30031 PlusCircleIconvue_type_template_id_120fd116_render,
30032 PlusCircleIconvue_type_template_id_120fd116_staticRenderFns,
30033 false,
30034 null,
30035 null,
30036 null
30037
30038)
30039
30040PlusCircleIcon_component.options.__file = "PlusCircleIcon.vue"
30041/* harmony default export */ var components_PlusCircleIcon = (PlusCircleIcon_component.exports);
30042// CONCATENATED MODULE: ./src/mutation-constants.ts
30043/* harmony default export */ var mutation_constants = ({
30044 ADD_NEW_WIDGET: 'addNewWidget',
30045 HIDE_WIDGET: 'hideWidget',
30046 COMPOUND_WIDGET_DRAG_FLAG_ON: 'compoundWidgetDragFlagOn',
30047 COMPOUND_WIDGET_DRAG_FLAG_OFF: 'compoundWidgetDragFlagOff',
30048 SWAP_COMPOUND_WIDGETS: 'swapCompoundWidgets',
30049 KILL_TAXON_SELECTOR: 'killTaxonSelector',
30050 SHUFFLE_TAXON_SELECTORS: 'shuffleTaxonSelectors',
30051 LOAD_SAMPLE_DATA: 'loadSampleData',
30052 ADD_COMPOUND_WIDGET: 'addCompoundWidget',
30053 INITIALIZE_TAXONOMIES: 'initializeTaxonomies',
30054 TOGGLE_TAXON_SELECTOR_VISIBILITY: 'toggleTaxonSelectorVisibility',
30055 MAKE_TENTATIVE_SELECTOR: 'makeTentativeSelector',
30056 SET_TAXONOMY_REF: 'setTaxonomyRef',
30057 ADD_PATH_SEGMENT: 'addPathSegment',
30058 REPLACE_PATH_SEGMENT: 'replacePathSegment',
30059 KILL_COMPOUND_WIDGET: 'killCompoundWidget'
30060});
30061
30062// CONCATENATED MODULE: ./src/taxon-utilities.ts
30063function getPlusCircleClasses(isEnabledCondition) {
30064 var classes = {
30065 'widget-add-icon': true
30066 };
30067 if (isEnabledCondition) {
30068 classes['ob-enabled'] = true;
30069 }
30070 else {
30071 classes['ob-disabled'] = true;
30072 }
30073 return classes;
30074}
30075
30076
30077// EXTERNAL MODULE: ./node_modules/loglevel/lib/loglevel.js
30078var loglevel = __webpack_require__("5c7d");
30079
30080// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CompoundWidgetTaxonomyAssigner.vue?vue&type=script&lang=ts&
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090/* harmony default export */ var CompoundWidgetTaxonomyAssignervue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
30091 data: function () {
30092 return {
30093 chosenTaxonomy: null
30094 };
30095 },
30096 props: {
30097 index: { type: Number, required: true }
30098 },
30099 components: { XCircleIcon: XCircleIcon, CircleIcon: components_CircleIcon, PlusCircleIcon: components_PlusCircleIcon },
30100 methods: {
30101 addTaxonSelector: function () {
30102 loglevel["debug"]("About to add taxon selector");
30103 if (this.chosenTaxonomy === null) {
30104 throw new Error("Must select a taxonomy");
30105 }
30106 this.$store.commit(mutation_constants.SET_TAXONOMY_REF, { compoundWidgetIndex: this.index, taxonomyRef: this.chosenTaxonomy });
30107 this.$store.commit(mutation_constants.MAKE_TENTATIVE_SELECTOR, this.index);
30108 },
30109 killCompoundWidget: function () {
30110 // Hitting the kill button for the taxonomy selector should
30111 // kill the entire compound widget.
30112 this.$store.commit(mutation_constants.KILL_COMPOUND_WIDGET, this.index);
30113 },
30114 },
30115 computed: __assign({ plusCircleClasses: function () {
30116 return getPlusCircleClasses(this.chosenTaxonomy !== null);
30117 },
30118 availableTaxonomies: function () {
30119 return Object.keys(this.taxonomies);
30120 } }, mapGetters(["taxonomies"]))
30121}));
30122
30123// CONCATENATED MODULE: ./src/components/CompoundWidgetTaxonomyAssigner.vue?vue&type=script&lang=ts&
30124 /* harmony default export */ var components_CompoundWidgetTaxonomyAssignervue_type_script_lang_ts_ = (CompoundWidgetTaxonomyAssignervue_type_script_lang_ts_);
30125// EXTERNAL MODULE: ./src/components/CompoundWidgetTaxonomyAssigner.vue?vue&type=style&index=0&lang=less&
30126var CompoundWidgetTaxonomyAssignervue_type_style_index_0_lang_less_ = __webpack_require__("1b1f");
30127
30128// CONCATENATED MODULE: ./src/components/CompoundWidgetTaxonomyAssigner.vue
30129
30130
30131
30132
30133
30134
30135/* normalize component */
30136
30137var CompoundWidgetTaxonomyAssigner_component = normalizeComponent(
30138 components_CompoundWidgetTaxonomyAssignervue_type_script_lang_ts_,
30139 CompoundWidgetTaxonomyAssignervue_type_template_id_7f6d22df_render,
30140 CompoundWidgetTaxonomyAssignervue_type_template_id_7f6d22df_staticRenderFns,
30141 false,
30142 null,
30143 null,
30144 null
30145
30146)
30147
30148CompoundWidgetTaxonomyAssigner_component.options.__file = "CompoundWidgetTaxonomyAssigner.vue"
30149/* harmony default export */ var CompoundWidgetTaxonomyAssigner = (CompoundWidgetTaxonomyAssigner_component.exports);
30150// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TaxonSelector.vue?vue&type=template&id=30351ab7&
30151var TaxonSelectorvue_type_template_id_30351ab7_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"widgets",staticClass:"widget",style:(_vm.styleOverrides)},[_c('select',{directives:[{name:"model",rawName:"v-model",value:(_vm.selectedTaxon),expression:"selectedTaxon"}],staticClass:"taxon-select",on:{"change":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.selectedTaxon=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},_vm.onChanged]}},_vm._l((_vm.siblings),function(sibling){return _c('option',{domProps:{"value":sibling.uri}},[_vm._v(_vm._s(sibling.content))])})),_c('div',{staticClass:"level-container"},[_c('x-circle-icon',{staticClass:"widget-close-icon",on:{"click":_vm.kill}}),_vm._l((_vm.humanFriendlyTaxonLevel),function(i){return _c('span',[_c('circle-icon',{class:_vm.getCircleIconClasses(i),attrs:{"width":16,"height":16},on:{"click":function($event){_vm.hideTaxonSelector(i)}}})],1)}),_c('plus-circle-icon',{class:_vm.plusCircleClasses,attrs:{"width":16,"height":16},on:{"click":_vm.addTaxonSelector}})],2)])}
30152var TaxonSelectorvue_type_template_id_30351ab7_staticRenderFns = []
30153
30154
30155// CONCATENATED MODULE: ./src/components/TaxonSelector.vue?vue&type=template&id=30351ab7&
30156
30157// CONCATENATED MODULE: ./src/util.ts
30158
30159function getNodeById(rootNode, wantedId) {
30160 var result = rootNode.all(function (node) {
30161 return node.model.uri === wantedId;
30162 });
30163 if (result.length === 1) {
30164 return result[0];
30165 }
30166 else {
30167 throw new Error("not found: " + wantedId);
30168 }
30169}
30170function getVirtualRoot(rootNode, wantedPath) {
30171 loglevel["debug"]("inside getVirtualRoot");
30172 if (wantedPath.length === 0) {
30173 loglevel["debug"]("returning root node");
30174 return rootNode;
30175 }
30176 // Find the leaf of the path...
30177 var leaf = wantedPath[wantedPath.length - 1];
30178 return getNodeById(rootNode, leaf);
30179}
30180function findValidChildren(rootNode, wantedPath) {
30181 var virtualRoot = getVirtualRoot(rootNode, wantedPath);
30182 return virtualRoot.children;
30183}
30184;
30185function getCollidingElements(d, validElements) {
30186 return validElements.filter(function (e) { return d.hitTest(e, '50%'); });
30187}
30188function makeEmptyCompoundWidget() {
30189 return {
30190 taxonomyRef: null,
30191 isCurrentlyBeingDragged: false,
30192 selectedPath: [],
30193 hasTentativeTaxonSelector: false,
30194 };
30195}
30196// Coerce a compound widget's selected path (which may include undefined ones)
30197// to a simple list of path identifiers
30198function getFlatPath(selectedPath) {
30199 var result = [];
30200 selectedPath.forEach(function (segment) {
30201 result.push.apply(result, segment.toPathElements());
30202 });
30203 return result;
30204}
30205function getQuerySegment(c) {
30206 if (c.taxonomyRef === null)
30207 throw new Error("null taxonomy");
30208 return {
30209 taxonomyRef: c.taxonomyRef,
30210 selectedPath: getFlatPath(c.selectedPath)
30211 };
30212}
30213/* harmony default export */ var util = ({
30214 findValidChildren: findValidChildren, getCollidingElements: getCollidingElements, makeEmptyCompoundWidget: makeEmptyCompoundWidget,
30215 getNodeById: getNodeById, getQuerySegment: getQuerySegment, getFlatPath: getFlatPath
30216});
30217
30218// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TaxonSelector.vue?vue&type=script&lang=ts&
30219
30220
30221
30222
30223
30224
30225
30226
30227/* harmony default export */ var TaxonSelectorvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
30228 props: [
30229 'index', 'styleOverrides', 'taxon', 'selectedPath',
30230 'taxonomyRef', 'compoundWidgetIndex'
30231 ],
30232 components: { XCircleIcon: XCircleIcon, CircleIcon: components_CircleIcon, PlusCircleIcon: components_PlusCircleIcon },
30233 data: function () {
30234 return {
30235 selectedTaxon: this.taxon.value
30236 };
30237 },
30238 created: function () {
30239 loglevel["debug"]("I consumed a REAL taxon.");
30240 loglevel["debug"]("The taxon is called %o", this.taxon);
30241 },
30242 methods: {
30243 onChanged: function () {
30244 var compoundWidgetIndex = this.compoundWidgetIndex;
30245 var selectedPathIndex = this.index;
30246 var nodeIdentifier = this.selectedTaxon;
30247 var taxonContent = this.selectedTaxon;
30248 this.$store.commit(mutation_constants.REPLACE_PATH_SEGMENT, {
30249 compoundWidgetIndex: compoundWidgetIndex,
30250 selectedPathIndex: selectedPathIndex,
30251 nodeIdentifier: nodeIdentifier,
30252 taxonContent: taxonContent
30253 });
30254 },
30255 kill: function () {
30256 // Need to pass the buck to the parent because we don't know which
30257 // compound element we are
30258 this.$emit('killed', this.index);
30259 },
30260 hideTaxonSelector: function (level) {
30261 var index = level - 1;
30262 var parameters = {
30263 compoundWidgetIndex: this.compoundWidgetIndex,
30264 taxonSelectorIndex: index
30265 };
30266 this.$store.commit(mutation_constants.TOGGLE_TAXON_SELECTOR_VISIBILITY, parameters);
30267 },
30268 addTaxonSelector: function () {
30269 loglevel["info"]("I would add a new taxon selector to this compound widget");
30270 if (!this.hasRemainingChildren) {
30271 throw new Error("no remaining children");
30272 }
30273 this.$store.commit(mutation_constants.MAKE_TENTATIVE_SELECTOR, this.index);
30274 },
30275 getNodesAtPathLevel: function (cutLevel) {
30276 var thisPathSegment = this.selectedPath[this.index];
30277 var pathStem = this.selectedPath.slice(0, cutLevel);
30278 var siblings = util.findValidChildren(this.taxonomies[this.taxonomyRef], util.getFlatPath(pathStem));
30279 var result = siblings.map(function (n) { return n.model; });
30280 loglevel["debug"]("called from index %o, sibling result was %o, stem size is %o", this.index, result, pathStem.length);
30281 return result;
30282 },
30283 getCircleIconClasses: function (level) {
30284 var relevantIndex = level - 1;
30285 var isVisible = this.$store.getters.getTaxonSelectorVisibility(this.compoundWidgetIndex, relevantIndex);
30286 var classes = {
30287 'circle-icon': true
30288 };
30289 if (isVisible) {
30290 classes['ob-enabled'] = true;
30291 }
30292 else {
30293 classes['ob-disabled'] = false;
30294 }
30295 return classes;
30296 }
30297 },
30298 computed: {
30299 canAddLevel: function () {
30300 var thisPathSegment = this.selectedPath[this.index];
30301 return thisPathSegment.hasDefiniteValue() && this.hasRemainingChildren;
30302 },
30303 plusCircleClasses: function () {
30304 return getPlusCircleClasses(this.canAddLevel);
30305 },
30306 humanFriendlyTaxonLevel: function () {
30307 return this.taxon.level;
30308 },
30309 taxonomies: function () {
30310 return this.$store.getters.taxonomies;
30311 },
30312 // If you think about it, this method only applies for the taxonselector, not the tentativeone.
30313 // Because the tentative should show children of the level above it.
30314 // But the regular one should show
30315 siblings: function () {
30316 return this.getNodesAtPathLevel(this.taxon.level - 1);
30317 },
30318 hasRemainingChildren: function () {
30319 var children = this.getNodesAtPathLevel(this.taxon.level);
30320 return children.length > 0;
30321 },
30322 }
30323}));
30324
30325// CONCATENATED MODULE: ./src/components/TaxonSelector.vue?vue&type=script&lang=ts&
30326 /* harmony default export */ var components_TaxonSelectorvue_type_script_lang_ts_ = (TaxonSelectorvue_type_script_lang_ts_);
30327// EXTERNAL MODULE: ./src/components/TaxonSelector.vue?vue&type=style&index=0&lang=less&
30328var TaxonSelectorvue_type_style_index_0_lang_less_ = __webpack_require__("1d77");
30329
30330// CONCATENATED MODULE: ./src/components/TaxonSelector.vue
30331
30332
30333
30334
30335
30336
30337/* normalize component */
30338
30339var TaxonSelector_component = normalizeComponent(
30340 components_TaxonSelectorvue_type_script_lang_ts_,
30341 TaxonSelectorvue_type_template_id_30351ab7_render,
30342 TaxonSelectorvue_type_template_id_30351ab7_staticRenderFns,
30343 false,
30344 null,
30345 null,
30346 null
30347
30348)
30349
30350TaxonSelector_component.options.__file = "TaxonSelector.vue"
30351/* harmony default export */ var TaxonSelector = (TaxonSelector_component.exports);
30352// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
30353var lodash = __webpack_require__("2ef0");
30354var lodash_default = /*#__PURE__*/__webpack_require__.n(lodash);
30355
30356// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CompoundWidget.vue?vue&type=script&lang=ts&
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366;
30367;
30368/* harmony default export */ var CompoundWidgetvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
30369 props: ['compoundWidgetIndex', 'taxonomyRef', 'taxonStyleOverrides'],
30370 data: function () {
30371 return {};
30372 },
30373 components: { MoveIcon: MoveIcon, TaxonSelector: TaxonSelector, CompoundWidgetTaxonomyAssigner: CompoundWidgetTaxonomyAssigner },
30374 mounted: function () {
30375 // nothing happens here because all the draggable binding is handled in
30376 // the parent widgetview
30377 },
30378 created: function () {
30379 loglevel["debug"]("Compound widget has taxons %o", this.taxons);
30380 loglevel["debug"]("value of selectedpath in cw is %o", this.selectedPath);
30381 },
30382 computed: __assign({
30383 // Why does this exist? Because v-for over an integer creates a 1-based
30384 // loop which is not what we want.
30385 taxonIndices: function () {
30386 // const BLANK_PATH_SEGMENTS = 0;
30387 // return _.range(this.taxons.length + BLANK_PATH_SEGMENTS);
30388 return lodash_default.a.range(this.taxons.length);
30389 },
30390 // styles for the compound widget itself -- styleOverrides only used
30391 // for styling the taxons
30392 dynamicStyles: function () {
30393 if (this.currentlyBeingDragged) {
30394 return {
30395 'border-width': 'medium',
30396 'border-style': 'dashed',
30397 'border-color': 'black',
30398 'background-color': 'hsla(0, 0%, 63%, 0.9)' // transparenty grey
30399 };
30400 }
30401 else {
30402 return {};
30403 }
30404 },
30405 // go through method-style getters to get specific compound widget properties
30406 currentlyBeingDragged: function () {
30407 return this.isSpecificCompoundWidgetBeingDragged(this.compoundWidgetIndex);
30408 },
30409 taxons: function () {
30410 return this.getTaxonsByCompoundWidgetIndex(this.compoundWidgetIndex);
30411 },
30412 thisCompoundWidgetHasTentativeTaxonSelector: function () {
30413 return this.hasTentativeTaxonSelector(this.compoundWidgetIndex);
30414 },
30415 selectedPath: function () {
30416 return this.getSelectedPath(this.compoundWidgetIndex);
30417 } }, mapGetters([
30418 'isSpecificCompoundWidgetBeingDragged',
30419 'getSelectedPath',
30420 'getTaxonsByCompoundWidgetIndex',
30421 'hasTentativeTaxonSelector'
30422 ])),
30423 methods: {
30424 killTaxonSelector: function (taxonSelectorIndex) {
30425 loglevel["info"]("Would kill taxon selector with index", taxonSelectorIndex);
30426 var params = {
30427 compoundWidgetIndex: this.compoundWidgetIndex,
30428 taxonSelectorIndex: taxonSelectorIndex
30429 };
30430 this.$store.commit(mutation_constants.KILL_TAXON_SELECTOR, params);
30431 }
30432 }
30433}));
30434
30435// CONCATENATED MODULE: ./src/components/CompoundWidget.vue?vue&type=script&lang=ts&
30436 /* harmony default export */ var components_CompoundWidgetvue_type_script_lang_ts_ = (CompoundWidgetvue_type_script_lang_ts_);
30437// EXTERNAL MODULE: ./src/components/CompoundWidget.vue?vue&type=style&index=0&lang=less&
30438var CompoundWidgetvue_type_style_index_0_lang_less_ = __webpack_require__("aa68");
30439
30440// CONCATENATED MODULE: ./src/components/CompoundWidget.vue
30441
30442
30443
30444
30445
30446
30447/* normalize component */
30448
30449var CompoundWidget_component = normalizeComponent(
30450 components_CompoundWidgetvue_type_script_lang_ts_,
30451 CompoundWidgetvue_type_template_id_4144179b_render,
30452 CompoundWidgetvue_type_template_id_4144179b_staticRenderFns,
30453 false,
30454 null,
30455 null,
30456 null
30457
30458)
30459
30460CompoundWidget_component.options.__file = "CompoundWidget.vue"
30461/* harmony default export */ var CompoundWidget = (CompoundWidget_component.exports);
30462// EXTERNAL MODULE: ./node_modules/gsap/TweenLite.js
30463var TweenLite = __webpack_require__("2e20");
30464
30465// CONCATENATED MODULE: ./node_modules/gsap/CSSPlugin.js
30466/*!
30467 * VERSION: 2.0.2
30468 * DATE: 2018-08-27
30469 * UPDATES AND DOCS AT: http://greensock.com
30470 *
30471 * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
30472 * This work is subject to the terms at http://greensock.com/standard-license or for
30473 * Club GreenSock members, the software agreement that was issued with your membership.
30474 *
30475 * @author: Jack Doyle, jack@greensock.com
30476 */
30477
30478
30479 TweenLite["c" /* _gsScope */]._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function() {
30480
30481 /** @constructor **/
30482 var CSSPlugin = function() {
30483 TweenLite["b" /* TweenPlugin */].call(this, "css");
30484 this._overwriteProps.length = 0;
30485 this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)
30486 },
30487 _globals = TweenLite["c" /* _gsScope */]._gsDefine.globals,
30488 _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.
30489 _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance
30490 _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter
30491 _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification.
30492 _specialProps = {},
30493 p = CSSPlugin.prototype = new TweenLite["b" /* TweenPlugin */]("css");
30494
30495 p.constructor = CSSPlugin;
30496 CSSPlugin.version = "2.0.2";
30497 CSSPlugin.API = 2;
30498 CSSPlugin.defaultTransformPerspective = 0;
30499 CSSPlugin.defaultSkewType = "compensated";
30500 CSSPlugin.defaultSmoothOrigin = true;
30501 p = "px"; //we'll reuse the "p" variable to keep file size down
30502 CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};
30503
30504
30505 var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g,
30506 _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
30507 _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
30508 _NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=
30509 _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,
30510 _opacityExp = /opacity *= *([^)]*)/i,
30511 _opacityValExp = /opacity:([^;]*)/i,
30512 _alphaFilterExp = /alpha\(opacity *=.+?\)/i,
30513 _rgbhslExp = /^(rgb|hsl)/,
30514 _capsExp = /([A-Z])/g,
30515 _camelExp = /-([a-z])/gi,
30516 _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage)
30517 _camelFunc = function(s, g) { return g.toUpperCase(); },
30518 _horizExp = /(?:Left|Right|Width)/i,
30519 _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,
30520 _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,
30521 _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis
30522 _complexExp = /[\s,\(]/i, //for testing a string to find if it has a space, comma, or open parenthesis (clues that it's a complex value)
30523 _DEG2RAD = Math.PI / 180,
30524 _RAD2DEG = 180 / Math.PI,
30525 _forcePT = {},
30526 _dummyElement = {style:{}},
30527 _doc = TweenLite["c" /* _gsScope */].document || {createElement: function() {return _dummyElement;}},
30528 _createElement = function(type, ns) {
30529 return _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
30530 },
30531 _tempDiv = _createElement("div"),
30532 _tempImg = _createElement("img"),
30533 _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins
30534 _agent = (TweenLite["c" /* _gsScope */].navigator || {}).userAgent || "",
30535 _autoRound,
30536 _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance).
30537
30538 _isSafari,
30539 _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element.
30540 _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!)
30541 _ieVers,
30542 _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version.
30543 var i = _agent.indexOf("Android"),
30544 a = _createElement("a");
30545 _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || parseFloat(_agent.substr(i+8, 2)) > 3));
30546 _isSafariLT6 = (_isSafari && (parseFloat(_agent.substr(_agent.indexOf("Version/")+8, 2)) < 6));
30547 _isFirefox = (_agent.indexOf("Firefox") !== -1);
30548 if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
30549 _ieVers = parseFloat( RegExp.$1 );
30550 }
30551 if (!a) {
30552 return false;
30553 }
30554 a.style.cssText = "top:1px;opacity:.55;";
30555 return /^0.55/.test(a.style.opacity);
30556 }()),
30557 _getIEOpacity = function(v) {
30558 return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1);
30559 },
30560 _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE.
30561 if (TweenLite["c" /* _gsScope */].console) {
30562 console.log(s);
30563 }
30564 },
30565 _target, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params
30566 _index, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params
30567
30568 _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"
30569 _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".
30570
30571 // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)
30572 _checkPropPrefix = function(p, e) {
30573 e = e || _tempDiv;
30574 var s = e.style,
30575 a, i;
30576 if (s[p] !== undefined) {
30577 return p;
30578 }
30579 p = p.charAt(0).toUpperCase() + p.substr(1);
30580 a = ["O","Moz","ms","Ms","Webkit"];
30581 i = 5;
30582 while (--i > -1 && s[a[i]+p] === undefined) { }
30583 if (i >= 0) {
30584 _prefix = (i === 3) ? "ms" : a[i];
30585 _prefixCSS = "-" + _prefix.toLowerCase() + "-";
30586 return _prefix + p;
30587 }
30588 return null;
30589 },
30590
30591 _getComputedStyle = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}).getComputedStyle,
30592
30593 /**
30594 * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:
30595 * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left");
30596 *
30597 * @param {!Object} t Target element whose style property you want to query
30598 * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.)
30599 * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call.
30600 * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value.
30601 * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto".
30602 * @return {?string} The current property value
30603 */
30604 _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) {
30605 var rv;
30606 if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here.
30607 return _getIEOpacity(t);
30608 }
30609 if (!calc && t.style[p]) {
30610 rv = t.style[p];
30611 } else if ((cs = cs || _getComputedStyle(t))) {
30612 rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase());
30613 } else if (t.currentStyle) {
30614 rv = t.currentStyle[p];
30615 }
30616 return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv;
30617 },
30618
30619 /**
30620 * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number.
30621 * @param {!Object} t Target element
30622 * @param {!string} p Property name (like "left", "top", "marginLeft", etc.)
30623 * @param {!number} v Value
30624 * @param {string=} sfx Suffix (like "px" or "%" or "em")
30625 * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect.
30626 * @return {number} value in pixels
30627 */
30628 _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) {
30629 if (sfx === "px" || (!sfx && p !== "lineHeight")) { return v; }
30630 if (sfx === "auto" || !v) { return 0; }
30631 var horiz = _horizExp.test(p),
30632 node = t,
30633 style = _tempDiv.style,
30634 neg = (v < 0),
30635 precise = (v === 1),
30636 pix, cache, time;
30637 if (neg) {
30638 v = -v;
30639 }
30640 if (precise) {
30641 v *= 100;
30642 }
30643 if (p === "lineHeight" && !sfx) { //special case of when a simple lineHeight (without a unit) is used. Set it to the value, read back the computed value, and then revert.
30644 cache = _getComputedStyle(t).lineHeight;
30645 t.style.lineHeight = v;
30646 pix = parseFloat(_getComputedStyle(t).lineHeight);
30647 t.style.lineHeight = cache;
30648 } else if (sfx === "%" && p.indexOf("border") !== -1) {
30649 pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);
30650 } else {
30651 style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;";
30652 if (sfx === "%" || !node.appendChild || sfx.charAt(0) === "v" || sfx === "rem") {
30653 node = t.parentNode || _doc.body;
30654 if (_getStyle(node, "display").indexOf("flex") !== -1) { //Edge and IE11 have a bug that causes offsetWidth to report as 0 if the container has display:flex and the child is position:relative. Switching to position: absolute solves it.
30655 style.position = "absolute";
30656 }
30657 cache = node._gsCache;
30658 time = TweenLite["d" /* default */].ticker.frame;
30659 if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick)
30660 return cache.width * v / 100;
30661 }
30662 style[(horiz ? "width" : "height")] = v + sfx;
30663 } else {
30664 style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;
30665 }
30666 node.appendChild(_tempDiv);
30667 pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);
30668 node.removeChild(_tempDiv);
30669 if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) {
30670 cache = node._gsCache = node._gsCache || {};
30671 cache.time = time;
30672 cache.width = pix / v * 100;
30673 }
30674 if (pix === 0 && !recurse) {
30675 pix = _convertToPixels(t, p, v, sfx, true);
30676 }
30677 }
30678 if (precise) {
30679 pix /= 100;
30680 }
30681 return neg ? -pix : pix;
30682 },
30683 _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop
30684 if (_getStyle(t, "position", cs) !== "absolute") { return 0; }
30685 var dim = ((p === "left") ? "Left" : "Top"),
30686 v = _getStyle(t, "margin" + dim, cs);
30687 return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0);
30688 },
30689
30690 // @private returns at object containing ALL of the style properties in camelCase and their associated values.
30691 _getAllStyles = function(t, cs) {
30692 var s = {},
30693 i, tr, p;
30694 if ((cs = cs || _getComputedStyle(t, null))) {
30695 if ((i = cs.length)) {
30696 while (--i > -1) {
30697 p = cs[i];
30698 if (p.indexOf("-transform") === -1 || _transformPropCSS === p) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.
30699 s[p.replace(_camelExp, _camelFunc)] = cs.getPropertyValue(p);
30700 }
30701 }
30702 } else { //some browsers behave differently - cs.length is always 0, so we must do a for...in loop.
30703 for (i in cs) {
30704 if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.
30705 s[i] = cs[i];
30706 }
30707 }
30708 }
30709 } else if ((cs = t.currentStyle || t.style)) {
30710 for (i in cs) {
30711 if (typeof(i) === "string" && s[i] === undefined) {
30712 s[i.replace(_camelExp, _camelFunc)] = cs[i];
30713 }
30714 }
30715 }
30716 if (!_supportsOpacity) {
30717 s.opacity = _getIEOpacity(t);
30718 }
30719 tr = _getTransform(t, cs, false);
30720 s.rotation = tr.rotation;
30721 s.skewX = tr.skewX;
30722 s.scaleX = tr.scaleX;
30723 s.scaleY = tr.scaleY;
30724 s.x = tr.x;
30725 s.y = tr.y;
30726 if (_supports3D) {
30727 s.z = tr.z;
30728 s.rotationX = tr.rotationX;
30729 s.rotationY = tr.rotationY;
30730 s.scaleZ = tr.scaleZ;
30731 }
30732 if (s.filters) {
30733 delete s.filters;
30734 }
30735 return s;
30736 },
30737
30738 // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.
30739 _cssDif = function(t, s1, s2, vars, forceLookup) {
30740 var difs = {},
30741 style = t.style,
30742 val, p, mpt;
30743 for (p in s2) {
30744 if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") {
30745 difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween.
30746 if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes.
30747 mpt = new MiniPropTween(style, p, style[p], mpt);
30748 }
30749 }
30750 }
30751 if (vars) {
30752 for (p in vars) { //copy properties (except className)
30753 if (p !== "className") {
30754 difs[p] = vars[p];
30755 }
30756 }
30757 }
30758 return {difs:difs, firstMPT:mpt};
30759 },
30760 _dimensions = {width:["Left","Right"], height:["Top","Bottom"]},
30761 _margins = ["marginLeft","marginRight","marginTop","marginBottom"],
30762
30763 /**
30764 * @private Gets the width or height of an element
30765 * @param {!Object} t Target element
30766 * @param {!string} p Property name ("width" or "height")
30767 * @param {Object=} cs Computed style object (if one exists). Just a speed optimization.
30768 * @return {number} Dimension (in pixels)
30769 */
30770 _getDimension = function(t, p, cs) {
30771 if ((t.nodeName + "").toLowerCase() === "svg") { //Chrome no longer supports offsetWidth/offsetHeight on SVG elements.
30772 return (cs || _getComputedStyle(t))[p] || 0;
30773 } else if (t.getCTM && _isSVG(t)) {
30774 return t.getBBox()[p] || 0;
30775 }
30776 var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight),
30777 a = _dimensions[p],
30778 i = a.length;
30779 cs = cs || _getComputedStyle(t, null);
30780 while (--i > -1) {
30781 v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0;
30782 v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0;
30783 }
30784 return v;
30785 },
30786
30787 // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)
30788 _parsePosition = function(v, recObj) {
30789 if (v === "contain" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto".
30790 return v + " ";
30791 }
30792 if (v == null || v === "") {
30793 v = "0 0";
30794 }
30795 var a = v.split(" "),
30796 x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],
30797 y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1],
30798 i;
30799 if (a.length > 3 && !recObj) { //multiple positions
30800 a = v.split(", ").join(",").split(",");
30801 v = [];
30802 for (i = 0; i < a.length; i++) {
30803 v.push(_parsePosition(a[i]));
30804 }
30805 return v.join(",");
30806 }
30807 if (y == null) {
30808 y = (x === "center") ? "50%" : "0";
30809 } else if (y === "center") {
30810 y = "50%";
30811 }
30812 if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.
30813 x = "50%";
30814 }
30815 v = x + " " + y + ((a.length > 2) ? " " + a[2] : "");
30816 if (recObj) {
30817 recObj.oxp = (x.indexOf("%") !== -1);
30818 recObj.oyp = (y.indexOf("%") !== -1);
30819 recObj.oxr = (x.charAt(1) === "=");
30820 recObj.oyr = (y.charAt(1) === "=");
30821 recObj.ox = parseFloat(x.replace(_NaNExp, ""));
30822 recObj.oy = parseFloat(y.replace(_NaNExp, ""));
30823 recObj.v = v;
30824 }
30825 return recObj || v;
30826 },
30827
30828 /**
30829 * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!)
30830 * @param {(number|string)} e End value which is typically a string, but could be a number
30831 * @param {(number|string)} b Beginning value which is typically a string but could be a number
30832 * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)
30833 */
30834 _parseChange = function(e, b) {
30835 if (typeof(e) === "function") {
30836 e = e(_index, _target);
30837 }
30838 return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : (parseFloat(e) - parseFloat(b)) || 0;
30839 },
30840
30841 /**
30842 * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function.
30843 * @param {Object} v Value to be parsed
30844 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)
30845 * @return {number} Parsed value
30846 */
30847 _parseVal = function(v, d) {
30848 if (typeof(v) === "function") {
30849 v = v(_index, _target);
30850 }
30851 var isRelative = (typeof(v) === "string" && v.charAt(1) === "=");
30852 if (typeof(v) === "string" && v.charAt(v.length - 2) === "v") { //convert vw and vh into px-equivalents.
30853 v = (isRelative ? v.substr(0, 2) : 0) + (window["inner" + ((v.substr(-2) === "vh") ? "Height" : "Width")] * (parseFloat(isRelative ? v.substr(2) : v) / 100));
30854 }
30855 return (v == null) ? d : isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v) || 0;
30856 },
30857
30858 /**
30859 * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly.
30860 * @param {Object} v Value to be parsed
30861 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)
30862 * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY"
30863 * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation.
30864 * @return {number} parsed angle in radians
30865 */
30866 _parseAngle = function(v, d, p, directionalEnd) {
30867 var min = 0.000001,
30868 cap, split, dif, result, isRelative;
30869 if (typeof(v) === "function") {
30870 v = v(_index, _target);
30871 }
30872 if (v == null) {
30873 result = d;
30874 } else if (typeof(v) === "number") {
30875 result = v;
30876 } else {
30877 cap = 360;
30878 split = v.split("_");
30879 isRelative = (v.charAt(1) === "=");
30880 dif = (isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(split[0].substr(2)) : parseFloat(split[0])) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - (isRelative ? 0 : d);
30881 if (split.length) {
30882 if (directionalEnd) {
30883 directionalEnd[p] = d + dif;
30884 }
30885 if (v.indexOf("short") !== -1) {
30886 dif = dif % cap;
30887 if (dif !== dif % (cap / 2)) {
30888 dif = (dif < 0) ? dif + cap : dif - cap;
30889 }
30890 }
30891 if (v.indexOf("_cw") !== -1 && dif < 0) {
30892 dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
30893 } else if (v.indexOf("ccw") !== -1 && dif > 0) {
30894 dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
30895 }
30896 }
30897 result = d + dif;
30898 }
30899 if (result < min && result > -min) {
30900 result = 0;
30901 }
30902 return result;
30903 },
30904
30905 _colorLookup = {aqua:[0,255,255],
30906 lime:[0,255,0],
30907 silver:[192,192,192],
30908 black:[0,0,0],
30909 maroon:[128,0,0],
30910 teal:[0,128,128],
30911 blue:[0,0,255],
30912 navy:[0,0,128],
30913 white:[255,255,255],
30914 fuchsia:[255,0,255],
30915 olive:[128,128,0],
30916 yellow:[255,255,0],
30917 orange:[255,165,0],
30918 gray:[128,128,128],
30919 purple:[128,0,128],
30920 green:[0,128,0],
30921 red:[255,0,0],
30922 pink:[255,192,203],
30923 cyan:[0,255,255],
30924 transparent:[255,255,255,0]},
30925
30926 _hue = function(h, m1, m2) {
30927 h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;
30928 return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;
30929 },
30930
30931 /**
30932 * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if toHSL parameter is true, it will populate the array with hue, saturation, and lightness values. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers).
30933 * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.
30934 * @param {(boolean)} toHSL If true, an hsl() or hsla() value will be returned instead of rgb() or rgba()
30935 * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order, or if the toHSL parameter was true, the array will contain hue, saturation and lightness (and optionally alpha) in that order. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and toHSL is true.
30936 */
30937 _parseColor = CSSPlugin.parseColor = function(v, toHSL) {
30938 var a, r, g, b, h, s, l, max, min, d, wasHSL;
30939 if (!v) {
30940 a = _colorLookup.black;
30941 } else if (typeof(v) === "number") {
30942 a = [v >> 16, (v >> 8) & 255, v & 255];
30943 } else {
30944 if (v.charAt(v.length - 1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.
30945 v = v.substr(0, v.length - 1);
30946 }
30947 if (_colorLookup[v]) {
30948 a = _colorLookup[v];
30949 } else if (v.charAt(0) === "#") {
30950 if (v.length === 4) { //for shorthand like #9F0
30951 r = v.charAt(1);
30952 g = v.charAt(2);
30953 b = v.charAt(3);
30954 v = "#" + r + r + g + g + b + b;
30955 }
30956 v = parseInt(v.substr(1), 16);
30957 a = [v >> 16, (v >> 8) & 255, v & 255];
30958 } else if (v.substr(0, 3) === "hsl") {
30959 a = wasHSL = v.match(_numExp);
30960 if (!toHSL) {
30961 h = (Number(a[0]) % 360) / 360;
30962 s = Number(a[1]) / 100;
30963 l = Number(a[2]) / 100;
30964 g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;
30965 r = l * 2 - g;
30966 if (a.length > 3) {
30967 a[3] = Number(a[3]);
30968 }
30969 a[0] = _hue(h + 1 / 3, r, g);
30970 a[1] = _hue(h, r, g);
30971 a[2] = _hue(h - 1 / 3, r, g);
30972 } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place.
30973 return v.match(_relNumExp);
30974 }
30975 } else {
30976 a = v.match(_numExp) || _colorLookup.transparent;
30977 }
30978 a[0] = Number(a[0]);
30979 a[1] = Number(a[1]);
30980 a[2] = Number(a[2]);
30981 if (a.length > 3) {
30982 a[3] = Number(a[3]);
30983 }
30984 }
30985 if (toHSL && !wasHSL) {
30986 r = a[0] / 255;
30987 g = a[1] / 255;
30988 b = a[2] / 255;
30989 max = Math.max(r, g, b);
30990 min = Math.min(r, g, b);
30991 l = (max + min) / 2;
30992 if (max === min) {
30993 h = s = 0;
30994 } else {
30995 d = max - min;
30996 s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
30997 h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4;
30998 h *= 60;
30999 }
31000 a[0] = (h + 0.5) | 0;
31001 a[1] = (s * 100 + 0.5) | 0;
31002 a[2] = (l * 100 + 0.5) | 0;
31003 }
31004 return a;
31005 },
31006 _formatColors = function(s, toHSL) {
31007 var colors = s.match(_colorExp) || [],
31008 charIndex = 0,
31009 parsed = "",
31010 i, color, temp;
31011 if (!colors.length) {
31012 return s;
31013 }
31014 for (i = 0; i < colors.length; i++) {
31015 color = colors[i];
31016 temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex);
31017 charIndex += temp.length + color.length;
31018 color = _parseColor(color, toHSL);
31019 if (color.length === 3) {
31020 color.push(1);
31021 }
31022 parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";
31023 }
31024 return parsed + s.substr(charIndex);
31025 },
31026 _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
31027
31028 for (p in _colorLookup) {
31029 _colorExp += "|" + p + "\\b";
31030 }
31031 _colorExp = new RegExp(_colorExp+")", "gi");
31032
31033 CSSPlugin.colorStringFilter = function(a) {
31034 var combined = a[0] + " " + a[1],
31035 toHSL;
31036 if (_colorExp.test(combined)) {
31037 toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);
31038 a[0] = _formatColors(a[0], toHSL);
31039 a[1] = _formatColors(a[1], toHSL);
31040 }
31041 _colorExp.lastIndex = 0;
31042 };
31043
31044 if (!TweenLite["d" /* default */].defaultStringFilter) {
31045 TweenLite["d" /* default */].defaultStringFilter = CSSPlugin.colorStringFilter;
31046 }
31047
31048 /**
31049 * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned.
31050 * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned.
31051 * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't.
31052 * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc.
31053 * @return {Function} formatter function
31054 */
31055 var _getFormatter = function(dflt, clr, collapsible, multi) {
31056 if (dflt == null) {
31057 return function(v) {return v;};
31058 }
31059 var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "",
31060 dVals = dflt.split(dColor).join("").match(_valuesExp) || [],
31061 pfx = dflt.substr(0, dflt.indexOf(dVals[0])),
31062 sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "",
31063 delim = (dflt.indexOf(" ") !== -1) ? " " : ",",
31064 numVals = dVals.length,
31065 dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "",
31066 formatter;
31067 if (!numVals) {
31068 return function(v) {return v;};
31069 }
31070 if (clr) {
31071 formatter = function(v) {
31072 var color, vals, i, a;
31073 if (typeof(v) === "number") {
31074 v += dSfx;
31075 } else if (multi && _commasOutsideParenExp.test(v)) {
31076 a = v.replace(_commasOutsideParenExp, "|").split("|");
31077 for (i = 0; i < a.length; i++) {
31078 a[i] = formatter(a[i]);
31079 }
31080 return a.join(",");
31081 }
31082 color = (v.match(_colorExp) || [dColor])[0];
31083 vals = v.split(color).join("").match(_valuesExp) || [];
31084 i = vals.length;
31085 if (numVals > i--) {
31086 while (++i < numVals) {
31087 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
31088 }
31089 }
31090 return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : "");
31091 };
31092 return formatter;
31093
31094 }
31095 formatter = function(v) {
31096 var vals, a, i;
31097 if (typeof(v) === "number") {
31098 v += dSfx;
31099 } else if (multi && _commasOutsideParenExp.test(v)) {
31100 a = v.replace(_commasOutsideParenExp, "|").split("|");
31101 for (i = 0; i < a.length; i++) {
31102 a[i] = formatter(a[i]);
31103 }
31104 return a.join(",");
31105 }
31106 vals = v.match(_valuesExp) || [];
31107 i = vals.length;
31108 if (numVals > i--) {
31109 while (++i < numVals) {
31110 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
31111 }
31112 }
31113 return pfx + vals.join(delim) + sfx;
31114 };
31115 return formatter;
31116 },
31117
31118 /**
31119 * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges.
31120 * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft"
31121 * @return {Function} a formatter function
31122 */
31123 _getEdgeParser = function(props) {
31124 props = props.split(",");
31125 return function(t, e, p, cssp, pt, plugin, vars) {
31126 var a = (e + "").split(" "),
31127 i;
31128 vars = {};
31129 for (i = 0; i < 4; i++) {
31130 vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)];
31131 }
31132 return cssp.parse(t, vars, pt, plugin);
31133 };
31134 },
31135
31136 // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.
31137 _setPluginRatio = _internals._setPluginRatio = function(v) {
31138 this.plugin.setRatio(v);
31139 var d = this.data,
31140 proxy = d.proxy,
31141 mpt = d.firstMPT,
31142 min = 0.000001,
31143 val, pt, i, str, p;
31144 while (mpt) {
31145 val = proxy[mpt.v];
31146 if (mpt.r) {
31147 val = mpt.r(val);
31148 } else if (val < min && val > -min) {
31149 val = 0;
31150 }
31151 mpt.t[mpt.p] = val;
31152 mpt = mpt._next;
31153 }
31154 if (d.autoRotate) {
31155 d.autoRotate.rotation = d.mod ? d.mod.call(this._tween, proxy.rotation, this.t, this._tween) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier
31156 }
31157 //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning.
31158 if (v === 1 || v === 0) {
31159 mpt = d.firstMPT;
31160 p = (v === 1) ? "e" : "b";
31161 while (mpt) {
31162 pt = mpt.t;
31163 if (!pt.type) {
31164 pt[p] = pt.s + pt.xs0;
31165 } else if (pt.type === 1) {
31166 str = pt.xs0 + pt.s + pt.xs1;
31167 for (i = 1; i < pt.l; i++) {
31168 str += pt["xn"+i] + pt["xs"+(i+1)];
31169 }
31170 pt[p] = str;
31171 }
31172 mpt = mpt._next;
31173 }
31174 }
31175 },
31176
31177 /**
31178 * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value.
31179 * @param {!Object} t target object whose property we're tweening (often a CSSPropTween)
31180 * @param {!string} p property name
31181 * @param {(number|string|object)} v value
31182 * @param {MiniPropTween=} next next MiniPropTween in the linked list
31183 * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer
31184 */
31185 MiniPropTween = function(t, p, v, next, r) {
31186 this.t = t;
31187 this.p = p;
31188 this.v = v;
31189 this.r = r;
31190 if (next) {
31191 next._prev = this;
31192 this._next = next;
31193 }
31194 },
31195
31196 /**
31197 * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element.
31198 * This method returns an object that has the following properties:
31199 * - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin. This is what we feed to the external _onInitTween() as the target
31200 * - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values
31201 * - firstMPT: the first MiniPropTween in the linked list
31202 * - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter.
31203 * @param {!Object} t target object to be tweened
31204 * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed
31205 * @param {!CSSPlugin} cssp The CSSPlugin instance
31206 * @param {CSSPropTween=} pt the next CSSPropTween in the linked list
31207 * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values
31208 * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter.
31209 * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions)
31210 */
31211 _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) {
31212 var bpt = pt,
31213 start = {},
31214 end = {},
31215 transform = cssp._transform,
31216 oldForce = _forcePT,
31217 i, p, xp, mpt, firstPT;
31218 cssp._transform = null;
31219 _forcePT = vars;
31220 pt = firstPT = cssp.parse(t, vars, pt, plugin);
31221 _forcePT = oldForce;
31222 //break off from the linked list so the new ones are isolated.
31223 if (shallow) {
31224 cssp._transform = transform;
31225 if (bpt) {
31226 bpt._prev = null;
31227 if (bpt._prev) {
31228 bpt._prev._next = null;
31229 }
31230 }
31231 }
31232 while (pt && pt !== bpt) {
31233 if (pt.type <= 1) {
31234 p = pt.p;
31235 end[p] = pt.s + pt.c;
31236 start[p] = pt.s;
31237 if (!shallow) {
31238 mpt = new MiniPropTween(pt, "s", p, mpt, pt.r);
31239 pt.c = 0;
31240 }
31241 if (pt.type === 1) {
31242 i = pt.l;
31243 while (--i > 0) {
31244 xp = "xn" + i;
31245 p = pt.p + "_" + xp;
31246 end[p] = pt.data[xp];
31247 start[p] = pt[xp];
31248 if (!shallow) {
31249 mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]);
31250 }
31251 }
31252 }
31253 }
31254 pt = pt._next;
31255 }
31256 return {proxy:start, end:end, firstMPT:mpt, pt:firstPT};
31257 },
31258
31259
31260
31261 /**
31262 * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory.
31263 * CSSPropTweens have the following optional properties as well (not defined through the constructor):
31264 * - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc.
31265 * - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list)
31266 * - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subtweens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request.
31267 * - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target.
31268 * - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible.
31269 * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything.
31270 * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width".
31271 * @param {number} s Starting numeric value
31272 * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95.
31273 * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it.
31274 * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update.
31275 * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip"
31276 * @param {boolean=} r If true, the value(s) should be rounded
31277 * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0.
31278 * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues.
31279 * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues.
31280 */
31281 CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) {
31282 this.t = t; //target
31283 this.p = p; //property
31284 this.s = s; //starting value
31285 this.c = c; //change value
31286 this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at)
31287 if (!(t instanceof CSSPropTween)) {
31288 _overwriteProps.push(this.n);
31289 }
31290 this.r = !r ? r : (typeof(r) === "function") ? r : Math.round; //round (boolean)
31291 this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work
31292 if (pr) {
31293 this.pr = pr;
31294 _hasPriority = true;
31295 }
31296 this.b = (b === undefined) ? s : b;
31297 this.e = (e === undefined) ? s + c : e;
31298 if (next) {
31299 this._next = next;
31300 next._prev = this;
31301 }
31302 },
31303
31304 _addNonTweeningNumericPT = function(target, prop, start, end, next, overwriteProp) { //cleans up some code redundancies and helps minification. Just a fast way to add a NUMERIC non-tweening CSSPropTween
31305 var pt = new CSSPropTween(target, prop, start, end - start, next, -1, overwriteProp);
31306 pt.b = start;
31307 pt.e = pt.xs0 = end;
31308 return pt;
31309 },
31310
31311 /**
31312 * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example:
31313 * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt);
31314 * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio().
31315 * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method.
31316 *
31317 * @param {!Object} t Target whose property will be tweened
31318 * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow")
31319 * @param {string} b Beginning value
31320 * @param {string} e Ending value
31321 * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization)
31322 * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match
31323 * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this).
31324 * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0.
31325 * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300}
31326 * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here.
31327 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call.
31328 */
31329 _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) {
31330 //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e);
31331 b = b || dflt || "";
31332 if (typeof(e) === "function") {
31333 e = e(_index, _target);
31334 }
31335 pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);
31336 e += ""; //ensures it's a string
31337 if (clrs && _colorExp.test(e + b)) { //if colors are found, normalize the formatting to rgba() or hsla().
31338 e = [b, e];
31339 CSSPlugin.colorStringFilter(e);
31340 b = e[0];
31341 e = e[1];
31342 }
31343 var ba = b.split(", ").join(",").split(" "), //beginning array
31344 ea = e.split(", ").join(",").split(" "), //ending array
31345 l = ba.length,
31346 autoRound = (_autoRound !== false),
31347 i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL;
31348 if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {
31349 if ((e + b).indexOf("rgb") !== -1 || (e + b).indexOf("hsl") !== -1) { //keep rgb(), rgba(), hsl(), and hsla() values together! (remember, we're splitting on spaces)
31350 ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
31351 ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
31352 } else {
31353 ba = ba.join(" ").split(",").join(", ").split(" ");
31354 ea = ea.join(" ").split(",").join(", ").split(" ");
31355 }
31356 l = ba.length;
31357 }
31358 if (l !== ea.length) {
31359 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");
31360 ba = (dflt || "").split(" ");
31361 l = ba.length;
31362 }
31363 pt.plugin = plugin;
31364 pt.setRatio = setRatio;
31365 _colorExp.lastIndex = 0;
31366 for (i = 0; i < l; i++) {
31367 bv = ba[i];
31368 ev = ea[i] + "";
31369 bn = parseFloat(bv);
31370 //if the value begins with a number (most common). It's fine if it has a suffix like px
31371 if (bn || bn === 0) {
31372 pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1) ? Math.round : false, true);
31373
31374 //if the value is a color
31375 } else if (clrs && _colorExp.test(bv)) {
31376 str = ev.indexOf(")") + 1;
31377 str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it.
31378 useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity);
31379 temp = ev; //original string value so we can look for any prefix later.
31380 bv = _parseColor(bv, useHSL);
31381 ev = _parseColor(ev, useHSL);
31382 hasAlpha = (bv.length + ev.length > 6);
31383 if (hasAlpha && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color
31384 pt["xs" + pt.l] += pt.l ? " transparent" : "transparent";
31385 pt.e = pt.e.split(ea[i]).join("transparent");
31386 } else {
31387 if (!_supportsOpacity) { //old versions of IE don't support rgba().
31388 hasAlpha = false;
31389 }
31390 if (useHSL) {
31391 pt.appendXtra(temp.substr(0, temp.indexOf("hsl")) + (hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true)
31392 .appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false)
31393 .appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false);
31394 } else {
31395 pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", Math.round, true)
31396 .appendXtra("", bv[1], ev[1] - bv[1], ",", Math.round)
31397 .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), Math.round);
31398 }
31399
31400 if (hasAlpha) {
31401 bv = (bv.length < 4) ? 1 : bv[3];
31402 pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false);
31403 }
31404 }
31405 _colorExp.lastIndex = 0; //otherwise the test() on the RegExp could move the lastIndex and taint future results.
31406
31407 } else {
31408 bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array
31409
31410 //if no number is found, treat it as a non-tweening value and just append the string to the current xs.
31411 if (!bnums) {
31412 pt["xs" + pt.l] += (pt.l || pt["xs" + pt.l]) ? " " + ev : ev;
31413
31414 //loop through all the numbers that are found and construct the extra values on the pt.
31415 } else {
31416 enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5
31417 if (!enums || enums.length !== bnums.length) {
31418 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");
31419 return pt;
31420 }
31421 ni = 0;
31422 for (xi = 0; xi < bnums.length; xi++) {
31423 cv = bnums[xi];
31424 temp = bv.indexOf(cv, ni);
31425 pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px") ? Math.round : false, (xi === 0));
31426 ni = temp + cv.length;
31427 }
31428 pt["xs" + pt.l] += bv.substr(ni);
31429 }
31430 }
31431 }
31432 //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly.
31433 if (e.indexOf("=") !== -1) if (pt.data) {
31434 str = pt.xs0 + pt.data.s;
31435 for (i = 1; i < pt.l; i++) {
31436 str += pt["xs" + i] + pt.data["xn" + i];
31437 }
31438 pt.e = str + pt["xs" + i];
31439 }
31440 if (!pt.l) {
31441 pt.type = -1;
31442 pt.xs0 = pt.e;
31443 }
31444 return pt.xfirst || pt;
31445 },
31446 i = 9;
31447
31448
31449 p = CSSPropTween.prototype;
31450 p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc.
31451 while (--i > 0) {
31452 p["xn" + i] = 0;
31453 p["xs" + i] = "";
31454 }
31455 p.xs0 = "";
31456 p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null;
31457
31458
31459 /**
31460 * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this:
31461 * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)"
31462 * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method).
31463 * @param {string=} pfx Prefix (if any)
31464 * @param {!number} s Starting value
31465 * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95.
31466 * @param {string=} sfx Suffix (if any)
31467 * @param {boolean=} r Round (if true).
31468 * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space.
31469 * @return {CSSPropTween} returns itself so that multiple methods can be chained together.
31470 */
31471 p.appendXtra = function(pfx, s, c, sfx, r, pad) {
31472 var pt = this,
31473 l = pt.l;
31474 pt["xs" + l] += (pad && (l || pt["xs" + l])) ? " " + pfx : pfx || "";
31475 if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value!
31476 pt["xs" + l] += s + (sfx || "");
31477 return pt;
31478 }
31479 pt.l++;
31480 pt.type = pt.setRatio ? 2 : 1;
31481 pt["xs" + pt.l] = sfx || "";
31482 if (l > 0) {
31483 pt.data["xn" + l] = s + c;
31484 pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method)
31485 pt["xn" + l] = s;
31486 if (!pt.plugin) {
31487 pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr);
31488 pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly.
31489 }
31490 return pt;
31491 }
31492 pt.data = {s:s + c};
31493 pt.rxp = {};
31494 pt.s = s;
31495 pt.c = c;
31496 pt.r = r;
31497 return pt;
31498 };
31499
31500 /**
31501 * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly.
31502 * @param {!string} p Property name (like "boxShadow" or "throwProps")
31503 * @param {Object=} options An object containing any of the following configuration options:
31504 * - defaultValue: the default value
31505 * - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker)
31506 * - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.)
31507 * - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O)
31508 * - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc.
31509 * - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0.
31510 * - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out.
31511 * - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc.
31512 * - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default).
31513 */
31514 var SpecialProp = function(p, options) {
31515 options = options || {};
31516 this.p = options.prefix ? _checkPropPrefix(p) || p : p;
31517 _specialProps[p] = _specialProps[this.p] = this;
31518 this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi);
31519 if (options.parser) {
31520 this.parse = options.parser;
31521 }
31522 this.clrs = options.color;
31523 this.multi = options.multi;
31524 this.keyword = options.keyword;
31525 this.dflt = options.defaultValue;
31526 this.pr = options.priority || 0;
31527 },
31528
31529 //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin.
31530 _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) {
31531 if (typeof(options) !== "object") {
31532 options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin
31533 }
31534 var a = p.split(","),
31535 d = options.defaultValue,
31536 i, temp;
31537 defaults = defaults || [d];
31538 for (i = 0; i < a.length; i++) {
31539 options.prefix = (i === 0 && options.prefix);
31540 options.defaultValue = defaults[i] || d;
31541 temp = new SpecialProp(a[i], options);
31542 }
31543 },
31544
31545 //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file.
31546 _registerPluginProp = _internals._registerPluginProp = function(p) {
31547 if (!_specialProps[p]) {
31548 var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin";
31549 _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) {
31550 var pluginClass = _globals.com.greensock.plugins[pluginName];
31551 if (!pluginClass) {
31552 _log("Error: " + pluginName + " js file not loaded.");
31553 return pt;
31554 }
31555 pluginClass._cssRegister();
31556 return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars);
31557 }});
31558 }
31559 };
31560
31561
31562 p = SpecialProp.prototype;
31563
31564 /**
31565 * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxShadow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list)
31566 * @param {!Object} t target element
31567 * @param {(string|number|object)} b beginning value
31568 * @param {(string|number|object)} e ending (destination) value
31569 * @param {CSSPropTween=} pt next CSSPropTween in the linked list
31570 * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here.
31571 * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here.
31572 * @return {CSSPropTween=} First CSSPropTween in the linked list
31573 */
31574 p.parseComplex = function(t, b, e, pt, plugin, setRatio) {
31575 var kwd = this.keyword,
31576 i, ba, ea, l, bi, ei;
31577 //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example)
31578 if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) {
31579 ba = b.replace(_commasOutsideParenExp, "|").split("|");
31580 ea = e.replace(_commasOutsideParenExp, "|").split("|");
31581 } else if (kwd) {
31582 ba = [b];
31583 ea = [e];
31584 }
31585 if (ea) {
31586 l = (ea.length > ba.length) ? ea.length : ba.length;
31587 for (i = 0; i < l; i++) {
31588 b = ba[i] = ba[i] || this.dflt;
31589 e = ea[i] = ea[i] || this.dflt;
31590 if (kwd) {
31591 bi = b.indexOf(kwd);
31592 ei = e.indexOf(kwd);
31593 if (bi !== ei) {
31594 if (ei === -1) { //if the keyword isn't in the end value, remove it from the beginning one.
31595 ba[i] = ba[i].split(kwd).join("");
31596 } else if (bi === -1) { //if the keyword isn't in the beginning, add it.
31597 ba[i] += " " + kwd;
31598 }
31599 }
31600 }
31601 }
31602 b = ba.join(", ");
31603 e = ea.join(", ");
31604 }
31605 return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio);
31606 };
31607
31608 /**
31609 * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call:
31610 * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this);
31611 * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that).
31612 * @param {!Object} t Target object whose property is being tweened
31613 * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object).
31614 * @param {!string} p Property name
31615 * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween.
31616 * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it)
31617 * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance.
31618 * @param {Object=} vars Original vars object that contains the data for parsing.
31619 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call.
31620 */
31621 p.parse = function(t, e, p, cssp, pt, plugin, vars) {
31622 return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin);
31623 };
31624
31625 /**
31626 * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters:
31627 * 1) Target object whose property should be tweened (typically a DOM element)
31628 * 2) The end/destination value (could be a string, number, object, or whatever you want)
31629 * 3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration)
31630 *
31631 * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example:
31632 *
31633 * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) {
31634 * var start = target.style.width;
31635 * return function(ratio) {
31636 * target.style.width = (start + value * ratio) + "px";
31637 * console.log("set width to " + target.style.width);
31638 * }
31639 * }, 0);
31640 *
31641 * Then, when I do this tween, it will trigger my special property:
31642 *
31643 * TweenLite.to(element, 1, {css:{myCustomProp:100}});
31644 *
31645 * In the example, of course, we're just changing the width, but you can do anything you want.
31646 *
31647 * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}})
31648 * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function.
31649 * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones.
31650 */
31651 CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) {
31652 _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) {
31653 var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority);
31654 rv.plugin = plugin;
31655 rv.setRatio = onInitTween(t, e, cssp._tween, p);
31656 return rv;
31657 }, priority:priority});
31658 };
31659
31660
31661
31662
31663
31664
31665 //transform-related methods and properties
31666 CSSPlugin.useSVGTransformAttr = true; //Safari and Firefox both have some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead (users can override this).
31667 var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","),
31668 _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.
31669 _transformPropCSS = _prefixCSS + "transform",
31670 _transformOriginProp = _checkPropPrefix("transformOrigin"),
31671 _supports3D = (_checkPropPrefix("perspective") !== null),
31672 Transform = _internals.Transform = function() {
31673 this.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0;
31674 this.force3D = (CSSPlugin.defaultForce3D === false || !_supports3D) ? false : CSSPlugin.defaultForce3D || "auto";
31675 },
31676 _SVGElement = TweenLite["c" /* _gsScope */].SVGElement,
31677 _useSVGTransformAttr,
31678 //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future.
31679
31680 _createSVG = function(type, container, attributes) {
31681 var element = _doc.createElementNS("http://www.w3.org/2000/svg", type),
31682 reg = /([a-z])([A-Z])/g,
31683 p;
31684 for (p in attributes) {
31685 element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]);
31686 }
31687 container.appendChild(element);
31688 return element;
31689 },
31690 _docElement = _doc.documentElement || {},
31691 _forceSVGTransformAttr = (function() {
31692 //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element
31693 var force = _ieVers || (/Android/i.test(_agent) && !TweenLite["c" /* _gsScope */].chrome),
31694 svg, rect, width;
31695 if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway
31696 svg = _createSVG("svg", _docElement);
31697 rect = _createSVG("rect", svg, {width:100, height:50, x:100});
31698 width = rect.getBoundingClientRect().width;
31699 rect.style[_transformOriginProp] = "50% 50%";
31700 rect.style[_transformProp] = "scaleX(0.5)";
31701 force = (width === rect.getBoundingClientRect().width && !(_isFirefox && _supports3D)); //note: Firefox fails the test even though it does support CSS transforms in 3D. Since we can't push 3D stuff into the transform attribute, we force Firefox to pass the test here (as long as it does truly support 3D).
31702 _docElement.removeChild(svg);
31703 }
31704 return force;
31705 })(),
31706 _parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin, skipRecord) {
31707 var tm = e._gsTransform,
31708 m = _getMatrix(e, true),
31709 v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld;
31710 if (tm) {
31711 xOriginOld = tm.xOrigin; //record the original values before we alter them.
31712 yOriginOld = tm.yOrigin;
31713 }
31714 if (!absolute || (v = absolute.split(" ")).length < 2) {
31715 b = e.getBBox();
31716 if (b.x === 0 && b.y === 0 && b.width + b.height === 0) { //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.
31717 b = {x: parseFloat(e.hasAttribute("x") ? e.getAttribute("x") : e.hasAttribute("cx") ? e.getAttribute("cx") : 0) || 0, y: parseFloat(e.hasAttribute("y") ? e.getAttribute("y") : e.hasAttribute("cy") ? e.getAttribute("cy") : 0) || 0, width:0, height:0};
31718 }
31719 local = _parsePosition(local).split(" ");
31720 v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * b.width : parseFloat(local[0])) + b.x,
31721 (local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * b.height : parseFloat(local[1])) + b.y];
31722 }
31723 decoratee.xOrigin = xOrigin = parseFloat(v[0]);
31724 decoratee.yOrigin = yOrigin = parseFloat(v[1]);
31725 if (absolute && m !== _identity2DMatrix) { //if svgOrigin is being set, we must invert the matrix and determine where the absolute point is, factoring in the current transforms. Otherwise, the svgOrigin would be based on the element's non-transformed position on the canvas.
31726 a = m[0];
31727 b = m[1];
31728 c = m[2];
31729 d = m[3];
31730 tx = m[4];
31731 ty = m[5];
31732 determinant = (a * d - b * c);
31733 if (determinant) { //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.
31734 x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + ((c * ty - d * tx) / determinant);
31735 y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - ((a * ty - b * tx) / determinant);
31736 xOrigin = decoratee.xOrigin = v[0] = x;
31737 yOrigin = decoratee.yOrigin = v[1] = y;
31738 }
31739 }
31740 if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly
31741 if (skipRecord) {
31742 decoratee.xOffset = tm.xOffset;
31743 decoratee.yOffset = tm.yOffset;
31744 tm = decoratee;
31745 }
31746 if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) {
31747 x = xOrigin - xOriginOld;
31748 y = yOrigin - yOriginOld;
31749 //originally, we simply adjusted the x and y values, but that would cause problems if, for example, you created a rotational tween part-way through an x/y tween. Managing the offset in a separate variable gives us ultimate flexibility.
31750 //tm.x -= x - (x * m[0] + y * m[2]);
31751 //tm.y -= y - (x * m[1] + y * m[3]);
31752 tm.xOffset += (x * m[0] + y * m[2]) - x;
31753 tm.yOffset += (x * m[1] + y * m[3]) - y;
31754 } else {
31755 tm.xOffset = tm.yOffset = 0;
31756 }
31757 }
31758 if (!skipRecord) {
31759 e.setAttribute("data-svg-origin", v.join(" "));
31760 }
31761 },
31762 _getBBoxHack = function(swapIfPossible) { //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).
31763 var svg = _createElement("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"),
31764 oldParent = this.parentNode,
31765 oldSibling = this.nextSibling,
31766 oldCSS = this.style.cssText,
31767 bbox;
31768 _docElement.appendChild(svg);
31769 svg.appendChild(this);
31770 this.style.display = "block";
31771 if (swapIfPossible) {
31772 try {
31773 bbox = this.getBBox();
31774 this._originalGetBBox = this.getBBox;
31775 this.getBBox = _getBBoxHack;
31776 } catch (e) { }
31777 } else if (this._originalGetBBox) {
31778 bbox = this._originalGetBBox();
31779 }
31780 if (oldSibling) {
31781 oldParent.insertBefore(this, oldSibling);
31782 } else {
31783 oldParent.appendChild(this);
31784 }
31785 _docElement.removeChild(svg);
31786 this.style.cssText = oldCSS;
31787 return bbox;
31788 },
31789 _getBBox = function(e) {
31790 try {
31791 return e.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118
31792 } catch (error) {
31793 return _getBBoxHack.call(e, true);
31794 }
31795 },
31796 _isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works
31797 return !!(_SVGElement && e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));
31798 },
31799 _identity2DMatrix = [1,0,0,1,0,0],
31800 _getMatrix = function(e, force2D) {
31801 var tm = e._gsTransform || new Transform(),
31802 rnd = 100000,
31803 style = e.style,
31804 isDefault, s, m, n, dec, none;
31805 if (_transformProp) {
31806 s = _getStyle(e, _transformPropCSS, null, true);
31807 } else if (e.currentStyle) {
31808 //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix.
31809 s = e.currentStyle.filter.match(_ieGetMatrixExp);
31810 s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
31811 }
31812 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
31813 if (_transformProp && ((none = (!_getComputedStyle(e) || _getComputedStyle(e).display === "none")) || !e.parentNode)) { //note: Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
31814 if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
31815 n = style.display;
31816 style.display = "block";
31817 }
31818 if (!e.parentNode) {
31819 dec = 1; //flag
31820 _docElement.appendChild(e);
31821 }
31822 s = _getStyle(e, _transformPropCSS, null, true);
31823 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
31824 if (n) {
31825 style.display = n;
31826 } else if (none) {
31827 _removeProp(style, "display");
31828 }
31829 if (dec) {
31830 _docElement.removeChild(e);
31831 }
31832 }
31833 if (tm.svg || (e.getCTM && _isSVG(e))) {
31834 if (isDefault && (style[_transformProp] + "").indexOf("matrix") !== -1) { //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values
31835 s = style[_transformProp];
31836 isDefault = 0;
31837 }
31838 m = e.getAttribute("transform");
31839 if (isDefault && m) {
31840 m = e.transform.baseVal.consolidate().matrix; //ensures that even complex values like "translate(50,60) rotate(135,0,0)" are parsed because it mashes it into a matrix.
31841 s = "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + m.e + "," + m.f + ")";
31842 isDefault = 0;
31843 }
31844 }
31845 if (isDefault) {
31846 return _identity2DMatrix;
31847 }
31848 //split the matrix values out into an array (m for matrix)
31849 m = (s || "").match(_numExp) || [];
31850 i = m.length;
31851 while (--i > -1) {
31852 n = Number(m[i]);
31853 m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example).
31854 }
31855 return (force2D && m.length > 6) ? [m[0], m[1], m[4], m[5], m[12], m[13]] : m;
31856 },
31857
31858 /**
31859 * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.
31860 * @param {!Object} t target element
31861 * @param {Object=} cs computed style object (optional)
31862 * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...}
31863 * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style)
31864 * @return {object} object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...}
31865 */
31866 _getTransform = _internals.getTransform = function(t, cs, rec, parse) {
31867 if (t._gsTransform && rec && !parse) {
31868 return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things.
31869 }
31870 var tm = rec ? t._gsTransform || new Transform() : new Transform(),
31871 invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent.
31872 min = 0.00002,
31873 rnd = 100000,
31874 zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin || 0 : 0,
31875 defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0,
31876 m, i, scaleX, scaleY, rotation, skewX;
31877
31878 tm.svg = !!(t.getCTM && _isSVG(t));
31879 if (tm.svg) {
31880 _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin"));
31881 _useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr;
31882 }
31883 m = _getMatrix(t);
31884 if (m !== _identity2DMatrix) {
31885
31886 if (m.length === 16) {
31887 //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values)
31888 var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],
31889 a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],
31890 a13 = m[8], a23 = m[9], a33 = m[10],
31891 a14 = m[12], a24 = m[13], a34 = m[14],
31892 a43 = m[11],
31893 angle = Math.atan2(a32, a33),
31894 t1, t2, t3, t4, cos, sin;
31895 //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari
31896 if (tm.zOrigin) {
31897 a34 = -tm.zOrigin;
31898 a14 = a13*a34-m[12];
31899 a24 = a23*a34-m[13];
31900 a34 = a33*a34+tm.zOrigin-m[14];
31901 }
31902 //note for possible future consolidation: rotationX: Math.atan2(a32, a33), rotationY: Math.atan2(-a31, Math.sqrt(a33 * a33 + a32 * a32)), rotation: Math.atan2(a21, a11), skew: Math.atan2(a12, a22). However, it doesn't seem to be quite as reliable as the full-on backwards rotation procedure.
31903 tm.rotationX = angle * _RAD2DEG;
31904 //rotationX
31905 if (angle) {
31906 cos = Math.cos(-angle);
31907 sin = Math.sin(-angle);
31908 t1 = a12*cos+a13*sin;
31909 t2 = a22*cos+a23*sin;
31910 t3 = a32*cos+a33*sin;
31911 a13 = a12*-sin+a13*cos;
31912 a23 = a22*-sin+a23*cos;
31913 a33 = a32*-sin+a33*cos;
31914 a43 = a42*-sin+a43*cos;
31915 a12 = t1;
31916 a22 = t2;
31917 a32 = t3;
31918 }
31919 //rotationY
31920 angle = Math.atan2(-a31, a33);
31921 tm.rotationY = angle * _RAD2DEG;
31922 if (angle) {
31923 cos = Math.cos(-angle);
31924 sin = Math.sin(-angle);
31925 t1 = a11*cos-a13*sin;
31926 t2 = a21*cos-a23*sin;
31927 t3 = a31*cos-a33*sin;
31928 a23 = a21*sin+a23*cos;
31929 a33 = a31*sin+a33*cos;
31930 a43 = a41*sin+a43*cos;
31931 a11 = t1;
31932 a21 = t2;
31933 a31 = t3;
31934 }
31935 //rotationZ
31936 angle = Math.atan2(a21, a11);
31937 tm.rotation = angle * _RAD2DEG;
31938 if (angle) {
31939 cos = Math.cos(angle);
31940 sin = Math.sin(angle);
31941 t1 = a11*cos+a21*sin;
31942 t2 = a12*cos+a22*sin;
31943 t3 = a13*cos+a23*sin;
31944 a21 = a21*cos-a11*sin;
31945 a22 = a22*cos-a12*sin;
31946 a23 = a23*cos-a13*sin;
31947 a11 = t1;
31948 a12 = t2;
31949 a13 = t3;
31950 }
31951
31952 if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.
31953 tm.rotationX = tm.rotation = 0;
31954 tm.rotationY = 180 - tm.rotationY;
31955 }
31956
31957 //skewX
31958 angle = Math.atan2(a12, a22);
31959
31960 //scales
31961 tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21 + a31 * a31) * rnd + 0.5) | 0) / rnd;
31962 tm.scaleY = ((Math.sqrt(a22 * a22 + a32 * a32) * rnd + 0.5) | 0) / rnd;
31963 tm.scaleZ = ((Math.sqrt(a13 * a13 + a23 * a23 + a33 * a33) * rnd + 0.5) | 0) / rnd;
31964 a11 /= tm.scaleX;
31965 a12 /= tm.scaleY;
31966 a21 /= tm.scaleX;
31967 a22 /= tm.scaleY;
31968 if (Math.abs(angle) > min) {
31969 tm.skewX = angle * _RAD2DEG;
31970 a12 = 0; //unskews
31971 if (tm.skewType !== "simple") {
31972 tm.scaleY *= 1 / Math.cos(angle); //by default, we compensate the scale based on the skew so that the element maintains a similar proportion when skewed, so we have to alter the scaleY here accordingly to match the default (non-adjusted) skewing that CSS does (stretching more and more as it skews).
31973 }
31974
31975 } else {
31976 tm.skewX = 0;
31977 }
31978
31979 /* //for testing purposes
31980 var transform = "matrix3d(",
31981 comma = ",",
31982 zero = "0";
31983 a13 /= tm.scaleZ;
31984 a23 /= tm.scaleZ;
31985 a31 /= tm.scaleX;
31986 a32 /= tm.scaleY;
31987 a33 /= tm.scaleZ;
31988 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
31989 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
31990 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
31991 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
31992 transform += a14 + comma + a24 + comma + a34 + comma + (tm.perspective ? (1 + (-a34 / tm.perspective)) : 1) + ")";
31993 console.log(transform);
31994 document.querySelector(".test").style[_transformProp] = transform;
31995 */
31996
31997 tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;
31998 tm.x = a14;
31999 tm.y = a24;
32000 tm.z = a34;
32001 if (tm.svg) {
32002 tm.x -= tm.xOrigin - (tm.xOrigin * a11 - tm.yOrigin * a12);
32003 tm.y -= tm.yOrigin - (tm.yOrigin * a21 - tm.xOrigin * a22);
32004 }
32005
32006 } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY))) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those.
32007 var k = (m.length >= 6),
32008 a = k ? m[0] : 1,
32009 b = m[1] || 0,
32010 c = m[2] || 0,
32011 d = k ? m[3] : 1;
32012 tm.x = m[4] || 0;
32013 tm.y = m[5] || 0;
32014 scaleX = Math.sqrt(a * a + b * b);
32015 scaleY = Math.sqrt(d * d + c * c);
32016 rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).
32017 skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0;
32018 tm.scaleX = scaleX;
32019 tm.scaleY = scaleY;
32020 tm.rotation = rotation;
32021 tm.skewX = skewX;
32022 if (_supports3D) {
32023 tm.rotationX = tm.rotationY = tm.z = 0;
32024 tm.perspective = defaultTransformPerspective;
32025 tm.scaleZ = 1;
32026 }
32027 if (tm.svg) {
32028 tm.x -= tm.xOrigin - (tm.xOrigin * a + tm.yOrigin * c);
32029 tm.y -= tm.yOrigin - (tm.xOrigin * b + tm.yOrigin * d);
32030 }
32031 }
32032 if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) {
32033 if (invX) {
32034 tm.scaleX *= -1;
32035 tm.skewX += (tm.rotation <= 0) ? 180 : -180;
32036 tm.rotation += (tm.rotation <= 0) ? 180 : -180;
32037 } else {
32038 tm.scaleY *= -1;
32039 tm.skewX += (tm.skewX <= 0) ? 180 : -180;
32040 }
32041 }
32042 tm.zOrigin = zOrigin;
32043 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate.
32044 for (i in tm) {
32045 if (tm[i] < min) if (tm[i] > -min) {
32046 tm[i] = 0;
32047 }
32048 }
32049 }
32050 //DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective+ ", origin: "+ tm.xOrigin+ ","+ tm.yOrigin);
32051 if (rec) {
32052 t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)
32053 if (tm.svg) { //if we're supposed to apply transforms to the SVG element's "transform" attribute, make sure there aren't any CSS transforms applied or they'll override the attribute ones. Also clear the transform attribute if we're using CSS, just to be clean.
32054 if (_useSVGTransformAttr && t.style[_transformProp]) {
32055 TweenLite["d" /* default */].delayedCall(0.001, function(){ //if we apply this right away (before anything has rendered), we risk there being no transforms for a brief moment and it also interferes with adjusting the transformOrigin in a tween with immediateRender:true (it'd try reading the matrix and it wouldn't have the appropriate data in place because we just removed it).
32056 _removeProp(t.style, _transformProp);
32057 });
32058 } else if (!_useSVGTransformAttr && t.getAttribute("transform")) {
32059 TweenLite["d" /* default */].delayedCall(0.001, function(){
32060 t.removeAttribute("transform");
32061 });
32062 }
32063 }
32064 }
32065 return tm;
32066 },
32067
32068 //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms)
32069 _setIETransformRatio = function(v) {
32070 var t = this.data, //refers to the element's _gsTransform object
32071 ang = -t.rotation * _DEG2RAD,
32072 skew = ang + t.skewX * _DEG2RAD,
32073 rnd = 100000,
32074 a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd,
32075 b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd,
32076 c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd,
32077 d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd,
32078 style = this.t.style,
32079 cs = this.t.currentStyle,
32080 filters, val;
32081 if (!cs) {
32082 return;
32083 }
32084 val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted)
32085 b = -c;
32086 c = -val;
32087 filters = cs.filter;
32088 style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight
32089 var w = this.t.offsetWidth,
32090 h = this.t.offsetHeight,
32091 clip = (cs.position !== "absolute"),
32092 m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d,
32093 ox = t.x + (w * t.xPercent / 100),
32094 oy = t.y + (h * t.yPercent / 100),
32095 dx, dy;
32096
32097 //if transformOrigin is being used, adjust the offset x and y
32098 if (t.ox != null) {
32099 dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2;
32100 dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2;
32101 ox += dx - (dx * a + dy * b);
32102 oy += dy - (dx * c + dy * d);
32103 }
32104
32105 if (!clip) {
32106 m += ", sizingMethod='auto expand')";
32107 } else {
32108 dx = (w / 2);
32109 dy = (h / 2);
32110 //translate to ensure that transformations occur around the correct origin (default is center).
32111 m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")";
32112 }
32113 if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) {
32114 style.filter = filters.replace(_ieSetMatrixExp, m);
32115 } else {
32116 style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha.
32117 }
32118
32119 //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance.
32120 if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf( true && filters.indexOf("Alpha")) === -1) {
32121 style.removeAttribute("filter");
32122 }
32123
32124 //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration).
32125 if (!clip) {
32126 var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom
32127 marg, prop, dif;
32128 dx = t.ieOffsetX || 0;
32129 dy = t.ieOffsetY || 0;
32130 t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox);
32131 t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy);
32132 for (i = 0; i < 4; i++) {
32133 prop = _margins[i];
32134 marg = cs[prop];
32135 //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes)
32136 val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0;
32137 if (val !== t[prop]) {
32138 dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible.
32139 } else {
32140 dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY;
32141 }
32142 style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px";
32143 }
32144 }
32145 },
32146
32147 /* translates a super small decimal to a string WITHOUT scientific notation
32148 _safeDecimal = function(n) {
32149 var s = (n < 0 ? -n : n) + "",
32150 a = s.split("e-");
32151 return (n < 0 ? "-0." : "0.") + new Array(parseInt(a[1], 10) || 0).join("0") + a[0].split(".").join("");
32152 },
32153 */
32154
32155 _setTransformRatio = _internals.set3DTransformRatio = _internals.setTransformRatio = function(v) {
32156 var t = this.data, //refers to the element's _gsTransform object
32157 style = this.t.style,
32158 angle = t.rotation,
32159 rotationX = t.rotationX,
32160 rotationY = t.rotationY,
32161 sx = t.scaleX,
32162 sy = t.scaleY,
32163 sz = t.scaleZ,
32164 x = t.x,
32165 y = t.y,
32166 z = t.z,
32167 isSVG = t.svg,
32168 perspective = t.perspective,
32169 force3D = t.force3D,
32170 skewY = t.skewY,
32171 skewX = t.skewX,
32172 t1, a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
32173 zOrigin, min, cos, sin, t2, transform, comma, zero, skew, rnd;
32174 if (skewY) { //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.
32175 skewX += skewY;
32176 angle += skewY;
32177 }
32178
32179 //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true)
32180 if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX && sz === 1) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween.
32181
32182 //2D
32183 if (angle || skewX || isSVG) {
32184 angle *= _DEG2RAD;
32185 skew = skewX * _DEG2RAD;
32186 rnd = 100000;
32187 a11 = Math.cos(angle) * sx;
32188 a21 = Math.sin(angle) * sx;
32189 a12 = Math.sin(angle - skew) * -sy;
32190 a22 = Math.cos(angle - skew) * sy;
32191 if (skew && t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does
32192 t1 = Math.tan(skew - skewY * _DEG2RAD);
32193 t1 = Math.sqrt(1 + t1 * t1);
32194 a12 *= t1;
32195 a22 *= t1;
32196 if (skewY) {
32197 t1 = Math.tan(skewY * _DEG2RAD);
32198 t1 = Math.sqrt(1 + t1 * t1);
32199 a11 *= t1;
32200 a21 *= t1;
32201 }
32202 }
32203 if (isSVG) {
32204 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset;
32205 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset;
32206 if (_useSVGTransformAttr && (t.xPercent || t.yPercent)) { //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the matrix to simulate it.
32207 min = this.t.getBBox();
32208 x += t.xPercent * 0.01 * min.width;
32209 y += t.yPercent * 0.01 * min.height;
32210 }
32211 min = 0.000001;
32212 if (x < min) if (x > -min) {
32213 x = 0;
32214 }
32215 if (y < min) if (y > -min) {
32216 y = 0;
32217 }
32218 }
32219 transform = (((a11 * rnd) | 0) / rnd) + "," + (((a21 * rnd) | 0) / rnd) + "," + (((a12 * rnd) | 0) / rnd) + "," + (((a22 * rnd) | 0) / rnd) + "," + x + "," + y + ")";
32220 if (isSVG && _useSVGTransformAttr) {
32221 this.t.setAttribute("transform", "matrix(" + transform);
32222 } else {
32223 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.
32224 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + transform;
32225 }
32226 } else {
32227 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")";
32228 }
32229 return;
32230
32231 }
32232 if (_isFirefox) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.
32233 min = 0.0001;
32234 if (sx < min && sx > -min) {
32235 sx = sz = 0.00002;
32236 }
32237 if (sy < min && sy > -min) {
32238 sy = sz = 0.00002;
32239 }
32240 if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z).
32241 perspective = 0;
32242 }
32243 }
32244 if (angle || skewX) {
32245 angle *= _DEG2RAD;
32246 cos = a11 = Math.cos(angle);
32247 sin = a21 = Math.sin(angle);
32248 if (skewX) {
32249 angle -= skewX * _DEG2RAD;
32250 cos = Math.cos(angle);
32251 sin = Math.sin(angle);
32252 if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does
32253 t1 = Math.tan((skewX - skewY) * _DEG2RAD);
32254 t1 = Math.sqrt(1 + t1 * t1);
32255 cos *= t1;
32256 sin *= t1;
32257 if (t.skewY) {
32258 t1 = Math.tan(skewY * _DEG2RAD);
32259 t1 = Math.sqrt(1 + t1 * t1);
32260 a11 *= t1;
32261 a21 *= t1;
32262 }
32263 }
32264 }
32265 a12 = -sin;
32266 a22 = cos;
32267
32268 } else if (!rotationY && !rotationX && sz === 1 && !perspective && !isSVG) { //if we're only translating and/or 2D scaling, this is faster...
32269 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");
32270 return;
32271 } else {
32272 a11 = a22 = 1;
32273 a12 = a21 = 0;
32274 }
32275 // KEY INDEX AFFECTS a[row][column]
32276 // a11 0 rotation, rotationY, scaleX
32277 // a21 1 rotation, rotationY, scaleX
32278 // a31 2 rotationY, scaleX
32279 // a41 3 rotationY, scaleX
32280 // a12 4 rotation, skewX, rotationX, scaleY
32281 // a22 5 rotation, skewX, rotationX, scaleY
32282 // a32 6 rotationX, scaleY
32283 // a42 7 rotationX, scaleY
32284 // a13 8 rotationY, rotationX, scaleZ
32285 // a23 9 rotationY, rotationX, scaleZ
32286 // a33 10 rotationY, rotationX, scaleZ
32287 // a43 11 rotationY, rotationX, perspective, scaleZ
32288 // a14 12 x, zOrigin, svgOrigin
32289 // a24 13 y, zOrigin, svgOrigin
32290 // a34 14 z, zOrigin
32291 // a44 15
32292 // rotation: Math.atan2(a21, a11)
32293 // rotationY: Math.atan2(a13, a33) (or Math.atan2(a13, a11))
32294 // rotationX: Math.atan2(a32, a33)
32295 a33 = 1;
32296 a13 = a23 = a31 = a32 = a41 = a42 = 0;
32297 a43 = (perspective) ? -1 / perspective : 0;
32298 zOrigin = t.zOrigin;
32299 min = 0.000001; //threshold below which browsers use scientific notation which won't work.
32300 comma = ",";
32301 zero = "0";
32302 angle = rotationY * _DEG2RAD;
32303 if (angle) {
32304 cos = Math.cos(angle);
32305 sin = Math.sin(angle);
32306 a31 = -sin;
32307 a41 = a43*-sin;
32308 a13 = a11*sin;
32309 a23 = a21*sin;
32310 a33 = cos;
32311 a43 *= cos;
32312 a11 *= cos;
32313 a21 *= cos;
32314 }
32315 angle = rotationX * _DEG2RAD;
32316 if (angle) {
32317 cos = Math.cos(angle);
32318 sin = Math.sin(angle);
32319 t1 = a12*cos+a13*sin;
32320 t2 = a22*cos+a23*sin;
32321 a32 = a33*sin;
32322 a42 = a43*sin;
32323 a13 = a12*-sin+a13*cos;
32324 a23 = a22*-sin+a23*cos;
32325 a33 = a33*cos;
32326 a43 = a43*cos;
32327 a12 = t1;
32328 a22 = t2;
32329 }
32330 if (sz !== 1) {
32331 a13*=sz;
32332 a23*=sz;
32333 a33*=sz;
32334 a43*=sz;
32335 }
32336 if (sy !== 1) {
32337 a12*=sy;
32338 a22*=sy;
32339 a32*=sy;
32340 a42*=sy;
32341 }
32342 if (sx !== 1) {
32343 a11*=sx;
32344 a21*=sx;
32345 a31*=sx;
32346 a41*=sx;
32347 }
32348
32349 if (zOrigin || isSVG) {
32350 if (zOrigin) {
32351 x += a13*-zOrigin;
32352 y += a23*-zOrigin;
32353 z += a33*-zOrigin+zOrigin;
32354 }
32355 if (isSVG) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually
32356 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset;
32357 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset;
32358 }
32359 if (x < min && x > -min) {
32360 x = zero;
32361 }
32362 if (y < min && y > -min) {
32363 y = zero;
32364 }
32365 if (z < min && z > -min) {
32366 z = 0; //don't use string because we calculate perspective later and need the number.
32367 }
32368 }
32369
32370 //optimized way of concatenating all the values into a string. If we do it all in one shot, it's slower because of the way browsers have to create temp strings and the way it affects memory. If we do it piece-by-piece with +=, it's a bit slower too. We found that doing it in these sized chunks works best overall:
32371 transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(");
32372 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
32373 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
32374 if (rotationX || rotationY || sz !== 1) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
32375 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
32376 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
32377 } else {
32378 transform += ",0,0,0,0,1,0,";
32379 }
32380 transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")";
32381
32382 style[_transformProp] = transform;
32383 };
32384
32385 p = Transform.prototype;
32386 p.x = p.y = p.z = p.skewX = p.skewY = p.rotation = p.rotationX = p.rotationY = p.zOrigin = p.xPercent = p.yPercent = p.xOffset = p.yOffset = 0;
32387 p.scaleX = p.scaleY = p.scaleZ = 1;
32388
32389 _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {parser:function(t, e, parsingProp, cssp, pt, plugin, vars) {
32390 if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it.
32391 cssp._lastParsedTransform = vars;
32392 var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0, //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()).
32393 swapFunc;
32394 if (typeof(vars[parsingProp]) === "function") { //whatever property triggers the initial parsing might be a function-based value in which case it already got called in parse(), thus we don't want to call it again in here. The most efficient way to avoid this is to temporarily swap the value directly into the vars object, and then after we do all our parsing in this function, we'll swap it back again.
32395 swapFunc = vars[parsingProp];
32396 vars[parsingProp] = e;
32397 }
32398 if (scaleFunc) {
32399 vars.scale = scaleFunc(_index, t);
32400 }
32401 var originalGSTransform = t._gsTransform,
32402 style = t.style,
32403 min = 0.000001,
32404 i = _transformProps.length,
32405 v = vars,
32406 endRotations = {},
32407 transformOriginString = "transformOrigin",
32408 m1 = _getTransform(t, _cs, true, v.parseTransform),
32409 orig = v.transform && ((typeof(v.transform) === "function") ? v.transform(_index, _target) : v.transform),
32410 m2, copy, has3D, hasChange, dr, x, y, matrix, p;
32411 m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;
32412 cssp._transform = m1;
32413 if ("rotationZ" in v) {
32414 v.rotation = v.rotationZ;
32415 }
32416 if (orig && typeof(orig) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)"
32417 copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly.
32418 copy[_transformProp] = orig;
32419 copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.
32420 copy.position = "absolute";
32421 if (orig.indexOf("%") !== -1) { //%-based translations will fail unless we set the width/height to match the original target...
32422 copy.width = _getStyle(t, "width");
32423 copy.height = _getStyle(t, "height");
32424 }
32425 _doc.body.appendChild(_tempDiv);
32426 m2 = _getTransform(_tempDiv, null, false);
32427 if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple".
32428 m2.scaleY *= Math.cos(m2.skewX * _DEG2RAD);
32429 }
32430 if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here...
32431 x = m1.xOrigin;
32432 y = m1.yOrigin;
32433 m2.x -= m1.xOffset;
32434 m2.y -= m1.yOffset;
32435 if (v.transformOrigin || v.svgOrigin) { //if this tween is altering the origin, we must factor that in here. The actual work of recording the transformOrigin values and setting up the PropTween is done later (still inside this function) so we cannot leave the changes intact here - we only want to update the x/y accordingly.
32436 orig = {};
32437 _parseSVGOrigin(t, _parsePosition(v.transformOrigin), orig, v.svgOrigin, v.smoothOrigin, true);
32438 x = orig.xOrigin;
32439 y = orig.yOrigin;
32440 m2.x -= orig.xOffset - m1.xOffset;
32441 m2.y -= orig.yOffset - m1.yOffset;
32442 }
32443 if (x || y) {
32444 matrix = _getMatrix(_tempDiv, true);
32445 m2.x -= x - (x * matrix[0] + y * matrix[2]);
32446 m2.y -= y - (x * matrix[1] + y * matrix[3]);
32447 }
32448 }
32449 _doc.body.removeChild(_tempDiv);
32450 if (!m2.perspective) {
32451 m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.
32452 }
32453 if (v.xPercent != null) {
32454 m2.xPercent = _parseVal(v.xPercent, m1.xPercent);
32455 }
32456 if (v.yPercent != null) {
32457 m2.yPercent = _parseVal(v.yPercent, m1.yPercent);
32458 }
32459 } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object)
32460 m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX),
32461 scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY),
32462 scaleZ:_parseVal(v.scaleZ, m1.scaleZ),
32463 x:_parseVal(v.x, m1.x),
32464 y:_parseVal(v.y, m1.y),
32465 z:_parseVal(v.z, m1.z),
32466 xPercent:_parseVal(v.xPercent, m1.xPercent),
32467 yPercent:_parseVal(v.yPercent, m1.yPercent),
32468 perspective:_parseVal(v.transformPerspective, m1.perspective)};
32469 dr = v.directionalRotation;
32470 if (dr != null) {
32471 if (typeof(dr) === "object") {
32472 for (copy in dr) {
32473 v[copy] = dr[copy];
32474 }
32475 } else {
32476 v.rotation = dr;
32477 }
32478 }
32479 if (typeof(v.x) === "string" && v.x.indexOf("%") !== -1) {
32480 m2.x = 0;
32481 m2.xPercent = _parseVal(v.x, m1.xPercent);
32482 }
32483 if (typeof(v.y) === "string" && v.y.indexOf("%") !== -1) {
32484 m2.y = 0;
32485 m2.yPercent = _parseVal(v.y, m1.yPercent);
32486 }
32487
32488 m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : m1.rotation, m1.rotation, "rotation", endRotations);
32489 if (_supports3D) {
32490 m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);
32491 m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);
32492 }
32493 m2.skewX = _parseAngle(v.skewX, m1.skewX);
32494 m2.skewY = _parseAngle(v.skewY, m1.skewY);
32495 }
32496 if (_supports3D && v.force3D != null) {
32497 m1.force3D = v.force3D;
32498 hasChange = true;
32499 }
32500
32501 has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective);
32502 if (!has3D && v.scale != null) {
32503 m2.scaleZ = 1; //no need to tween scaleZ.
32504 }
32505
32506 while (--i > -1) {
32507 p = _transformProps[i];
32508 orig = m2[p] - m1[p];
32509 if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) {
32510 hasChange = true;
32511 pt = new CSSPropTween(m1, p, m1[p], orig, pt);
32512 if (p in endRotations) {
32513 pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested
32514 }
32515 pt.xs0 = 0; //ensures the value stays numeric in setRatio()
32516 pt.plugin = plugin;
32517 cssp._overwriteProps.push(pt.n);
32518 }
32519 }
32520
32521 orig = v.transformOrigin;
32522 if (m1.svg && (orig || v.svgOrigin)) {
32523 x = m1.xOffset; //when we change the origin, in order to prevent things from jumping we adjust the x/y so we must record those here so that we can create PropTweens for them and flip them at the same time as the origin
32524 y = m1.yOffset;
32525 _parseSVGOrigin(t, _parsePosition(orig), m2, v.svgOrigin, v.smoothOrigin);
32526 pt = _addNonTweeningNumericPT(m1, "xOrigin", (originalGSTransform ? m1 : m2).xOrigin, m2.xOrigin, pt, transformOriginString); //note: if there wasn't a transformOrigin defined yet, just start with the destination one; it's wasteful otherwise, and it causes problems with fromTo() tweens. For example, TweenLite.to("#wheel", 3, {rotation:180, transformOrigin:"50% 50%", delay:1}); TweenLite.fromTo("#wheel", 3, {scale:0.5, transformOrigin:"50% 50%"}, {scale:1, delay:2}); would cause a jump when the from values revert at the beginning of the 2nd tween.
32527 pt = _addNonTweeningNumericPT(m1, "yOrigin", (originalGSTransform ? m1 : m2).yOrigin, m2.yOrigin, pt, transformOriginString);
32528 if (x !== m1.xOffset || y !== m1.yOffset) {
32529 pt = _addNonTweeningNumericPT(m1, "xOffset", (originalGSTransform ? x : m1.xOffset), m1.xOffset, pt, transformOriginString);
32530 pt = _addNonTweeningNumericPT(m1, "yOffset", (originalGSTransform ? y : m1.yOffset), m1.yOffset, pt, transformOriginString);
32531 }
32532 orig = "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin
32533 }
32534 if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
32535 if (_transformProp) {
32536 hasChange = true;
32537 p = _transformOriginProp;
32538 orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors
32539 pt = new CSSPropTween(style, p, 0, 0, pt, -1, transformOriginString);
32540 pt.b = style[p];
32541 pt.plugin = plugin;
32542 if (_supports3D) {
32543 copy = m1.zOrigin;
32544 orig = orig.split(" ");
32545 m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.
32546 pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)!
32547 pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here)
32548 pt.b = copy;
32549 pt.xs0 = pt.e = m1.zOrigin;
32550 } else {
32551 pt.xs0 = pt.e = orig;
32552 }
32553
32554 //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp).
32555 } else {
32556 _parsePosition(orig + "", m1);
32557 }
32558 }
32559 if (hasChange) {
32560 cssp._transformType = (!(m1.svg && _useSVGTransformAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms();
32561 }
32562 if (swapFunc) {
32563 vars[parsingProp] = swapFunc;
32564 }
32565 if (scaleFunc) {
32566 vars.scale = scaleFunc;
32567 }
32568 return pt;
32569 }, prefix:true});
32570
32571 _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});
32572
32573 _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
32574 e = this.format(e);
32575 var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],
32576 style = t.style,
32577 ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em;
32578 w = parseFloat(t.offsetWidth);
32579 h = parseFloat(t.offsetHeight);
32580 ea1 = e.split(" ");
32581 for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis!
32582 if (this.p.indexOf("border")) { //older browsers used a prefix
32583 props[i] = _checkPropPrefix(props[i]);
32584 }
32585 bs = bs2 = _getStyle(t, props[i], _cs, false, "0px");
32586 if (bs.indexOf(" ") !== -1) {
32587 bs2 = bs.split(" ");
32588 bs = bs2[0];
32589 bs2 = bs2[1];
32590 }
32591 es = es2 = ea1[i];
32592 bn = parseFloat(bs);
32593 bsfx = bs.substr((bn + "").length);
32594 rel = (es.charAt(1) === "=");
32595 if (rel) {
32596 en = parseInt(es.charAt(0)+"1", 10);
32597 es = es.substr(2);
32598 en *= parseFloat(es);
32599 esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || "";
32600 } else {
32601 en = parseFloat(es);
32602 esfx = es.substr((en + "").length);
32603 }
32604 if (esfx === "") {
32605 esfx = _suffixMap[p] || bsfx;
32606 }
32607 if (esfx !== bsfx) {
32608 hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent.
32609 vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number
32610 if (esfx === "%") {
32611 bs = (hn / w * 100) + "%";
32612 bs2 = (vn / h * 100) + "%";
32613 } else if (esfx === "em") {
32614 em = _convertToPixels(t, "borderLeft", 1, "em");
32615 bs = (hn / em) + "em";
32616 bs2 = (vn / em) + "em";
32617 } else {
32618 bs = hn + "px";
32619 bs2 = vn + "px";
32620 }
32621 if (rel) {
32622 es = (parseFloat(bs) + en) + esfx;
32623 es2 = (parseFloat(bs2) + en) + esfx;
32624 }
32625 }
32626 pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt);
32627 }
32628 return pt;
32629 }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)});
32630 _registerComplexSpecialProp("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
32631 return _parseComplex(t.style, p, this.format(_getStyle(t, p, _cs, false, "0px 0px")), this.format(e), false, "0px", pt);
32632 }, prefix:true, formatter:_getFormatter("0px 0px", false, true)});
32633 _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) {
32634 var bp = "background-position",
32635 cs = (_cs || _getComputedStyle(t, null)),
32636 bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase
32637 es = this.format(e),
32638 ba, ea, i, pct, overlap, src;
32639 if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1) && es.split(",").length < 2) {
32640 src = _getStyle(t, "backgroundImage").replace(_urlExp, "");
32641 if (src && src !== "none") {
32642 ba = bs.split(" ");
32643 ea = es.split(" ");
32644 _tempImg.setAttribute("src", src); //set the temp IMG's src to the background-image so that we can measure its width/height
32645 i = 2;
32646 while (--i > -1) {
32647 bs = ba[i];
32648 pct = (bs.indexOf("%") !== -1);
32649 if (pct !== (ea[i].indexOf("%") !== -1)) {
32650 overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height;
32651 ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%";
32652 }
32653 }
32654 bs = ba.join(" ");
32655 }
32656 }
32657 return this.parseComplex(t.style, bs, es, pt, plugin);
32658 }, formatter:_parsePosition});
32659 _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:function(v) {
32660 v += ""; //ensure it's a string
32661 return (v.substr(0,2) === "co") ? v : _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong). Also remember that it could be "cover" or "contain" which we can't tween but should be able to set.
32662 }});
32663 _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});
32664 _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});
32665 _registerComplexSpecialProp("transformStyle", {prefix:true});
32666 _registerComplexSpecialProp("backfaceVisibility", {prefix:true});
32667 _registerComplexSpecialProp("userSelect", {prefix:true});
32668 _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")});
32669 _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")});
32670 _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){
32671 var b, cs, delim;
32672 if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited.
32673 cs = t.currentStyle;
32674 delim = _ieVers < 8 ? " " : ",";
32675 b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")";
32676 e = this.format(e).split(",").join(delim);
32677 } else {
32678 b = this.format(_getStyle(t, this.p, _cs, false, this.dflt));
32679 e = this.format(e);
32680 }
32681 return this.parseComplex(t.style, b, e, pt, plugin);
32682 }});
32683 _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true});
32684 _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them)
32685 _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) {
32686 var bw = _getStyle(t, "borderTopWidth", _cs, false, "0px"),
32687 end = this.format(e).split(" "),
32688 esfx = end[0].replace(_suffixExp, "");
32689 if (esfx !== "px") { //if we're animating to a non-px value, we need to convert the beginning width to that unit.
32690 bw = (parseFloat(bw) / _convertToPixels(t, "borderTopWidth", 1, esfx)) + esfx;
32691 }
32692 return this.parseComplex(t.style, this.format(bw + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), end.join(" "), pt, plugin);
32693 }, color:true, formatter:function(v) {
32694 var a = v.split(" ");
32695 return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0];
32696 }});
32697 _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline).
32698 _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) {
32699 var s = t.style,
32700 prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat";
32701 return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e);
32702 }});
32703
32704 //opacity-related
32705 var _setIEOpacityRatio = function(v) {
32706 var t = this.t, //refers to the element's style property
32707 filters = t.filter || _getStyle(this.data, "filter") || "",
32708 val = (this.s + this.c * v) | 0,
32709 skip;
32710 if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.
32711 if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) {
32712 t.removeAttribute("filter");
32713 skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check.
32714 } else {
32715 t.filter = filters.replace(_alphaFilterExp, "");
32716 skip = true;
32717 }
32718 }
32719 if (!skip) {
32720 if (this.xn1) {
32721 t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame.
32722 }
32723 if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues
32724 if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween)
32725 t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly.
32726 }
32727 } else {
32728 t.filter = filters.replace(_opacityExp, "opacity=" + val);
32729 }
32730 }
32731 };
32732 _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) {
32733 var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")),
32734 style = t.style,
32735 isAutoAlpha = (p === "autoAlpha");
32736 if (typeof(e) === "string" && e.charAt(1) === "=") {
32737 e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b;
32738 }
32739 if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience)
32740 b = 0;
32741 }
32742 if (_supportsOpacity) {
32743 pt = new CSSPropTween(style, "opacity", b, e - b, pt);
32744 } else {
32745 pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt);
32746 pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug.
32747 style.zoom = 1; //helps correct an IE issue.
32748 pt.type = 2;
32749 pt.b = "alpha(opacity=" + pt.s + ")";
32750 pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")";
32751 pt.data = t;
32752 pt.plugin = plugin;
32753 pt.setRatio = _setIEOpacityRatio;
32754 }
32755 if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier
32756 pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));
32757 pt.xs0 = "inherit";
32758 cssp._overwriteProps.push(pt.n);
32759 cssp._overwriteProps.push(p);
32760 }
32761 return pt;
32762 }});
32763
32764
32765 var _removeProp = function(s, p) {
32766 if (p) {
32767 if (s.removeProperty) {
32768 if (p.substr(0,2) === "ms" || p.substr(0,6) === "webkit") { //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)
32769 p = "-" + p;
32770 }
32771 s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase());
32772 } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"
32773 s.removeAttribute(p);
32774 }
32775 }
32776 },
32777 _setClassNameRatio = function(v) {
32778 this.t._gsClassPT = this;
32779 if (v === 1 || v === 0) {
32780 this.t.setAttribute("class", (v === 0) ? this.b : this.e);
32781 var mpt = this.data, //first MiniPropTween
32782 s = this.t.style;
32783 while (mpt) {
32784 if (!mpt.v) {
32785 _removeProp(s, mpt.p);
32786 } else {
32787 s[mpt.p] = mpt.v;
32788 }
32789 mpt = mpt._next;
32790 }
32791 if (v === 1 && this.t._gsClassPT === this) {
32792 this.t._gsClassPT = null;
32793 }
32794 } else if (this.t.getAttribute("class") !== this.e) {
32795 this.t.setAttribute("class", this.e);
32796 }
32797 };
32798 _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) {
32799 var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable.
32800 cssText = t.style.cssText,
32801 difData, bs, cnpt, cnptLookup, mpt;
32802 pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2);
32803 pt.setRatio = _setClassNameRatio;
32804 pt.pr = -11;
32805 _hasPriority = true;
32806 pt.b = b;
32807 bs = _getAllStyles(t, _cs);
32808 //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfering that were there just for class-specific values)
32809 cnpt = t._gsClassPT;
32810 if (cnpt) {
32811 cnptLookup = {};
32812 mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned.
32813 while (mpt) {
32814 cnptLookup[mpt.p] = 1;
32815 mpt = mpt._next;
32816 }
32817 cnpt.setRatio(1);
32818 }
32819 t._gsClassPT = pt;
32820 pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("(?:\\s|^)" + e.substr(2) + "(?![\\w-])"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");
32821 t.setAttribute("class", pt.e);
32822 difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
32823 t.setAttribute("class", b);
32824 pt.data = difData.firstMPT;
32825 t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
32826 pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
32827 return pt;
32828 }});
32829
32830
32831 var _setClearPropsRatio = function(v) {
32832 if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in).
32833 var s = this.t.style,
32834 transformParse = _specialProps.transform.parse,
32835 a, p, i, clearTransform, transform;
32836 if (this.e === "all") {
32837 s.cssText = "";
32838 clearTransform = true;
32839 } else {
32840 a = this.e.split(" ").join("").split(",");
32841 i = a.length;
32842 while (--i > -1) {
32843 p = a[i];
32844 if (_specialProps[p]) {
32845 if (_specialProps[p].parse === transformParse) {
32846 clearTransform = true;
32847 } else {
32848 p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow"
32849 }
32850 }
32851 _removeProp(s, p);
32852 }
32853 }
32854 if (clearTransform) {
32855 _removeProp(s, _transformProp);
32856 transform = this.t._gsTransform;
32857 if (transform) {
32858 if (transform.svg) {
32859 this.t.removeAttribute("data-svg-origin");
32860 this.t.removeAttribute("transform");
32861 }
32862 delete this.t._gsTransform;
32863 }
32864 }
32865
32866 }
32867 };
32868 _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) {
32869 pt = new CSSPropTween(t, p, 0, 0, pt, 2);
32870 pt.setRatio = _setClearPropsRatio;
32871 pt.e = e;
32872 pt.pr = -10;
32873 pt.data = cssp._tween;
32874 _hasPriority = true;
32875 return pt;
32876 }});
32877
32878 p = "bezier,throwProps,physicsProps,physics2D".split(",");
32879 i = p.length;
32880 while (i--) {
32881 _registerPluginProp(p[i]);
32882 }
32883
32884
32885
32886
32887
32888
32889
32890
32891 p = CSSPlugin.prototype;
32892 p._firstPT = p._lastParsedTransform = p._transform = null;
32893
32894 //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.
32895 p._onInitTween = function(target, vars, tween, index) {
32896 if (!target.nodeType) { //css is only for dom elements
32897 return false;
32898 }
32899 this._target = _target = target;
32900 this._tween = tween;
32901 this._vars = vars;
32902 _index = index;
32903 _autoRound = vars.autoRound;
32904 _hasPriority = false;
32905 _suffixMap = vars.suffixMap || CSSPlugin.suffixMap;
32906 _cs = _getComputedStyle(target, "");
32907 _overwriteProps = this._overwriteProps;
32908 var style = target.style,
32909 v, pt, pt2, first, last, next, zIndex, tpt, threeD;
32910 if (_reqSafariFix) if (style.zIndex === "") {
32911 v = _getStyle(target, "zIndex", _cs);
32912 if (v === "auto" || v === "") {
32913 //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive.
32914 this._addLazySet(style, "zIndex", 0);
32915 }
32916 }
32917
32918 if (typeof(vars) === "string") {
32919 first = style.cssText;
32920 v = _getAllStyles(target, _cs);
32921 style.cssText = first + ";" + vars;
32922 v = _cssDif(target, v, _getAllStyles(target)).difs;
32923 if (!_supportsOpacity && _opacityValExp.test(vars)) {
32924 v.opacity = parseFloat( RegExp.$1 );
32925 }
32926 vars = v;
32927 style.cssText = first;
32928 }
32929
32930 if (vars.className) { //className tweens will combine any differences they find in the css with the vars that are passed in, so {className:"myClass", scale:0.5, left:20} would work.
32931 this._firstPT = pt = _specialProps.className.parse(target, vars.className, "className", this, null, null, vars);
32932 } else {
32933 this._firstPT = pt = this.parse(target, vars, null);
32934 }
32935
32936 if (this._transformType) {
32937 threeD = (this._transformType === 3);
32938 if (!_transformProp) {
32939 style.zoom = 1; //helps correct an IE issue.
32940 } else if (_isSafari) {
32941 _reqSafariFix = true;
32942 //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random).
32943 if (style.zIndex === "") {
32944 zIndex = _getStyle(target, "zIndex", _cs);
32945 if (zIndex === "auto" || zIndex === "") {
32946 this._addLazySet(style, "zIndex", 0);
32947 }
32948 }
32949 //Setting WebkitBackfaceVisibility corrects 3 bugs:
32950 // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update.
32951 // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly.
32952 // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug.
32953 //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween.
32954 if (_isSafariLT6) {
32955 this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden"));
32956 }
32957 }
32958 pt2 = pt;
32959 while (pt2 && pt2._next) {
32960 pt2 = pt2._next;
32961 }
32962 tpt = new CSSPropTween(target, "transform", 0, 0, null, 2);
32963 this._linkCSSP(tpt, null, pt2);
32964 tpt.setRatio = _transformProp ? _setTransformRatio : _setIETransformRatio;
32965 tpt.data = this._transform || _getTransform(target, _cs, true);
32966 tpt.tween = tween;
32967 tpt.pr = -1; //ensures that the transforms get applied after the components are updated.
32968 _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here.
32969 }
32970
32971 if (_hasPriority) {
32972 //reorders the linked list in order of pr (priority)
32973 while (pt) {
32974 next = pt._next;
32975 pt2 = first;
32976 while (pt2 && pt2.pr > pt.pr) {
32977 pt2 = pt2._next;
32978 }
32979 if ((pt._prev = pt2 ? pt2._prev : last)) {
32980 pt._prev._next = pt;
32981 } else {
32982 first = pt;
32983 }
32984 if ((pt._next = pt2)) {
32985 pt2._prev = pt;
32986 } else {
32987 last = pt;
32988 }
32989 pt = next;
32990 }
32991 this._firstPT = first;
32992 }
32993 return true;
32994 };
32995
32996
32997 p.parse = function(target, vars, pt, plugin) {
32998 var style = target.style,
32999 p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel;
33000 for (p in vars) {
33001 es = vars[p]; //ending value string
33002 if (typeof(es) === "function") {
33003 es = es(_index, _target);
33004 }
33005 sp = _specialProps[p]; //SpecialProp lookup.
33006 if (sp) {
33007 pt = sp.parse(target, es, p, this, pt, plugin, vars);
33008 } else if (p.substr(0,2) === "--") { //for tweening CSS variables (which always start with "--"). To maximize performance and simplicity, we bypass CSSPlugin altogether and just add a normal property tween to the tween instance itself.
33009 this._tween._propLookup[p] = this._addTween.call(this._tween, target.style, "setProperty", _getComputedStyle(target).getPropertyValue(p) + "", es + "", p, false, p);
33010 continue;
33011 } else {
33012 bs = _getStyle(target, p, _cs) + "";
33013 isStr = (typeof(es) === "string");
33014 if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor:
33015 if (!isStr) {
33016 es = _parseColor(es);
33017 es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")";
33018 }
33019 pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);
33020
33021 } else if (isStr && _complexExp.test(es)) {
33022 pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);
33023
33024 } else {
33025 bn = parseFloat(bs);
33026 bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case.
33027
33028 if (bs === "" || bs === "auto") {
33029 if (p === "width" || p === "height") {
33030 bn = _getDimension(target, p, _cs);
33031 bsfx = "px";
33032 } else if (p === "left" || p === "top") {
33033 bn = _calculateOffset(target, p, _cs);
33034 bsfx = "px";
33035 } else {
33036 bn = (p !== "opacity") ? 0 : 1;
33037 bsfx = "";
33038 }
33039 }
33040
33041 rel = (isStr && es.charAt(1) === "=");
33042 if (rel) {
33043 en = parseInt(es.charAt(0) + "1", 10);
33044 es = es.substr(2);
33045 en *= parseFloat(es);
33046 esfx = es.replace(_suffixExp, "");
33047 } else {
33048 en = parseFloat(es);
33049 esfx = isStr ? es.replace(_suffixExp, "") : "";
33050 }
33051
33052 if (esfx === "") {
33053 esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix.
33054 }
33055
33056 es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix.
33057 //if the beginning/ending suffixes don't match, normalize them...
33058 if (bsfx !== esfx) if (esfx !== "" || p === "lineHeight") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!
33059 bn = _convertToPixels(target, p, bn, bsfx);
33060 if (esfx === "%") {
33061 bn /= _convertToPixels(target, p, 100, "%") / 100;
33062 if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens.
33063 bs = bn + "%";
33064 }
33065
33066 } else if (esfx === "em" || esfx === "rem" || esfx === "vw" || esfx === "vh") {
33067 bn /= _convertToPixels(target, p, 1, esfx);
33068
33069 //otherwise convert to pixels.
33070 } else if (esfx !== "px") {
33071 en = _convertToPixels(target, p, en, esfx);
33072 esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too.
33073 }
33074 if (rel) if (en || en === 0) {
33075 es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here.
33076 }
33077 }
33078
33079 if (rel) {
33080 en += bn;
33081 }
33082
33083 if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly.
33084 pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es);
33085 pt.xs0 = esfx;
33086 //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0);
33087 } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) {
33088 _log("invalid " + p + " tween value: " + vars[p]);
33089 } else {
33090 pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es);
33091 pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween.
33092 //DEBUG: _log("non-tweening value "+p+": "+pt.xs0);
33093 }
33094 }
33095 }
33096 if (plugin) if (pt && !pt.plugin) {
33097 pt.plugin = plugin;
33098 }
33099 }
33100 return pt;
33101 };
33102
33103
33104 //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.
33105 p.setRatio = function(v) {
33106 var pt = this._firstPT,
33107 min = 0.000001,
33108 val, str, i;
33109 //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).
33110 if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {
33111 while (pt) {
33112 if (pt.type !== 2) {
33113 if (pt.r && pt.type !== -1) {
33114 val = pt.r(pt.s + pt.c);
33115 if (!pt.type) {
33116 pt.t[pt.p] = val + pt.xs0;
33117 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"
33118 i = pt.l;
33119 str = pt.xs0 + val + pt.xs1;
33120 for (i = 1; i < pt.l; i++) {
33121 str += pt["xn"+i] + pt["xs"+(i+1)];
33122 }
33123 pt.t[pt.p] = str;
33124 }
33125 } else {
33126 pt.t[pt.p] = pt.e;
33127 }
33128 } else {
33129 pt.setRatio(v);
33130 }
33131 pt = pt._next;
33132 }
33133
33134 } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) {
33135 while (pt) {
33136 val = pt.c * v + pt.s;
33137 if (pt.r) {
33138 val = pt.r(val);
33139 } else if (val < min) if (val > -min) {
33140 val = 0;
33141 }
33142 if (!pt.type) {
33143 pt.t[pt.p] = val + pt.xs0;
33144 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"
33145 i = pt.l;
33146 if (i === 2) {
33147 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2;
33148 } else if (i === 3) {
33149 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3;
33150 } else if (i === 4) {
33151 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4;
33152 } else if (i === 5) {
33153 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5;
33154 } else {
33155 str = pt.xs0 + val + pt.xs1;
33156 for (i = 1; i < pt.l; i++) {
33157 str += pt["xn"+i] + pt["xs"+(i+1)];
33158 }
33159 pt.t[pt.p] = str;
33160 }
33161
33162 } else if (pt.type === -1) { //non-tweening value
33163 pt.t[pt.p] = pt.xs0;
33164
33165 } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc.
33166 pt.setRatio(v);
33167 }
33168 pt = pt._next;
33169 }
33170
33171 //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever).
33172 } else {
33173 while (pt) {
33174 if (pt.type !== 2) {
33175 pt.t[pt.p] = pt.b;
33176 } else {
33177 pt.setRatio(v);
33178 }
33179 pt = pt._next;
33180 }
33181 }
33182 };
33183
33184 /**
33185 * @private
33186 * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called.
33187 * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked
33188 * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call
33189 * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin
33190 * doesn't have any transform-related properties of its own. You can call this method as many times as you
33191 * want and it won't create duplicate CSSPropTweens.
33192 *
33193 * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)
33194 */
33195 p._enableTransforms = function(threeD) {
33196 this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.
33197 this._transformType = (!(this._transform.svg && _useSVGTransformAttr) && (threeD || this._transformType === 3)) ? 3 : 2;
33198 };
33199
33200 var lazySet = function(v) {
33201 this.t[this.p] = this.e;
33202 this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop.
33203 };
33204 /** @private Gives us a way to set a value on the first render (and only the first render). **/
33205 p._addLazySet = function(t, p, v) {
33206 var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2);
33207 pt.e = v;
33208 pt.setRatio = lazySet;
33209 pt.data = this;
33210 };
33211
33212 /** @private **/
33213 p._linkCSSP = function(pt, next, prev, remove) {
33214 if (pt) {
33215 if (next) {
33216 next._prev = pt;
33217 }
33218 if (pt._next) {
33219 pt._next._prev = pt._prev;
33220 }
33221 if (pt._prev) {
33222 pt._prev._next = pt._next;
33223 } else if (this._firstPT === pt) {
33224 this._firstPT = pt._next;
33225 remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)
33226 }
33227 if (prev) {
33228 prev._next = pt;
33229 } else if (!remove && this._firstPT === null) {
33230 this._firstPT = pt;
33231 }
33232 pt._next = next;
33233 pt._prev = prev;
33234 }
33235 return pt;
33236 };
33237
33238 p._mod = function(lookup) {
33239 var pt = this._firstPT;
33240 while (pt) {
33241 if (typeof(lookup[pt.p]) === "function") { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally.
33242 pt.r = lookup[pt.p];
33243 }
33244 pt = pt._next;
33245 }
33246 };
33247
33248 //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property.
33249 p._kill = function(lookup) {
33250 var copy = lookup,
33251 pt, p, xfirst;
33252 if (lookup.autoAlpha || lookup.alpha) {
33253 copy = {};
33254 for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere.
33255 copy[p] = lookup[p];
33256 }
33257 copy.opacity = 1;
33258 if (copy.autoAlpha) {
33259 copy.visibility = 1;
33260 }
33261 }
33262 if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst".
33263 xfirst = pt.xfirst;
33264 if (xfirst && xfirst._prev) {
33265 this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev
33266 } else if (xfirst === this._firstPT) {
33267 this._firstPT = pt._next;
33268 }
33269 if (pt._next) {
33270 this._linkCSSP(pt._next, pt._next._next, xfirst._prev);
33271 }
33272 this._classNamePT = null;
33273 }
33274 pt = this._firstPT;
33275 while (pt) {
33276 if (pt.plugin && pt.plugin !== p && pt.plugin._kill) { //for plugins that are registered with CSSPlugin, we should notify them of the kill.
33277 pt.plugin._kill(lookup);
33278 p = pt.plugin;
33279 }
33280 pt = pt._next;
33281 }
33282 return TweenLite["b" /* TweenPlugin */].prototype._kill.call(this, copy);
33283 };
33284
33285
33286
33287 //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison.
33288 var _getChildStyles = function(e, props, targets) {
33289 var children, i, child, type;
33290 if (e.slice) {
33291 i = e.length;
33292 while (--i > -1) {
33293 _getChildStyles(e[i], props, targets);
33294 }
33295 return;
33296 }
33297 children = e.childNodes;
33298 i = children.length;
33299 while (--i > -1) {
33300 child = children[i];
33301 type = child.type;
33302 if (child.style) {
33303 props.push(_getAllStyles(child));
33304 if (targets) {
33305 targets.push(child);
33306 }
33307 }
33308 if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) {
33309 _getChildStyles(child, props, targets);
33310 }
33311 }
33312 };
33313
33314 /**
33315 * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite
33316 * and then compares the style properties of all the target's child elements at the tween's start and end, and
33317 * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting
33318 * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is
33319 * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens
33320 * is because it creates entirely new tweens that may have completely different targets than the original tween,
33321 * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API
33322 * and it would create other problems. For example:
33323 * - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted)
33324 * - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others.
33325 * - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed.
33326 *
33327 * @param {Object} target object to be tweened
33328 * @param {number} Duration in seconds (or frames for frames-based tweens)
33329 * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone}
33330 * @return {Array} An array of TweenLite instances
33331 */
33332 CSSPlugin.cascadeTo = function(target, duration, vars) {
33333 var tween = TweenLite["d" /* default */].to(target, duration, vars),
33334 results = [tween],
33335 b = [],
33336 e = [],
33337 targets = [],
33338 _reservedProps = TweenLite["d" /* default */]._internals.reservedProps,
33339 i, difs, p, from;
33340 target = tween._targets || tween.target;
33341 _getChildStyles(target, b, targets);
33342 tween.render(duration, true, true);
33343 _getChildStyles(target, e);
33344 tween.render(0, true, true);
33345 tween._enabled(true);
33346 i = targets.length;
33347 while (--i > -1) {
33348 difs = _cssDif(targets[i], b[i], e[i]);
33349 if (difs.firstMPT) {
33350 difs = difs.difs;
33351 for (p in vars) {
33352 if (_reservedProps[p]) {
33353 difs[p] = vars[p];
33354 }
33355 }
33356 from = {};
33357 for (p in difs) {
33358 from[p] = b[i][p];
33359 }
33360 results.push(TweenLite["d" /* default */].fromTo(targets[i], duration, from, difs));
33361 }
33362 }
33363 return results;
33364 };
33365
33366 TweenLite["b" /* TweenPlugin */].activate([CSSPlugin]);
33367 return CSSPlugin;
33368
33369 }, true);
33370
33371var CSSPlugin_CSSPlugin = TweenLite["e" /* globals */].CSSPlugin;
33372
33373// CONCATENATED MODULE: ./node_modules/gsap/Draggable.js
33374/*!
33375 * VERSION: 0.16.5
33376 * DATE: 2018-08-27
33377 * UPDATES AND DOCS AT: http://greensock.com
33378 *
33379 * Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
33380 *
33381 * @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
33382 * This work is subject to the terms at http://greensock.com/standard-license or for
33383 * Club GreenSock members, the software agreement that was issued with your membership.
33384 *
33385 * @author: Jack Doyle, jack@greensock.com
33386 */
33387
33388
33389
33390
33391 TweenLite["c" /* _gsScope */]._gsDefine("utils.Draggable", ["events.EventDispatcher","TweenLite","plugins.CSSPlugin"], function() {
33392
33393 var _tempVarsXY = {css:{}, data:"_draggable"}, //speed optimization - we reuse the same vars object for x/y TweenLite.set() calls to minimize garbage collection tasks and improve performance.
33394 _tempVarsX = {css:{}, data:"_draggable"},
33395 _tempVarsY = {css:{}, data:"_draggable"},
33396 _tempVarsRotation = {css:{}},
33397 _globals = TweenLite["c" /* _gsScope */]._gsDefine.globals,
33398 _tempEvent = {}, //for populating with pageX/pageY in old versions of IE
33399 _emptyFunc = function() { return false; },
33400 _dummyElement = {style:{}, appendChild:_emptyFunc, removeChild:_emptyFunc},
33401 _doc = TweenLite["c" /* _gsScope */].document || {createElement: function() {return _dummyElement;}},
33402 _docElement = _doc.documentElement || {},
33403 _createElement = function(type) {
33404 return _doc.createElementNS ? _doc.createElementNS("http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
33405 },
33406 _tempDiv = _createElement("div"),
33407 _emptyArray = [],
33408 _RAD2DEG = 180 / Math.PI,
33409 _max = 999999999999999,
33410 _getTime = Date.now || function() {return new Date().getTime();},
33411 _isOldIE = !!(!_doc.addEventListener && _doc.all),
33412 _placeholderDiv = _doc.createElement("div"),
33413 _renderQueue = [],
33414 _lookup = {}, //when a Draggable is created, the target gets a unique _gsDragID property that allows gets associated with the Draggable instance for quick lookups in Draggable.get(). This avoids circular references that could cause gc problems.
33415 _lookupCount = 0,
33416 _clickableTagExp = /^(?:a|input|textarea|button|select)$/i,
33417 _dragCount = 0, //total number of elements currently being dragged
33418 _prefix,
33419 _isMultiTouching,
33420 _isAndroid = (TweenLite["c" /* _gsScope */].navigator && TweenLite["c" /* _gsScope */].navigator.userAgent.toLowerCase().indexOf("android") !== -1), //Android handles touch events in an odd way and it's virtually impossible to "feature test" so we resort to UA sniffing
33421 _lastDragTime = 0,
33422 _temp1 = {}, // a simple object we reuse and populate (usually x/y properties) to conserve memory and improve performance.
33423 _windowProxy = {}, //memory/performance optimization - we reuse this object during autoScroll to store window-related bounds/offsets.
33424 _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
33425 if (typeof(a) === "string") {
33426 a = TweenLite["d" /* default */].selector(a);
33427 }
33428 if (!a || a.nodeType) { //if it's not an array, wrap it in one.
33429 return [a];
33430 }
33431 var b = [],
33432 l = a.length,
33433 i;
33434 for (i = 0; i !== l; b.push(a[i++]));
33435 return b;
33436 },
33437 _copy = function(obj, factor) {
33438 var copy = {}, p;
33439 if (factor) {
33440 for (p in obj) {
33441 copy[p] = obj[p] * factor;
33442 }
33443 } else {
33444 for (p in obj) {
33445 copy[p] = obj[p];
33446 }
33447 }
33448 return copy;
33449 },
33450 ThrowPropsPlugin,
33451
33452 _renderQueueTick = function() {
33453 var i = _renderQueue.length;
33454 while (--i > -1) {
33455 _renderQueue[i]();
33456 }
33457 },
33458 _addToRenderQueue = function(func) {
33459 _renderQueue.push(func);
33460 if (_renderQueue.length === 1) {
33461 TweenLite["d" /* default */].ticker.addEventListener("tick", _renderQueueTick, this, false, 1);
33462 }
33463 },
33464 _removeFromRenderQueue = function(func) {
33465 var i = _renderQueue.length;
33466 while (--i > -1) {
33467 if (_renderQueue[i] === func) {
33468 _renderQueue.splice(i, 1);
33469 }
33470 }
33471 TweenLite["d" /* default */].to(_renderQueueTimeout, 0, {overwrite:"all", delay:15, onComplete:_renderQueueTimeout, data:"_draggable"}); //remove the "tick" listener only after the render queue is empty for 15 seconds (to improve performance). Adding/removing it constantly for every click/touch wouldn't deliver optimal speed, and we also don't want the ticker to keep calling the render method when things are idle for long periods of time (we want to improve battery life on mobile devices).
33472 },
33473 _renderQueueTimeout = function() {
33474 if (!_renderQueue.length) {
33475 TweenLite["d" /* default */].ticker.removeEventListener("tick", _renderQueueTick);
33476 }
33477 },
33478
33479 _extend = function(obj, defaults) {
33480 var p;
33481 for (p in defaults) {
33482 if (obj[p] === undefined) {
33483 obj[p] = defaults[p];
33484 }
33485 }
33486 return obj;
33487 },
33488 _getDocScrollTop = function() {
33489 return (window.pageYOffset != null) ? window.pageYOffset : (_doc.scrollTop != null) ? _doc.scrollTop : _docElement.scrollTop || _doc.body.scrollTop || 0;
33490 },
33491 _getDocScrollLeft = function() {
33492 return (window.pageXOffset != null) ? window.pageXOffset : (_doc.scrollLeft != null) ? _doc.scrollLeft : _docElement.scrollLeft || _doc.body.scrollLeft || 0;
33493 },
33494 _addScrollListener = function(e, callback) {
33495 _addListener(e, "scroll", callback);
33496 if (!_isRoot(e.parentNode)) {
33497 _addScrollListener(e.parentNode, callback);
33498 }
33499 },
33500 _removeScrollListener = function(e, callback) {
33501 _removeListener(e, "scroll", callback);
33502 if (!_isRoot(e.parentNode)) {
33503 _removeScrollListener(e.parentNode, callback);
33504 }
33505 },
33506 _isRoot = function (e) {
33507 return !!(!e || e === _docElement || e === _doc || e === _doc.body || e === window || !e.nodeType || !e.parentNode);
33508 },
33509 _getMaxScroll = function(element, axis) {
33510 var dim = (axis === "x") ? "Width" : "Height",
33511 scroll = "scroll" + dim,
33512 client = "client" + dim,
33513 body = _doc.body;
33514 return Math.max(0, _isRoot(element) ? Math.max(_docElement[scroll], body[scroll]) - (window["inner" + dim] || _docElement[client] || body[client]) : element[scroll] - element[client]);
33515 },
33516 _recordMaxScrolls = function(e) { //records _gsMaxScrollX and _gsMaxScrollY properties for the element and all ancestors up the chain so that we can cap it, otherwise dragging beyond the edges with autoScroll on can endlessly scroll.
33517 var isRoot = _isRoot(e),
33518 x = _getMaxScroll(e, "x"),
33519 y = _getMaxScroll(e, "y");
33520 if (isRoot) {
33521 e = _windowProxy;
33522 } else {
33523 _recordMaxScrolls(e.parentNode);
33524 }
33525 e._gsMaxScrollX = x;
33526 e._gsMaxScrollY = y;
33527 e._gsScrollX = e.scrollLeft || 0;
33528 e._gsScrollY = e.scrollTop || 0;
33529 },
33530
33531 //just used for IE8 and earlier to normalize events and populate pageX/pageY
33532 _populateIEEvent = function(e, preventDefault) {
33533 e = e || window.event;
33534 _tempEvent.pageX = e.clientX + _doc.body.scrollLeft + _docElement.scrollLeft;
33535 _tempEvent.pageY = e.clientY + _doc.body.scrollTop + _docElement.scrollTop;
33536 if (preventDefault) {
33537 e.returnValue = false;
33538 }
33539 return _tempEvent;
33540 },
33541
33542 //grabs the first element it finds (and we include the window as an element), so if it's selector text, it'll feed that value to TweenLite.selector, if it's a jQuery object or some other selector engine's result, it'll grab the first one, and same for an array. If the value doesn't contain a DOM element, it'll just return null.
33543 _unwrapElement = function(value) {
33544 if (!value) {
33545 return value;
33546 }
33547 if (typeof(value) === "string") {
33548 value = TweenLite["d" /* default */].selector(value);
33549 }
33550 if (value.length && value !== window && value[0] && value[0].style && !value.nodeType) {
33551 value = value[0];
33552 }
33553 return (value === window || (value.nodeType && value.style)) ? value : null;
33554 },
33555
33556 _checkPrefix = function(e, p) {
33557 var s = e.style,
33558 capped, i, a;
33559 if (s[p] === undefined) {
33560 a = ["O","Moz","ms","Ms","Webkit"];
33561 i = 5;
33562 capped = p.charAt(0).toUpperCase() + p.substr(1);
33563 while (--i > -1 && s[a[i]+capped] === undefined) { }
33564 if (i < 0) {
33565 return "";
33566 }
33567 _prefix = (i === 3) ? "ms" : a[i];
33568 p = _prefix + capped;
33569 }
33570 return p;
33571 },
33572
33573 _setStyle = function(e, p, value) {
33574 var s = e.style;
33575 if (!s) {
33576 return;
33577 }
33578 if (s[p] === undefined) {
33579 p = _checkPrefix(e, p);
33580 }
33581 if (value == null) {
33582 if (s.removeProperty) {
33583 s.removeProperty(p.replace(/([A-Z])/g, "-$1").toLowerCase());
33584 } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"
33585 s.removeAttribute(p);
33586 }
33587 } else if (s[p] !== undefined) {
33588 s[p] = value;
33589 }
33590 },
33591
33592 _getCSFunc = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}).getComputedStyle,
33593 _getComputedStyle = function(e, s) {
33594 return _getCSFunc((e instanceof Element) ? e : e.host || (e.parentNode || {}).host || e, s); //the "host" stuff helps to accommodate ShadowDom objects.
33595 },
33596 _horizExp = /(?:Left|Right|Width)/i,
33597 _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,
33598 _convertToPixels = function(t, p, v, sfx, recurse) {
33599 if (sfx === "px" || !sfx) { return v; }
33600 if (sfx === "auto" || !v) { return 0; }
33601 var horiz = _horizExp.test(p),
33602 node = t,
33603 style = _tempDiv.style,
33604 neg = (v < 0),
33605 pix;
33606 if (neg) {
33607 v = -v;
33608 }
33609 if (sfx === "%" && p.indexOf("border") !== -1) {
33610 pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);
33611 } else {
33612 style.cssText = "border:0 solid red;position:" + _getStyle(t, "position", true) + ";line-height:0;";
33613 if (sfx === "%" || !node.appendChild) {
33614 node = t.parentNode || _doc.body;
33615 style[(horiz ? "width" : "height")] = v + sfx;
33616 } else {
33617 style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;
33618 }
33619 node.appendChild(_tempDiv);
33620 pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);
33621 node.removeChild(_tempDiv);
33622 if (pix === 0 && !recurse) {
33623 pix = _convertToPixels(t, p, v, sfx, true);
33624 }
33625 }
33626 return neg ? -pix : pix;
33627 },
33628 _calculateOffset = function(t, p) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop
33629 if (_getStyle(t, "position", true) !== "absolute") { return 0; }
33630 var dim = ((p === "left") ? "Left" : "Top"),
33631 v = _getStyle(t, "margin" + dim, true);
33632 return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), (v + "").replace(_suffixExp, "")) || 0);
33633 },
33634
33635 _getStyle = function(element, prop, keepUnits) {
33636 var rv = (element._gsTransform || {})[prop],
33637 cs;
33638 if (rv || rv === 0) {
33639 return rv;
33640 } else if (element.style && element.style[prop]) { //shadow dom elements don't have "style".
33641 rv = element.style[prop];
33642 } else if ((cs = _getComputedStyle(element))) {
33643 rv = cs.getPropertyValue(prop.replace(/([A-Z])/g, "-$1").toLowerCase());
33644 rv = (rv || cs.length) ? rv : cs[prop]; //Opera behaves VERY strangely - length is usually 0 and cs[prop] is the only way to get accurate results EXCEPT when checking for -o-transform which only works with cs.getPropertyValue()!
33645 } else if (element.currentStyle) {
33646 rv = element.currentStyle[prop];
33647 }
33648 if (rv === "auto" && (prop === "top" || prop === "left")) {
33649 rv = _calculateOffset(element, prop);
33650 }
33651 return keepUnits ? rv : parseFloat(rv) || 0;
33652 },
33653
33654 _dispatchEvent = function(instance, type, callbackName) {
33655 var vars = instance.vars,
33656 callback = vars[callbackName],
33657 listeners = instance._listeners[type];
33658 if (typeof(callback) === "function") {
33659 callback.apply(vars[callbackName + "Scope"] || vars.callbackScope || instance, vars[callbackName + "Params"] || [instance.pointerEvent]);
33660 }
33661 if (listeners) {
33662 instance.dispatchEvent(type);
33663 }
33664 },
33665 _getBounds = function(obj, context) { //accepts any of the following: a DOM element, jQuery object, selector text, or an object defining bounds as {top, left, width, height} or {minX, maxX, minY, maxY}. Returns an object with left, top, width, and height properties.
33666 var e = _unwrapElement(obj),
33667 top, left, offset;
33668 if (!e) {
33669 if (obj.left !== undefined) {
33670 offset = _getOffsetTransformOrigin(context); //the bounds should be relative to the origin
33671 return {left: obj.left - offset.x, top: obj.top - offset.y, width: obj.width, height: obj.height};
33672 }
33673 left = obj.min || obj.minX || obj.minRotation || 0;
33674 top = obj.min || obj.minY || 0;
33675 return {left:left, top:top, width:(obj.max || obj.maxX || obj.maxRotation || 0) - left, height:(obj.max || obj.maxY || 0) - top};
33676 }
33677 return _getElementBounds(e, context);
33678 },
33679
33680 _svgBorderFactor,
33681 _svgBorderScales,
33682 _svgScrollOffset,
33683 _hasBorderBug,
33684 _hasReparentBug,//some browsers, like Chrome 49, alter the offsetTop/offsetLeft/offsetParent of elements when a non-identity transform is applied.
33685 _setEnvironmentVariables = function() { //some browsers factor the border into the SVG coordinate space, some don't (like Firefox). Some apply transforms to them, some don't. We feature-detect here so we know how to handle the border(s). We can't do this immediately - we must wait for the document.body to exist.
33686 if (!_doc.createElementNS) {
33687 _svgBorderFactor = 0;
33688 _svgBorderScales = false;
33689 return;
33690 }
33691 var div = _createElement("div"),
33692 svg = _doc.createElementNS("http://www.w3.org/2000/svg", "svg"),
33693 wrapper = _createElement("div"),
33694 style = div.style,
33695 parent = _doc.body || _docElement,
33696 isFlex = (_getStyle(parent, "display", true) === "flex"), //Firefox bug causes getScreenCTM() to return null when parent is display:flex and the element isn't rendered inside the window (like if it's below the scroll position)
33697 matrix, e1, point, oldValue;
33698 if (_doc.body && _transformProp) {
33699 style.position = "absolute";
33700 parent.appendChild(wrapper);
33701 wrapper.appendChild(div);
33702 oldValue = div.offsetParent;
33703 wrapper.style[_transformProp] = "rotate(1deg)";
33704 _hasReparentBug = (div.offsetParent === oldValue);
33705 wrapper.style.position = "absolute";
33706 style.height = "10px";
33707 oldValue = div.offsetTop;
33708 wrapper.style.border = "5px solid red";
33709 _hasBorderBug = (oldValue !== div.offsetTop); //some browsers, like Firefox 38, cause the offsetTop/Left to be affected by a parent's border.
33710 parent.removeChild(wrapper);
33711 }
33712 style = svg.style;
33713 svg.setAttributeNS(null, "width", "400px");
33714 svg.setAttributeNS(null, "height", "400px");
33715 svg.setAttributeNS(null, "viewBox", "0 0 400 400");
33716 style.display = "block";
33717 style.boxSizing = "border-box";
33718 style.border = "0px solid red";
33719 style.transform = "none";
33720 // in some browsers (like certain flavors of Android), the getScreenCTM() matrix is contaminated by the scroll position. We can run some logic here to detect that condition, but we ended up not needing this because we found another workaround using getBoundingClientRect().
33721 div.style.cssText = "width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;";
33722 parent.appendChild(div);
33723 div.appendChild(svg);
33724 point = svg.createSVGPoint().matrixTransform(svg.getScreenCTM());
33725 e1 = point.y;
33726 div.scrollTop = 100;
33727 point.x = point.y = 0;
33728 point = point.matrixTransform(svg.getScreenCTM());
33729 _svgScrollOffset = (e1 - point.y < 100.1) ? 0 : e1 - point.y - 150;
33730 div.removeChild(svg);
33731 parent.removeChild(div);
33732 // -- end _svgScrollOffset calculation.
33733 parent.appendChild(svg);
33734 if (isFlex) {
33735 parent.style.display = "block"; //Firefox bug causes getScreenCTM() to return null when parent is display:flex and the element isn't rendered inside the window (like if it's below the scroll position)
33736 }
33737 matrix = svg.getScreenCTM();
33738 e1 = matrix.e;
33739 style.border = "50px solid red";
33740 matrix = svg.getScreenCTM();
33741 if (e1 === 0 && matrix.e === 0 && matrix.f === 0 && matrix.a === 1) { //Opera has a bunch of bugs - it doesn't adjust the x/y of the matrix, nor does it scale when box-sizing is border-box but it does so elsewhere; to get the correct behavior we set _svgBorderScales to true.
33742 _svgBorderFactor = 1;
33743 _svgBorderScales = true;
33744 } else {
33745 _svgBorderFactor = (e1 !== matrix.e) ? 1 : 0;
33746 _svgBorderScales = (matrix.a !== 1);
33747 }
33748 if (isFlex) {
33749 parent.style.display = "flex";
33750 }
33751 parent.removeChild(svg);
33752 },
33753
33754 _supports3D = (_checkPrefix(_tempDiv, "perspective") !== ""),
33755
33756 // start matrix and point conversion methods...
33757 _transformOriginProp = _checkPrefix(_tempDiv, "transformOrigin").replace(/^ms/g, "Ms").replace(/([A-Z])/g, "-$1").toLowerCase(),
33758 _transformProp = _checkPrefix(_tempDiv, "transform"),
33759 _transformPropCSS = _transformProp.replace(/^ms/g, "Ms").replace(/([A-Z])/g, "-$1").toLowerCase(),
33760 _point1 = {}, //we reuse _point1 and _point2 objects inside matrix and point conversion methods to conserve memory and minimize garbage collection tasks.
33761 _point2 = {},
33762 _SVGElement = TweenLite["c" /* _gsScope */].SVGElement,
33763 _isSVG = function(e) {
33764 return !!(_SVGElement && typeof(e.getBBox) === "function" && e.getCTM && (!e.parentNode || (e.parentNode.getBBox && e.parentNode.getCTM)));
33765 },
33766 _isIE10orBelow = (TweenLite["c" /* _gsScope */].navigator && (((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(TweenLite["c" /* _gsScope */].navigator.userAgent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(TweenLite["c" /* _gsScope */].navigator.userAgent)) && parseFloat( RegExp.$1 ) < 11)), //Ideally we'd avoid user agent sniffing, but there doesn't seem to be a way to feature-detect and sense a border-related bug that only affects IE10 and IE9.
33767 _tempTransforms = [],
33768 _tempElements = [],
33769 _getSVGOffsets = function(e) { //SVG elements don't always report offsetTop/offsetLeft/offsetParent at all (I'm looking at you, Firefox 29 and Android), so we have to do some work to manufacture those values. You can pass any SVG element and it'll spit back an object with offsetTop, offsetLeft, offsetParent, scaleX, and scaleY properties. We need the scaleX and scaleY to handle the way SVG can resize itself based on the container.
33770 if (!e.getBoundingClientRect || !e.parentNode || !_transformProp) {
33771 return {offsetTop:0, offsetLeft:0, scaleX:1, scaleY:1, offsetParent:_docElement};
33772 }
33773 if (Draggable.cacheSVGData !== false && e._dCache && e._dCache.lastUpdate === TweenLite["d" /* default */].ticker.frame) { //performance optimization. Assume that if the offsets are requested again on the same tick, we can just feed back the values we already calculated (no need to keep recalculating until another tick elapses).
33774 return e._dCache;
33775 }
33776 var curElement = e,
33777 cache = _cache(e),
33778 eRect, parentRect, offsetParent, cs, m, i, point1, point2, borderWidth, borderHeight, width, height;
33779 cache.lastUpdate = TweenLite["d" /* default */].ticker.frame;
33780 if (e.getBBox && !cache.isSVGRoot) { //if it's a nested/child SVG element, we must find the parent SVG canvas and measure the offset from there.
33781 curElement = e.parentNode;
33782 eRect = e.getBBox();
33783 while (curElement && (curElement.nodeName + "").toLowerCase() !== "svg") {
33784 curElement = curElement.parentNode;
33785 }
33786 cs = _getSVGOffsets(curElement);
33787 cache.offsetTop = eRect.y * cs.scaleY;
33788 cache.offsetLeft = eRect.x * cs.scaleX;
33789 cache.scaleX = cs.scaleX;
33790 cache.scaleY = cs.scaleY;
33791 cache.offsetParent = curElement || _docElement;
33792 return cache;
33793 }
33794 //only root SVG elements continue here...
33795 offsetParent = cache.offsetParent;
33796 if (offsetParent === _doc.body) {
33797 offsetParent = _docElement; //avoids problems with margins/padding on the body
33798 }
33799 //walk up the ancestors and record any non-identity transforms (and reset them to "none") until we reach the offsetParent. We must do this so that the getBoundingClientRect() is accurate for measuring the offsetTop/offsetLeft. We'll revert the values later...
33800 _tempElements.length = _tempTransforms.length = 0;
33801 while (curElement) {
33802 m = _getStyle(curElement, _transformProp, true);
33803 if (m !== "matrix(1, 0, 0, 1, 0, 0)" && m !== "none" && m !== "translate3d(0px, 0px, 0px)") {
33804 _tempElements.push(curElement);
33805 _tempTransforms.push(curElement.style[_transformProp]);
33806 curElement.style[_transformProp] = "none";
33807 }
33808 if (curElement === offsetParent) {
33809 break;
33810 }
33811 curElement = curElement.parentNode;
33812 }
33813 parentRect = offsetParent.getBoundingClientRect();
33814 m = e.getScreenCTM();
33815
33816 point2 = e.createSVGPoint();
33817 point1 = point2.matrixTransform(m);
33818 cache.scaleX = Math.sqrt(m.a * m.a + m.b * m.b);
33819 cache.scaleY = Math.sqrt(m.d * m.d + m.c * m.c);
33820 if (_svgBorderFactor === undefined) {
33821 _setEnvironmentVariables();
33822 }
33823 if (cache.borderBox && !_svgBorderScales && e.getAttribute("width")) { //some browsers (like Safari) don't properly scale the matrix to accommodate the border when box-sizing is border-box, so we must calculate it here...
33824 cs = _getComputedStyle(e) || {};
33825 borderWidth = (parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth)) || 0;
33826 borderHeight = (parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth)) || 0;
33827 width = parseFloat(cs.width) || 0;
33828 height = parseFloat(cs.height) || 0;
33829 cache.scaleX *= (width - borderWidth) / width;
33830 cache.scaleY *= (height - borderHeight) / height;
33831 }
33832 if (_svgScrollOffset) { //some browsers (like Chrome for Android) have bugs in the way getScreenCTM() is reported (it doesn't factor in scroll position), so we must revert to a more expensive technique for calculating offsetTop/Left.
33833 eRect = e.getBoundingClientRect();
33834 cache.offsetLeft = eRect.left - parentRect.left;
33835 cache.offsetTop = eRect.top - parentRect.top;
33836 } else {
33837 cache.offsetLeft = point1.x - parentRect.left;
33838 cache.offsetTop = point1.y - parentRect.top;
33839 }
33840 cache.offsetParent = offsetParent;
33841 i = _tempElements.length;
33842 while (--i > -1) {
33843 _tempElements[i].style[_transformProp] = _tempTransforms[i];
33844 }
33845 return cache;
33846 },
33847 _getOffsetTransformOrigin = function(e, decoratee) { //returns the x/y position of the transformOrigin of the element, in its own local coordinate system (pixels), offset from the top left corner.
33848 decoratee = decoratee || {};
33849 if (!e || e === _docElement || !e.parentNode || e === window) {
33850 return {x:0, y:0};
33851 }
33852 var cs = _getComputedStyle(e),
33853 v = (_transformOriginProp && cs) ? cs.getPropertyValue(_transformOriginProp) : "50% 50%",
33854 a = v.split(" "),
33855 x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],
33856 y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1];
33857 if (y === "center" || y == null) {
33858 y = "50%";
33859 }
33860 if (x === "center" || isNaN(parseFloat(x))) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.
33861 x = "50%";
33862 }
33863 if (e.getBBox && _isSVG(e)) { //SVG elements must be handled in a special way because their origins are calculated from the top left.
33864 if (!e._gsTransform) {
33865 TweenLite["d" /* default */].set(e, {x:"+=0", overwrite:false}); //forces creation of the _gsTransform where we store all the transform components including xOrigin and yOrigin for SVG elements, as of GSAP 1.15.0 which also takes care of calculating the origin from the upper left corner of the SVG canvas.
33866 if (e._gsTransform.xOrigin === undefined) {
33867 console.log("Draggable requires at least GSAP 1.17.0");
33868 }
33869 }
33870 v = e.getBBox();
33871 decoratee.x = (e._gsTransform.xOrigin - v.x);
33872 decoratee.y = (e._gsTransform.yOrigin - v.y);
33873 } else {
33874 if (e.getBBox && (x + y).indexOf("%") !== -1) { //Firefox doesn't report offsetWidth/height on <svg> elements.
33875 e = e.getBBox();
33876 e = {offsetWidth: e.width, offsetHeight: e.height};
33877 }
33878 decoratee.x = ((x.indexOf("%") !== -1) ? e.offsetWidth * parseFloat(x) / 100 : parseFloat(x));
33879 decoratee.y = ((y.indexOf("%") !== -1) ? e.offsetHeight * parseFloat(y) / 100 : parseFloat(y));
33880 }
33881 return decoratee;
33882 },
33883 _cache = function(e) { //computes some important values and stores them in a _dCache object attached to the element itself so that we can optimize performance
33884 if (Draggable.cacheSVGData !== false && e._dCache && e._dCache.lastUpdate === TweenLite["d" /* default */].ticker.frame) { //performance optimization. Assume that if the offsets are requested again on the same tick, we can just feed back the values we already calculated (no need to keep recalculating until another tick elapses).
33885 return e._dCache;
33886 }
33887 var cache = e._dCache = e._dCache || {},
33888 cs = _getComputedStyle(e),
33889 isSVG = (e.getBBox && _isSVG(e)),
33890 isSVGRoot = ((e.nodeName + "").toLowerCase() === "svg"),
33891 curSVG;
33892 cache.isSVG = isSVG;
33893 cache.isSVGRoot = isSVGRoot;
33894 cache.borderBox = (cs.boxSizing === "border-box");
33895 cache.computedStyle = cs;
33896 if (isSVGRoot) { //some browsers don't report parentNode on SVG elements.
33897 curSVG = e.parentNode || _docElement;
33898 curSVG.insertBefore(_tempDiv, e);
33899 cache.offsetParent = _tempDiv.offsetParent || _docElement; //in some cases, Firefox still reports offsetParent as null.
33900 curSVG.removeChild(_tempDiv);
33901 } else if (isSVG) {
33902 curSVG = e.parentNode;
33903 while (curSVG && (curSVG.nodeName + "").toLowerCase() !== "svg") { //offsetParent is always the SVG canvas for SVG elements.
33904 curSVG = curSVG.parentNode;
33905 }
33906 cache.offsetParent = curSVG;
33907 } else {
33908 cache.offsetParent = e.offsetParent;
33909 }
33910 return cache;
33911 },
33912 _getOffset2DMatrix = function(e, offsetOrigin, parentOffsetOrigin, zeroOrigin, isBase) { //"isBase" helps us discern context - it should only be true when the element is the base one (the one at which we're starting to walk up the chain). It only matters in cases when it's an <svg> element itself because that's a case when we don't apply scaling.
33913 if (e === window || !e || !e.style || !e.parentNode) {
33914 return [1,0,0,1,0,0];
33915 }
33916 var cache = e._dCache || _cache(e),
33917 parent = e.parentNode,
33918 parentCache = parent._dCache || _cache(parent),
33919 cs = cache.computedStyle,
33920 parentOffsetParent = cache.isSVG ? parentCache.offsetParent : parent.offsetParent,
33921 m, isRoot, offsets, rect, t, sx, sy, offsetX, offsetY, parentRect, borderTop, borderLeft, borderTranslateX, borderTranslateY;
33922 m = (cache.isSVG && (e.style[_transformProp] + "").indexOf("matrix") !== -1) ? e.style[_transformProp] : cs ? cs.getPropertyValue(_transformPropCSS) : e.currentStyle ? e.currentStyle[_transformProp] : "1,0,0,1,0,0"; //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values
33923 if (e.getBBox && (e.getAttribute("transform") + "").indexOf("matrix") !== -1) { //SVG can store transform data in its "transform" attribute instead of the CSS, so look for that here (only accept matrix()).
33924 m = e.getAttribute("transform");
33925 }
33926 m = (m + "").match(/(?:\-|\.|\b)(\d|\.|e\-)+/g) || [1,0,0,1,0,0];
33927 if (m.length > 6) {
33928 m = [m[0], m[1], m[4], m[5], m[12], m[13]];
33929 }
33930 if (zeroOrigin) {
33931 m[4] = m[5] = 0;
33932 } else if (cache.isSVG && (t = e._gsTransform) && (t.xOrigin || t.yOrigin)) {
33933 //SVGs handle origin very differently. Factor in GSAP's handling of origin values here:
33934 m[0] = parseFloat(m[0]);
33935 m[1] = parseFloat(m[1]);
33936 m[2] = parseFloat(m[2]);
33937 m[3] = parseFloat(m[3]);
33938 m[4] = parseFloat(m[4]) - (t.xOrigin - (t.xOrigin * m[0] + t.yOrigin * m[2]));
33939 m[5] = parseFloat(m[5]) - (t.yOrigin - (t.xOrigin * m[1] + t.yOrigin * m[3]));
33940 }
33941 if (offsetOrigin) {
33942 if (_svgBorderFactor === undefined) {
33943 _setEnvironmentVariables();
33944 }
33945 offsets = (cache.isSVG || cache.isSVGRoot) ? _getSVGOffsets(e) : e;
33946 if (cache.isSVG) { //don't just rely on "instanceof _SVGElement" because if the SVG is embedded via an object tag, it won't work (SVGElement is mapped to a different object))
33947 rect = e.getBBox();
33948 parentRect = (parentCache.isSVGRoot) ? {x:0, y:0} : parent.getBBox();
33949 offsets = {offsetLeft:rect.x - parentRect.x, offsetTop:rect.y - parentRect.y, offsetParent:cache.offsetParent};
33950 } else if (cache.isSVGRoot) {
33951 borderTop = parseInt(cs.borderTopWidth, 10) || 0;
33952 borderLeft = parseInt(cs.borderLeftWidth, 10) || 0;
33953 borderTranslateX = ((m[0] - _svgBorderFactor) * borderLeft + m[2] * borderTop);
33954 borderTranslateY = (m[1] * borderLeft + (m[3] - _svgBorderFactor) * borderTop);
33955
33956 sx = offsetOrigin.x;
33957 sy = offsetOrigin.y;
33958 offsetX = (sx - (sx * m[0] + sy * m[2])); //accommodate the SVG root's transforms when the origin isn't in the top left.
33959 offsetY = (sy - (sx * m[1] + sy * m[3]));
33960
33961 m[4] = parseFloat(m[4]) + offsetX;
33962 m[5] = parseFloat(m[5]) + offsetY;
33963 offsetOrigin.x -= offsetX;
33964 offsetOrigin.y -= offsetY;
33965 sx = offsets.scaleX;
33966 sy = offsets.scaleY;
33967 if (!isBase) { //when getting the matrix for a root <svg> element itself (NOT in the context of an SVG element that's nested inside of it like a <path>), we do NOT apply the scaling!
33968 offsetOrigin.x *= sx;
33969 offsetOrigin.y *= sy;
33970 }
33971 m[0] *= sx;
33972 m[1] *= sy;
33973 m[2] *= sx;
33974 m[3] *= sy;
33975 if (!_isIE10orBelow) {
33976 offsetOrigin.x += borderTranslateX;
33977 offsetOrigin.y += borderTranslateY;
33978 }
33979 if (parentOffsetParent === _doc.body && offsets.offsetParent === _docElement) { //to avoid issues with margin/padding on the <body>, we always set the offsetParent to _docElement in the _getSVGOffsets() function but there's a condition we check later in this function for (parentOffsetParent === offsets.offsetParent) which would fail if we don't run this logic. In other words, parentOffsetParent may be <body> and the <svg>'s offsetParent is also <body> but artificially set to _docElement to avoid margin/padding issues.
33980 parentOffsetParent = _docElement;
33981 }
33982 } else if (!_hasBorderBug && e.offsetParent) {
33983 offsetOrigin.x += parseInt(_getStyle(e.offsetParent, "borderLeftWidth"), 10) || 0;
33984 offsetOrigin.y += parseInt(_getStyle(e.offsetParent, "borderTopWidth"), 10) || 0;
33985 }
33986 isRoot = (parent === _docElement || parent === _doc.body);
33987 m[4] = Number(m[4]) + offsetOrigin.x + (offsets.offsetLeft || 0) - parentOffsetOrigin.x - (isRoot ? 0 : parent.scrollLeft || 0);
33988 m[5] = Number(m[5]) + offsetOrigin.y + (offsets.offsetTop || 0) - parentOffsetOrigin.y - (isRoot ? 0 : parent.scrollTop || 0);
33989 if (parent && _getStyle(e, "position", cs) === "fixed") { //fixed position elements should factor in the scroll position of the document.
33990 m[4] += _getDocScrollLeft();
33991 m[5] += _getDocScrollTop();
33992 }
33993 if (parent && parent !== _docElement && parentOffsetParent === offsets.offsetParent && !parentCache.isSVG && (!_hasReparentBug || _getOffset2DMatrix(parent).join("") === "100100")) {
33994 offsets = (parentCache.isSVGRoot) ? _getSVGOffsets(parent) : parent;
33995 m[4] -= offsets.offsetLeft || 0;
33996 m[5] -= offsets.offsetTop || 0;
33997 if (!_hasBorderBug && parentCache.offsetParent && !cache.isSVG && !cache.isSVGRoot) {
33998 m[4] -= parseInt(_getStyle(parentCache.offsetParent, "borderLeftWidth"), 10) || 0;
33999 m[5] -= parseInt(_getStyle(parentCache.offsetParent, "borderTopWidth"), 10) || 0;
34000 }
34001 }
34002 }
34003 return m;
34004 },
34005 _getConcatenatedMatrix = function(e, invert) {
34006 if (!e || e === window || !e.parentNode) {
34007 return [1,0,0,1,0,0];
34008 }
34009 //note: we keep reusing _point1 and _point2 in order to minimize memory usage and garbage collection chores.
34010 var originOffset = _getOffsetTransformOrigin(e, _point1),
34011 parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, _point2),
34012 m = _getOffset2DMatrix(e, originOffset, parentOriginOffset, false, !invert),
34013 a, b, c, d, tx, ty, m2, determinant;
34014 while ((e = e.parentNode) && e.parentNode && e !== _docElement) {
34015 originOffset = parentOriginOffset;
34016 parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, (originOffset === _point1) ? _point2 : _point1);
34017 m2 = _getOffset2DMatrix(e, originOffset, parentOriginOffset);
34018 a = m[0];
34019 b = m[1];
34020 c = m[2];
34021 d = m[3];
34022 tx = m[4];
34023 ty = m[5];
34024 m[0] = a * m2[0] + b * m2[2];
34025 m[1] = a * m2[1] + b * m2[3];
34026 m[2] = c * m2[0] + d * m2[2];
34027 m[3] = c * m2[1] + d * m2[3];
34028 m[4] = tx * m2[0] + ty * m2[2] + m2[4];
34029 m[5] = tx * m2[1] + ty * m2[3] + m2[5];
34030 }
34031 if (invert) {
34032 a = m[0];
34033 b = m[1];
34034 c = m[2];
34035 d = m[3];
34036 tx = m[4];
34037 ty = m[5];
34038 determinant = (a * d - b * c);
34039 m[0] = d / determinant;
34040 m[1] = -b / determinant;
34041 m[2] = -c / determinant;
34042 m[3] = a / determinant;
34043 m[4] = (c * ty - d * tx) / determinant;
34044 m[5] = -(a * ty - b * tx) / determinant;
34045 }
34046 return m;
34047 },
34048 _localToGlobal = function(e, p, fromTopLeft, decoratee, zeroOrigin) {
34049 e = _unwrapElement(e);
34050 var m = _getConcatenatedMatrix(e, false, zeroOrigin),
34051 x = p.x,
34052 y = p.y;
34053 if (fromTopLeft) {
34054 _getOffsetTransformOrigin(e, p);
34055 x -= p.x;
34056 y -= p.y;
34057 }
34058 decoratee = (decoratee === true) ? p : decoratee || {};
34059 decoratee.x = x * m[0] + y * m[2] + m[4];
34060 decoratee.y = x * m[1] + y * m[3] + m[5];
34061 return decoratee;
34062 },
34063 _localizePoint = function(p, localToGlobal, globalToLocal) {
34064 var x = p.x * localToGlobal[0] + p.y * localToGlobal[2] + localToGlobal[4],
34065 y = p.x * localToGlobal[1] + p.y * localToGlobal[3] + localToGlobal[5];
34066 p.x = x * globalToLocal[0] + y * globalToLocal[2] + globalToLocal[4];
34067 p.y = x * globalToLocal[1] + y * globalToLocal[3] + globalToLocal[5];
34068 return p;
34069 },
34070
34071 _getElementBounds = function(e, context, fromTopLeft) {
34072 if (!(e = _unwrapElement(e))) {
34073 return null;
34074 }
34075 context = _unwrapElement(context);
34076 var isSVG = (e.getBBox && _isSVG(e)),
34077 origin, left, right, top, bottom, mLocalToGlobal, mGlobalToLocal, p1, p2, p3, p4, bbox, width, height, cache, borderLeft, borderTop, viewBox, viewBoxX, viewBoxY, computedDimensions, cs;
34078 if (e === window) {
34079 top = _getDocScrollTop();
34080 left = _getDocScrollLeft();
34081 right = left + (_docElement.clientWidth || e.innerWidth || _doc.body.clientWidth || 0);
34082 bottom = top + (((e.innerHeight || 0) - 20 < _docElement.clientHeight) ? _docElement.clientHeight : e.innerHeight || _doc.body.clientHeight || 0); //some browsers (like Firefox) ignore absolutely positioned elements, and collapse the height of the documentElement, so it could be 8px, for example, if you have just an absolutely positioned div. In that case, we use the innerHeight to resolve this.
34083 } else if (context === undefined || context === window) {
34084 return e.getBoundingClientRect();
34085 } else {
34086 origin = _getOffsetTransformOrigin(e);
34087 left = -origin.x;
34088 top = -origin.y;
34089 if (isSVG) {
34090 bbox = e.getBBox();
34091 width = bbox.width;
34092 height = bbox.height;
34093 } else if ((e.nodeName + "").toLowerCase() !== "svg" && e.offsetWidth) { //Chrome dropped support for "offsetWidth" on SVG elements
34094 width = e.offsetWidth;
34095 height = e.offsetHeight;
34096 } else {
34097 computedDimensions = _getComputedStyle(e);
34098 width = parseFloat(computedDimensions.width);
34099 height = parseFloat(computedDimensions.height);
34100 }
34101 right = left + width;
34102 bottom = top + height;
34103 if (e.nodeName.toLowerCase() === "svg" && !_isOldIE) { //root SVG elements are a special beast because they have 2 types of scaling - transforms on themselves as well as the stretching of the SVG canvas itself based on the outer size and the viewBox. If, for example, the SVG's viewbox is "0 0 100 100" but the CSS is set to width:200px; height:200px, that'd make it appear at 2x scale even though the element itself has no CSS transforms but the offsetWidth/offsetHeight are based on that css, not the viewBox so we need to adjust them accordingly.
34104 cache = _getSVGOffsets(e);
34105 cs = cache.computedStyle || {};
34106 viewBox = (e.getAttribute("viewBox") || "0 0").split(" ");
34107 viewBoxX = parseFloat(viewBox[0]);
34108 viewBoxY = parseFloat(viewBox[1]);
34109 borderLeft = parseFloat(cs.borderLeftWidth) || 0;
34110 borderTop = parseFloat(cs.borderTopWidth) || 0;
34111 right -= width - ((width - borderLeft) / cache.scaleX) - viewBoxX;
34112 bottom -= height - ((height - borderTop) / cache.scaleY) - viewBoxY;
34113 left -= borderLeft / cache.scaleX - viewBoxX;
34114 top -= borderTop / cache.scaleY - viewBoxY;
34115 if (computedDimensions) { //when we had to use computed styles, factor in the border now.
34116 right += (parseFloat(cs.borderRightWidth) + borderLeft) / cache.scaleX;
34117 bottom += (borderTop + parseFloat(cs.borderBottomWidth)) / cache.scaleY;
34118 }
34119 }
34120 }
34121 if (e === context) {
34122 return {left:left, top:top, width: right - left, height: bottom - top};
34123 }
34124 mLocalToGlobal = _getConcatenatedMatrix(e);
34125 mGlobalToLocal = _getConcatenatedMatrix(context, true);
34126 p1 = _localizePoint({x:left, y:top}, mLocalToGlobal, mGlobalToLocal);
34127 p2 = _localizePoint({x:right, y:top}, mLocalToGlobal, mGlobalToLocal);
34128 p3 = _localizePoint({x:right, y:bottom}, mLocalToGlobal, mGlobalToLocal);
34129 p4 = _localizePoint({x:left, y:bottom}, mLocalToGlobal, mGlobalToLocal);
34130 left = Math.min(p1.x, p2.x, p3.x, p4.x);
34131 top = Math.min(p1.y, p2.y, p3.y, p4.y);
34132 _temp1.x = _temp1.y = 0;
34133 if (fromTopLeft) {
34134 _getOffsetTransformOrigin(context, _temp1);
34135 }
34136 return {left:left + _temp1.x, top:top + _temp1.y, width:Math.max(p1.x, p2.x, p3.x, p4.x) - left, height:Math.max(p1.y, p2.y, p3.y, p4.y) - top};
34137 },
34138 // end matrix and point conversion methods
34139
34140
34141
34142 _isArrayLike = function(e) {
34143 return (e && e.length && e[0] && ((e[0].nodeType && e[0].style && !e.nodeType) || (e[0].length && e[0][0]))) ? true : false; //could be an array of jQuery objects too, so accommodate that.
34144 },
34145
34146 _flattenArray = function(a) {
34147 var result = [],
34148 l = a.length,
34149 i, e, j;
34150 for (i = 0; i < l; i++) {
34151 e = a[i];
34152 if (_isArrayLike(e)) {
34153 j = e.length;
34154 for (j = 0; j < e.length; j++) {
34155 result.push(e[j]);
34156 }
34157 } else if (e && e.length !== 0) {
34158 result.push(e);
34159 }
34160 }
34161 return result;
34162 },
34163
34164 _isTouchDevice = (typeof(window) !== "undefined" && ("ontouchstart" in _docElement) && ("orientation" in window)),
34165 _touchEventLookup = (function(types) { //we create an object that makes it easy to translate touch event types into their "pointer" counterparts if we're in a browser that uses those instead. Like IE10 uses "MSPointerDown" instead of "touchstart", for example.
34166 var standard = types.split(","),
34167 converted = ((_tempDiv.onpointerdown !== undefined) ? "pointerdown,pointermove,pointerup,pointercancel" : (_tempDiv.onmspointerdown !== undefined) ? "MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel" : types).split(","),
34168 obj = {},
34169 i = 4;
34170 while (--i > -1) {
34171 obj[standard[i]] = converted[i];
34172 obj[converted[i]] = standard[i];
34173 }
34174 return obj;
34175 }("touchstart,touchmove,touchend,touchcancel")),
34176
34177 _addListener = function(element, type, func, capture) {
34178 if (element.addEventListener) {
34179 var touchType = _touchEventLookup[type];
34180 capture = capture || {passive:false};
34181 element.addEventListener(touchType || type, func, capture);
34182 if (touchType && type !== touchType) { //some browsers actually support both, so must we.
34183 element.addEventListener(type, func, capture);
34184 }
34185 } else if (element.attachEvent) {
34186 element.attachEvent("on" + type, func);
34187 }
34188 },
34189
34190 _removeListener = function(element, type, func) {
34191 if (element.removeEventListener) {
34192 var touchType = _touchEventLookup[type];
34193 element.removeEventListener(touchType || type, func);
34194 if (touchType && type !== touchType) {
34195 element.removeEventListener(type, func);
34196 }
34197 } else if (element.detachEvent) {
34198 element.detachEvent("on" + type, func);
34199 }
34200 },
34201
34202 _hasTouchID = function(list, ID) {
34203 var i = list.length;
34204 while (--i > -1) {
34205 if (list[i].identifier === ID) {
34206 return true;
34207 }
34208 }
34209 return false;
34210 },
34211
34212 _onMultiTouchDocumentEnd = function(e) {
34213 _isMultiTouching = (e.touches && _dragCount < e.touches.length);
34214 _removeListener(e.target, "touchend", _onMultiTouchDocumentEnd);
34215 },
34216
34217 _onMultiTouchDocument = function(e) {
34218 _isMultiTouching = (e.touches && _dragCount < e.touches.length);
34219 _addListener(e.target, "touchend", _onMultiTouchDocumentEnd);
34220 },
34221
34222 _parseThrowProps = function(draggable, snap, max, min, factor, forceZeroVelocity) {
34223 var vars = {},
34224 a, i, l;
34225 if (snap) {
34226 if (factor !== 1 && snap instanceof Array) { //some data must be altered to make sense, like if the user passes in an array of rotational values in degrees, we must convert it to radians. Or for scrollLeft and scrollTop, we invert the values.
34227 vars.end = a = [];
34228 l = snap.length;
34229 if (typeof(snap[0]) === "object") { //if the array is populated with objects, like points ({x:100, y:200}), make copies before multiplying by the factor, otherwise we'll mess up the originals and the user may reuse it elsewhere.
34230 for (i = 0; i < l; i++) {
34231 a[i] = _copy(snap[i], factor);
34232 }
34233 } else {
34234 for (i = 0; i < l; i++) {
34235 a[i] = snap[i] * factor;
34236 }
34237 }
34238 max += 1.1; //allow 1.1 pixels of wiggle room when snapping in order to work around some browser inconsistencies in the way bounds are reported which can make them roughly a pixel off. For example, if "snap:[-$('#menu').width(), 0]" was defined and #menu had a wrapper that was used as the bounds, some browsers would be one pixel off, making the minimum -752 for example when snap was [-753,0], thus instead of snapping to -753, it would snap to 0 since -753 was below the minimum.
34239 min -= 1.1;
34240 } else if (typeof(snap) === "function") {
34241 vars.end = function(value) {
34242 var result = snap.call(draggable, value),
34243 copy, p;
34244 if (factor !== 1) {
34245 if (typeof(result) === "object") {
34246 copy = {};
34247 for (p in result) {
34248 copy[p] = result[p] * factor;
34249 }
34250 result = copy;
34251 } else {
34252 result *= factor;
34253 }
34254 }
34255 return result; //we need to ensure that we can scope the function call to the Draggable instance itself so that users can access important values like maxX, minX, maxY, minY, x, and y from within that function.
34256 };
34257 } else {
34258 vars.end = snap;
34259 }
34260 }
34261 if (max || max === 0) {
34262 vars.max = max;
34263 }
34264 if (min || min === 0) {
34265 vars.min = min;
34266 }
34267 if (forceZeroVelocity) {
34268 vars.velocity = 0;
34269 }
34270 return vars;
34271 },
34272
34273 _isClickable = function(e) { //sometimes it's convenient to mark an element as clickable by adding a data-clickable="true" attribute (in which case we won't preventDefault() the mouse/touch event). This method checks if the element is an <a>, <input>, or <button> or has an onclick or has the data-clickable or contentEditable attribute set to true (or any of its parent elements).
34274 var data;
34275 return (!e || !e.getAttribute || e.nodeName === "BODY") ? false : ((data = e.getAttribute("data-clickable")) === "true" || (data !== "false" && (e.onclick || _clickableTagExp.test(e.nodeName + "") || e.getAttribute("contentEditable") === "true"))) ? true : _isClickable(e.parentNode);
34276 },
34277
34278 _setSelectable = function(elements, selectable) {
34279 var i = elements.length,
34280 e;
34281 while (--i > -1) {
34282 e = elements[i];
34283 e.ondragstart = e.onselectstart = selectable ? null : _emptyFunc;
34284 _setStyle(e, "userSelect", (selectable ? "text" : "none"));
34285 }
34286 },
34287
34288 _addPaddingBR = (function() { //this function is in charge of analyzing browser behavior related to padding. It sets the _addPaddingBR to true if the browser doesn't normally factor in the bottom or right padding on the element inside the scrolling area, and it sets _addPaddingLeft to true if it's a browser that requires the extra offset (offsetLeft) to be added to the paddingRight (like Opera).
34289 var div = _doc.createElement("div"),
34290 child = _doc.createElement("div"),
34291 childStyle = child.style,
34292 parent = _doc.body || _tempDiv,
34293 val;
34294 childStyle.display = "inline-block";
34295 childStyle.position = "relative";
34296 div.style.cssText = child.innerHTML = "width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden";
34297 div.appendChild(child);
34298 parent.appendChild(div);
34299 val = (child.offsetHeight + 18 > div.scrollHeight); //div.scrollHeight should be child.offsetHeight + 20 because of the 10px of padding on each side, but some browsers ignore one side. We allow a 2px margin of error.
34300 parent.removeChild(div);
34301 return val;
34302 }()),
34303
34304
34305
34306
34307 //The ScrollProxy class wraps an element's contents into another div (we call it "content") that we either add padding when necessary or apply a translate3d() transform in order to overscroll (scroll past the boundaries). This allows us to simply set the scrollTop/scrollLeft (or top/left for easier reverse-axis orientation, which is what we do in Draggable) and it'll do all the work for us. For example, if we tried setting scrollTop to -100 on a normal DOM element, it wouldn't work - it'd look the same as setting it to 0, but if we set scrollTop of a ScrollProxy to -100, it'll give the correct appearance by either setting paddingTop of the wrapper to 100 or applying a 100-pixel translateY.
34308 ScrollProxy = function(element, vars) {
34309 element = _unwrapElement(element);
34310 vars = vars || {};
34311 var content = _doc.createElement("div"),
34312 style = content.style,
34313 node = element.firstChild,
34314 offsetTop = 0,
34315 offsetLeft = 0,
34316 prevTop = element.scrollTop,
34317 prevLeft = element.scrollLeft,
34318 scrollWidth = element.scrollWidth,
34319 scrollHeight = element.scrollHeight,
34320 extraPadRight = 0,
34321 maxLeft = 0,
34322 maxTop = 0,
34323 elementWidth, elementHeight, contentHeight, nextNode, transformStart, transformEnd;
34324
34325 if (_supports3D && vars.force3D !== false) {
34326 transformStart = "translate3d(";
34327 transformEnd = "px,0px)";
34328 } else if (_transformProp) {
34329 transformStart = "translate(";
34330 transformEnd = "px)";
34331 }
34332
34333 this.scrollTop = function(value, force) {
34334 if (!arguments.length) {
34335 return -this.top();
34336 }
34337 this.top(-value, force);
34338 };
34339
34340 this.scrollLeft = function(value, force) {
34341 if (!arguments.length) {
34342 return -this.left();
34343 }
34344 this.left(-value, force);
34345 };
34346
34347 this.left = function(value, force) {
34348 if (!arguments.length) {
34349 return -(element.scrollLeft + offsetLeft);
34350 }
34351 var dif = element.scrollLeft - prevLeft,
34352 oldOffset = offsetLeft;
34353 if ((dif > 2 || dif < -2) && !force) { //if the user interacts with the scrollbar (or something else scrolls it, like the mouse wheel), we should kill any tweens of the ScrollProxy.
34354 prevLeft = element.scrollLeft;
34355 TweenLite["d" /* default */].killTweensOf(this, true, {left:1, scrollLeft:1});
34356 this.left(-prevLeft);
34357 if (vars.onKill) {
34358 vars.onKill();
34359 }
34360 return;
34361 }
34362 value = -value; //invert because scrolling works in the opposite direction
34363 if (value < 0) {
34364 offsetLeft = (value - 0.5) | 0;
34365 value = 0;
34366 } else if (value > maxLeft) {
34367 offsetLeft = (value - maxLeft) | 0;
34368 value = maxLeft;
34369 } else {
34370 offsetLeft = 0;
34371 }
34372 if (offsetLeft || oldOffset) {
34373 if (transformStart) {
34374 if (!this._suspendTransforms) {
34375 style[_transformProp] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd;
34376 }
34377 } else {
34378 style.left = -offsetLeft + "px";
34379 }
34380 if (offsetLeft + extraPadRight >= 0) {
34381 style.paddingRight = offsetLeft + extraPadRight + "px";
34382 }
34383 }
34384 element.scrollLeft = value | 0;
34385 prevLeft = element.scrollLeft; //don't merge this with the line above because some browsers adjsut the scrollLeft after it's set, so in order to be 100% accurate in tracking it, we need to ask the browser to report it.
34386 };
34387
34388 this.top = function(value, force) {
34389 if (!arguments.length) {
34390 return -(element.scrollTop + offsetTop);
34391 }
34392 var dif = element.scrollTop - prevTop,
34393 oldOffset = offsetTop;
34394 if ((dif > 2 || dif < -2) && !force) { //if the user interacts with the scrollbar (or something else scrolls it, like the mouse wheel), we should kill any tweens of the ScrollProxy.
34395 prevTop = element.scrollTop;
34396 TweenLite["d" /* default */].killTweensOf(this, true, {top:1, scrollTop:1});
34397 this.top(-prevTop);
34398 if (vars.onKill) {
34399 vars.onKill();
34400 }
34401 return;
34402 }
34403 value = -value; //invert because scrolling works in the opposite direction
34404 if (value < 0) {
34405 offsetTop = (value - 0.5) | 0;
34406 value = 0;
34407 } else if (value > maxTop) {
34408 offsetTop = (value - maxTop) | 0;
34409 value = maxTop;
34410 } else {
34411 offsetTop = 0;
34412 }
34413 if (offsetTop || oldOffset) {
34414 if (transformStart) {
34415 if (!this._suspendTransforms) {
34416 style[_transformProp] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd;
34417 }
34418 } else {
34419 style.top = -offsetTop + "px";
34420 }
34421 }
34422 element.scrollTop = value | 0;
34423 prevTop = element.scrollTop;
34424 };
34425
34426 this.maxScrollTop = function() {
34427 return maxTop;
34428 };
34429
34430 this.maxScrollLeft = function() {
34431 return maxLeft;
34432 };
34433
34434 this.disable = function() {
34435 node = content.firstChild;
34436 while (node) {
34437 nextNode = node.nextSibling;
34438 element.appendChild(node);
34439 node = nextNode;
34440 }
34441 if (element === content.parentNode) { //in case disable() is called when it's already disabled.
34442 element.removeChild(content);
34443 }
34444 };
34445
34446 this.enable = function() {
34447 node = element.firstChild;
34448 if (node === content) {
34449 return;
34450 }
34451 while (node) {
34452 nextNode = node.nextSibling;
34453 content.appendChild(node);
34454 node = nextNode;
34455 }
34456 element.appendChild(content);
34457 this.calibrate();
34458 };
34459
34460 this.calibrate = function(force) {
34461 var widthMatches = (element.clientWidth === elementWidth),
34462 x, y;
34463 prevTop = element.scrollTop;
34464 prevLeft = element.scrollLeft;
34465 if (widthMatches && element.clientHeight === elementHeight && content.offsetHeight === contentHeight && scrollWidth === element.scrollWidth && scrollHeight === element.scrollHeight && !force) {
34466 return; //no need to recalculate things if the width and height haven't changed.
34467 }
34468 if (offsetTop || offsetLeft) {
34469 x = this.left();
34470 y = this.top();
34471 this.left(-element.scrollLeft);
34472 this.top(-element.scrollTop);
34473 }
34474 //first, we need to remove any width constraints to see how the content naturally flows so that we can see if it's wider than the containing element. If so, we've got to record the amount of overage so that we can apply that as padding in order for browsers to correctly handle things. Then we switch back to a width of 100% (without that, some browsers don't flow the content correctly)
34475 if (!widthMatches || force) {
34476 style.display = "block";
34477 style.width = "auto";
34478 style.paddingRight = "0px";
34479 extraPadRight = Math.max(0, element.scrollWidth - element.clientWidth);
34480 //if the content is wider than the container, we need to add the paddingLeft and paddingRight in order for things to behave correctly.
34481 if (extraPadRight) {
34482 extraPadRight += _getStyle(element, "paddingLeft") + (_addPaddingBR ? _getStyle(element, "paddingRight") : 0);
34483 }
34484 }
34485 style.display = "inline-block";
34486 style.position = "relative";
34487 style.overflow = "visible";
34488 style.verticalAlign = "top";
34489 style.width = "100%";
34490 style.paddingRight = extraPadRight + "px";
34491 //some browsers neglect to factor in the bottom padding when calculating the scrollHeight, so we need to add that padding to the content when that happens. Allow a 2px margin for error
34492 if (_addPaddingBR) {
34493 style.paddingBottom = _getStyle(element, "paddingBottom", true);
34494 }
34495 if (_isOldIE) {
34496 style.zoom = "1";
34497 }
34498 elementWidth = element.clientWidth;
34499 elementHeight = element.clientHeight;
34500 scrollWidth = element.scrollWidth;
34501 scrollHeight = element.scrollHeight;
34502 maxLeft = element.scrollWidth - elementWidth;
34503 maxTop = element.scrollHeight - elementHeight;
34504 contentHeight = content.offsetHeight;
34505 style.display = "block";
34506 if (x || y) {
34507 this.left(x);
34508 this.top(y);
34509 }
34510 };
34511
34512 this.content = content;
34513 this.element = element;
34514 this._suspendTransforms = false;
34515 this.enable();
34516 },
34517
34518
34519
34520
34521
34522 Draggable = function(target, vars) {
34523 TweenLite["a" /* EventDispatcher */].call(this, target);
34524 target = _unwrapElement(target); //in case the target is a selector object or selector text
34525 if (!ThrowPropsPlugin) {
34526 ThrowPropsPlugin = _globals.com.greensock.plugins.ThrowPropsPlugin;
34527 }
34528 this.vars = vars = _copy(vars || {});
34529 this.target = target;
34530 this.x = this.y = this.rotation = 0;
34531 this.dragResistance = parseFloat(vars.dragResistance) || 0;
34532 this.edgeResistance = isNaN(vars.edgeResistance) ? 1 : parseFloat(vars.edgeResistance) || 0;
34533 this.lockAxis = vars.lockAxis;
34534 this.autoScroll = vars.autoScroll || 0;
34535 this.lockedAxis = null;
34536 this.allowEventDefault = !!vars.allowEventDefault;
34537 var type = (vars.type || (_isOldIE ? "top,left" : "x,y")).toLowerCase(),
34538 xyMode = (type.indexOf("x") !== -1 || type.indexOf("y") !== -1),
34539 rotationMode = (type.indexOf("rotation") !== -1),
34540 xProp = rotationMode ? "rotation" : xyMode ? "x" : "left",
34541 yProp = xyMode ? "y" : "top",
34542 allowX = (type.indexOf("x") !== -1 || type.indexOf("left") !== -1 || type === "scroll"),
34543 allowY = (type.indexOf("y") !== -1 || type.indexOf("top") !== -1 || type === "scroll"),
34544 minimumMovement = vars.minimumMovement || 2,
34545 self = this,
34546 triggers = _slice(vars.trigger || vars.handle || target),
34547 killProps = {},
34548 dragEndTime = 0,
34549 checkAutoScrollBounds = false,
34550 autoScrollMarginTop = vars.autoScrollMarginTop || 40,
34551 autoScrollMarginRight = vars.autoScrollMarginRight || 40,
34552 autoScrollMarginBottom = vars.autoScrollMarginBottom || 40,
34553 autoScrollMarginLeft = vars.autoScrollMarginLeft || 40,
34554 isClickable = vars.clickableTest || _isClickable,
34555 clickTime = 0,
34556 enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, snapXY, isClicking, touchEventTarget, matrix, interrupted, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching, clickDispatch, trustedClickDispatch,
34557
34558 onContextMenu = function(e) { //used to prevent long-touch from triggering a context menu.
34559 if (self.isPressed && e.which < 2) {
34560 self.endDrag();
34561 } else {
34562 e.preventDefault();
34563 e.stopPropagation();
34564 return false;
34565 }
34566 },
34567
34568 //this method gets called on every tick of TweenLite.ticker which allows us to synchronize the renders to the core engine (which is typically synchronized with the display refresh via requestAnimationFrame). This is an optimization - it's better than applying the values inside the "mousemove" or "touchmove" event handler which may get called many times inbetween refreshes.
34569 render = function(suppressEvents) {
34570 if (self.autoScroll && self.isDragging && (checkAutoScrollBounds || dirty)) {
34571 var e = target,
34572 autoScrollFactor = self.autoScroll * 15, //multiplying by 15 just gives us a better "feel" speed-wise.
34573 parent, isRoot, rect, pointerX, pointerY, changeX, changeY, gap;
34574 checkAutoScrollBounds = false;
34575 _windowProxy.scrollTop = ((window.pageYOffset != null) ? window.pageYOffset : (_docElement.scrollTop != null) ? _docElement.scrollTop : _doc.body.scrollTop);
34576 _windowProxy.scrollLeft = ((window.pageXOffset != null) ? window.pageXOffset : (_docElement.scrollLeft != null) ? _docElement.scrollLeft : _doc.body.scrollLeft);
34577 pointerX = self.pointerX - _windowProxy.scrollLeft;
34578 pointerY = self.pointerY - _windowProxy.scrollTop;
34579 while (e && !isRoot) { //walk up the chain and sense wherever the pointer is within 40px of an edge that's scrollable.
34580 isRoot = _isRoot(e.parentNode);
34581 parent = isRoot ? _windowProxy : e.parentNode;
34582 rect = isRoot ? {bottom:Math.max(_docElement.clientHeight, window.innerHeight || 0), right: Math.max(_docElement.clientWidth, window.innerWidth || 0), left:0, top:0} : parent.getBoundingClientRect();
34583 changeX = changeY = 0;
34584 if (allowY) {
34585 gap = parent._gsMaxScrollY - parent.scrollTop;
34586 if (gap < 0) {
34587 changeY = gap;
34588 } else if (pointerY > rect.bottom - autoScrollMarginBottom && gap) {
34589 checkAutoScrollBounds = true;
34590 changeY = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.bottom - pointerY)) / autoScrollMarginBottom)) | 0);
34591 } else if (pointerY < rect.top + autoScrollMarginTop && parent.scrollTop) {
34592 checkAutoScrollBounds = true;
34593 changeY = -Math.min(parent.scrollTop, (autoScrollFactor * (1 - Math.max(0, (pointerY - rect.top)) / autoScrollMarginTop)) | 0);
34594 }
34595 if (changeY) {
34596 parent.scrollTop += changeY;
34597 }
34598 }
34599 if (allowX) {
34600 gap = parent._gsMaxScrollX - parent.scrollLeft;
34601 if (gap < 0) {
34602 changeX = gap;
34603 } else if (pointerX > rect.right - autoScrollMarginRight && gap) {
34604 checkAutoScrollBounds = true;
34605 changeX = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.right - pointerX)) / autoScrollMarginRight)) | 0);
34606 } else if (pointerX < rect.left + autoScrollMarginLeft && parent.scrollLeft) {
34607 checkAutoScrollBounds = true;
34608 changeX = -Math.min(parent.scrollLeft, (autoScrollFactor * (1 - Math.max(0, (pointerX - rect.left)) / autoScrollMarginLeft)) | 0);
34609 }
34610 if (changeX) {
34611 parent.scrollLeft += changeX;
34612 }
34613 }
34614
34615 if (isRoot && (changeX || changeY)) {
34616 window.scrollTo(parent.scrollLeft, parent.scrollTop);
34617 setPointerPosition(self.pointerX + changeX, self.pointerY + changeY);
34618 }
34619 e = parent;
34620 }
34621 }
34622 if (dirty) {
34623 var x = self.x,
34624 y = self.y,
34625 min = 0.000001;
34626 if (x < min && x > -min) { //browsers don't handle super small decimals well.
34627 x = 0;
34628 }
34629 if (y < min && y > -min) {
34630 y = 0;
34631 }
34632 if (rotationMode) {
34633 self.deltaX = x - applyObj.data.rotation;
34634 applyObj.data.rotation = self.rotation = x;
34635 applyObj.setRatio(1); //note: instead of doing TweenLite.set(), as a performance optimization we skip right to the method that renders the transforms inside CSSPlugin. For old versions of IE, though, we do a normal TweenLite.set() to leverage its ability to re-reroute to an IE-specific 2D renderer.
34636 } else {
34637 if (scrollProxy) {
34638 if (allowY) {
34639 self.deltaY = y - scrollProxy.top();
34640 scrollProxy.top(y);
34641 }
34642 if (allowX) {
34643 self.deltaX = x - scrollProxy.left();
34644 scrollProxy.left(x);
34645 }
34646 } else if (xyMode) {
34647 if (allowY) {
34648 self.deltaY = y - applyObj.data.y;
34649 applyObj.data.y = y;
34650 }
34651 if (allowX) {
34652 self.deltaX = x - applyObj.data.x;
34653 applyObj.data.x = x;
34654 }
34655 applyObj.setRatio(1); //note: instead of doing TweenLite.set(), as a performance optimization we skip right to the method that renders the transforms inside CSSPlugin. For old versions of IE, though, we do a normal TweenLite.set() to leverage its ability to re-reroute to an IE-specific 2D renderer.
34656 } else {
34657 if (allowY) {
34658 self.deltaY = y - parseFloat(target.style.top || 0);
34659 target.style.top = y + "px";
34660 }
34661 if (allowX) {
34662 self.deltaY = x - parseFloat(target.style.left || 0);
34663 target.style.left = x + "px";
34664 }
34665 }
34666 }
34667 if (hasDragCallback && !suppressEvents && !isDispatching) {
34668 isDispatching = true; //in case onDrag has an update() call (avoid endless loop)
34669 _dispatchEvent(self, "drag", "onDrag");
34670 isDispatching = false;
34671 }
34672 }
34673 dirty = false;
34674 },
34675
34676 //copies the x/y from the element (whether that be transforms, top/left, or ScrollProxy's top/left) to the Draggable's x and y (and rotation if necessary) properties so that they reflect reality and it also (optionally) applies any snapping necessary. This is used by the ThrowPropsPlugin tween in an onUpdate to ensure things are synced and snapped.
34677 syncXY = function(skipOnUpdate, skipSnap) {
34678 var x = self.x,
34679 y = self.y,
34680 snappedValue;
34681 if (!target._gsTransform && (xyMode || rotationMode)) { //just in case the _gsTransform got wiped, like if the user called clearProps on the transform or something (very rare), doing an x tween forces a re-parsing of the transforms and population of the _gsTransform.
34682 TweenLite["d" /* default */].set(target, {x:"+=0", overwrite:false, data:"_draggable"});
34683 }
34684 if (xyMode) {
34685 self.y = target._gsTransform.y;
34686 self.x = target._gsTransform.x;
34687 } else if (rotationMode) {
34688 self.x = self.rotation = target._gsTransform.rotation;
34689 } else if (scrollProxy) {
34690 self.y = scrollProxy.top();
34691 self.x = scrollProxy.left();
34692 } else {
34693 self.y = parseInt(target.style.top, 10) || 0;
34694 self.x = parseInt(target.style.left, 10) || 0;
34695 }
34696 if ((snapX || snapY || snapXY) && !skipSnap && (self.isDragging || self.isThrowing)) {
34697 if (snapXY) {
34698 _temp1.x = self.x;
34699 _temp1.y = self.y;
34700 snappedValue = snapXY(_temp1);
34701 if (snappedValue.x !== self.x) {
34702 self.x = snappedValue.x;
34703 dirty = true;
34704 }
34705 if (snappedValue.y !== self.y) {
34706 self.y = snappedValue.y;
34707 dirty = true;
34708 }
34709 }
34710 if (snapX) {
34711 snappedValue = snapX(self.x);
34712 if (snappedValue !== self.x) {
34713 self.x = snappedValue;
34714 if (rotationMode) {
34715 self.rotation = snappedValue;
34716 }
34717 dirty = true;
34718 }
34719 }
34720 if (snapY) {
34721 snappedValue = snapY(self.y);
34722 if (snappedValue !== self.y) {
34723 self.y = snappedValue;
34724 }
34725 dirty = true;
34726 }
34727 }
34728 if (dirty) {
34729 render(true);
34730 }
34731 if (!skipOnUpdate) {
34732 self.deltaX = self.x - x;
34733 self.deltaY = self.y - y;
34734 _dispatchEvent(self, "throwupdate", "onThrowUpdate");
34735 }
34736 },
34737
34738 calculateBounds = function() {
34739 var bounds, targetBounds, snap, snapIsRaw;
34740 hasBounds = false;
34741 if (scrollProxy) {
34742 scrollProxy.calibrate();
34743 self.minX = minX = -scrollProxy.maxScrollLeft();
34744 self.minY = minY = -scrollProxy.maxScrollTop();
34745 self.maxX = maxX = self.maxY = maxY = 0;
34746 hasBounds = true;
34747 } else if (!!vars.bounds) {
34748 bounds = _getBounds(vars.bounds, target.parentNode); //could be a selector/jQuery object or a DOM element or a generic object like {top:0, left:100, width:1000, height:800} or {minX:100, maxX:1100, minY:0, maxY:800}
34749 if (rotationMode) {
34750 self.minX = minX = bounds.left;
34751 self.maxX = maxX = bounds.left + bounds.width;
34752 self.minY = minY = self.maxY = maxY = 0;
34753 } else if (vars.bounds.maxX !== undefined || vars.bounds.maxY !== undefined) {
34754 bounds = vars.bounds;
34755 self.minX = minX = bounds.minX;
34756 self.minY = minY = bounds.minY;
34757 self.maxX = maxX = bounds.maxX;
34758 self.maxY = maxY = bounds.maxY;
34759 } else {
34760 targetBounds = _getBounds(target, target.parentNode);
34761 self.minX = minX = _getStyle(target, xProp) + bounds.left - targetBounds.left;
34762 self.minY = minY = _getStyle(target, yProp) + bounds.top - targetBounds.top;
34763 self.maxX = maxX = minX + (bounds.width - targetBounds.width);
34764 self.maxY = maxY = minY + (bounds.height - targetBounds.height);
34765 }
34766 if (minX > maxX) {
34767 self.minX = maxX;
34768 self.maxX = maxX = minX;
34769 minX = self.minX;
34770 }
34771 if (minY > maxY) {
34772 self.minY = maxY;
34773 self.maxY = maxY = minY;
34774 minY = self.minY;
34775 }
34776 if (rotationMode) {
34777 self.minRotation = minX;
34778 self.maxRotation = maxX;
34779 }
34780 hasBounds = true;
34781 }
34782 if (vars.liveSnap) {
34783 snap = (vars.liveSnap === true) ? (vars.snap || {}) : vars.liveSnap;
34784 snapIsRaw = (snap instanceof Array || typeof(snap) === "function");
34785 if (rotationMode) {
34786 snapX = buildSnapFunc((snapIsRaw ? snap : snap.rotation), minX, maxX, 1);
34787 snapY = null;
34788 } else {
34789 if (snap.points) {
34790 snapXY = buildPointSnapFunc((snapIsRaw ? snap : snap.points), minX, maxX, minY, maxY, snap.radius, scrollProxy ? -1 : 1);
34791 } else {
34792 if (allowX) {
34793 snapX = buildSnapFunc((snapIsRaw ? snap : snap.x || snap.left || snap.scrollLeft), minX, maxX, scrollProxy ? -1 : 1);
34794 }
34795 if (allowY) {
34796 snapY = buildSnapFunc((snapIsRaw ? snap : snap.y || snap.top || snap.scrollTop), minY, maxY, scrollProxy ? -1 : 1);
34797 }
34798 }
34799 }
34800 }
34801
34802 },
34803
34804 onThrowComplete = function() {
34805 self.isThrowing = false;
34806 _dispatchEvent(self, "throwcomplete", "onThrowComplete");
34807 },
34808 onThrowOverwrite = function() {
34809 self.isThrowing = false;
34810 },
34811
34812 animate = function(throwProps, forceZeroVelocity) {
34813 var snap, snapIsRaw, tween, overshootTolerance;
34814 if (throwProps && ThrowPropsPlugin) {
34815 if (throwProps === true) {
34816 snap = vars.snap || vars.liveSnap || {};
34817 snapIsRaw = (snap instanceof Array || typeof(snap) === "function");
34818 throwProps = {resistance:(vars.throwResistance || vars.resistance || 1000) / (rotationMode ? 10 : 1)};
34819 if (rotationMode) {
34820 throwProps.rotation = _parseThrowProps(self, snapIsRaw ? snap : snap.rotation, maxX, minX, 1, forceZeroVelocity);
34821 } else {
34822 if (allowX) {
34823 throwProps[xProp] = _parseThrowProps(self, snapIsRaw ? snap : snap.points || snap.x || snap.left || snap.scrollLeft, maxX, minX, scrollProxy ? -1 : 1, forceZeroVelocity || (self.lockedAxis === "x"));
34824 }
34825 if (allowY) {
34826 throwProps[yProp] = _parseThrowProps(self, snapIsRaw ? snap : snap.points || snap.y || snap.top || snap.scrollTop, maxY, minY, scrollProxy ? -1 : 1, forceZeroVelocity || (self.lockedAxis === "y"));
34827 }
34828 if (snap.points || (snap instanceof Array && typeof(snap[0]) === "object")) {
34829 throwProps.linkedProps = xProp + "," + yProp;
34830 throwProps.radius = snap.radius; //note: we also disable liveSnapping while throwing if there's a "radius" defined, otherwise it looks weird to have the item thrown past a snapping point but live-snapping mid-tween. We do this by altering the onUpdateParams so that "skipSnap" parameter is true for syncXY.
34831 }
34832 }
34833 }
34834 self.isThrowing = true;
34835 overshootTolerance = (!isNaN(vars.overshootTolerance)) ? vars.overshootTolerance : (vars.edgeResistance === 1) ? 0 : (1 - self.edgeResistance) + 0.2;
34836 self.tween = tween = ThrowPropsPlugin.to(scrollProxy || target, {throwProps:throwProps, data:"_draggable", ease:(vars.ease || _globals.Power3.easeOut), onComplete:onThrowComplete, onOverwrite:onThrowOverwrite, onUpdate:(vars.fastMode ? _dispatchEvent : syncXY), onUpdateParams:(vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : (snap && snap.radius) ? [false, true] : _emptyArray)}, Math.max(vars.minDuration || 0, vars.maxDuration || 0) || 2, (!isNaN(vars.minDuration) ? vars.minDuration : (overshootTolerance === 0 || (typeof(throwProps) === "object" && throwProps.resistance > 1000)) ? 0 : 0.5), overshootTolerance);
34837 if (!vars.fastMode) {
34838 //to populate the end values, we just scrub the tween to the end, record the values, and then jump back to the beginning.
34839 if (scrollProxy) {
34840 scrollProxy._suspendTransforms = true; //Microsoft browsers have a bug that causes them to briefly render the position incorrectly (it flashes to the end state when we seek() the tween even though we jump right back to the current position, and this only seems to happen when we're affecting both top and left), so we set a _suspendTransforms flag to prevent it from actually applying the values in the ScrollProxy.
34841 }
34842 tween.render(tween.duration(), true, true);
34843 syncXY(true, true);
34844 self.endX = self.x;
34845 self.endY = self.y;
34846 if (rotationMode) {
34847 self.endRotation = self.x;
34848 }
34849 tween.play(0);
34850 syncXY(true, true);
34851 if (scrollProxy) {
34852 scrollProxy._suspendTransforms = false;
34853 }
34854 }
34855 } else if (hasBounds) {
34856 self.applyBounds();
34857 }
34858 },
34859
34860 updateMatrix = function(shiftStart) {
34861 var start = matrix || [1,0,0,1,0,0],
34862 a, b, c, d, tx, ty, determinant, pointerX, pointerY;
34863 matrix = _getConcatenatedMatrix(target.parentNode, true);
34864 if (shiftStart && self.isPressed && start.join(",") !== matrix.join(",")) { //if the matrix changes WHILE the element is pressed, we must adjust the startPointerX and startPointerY accordingly, so we invert the original matrix and figure out where the pointerX and pointerY were in the global space, then apply the new matrix to get the updated coordinates.
34865 a = start[0];
34866 b = start[1];
34867 c = start[2];
34868 d = start[3];
34869 tx = start[4];
34870 ty = start[5];
34871 determinant = (a * d - b * c);
34872 pointerX = startPointerX * (d / determinant) + startPointerY * (-c / determinant) + ((c * ty - d * tx) / determinant);
34873 pointerY = startPointerX * (-b / determinant) + startPointerY * (a / determinant) + (-(a * ty - b * tx) / determinant);
34874 startPointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];
34875 startPointerX = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];
34876 }
34877 if (!matrix[1] && !matrix[2] && matrix[0] == 1 && matrix[3] == 1 && matrix[4] == 0 && matrix[5] == 0) { //if there are no transforms, we can optimize performance by not factoring in the matrix
34878 matrix = null;
34879 }
34880
34881 },
34882
34883 recordStartPositions = function() {
34884 var edgeTolerance = 1 - self.edgeResistance;
34885 updateMatrix(false);
34886 if (matrix) {
34887 startPointerX = self.pointerX * matrix[0] + self.pointerY * matrix[2] + matrix[4]; //translate to local coordinate system
34888 startPointerY = self.pointerX * matrix[1] + self.pointerY * matrix[3] + matrix[5];
34889 }
34890 if (dirty) {
34891 setPointerPosition(self.pointerX, self.pointerY);
34892 render(true);
34893 }
34894 if (scrollProxy) {
34895 calculateBounds();
34896 startElementY = scrollProxy.top();
34897 startElementX = scrollProxy.left();
34898 } else {
34899 //if the element is in the process of tweening, don't force snapping to occur because it could make it jump. Imagine the user throwing, then before it's done, clicking on the element in its inbetween state.
34900 if (isTweening()) {
34901 syncXY(true, true);
34902 calculateBounds();
34903 } else {
34904 self.applyBounds();
34905 }
34906 if (rotationMode) {
34907 rotationOrigin = self.rotationOrigin = _localToGlobal(target, {x:0, y:0});
34908 syncXY(true, true);
34909 startElementX = self.x; //starting rotation (x always refers to rotation in type:"rotation", measured in degrees)
34910 startElementY = self.y = Math.atan2(rotationOrigin.y - self.pointerY, self.pointerX - rotationOrigin.x) * _RAD2DEG;
34911 } else {
34912 startScrollTop = target.parentNode ? target.parentNode.scrollTop || 0 : 0;
34913 startScrollLeft = target.parentNode ? target.parentNode.scrollLeft || 0 : 0;
34914 startElementY = _getStyle(target, yProp); //record the starting top and left values so that we can just add the mouse's movement to them later.
34915 startElementX = _getStyle(target, xProp);
34916 }
34917 }
34918 if (hasBounds && edgeTolerance) {
34919 if (startElementX > maxX) {
34920 startElementX = maxX + (startElementX - maxX) / edgeTolerance;
34921 } else if (startElementX < minX) {
34922 startElementX = minX - (minX - startElementX) / edgeTolerance;
34923 }
34924 if (!rotationMode) {
34925 if (startElementY > maxY) {
34926 startElementY = maxY + (startElementY - maxY) / edgeTolerance;
34927 } else if (startElementY < minY) {
34928 startElementY = minY - (minY - startElementY) / edgeTolerance;
34929 }
34930 }
34931 }
34932 self.startX = startElementX;
34933 self.startY = startElementY;
34934 },
34935
34936 isTweening = function() {
34937 return (self.tween && self.tween.isActive());
34938 },
34939
34940 removePlaceholder = function() {
34941 if (_placeholderDiv.parentNode && !isTweening() && !self.isDragging) { //_placeholderDiv just props open auto-scrolling containers so they don't collapse as the user drags left/up. We remove it after dragging (and throwing, if necessary) finishes.
34942 _placeholderDiv.parentNode.removeChild(_placeholderDiv);
34943 }
34944 },
34945
34946 buildSnapFunc = function(snap, min, max, factor) {
34947 if (typeof(snap) === "function") {
34948 return function(n) {
34949 var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance; //if we're tweening, disable the edgeTolerance because it's already factored into the tweening values (we don't want to apply it multiple times)
34950 return snap.call(self, (n > max ? max + (n - max) * edgeTolerance : (n < min) ? min + (n - min) * edgeTolerance : n)) * factor;
34951 };
34952 }
34953 if (snap instanceof Array) {
34954 return function(n) {
34955 var i = snap.length,
34956 closest = 0,
34957 absDif = _max,
34958 val, dif;
34959 while (--i > -1) {
34960 val = snap[i];
34961 dif = val - n;
34962 if (dif < 0) {
34963 dif = -dif;
34964 }
34965 if (dif < absDif && val >= min && val <= max) {
34966 closest = i;
34967 absDif = dif;
34968 }
34969 }
34970 return snap[closest];
34971 };
34972 }
34973 return isNaN(snap) ? function(n) { return n; } : function() { return snap * factor; };
34974 },
34975
34976 buildPointSnapFunc = function(snap, minX, maxX, minY, maxY, radius, factor) {
34977 radius = (radius && radius < _max) ? radius * radius : _max; //so we don't have to Math.sqrt() in the functions. Performance optimization.
34978 if (typeof(snap) === "function") {
34979 return function(point) {
34980 var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance,
34981 x = point.x,
34982 y = point.y,
34983 result, dx, dy; //if we're tweening, disable the edgeTolerance because it's already factored into the tweening values (we don't want to apply it multiple times)
34984 point.x = x = (x > maxX ? maxX + (x - maxX) * edgeTolerance : (x < minX) ? minX + (x - minX) * edgeTolerance : x);
34985 point.y = y = (y > maxY ? maxY + (y - maxY) * edgeTolerance : (y < minY) ? minY + (y - minY) * edgeTolerance : y);
34986 result = snap.call(self, point);
34987 if (result !== point) {
34988 point.x = result.x;
34989 point.y = result.y;
34990 }
34991 if (factor !== 1) {
34992 point.x *= factor;
34993 point.y *= factor;
34994 }
34995 if (radius < _max) {
34996 dx = point.x - x;
34997 dy = point.y - y;
34998 if (dx * dx + dy * dy > radius) {
34999 point.x = x;
35000 point.y = y;
35001 }
35002 }
35003 return point;
35004 };
35005 }
35006 if (snap instanceof Array) {
35007 return function(p) {
35008 var i = snap.length,
35009 closest = 0,
35010 minDist = _max,
35011 x, y, point, dist;
35012 while (--i > -1) {
35013 point = snap[i];
35014 x = point.x - p.x;
35015 y = point.y - p.y;
35016 dist = x * x + y * y;
35017 if (dist < minDist) {
35018 closest = i;
35019 minDist = dist;
35020 }
35021 }
35022 return (minDist <= radius) ? snap[closest] : p;
35023 };
35024 }
35025 return function(n) { return n; };
35026 },
35027
35028 //called when the mouse is pressed (or touch starts)
35029 onPress = function(e, force) {
35030 var i;
35031 if (!enabled || self.isPressed || !e || ((e.type === "mousedown" || e.type === "pointerdown") && !force && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type])) { //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown.
35032 return;
35033 }
35034 interrupted = isTweening();
35035 self.pointerEvent = e;
35036 if (_touchEventLookup[e.type]) { //note: on iOS, BOTH touchmove and mousemove are dispatched, but the mousemove has pageY and pageX of 0 which would mess up the calculations and needlessly hurt performance.
35037 touchEventTarget = (e.type.indexOf("touch") !== -1) ? (e.currentTarget || e.target) : _doc; //pointer-based touches (for Microsoft browsers) don't remain locked to the original target like other browsers, so we must use the document instead. The event type would be "MSPointerDown" or "pointerdown".
35038 _addListener(touchEventTarget, "touchend", onRelease);
35039 _addListener(touchEventTarget, "touchmove", onMove);
35040 _addListener(touchEventTarget, "touchcancel", onRelease);
35041 _addListener(_doc, "touchstart", _onMultiTouchDocument);
35042 } else {
35043 touchEventTarget = null;
35044 _addListener(_doc, "mousemove", onMove); //attach these to the document instead of the box itself so that if the user's mouse moves too quickly (and off of the box), things still work.
35045 }
35046 touchDragAxis = null;
35047 _addListener(_doc, "mouseup", onRelease);
35048 if (e && e.target) {
35049 _addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"
35050 }
35051 isClicking = (isClickable.call(self, e.target) && !vars.dragClickables && !force);
35052 if (isClicking) {
35053 _addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.
35054 _dispatchEvent(self, "pressInit", "onPressInit");
35055 _dispatchEvent(self, "press", "onPress");
35056 _setSelectable(triggers, true); //accommodates things like inputs and elements with contentEditable="true" (otherwise user couldn't drag to select text)
35057 return;
35058 }
35059 allowNativeTouchScrolling = (!touchEventTarget || allowX === allowY || self.vars.allowNativeTouchScrolling === false || (self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2))) ? false : allowX ? "y" : "x"; //note: in Chrome, right-clicking (for a context menu) fires onPress and it doesn't have the event.which set properly, so we must look for event.ctrlKey. If the user wants to allow context menus we should of course sense it here and not allow native touch scrolling.
35060 if (_isOldIE) {
35061 e = _populateIEEvent(e, true);
35062 } else if (!allowNativeTouchScrolling && !self.allowEventDefault) {
35063 e.preventDefault();
35064 if (e.preventManipulation) {
35065 e.preventManipulation(); //for some Microsoft browsers
35066 }
35067 }
35068 if (e.changedTouches) { //touch events store the data slightly differently
35069 e = touch = e.changedTouches[0];
35070 touchID = e.identifier;
35071 } else if (e.pointerId) {
35072 touchID = e.pointerId; //for some Microsoft browsers
35073 } else {
35074 touch = touchID = null;
35075 }
35076 _dragCount++;
35077 _addToRenderQueue(render); //causes the Draggable to render on each "tick" of TweenLite.ticker (performance optimization - updating values in a mousemove can cause them to happen too frequently, like multiple times between frame redraws which is wasteful, and it also prevents values from updating properly in IE8)
35078 startPointerY = self.pointerY = e.pageY; //record the starting x and y so that we can calculate the movement from the original in _onMouseMove
35079 startPointerX = self.pointerX = e.pageX;
35080 _dispatchEvent(self, "pressInit", "onPressInit");
35081 if (allowNativeTouchScrolling || self.autoScroll) {
35082 _recordMaxScrolls(target.parentNode);
35083 }
35084 if (target.parentNode && self.autoScroll && !scrollProxy && !rotationMode && target.parentNode._gsMaxScrollX && !_placeholderDiv.parentNode && !target.getBBox) { //add a placeholder div to prevent the parent container from collapsing when the user drags the element left.
35085 _placeholderDiv.style.width = target.parentNode.scrollWidth + "px";
35086 target.parentNode.appendChild(_placeholderDiv);
35087 }
35088 recordStartPositions();
35089 if (self.tween) {
35090 self.tween.kill();
35091 }
35092 self.isThrowing = false;
35093 TweenLite["d" /* default */].killTweensOf(scrollProxy || target, true, killProps); //in case the user tries to drag it before the last tween is done.
35094 if (scrollProxy) {
35095 TweenLite["d" /* default */].killTweensOf(target, true, {scrollTo:1}); //just in case the original target's scroll position is being tweened somewhere else.
35096 }
35097 self.tween = self.lockedAxis = null;
35098 if (vars.zIndexBoost || (!rotationMode && !scrollProxy && vars.zIndexBoost !== false)) {
35099 target.style.zIndex = Draggable.zIndex++;
35100 }
35101 self.isPressed = true;
35102 hasDragCallback = !!(vars.onDrag || self._listeners.drag);
35103 if (!rotationMode) {
35104 i = triggers.length;
35105 while (--i > -1) {
35106 _setStyle(triggers[i], "cursor", vars.cursor || "move");
35107 }
35108 }
35109 _dispatchEvent(self, "press", "onPress");
35110 },
35111
35112 //called every time the mouse/touch moves
35113 onMove = function(e) {
35114 var originalEvent = e,
35115 touches, pointerX, pointerY, i, dx, dy;
35116 if (!enabled || _isMultiTouching || !self.isPressed || !e) {
35117 return;
35118 }
35119 self.pointerEvent = e;
35120 touches = e.changedTouches;
35121 if (touches) { //touch events store the data slightly differently
35122 e = touches[0];
35123 if (e !== touch && e.identifier !== touchID) { //Usually changedTouches[0] will be what we're looking for, but in case it's not, look through the rest of the array...(and Android browsers don't reuse the event like iOS)
35124 i = touches.length;
35125 while (--i > -1 && (e = touches[i]).identifier !== touchID) {}
35126 if (i < 0) {
35127 return;
35128 }
35129 }
35130 } else if (e.pointerId && touchID && e.pointerId !== touchID) { //for some Microsoft browsers, we must attach the listener to the doc rather than the trigger so that when the finger moves outside the bounds of the trigger, things still work. So if the event we're receiving has a pointerId that doesn't match the touchID, ignore it (for multi-touch)
35131 return;
35132 }
35133 if (_isOldIE) {
35134 e = _populateIEEvent(e, true);
35135 } else {
35136 if (touchEventTarget && allowNativeTouchScrolling && !touchDragAxis) { //Android browsers force us to decide on the first "touchmove" event if we should allow the default (scrolling) behavior or preventDefault(). Otherwise, a "touchcancel" will be fired and then no "touchmove" or "touchend" will fire during the scrolling (no good).
35137 pointerX = e.pageX;
35138 pointerY = e.pageY;
35139 if (matrix) {
35140 i = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];
35141 pointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];
35142 pointerX = i;
35143 }
35144 dx = Math.abs(pointerX - startPointerX);
35145 dy = Math.abs(pointerY - startPointerY);
35146 if ((dx !== dy && (dx > minimumMovement || dy > minimumMovement)) || (_isAndroid && allowNativeTouchScrolling === touchDragAxis)) {
35147 touchDragAxis = (dx > dy && allowX) ? "x" : "y";
35148 if (self.vars.lockAxisOnTouchScroll !== false) {
35149 self.lockedAxis = (touchDragAxis === "x") ? "y" : "x";
35150 if (typeof(self.vars.onLockAxis) === "function") {
35151 self.vars.onLockAxis.call(self, originalEvent);
35152 }
35153 }
35154 if (_isAndroid && allowNativeTouchScrolling === touchDragAxis) {
35155 onRelease(originalEvent);
35156 return;
35157 }
35158 }
35159 }
35160 if (!self.allowEventDefault && (!allowNativeTouchScrolling || (touchDragAxis && allowNativeTouchScrolling !== touchDragAxis)) && originalEvent.cancelable !== false) {
35161 originalEvent.preventDefault();
35162 if (originalEvent.preventManipulation) { //for some Microsoft browsers
35163 originalEvent.preventManipulation();
35164 }
35165 }
35166 }
35167 if (self.autoScroll) {
35168 checkAutoScrollBounds = true;
35169 }
35170 setPointerPosition(e.pageX, e.pageY);
35171 },
35172
35173 setPointerPosition = function(pointerX, pointerY) {
35174 var dragTolerance = 1 - self.dragResistance,
35175 edgeTolerance = 1 - self.edgeResistance,
35176 xChange, yChange, x, y, dif, temp;
35177
35178 self.pointerX = pointerX;
35179 self.pointerY = pointerY;
35180 if (rotationMode) {
35181 y = Math.atan2(rotationOrigin.y - pointerY, pointerX - rotationOrigin.x) * _RAD2DEG;
35182 dif = self.y - y;
35183 if (dif > 180) {
35184 startElementY -= 360;
35185 self.y = y;
35186 } else if (dif < -180) {
35187 startElementY += 360;
35188 self.y = y;
35189 }
35190 if (self.x !== startElementX || Math.abs(startElementY - y) > minimumMovement) {
35191 self.y = y;
35192 x = startElementX + (startElementY - y) * dragTolerance;
35193 } else {
35194 x = startElementX;
35195 }
35196
35197 } else {
35198 if (matrix) {
35199 temp = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];
35200 pointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];
35201 pointerX = temp;
35202 }
35203 yChange = (pointerY - startPointerY);
35204 xChange = (pointerX - startPointerX);
35205 if (yChange < minimumMovement && yChange > -minimumMovement) {
35206 yChange = 0;
35207 }
35208 if (xChange < minimumMovement && xChange > -minimumMovement) {
35209 xChange = 0;
35210 }
35211 if ((self.lockAxis || self.lockedAxis) && (xChange || yChange)) {
35212 temp = self.lockedAxis;
35213 if (!temp) {
35214 self.lockedAxis = temp = (allowX && Math.abs(xChange) > Math.abs(yChange)) ? "y" : allowY ? "x" : null;
35215 if (temp && typeof(self.vars.onLockAxis) === "function") {
35216 self.vars.onLockAxis.call(self, self.pointerEvent);
35217 }
35218 }
35219 if (temp === "y") {
35220 yChange = 0;
35221 } else if (temp === "x") {
35222 xChange = 0;
35223 }
35224 }
35225 x = startElementX + xChange * dragTolerance;
35226 y = startElementY + yChange * dragTolerance;
35227 }
35228
35229 if ((snapX || snapY || snapXY) && (self.x !== x || (self.y !== y && !rotationMode))) {
35230 if (snapXY) {
35231 _temp1.x = x;
35232 _temp1.y = y;
35233 temp = snapXY(_temp1);
35234 x = temp.x;
35235 y = temp.y;
35236 }
35237 if (snapX) {
35238 x = snapX(x);
35239 }
35240 if (snapY) {
35241 y = snapY(y);
35242 }
35243 } else if (hasBounds) {
35244 if (x > maxX) {
35245 x = maxX + (x - maxX) * edgeTolerance;
35246 } else if (x < minX) {
35247 x = minX + (x - minX) * edgeTolerance;
35248 }
35249 if (!rotationMode) {
35250 if (y > maxY) {
35251 y = maxY + (y - maxY) * edgeTolerance;
35252 } else if (y < minY) {
35253 y = minY + (y - minY) * edgeTolerance;
35254 }
35255 }
35256 }
35257 if (!rotationMode && !matrix) {
35258 x = Math.round(x); //helps work around an issue with some Win Touch devices
35259 y = Math.round(y);
35260 }
35261 if (self.x !== x || (self.y !== y && !rotationMode)) {
35262 if (rotationMode) {
35263 self.endRotation = self.x = self.endX = x;
35264 dirty = true;
35265 } else {
35266 if (allowY) {
35267 self.y = self.endY = y;
35268 dirty = true; //a flag that indicates we need to render the target next time the TweenLite.ticker dispatches a "tick" event (typically on a requestAnimationFrame) - this is a performance optimization (we shouldn't render on every move because sometimes many move events can get dispatched between screen refreshes, and that'd be wasteful to render every time)
35269 }
35270 if (allowX) {
35271 self.x = self.endX = x;
35272 dirty = true;
35273 }
35274 }
35275 if (!self.isDragging && self.isPressed) {
35276 self.isDragging = true;
35277 _dispatchEvent(self, "dragstart", "onDragStart");
35278 }
35279 }
35280 },
35281
35282 //called when the mouse/touch is released
35283 onRelease = function(e, force) {
35284 if (!enabled || !self.isPressed || (e && touchID != null && !force && ((e.pointerId && e.pointerId !== touchID) || (e.changedTouches && !_hasTouchID(e.changedTouches, touchID))))) { //for some Microsoft browsers, we must attach the listener to the doc rather than the trigger so that when the finger moves outside the bounds of the trigger, things still work. So if the event we're receiving has a pointerId that doesn't match the touchID, ignore it (for multi-touch)
35285 return;
35286 }
35287 self.isPressed = false;
35288 var originalEvent = e,
35289 wasDragging = self.isDragging,
35290 isContextMenuRelease = (self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2)),
35291 placeholderDelayedCall = TweenLite["d" /* default */].delayedCall(0.001, removePlaceholder),
35292 touches, i, syntheticEvent, eventTarget, syntheticClick;
35293 if (touchEventTarget) {
35294 _removeListener(touchEventTarget, "touchend", onRelease);
35295 _removeListener(touchEventTarget, "touchmove", onMove);
35296 _removeListener(touchEventTarget, "touchcancel", onRelease);
35297 _removeListener(_doc, "touchstart", _onMultiTouchDocument);
35298 } else {
35299 _removeListener(_doc, "mousemove", onMove);
35300 }
35301 _removeListener(_doc, "mouseup", onRelease);
35302 if (e && e.target) {
35303 _removeListener(e.target, "mouseup", onRelease);
35304 }
35305 dirty = false;
35306 if (isClicking && !isContextMenuRelease) {
35307 if (e) {
35308 _removeListener(e.target, "change", onRelease);
35309 self.pointerEvent = originalEvent;
35310 }
35311 _setSelectable(triggers, false);
35312 _dispatchEvent(self, "release", "onRelease");
35313 _dispatchEvent(self, "click", "onClick");
35314 isClicking = false;
35315 return;
35316 }
35317 _removeFromRenderQueue(render);
35318 if (!rotationMode) {
35319 i = triggers.length;
35320 while (--i > -1) {
35321 _setStyle(triggers[i], "cursor", vars.cursor || "move");
35322 }
35323 }
35324 if (wasDragging) {
35325 dragEndTime = _lastDragTime = _getTime();
35326 self.isDragging = false;
35327 }
35328 _dragCount--;
35329 if (e) {
35330 if (_isOldIE) {
35331 e = _populateIEEvent(e, false);
35332 }
35333 touches = e.changedTouches;
35334 if (touches) { //touch events store the data slightly differently
35335 e = touches[0];
35336 if (e !== touch && e.identifier !== touchID) { //Usually changedTouches[0] will be what we're looking for, but in case it's not, look through the rest of the array...(and Android browsers don't reuse the event like iOS)
35337 i = touches.length;
35338 while (--i > -1 && (e = touches[i]).identifier !== touchID) {}
35339 if (i < 0) {
35340 return;
35341 }
35342 }
35343 }
35344 self.pointerEvent = originalEvent;
35345 self.pointerX = e.pageX;
35346 self.pointerY = e.pageY;
35347 }
35348 if (isContextMenuRelease && originalEvent) {
35349 originalEvent.preventDefault();
35350 if (originalEvent.preventManipulation) {
35351 originalEvent.preventManipulation(); //for some Microsoft browsers
35352 }
35353 _dispatchEvent(self, "release", "onRelease");
35354 } else if (originalEvent && !wasDragging) {
35355 if (interrupted && (vars.snap || vars.bounds)) { //otherwise, if the user clicks on the object while it's animating to a snapped position, and then releases without moving 3 pixels, it will just stay there (it should animate/snap)
35356 animate(vars.throwProps);
35357 }
35358 _dispatchEvent(self, "release", "onRelease");
35359 if ((!_isAndroid || originalEvent.type !== "touchmove") && originalEvent.type.indexOf("cancel") === -1) { //to accommodate native scrolling on Android devices, we have to immediately call onRelease() on the first touchmove event, but that shouldn't trigger a "click".
35360 _dispatchEvent(self, "click", "onClick");
35361 if (_getTime() - clickTime < 300) {
35362 _dispatchEvent(self, "doubleclick", "onDoubleClick");
35363 }
35364 eventTarget = originalEvent.target || originalEvent.srcElement || target; //old IE uses srcElement
35365 clickTime = _getTime();
35366 syntheticClick = function () { // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched.
35367 if (clickTime !== clickDispatch && self.enabled() && !self.isPressed) {
35368 if (eventTarget.click) { //some browsers (like mobile Safari) don't properly trigger the click event
35369 eventTarget.click();
35370 } else if (_doc.createEvent) {
35371 syntheticEvent = _doc.createEvent("MouseEvents");
35372 syntheticEvent.initMouseEvent("click", true, true, window, 1, self.pointerEvent.screenX, self.pointerEvent.screenY, self.pointerX, self.pointerY, false, false, false, false, 0, null);
35373 eventTarget.dispatchEvent(syntheticEvent);
35374 }
35375 }
35376 };
35377 if (!_isAndroid && !originalEvent.defaultPrevented) { //iOS Safari requires the synthetic click to happen immediately or else it simply won't work, but Android doesn't play nice.
35378 TweenLite["d" /* default */].delayedCall(0.00001, syntheticClick); //in addition to the iOS bug workaround, there's a Firefox issue with clicking on things like a video to play, so we must fake a click event in a slightly delayed fashion. Previously, we listened for the "click" event with "capture" false which solved the video-click-to-play issue, but it would allow the "click" event to be dispatched twice like if you were using a jQuery.click() because that was handled in the capture phase, thus we had to switch to the capture phase to avoid the double-dispatching, but do the delayed synthetic click.
35379 }
35380 }
35381 } else {
35382 animate(vars.throwProps); //will skip if throwProps isn't defined or ThrowPropsPlugin isn't loaded.
35383 if (!_isOldIE && !self.allowEventDefault && originalEvent && (vars.dragClickables || !isClickable.call(self, originalEvent.target)) && wasDragging && (!allowNativeTouchScrolling || (touchDragAxis && allowNativeTouchScrolling === touchDragAxis)) && originalEvent.cancelable !== false) {
35384 originalEvent.preventDefault();
35385 if (originalEvent.preventManipulation) {
35386 originalEvent.preventManipulation(); //for some Microsoft browsers
35387 }
35388 }
35389 _dispatchEvent(self, "release", "onRelease");
35390 }
35391 if (isTweening()) {
35392 placeholderDelayedCall.duration( self.tween.duration() ); //sync the timing so that the placeholder DIV gets
35393 }
35394 if (wasDragging) {
35395 _dispatchEvent(self, "dragend", "onDragEnd");
35396 }
35397 return true;
35398 },
35399
35400 updateScroll = function(e) {
35401 if (e && self.isDragging && !scrollProxy) {
35402 var parent = e.target || e.srcElement || target.parentNode,
35403 deltaX = parent.scrollLeft - parent._gsScrollX,
35404 deltaY = parent.scrollTop - parent._gsScrollY;
35405 if (deltaX || deltaY) {
35406 if (matrix) {
35407 startPointerX -= deltaX * matrix[0] + deltaY * matrix[2];
35408 startPointerY -= deltaY * matrix[3] + deltaX * matrix[1];
35409 } else {
35410 startPointerX -= deltaX;
35411 startPointerY -= deltaY;
35412 }
35413 parent._gsScrollX += deltaX;
35414 parent._gsScrollY += deltaY;
35415 setPointerPosition(self.pointerX, self.pointerY);
35416 }
35417 }
35418 },
35419
35420 onClick = function(e) { //this was a huge pain in the neck to align all the various browsers and their behaviors. Chrome, Firefox, Safari, Opera, Android, and Microsoft Edge all handle events differently! Some will only trigger native behavior (like checkbox toggling) from trusted events. Others don't even support isTrusted, but require 2 events to flow through before triggering native behavior. Edge treats everything as trusted but also mandates that 2 flow through to trigger the correct native behavior.
35421 var time = _getTime(),
35422 recentlyClicked = (time - clickTime < 40),
35423 recentlyDragged = (time - dragEndTime < 40),
35424 alreadyDispatched = (recentlyClicked && clickDispatch === clickTime),
35425 isModern = !!e.preventDefault,
35426 defaultPrevented = (self.pointerEvent && self.pointerEvent.defaultPrevented),
35427 alreadyDispatchedTrusted = (recentlyClicked && trustedClickDispatch === clickTime),
35428 trusted = e.isTrusted || (e.isTrusted == null && recentlyClicked && alreadyDispatched); //note: Safari doesn't support isTrusted, and it won't properly execute native behavior (like toggling checkboxes) on the first synthetic "click" event - we must wait for the 2nd and treat it as trusted (but stop propagation at that point). Confusing, I know. Don't you love cross-browser compatibility challenges?
35429 if (isModern && (alreadyDispatched || (recentlyDragged && self.vars.suppressClickOnDrag !== false) )) {
35430 e.stopImmediatePropagation();
35431 }
35432 if (recentlyClicked && !(self.pointerEvent && self.pointerEvent.defaultPrevented) && (!alreadyDispatched || (trusted !== alreadyDispatchedTrusted))) { //let the first click pass through unhindered. Let the next one only if it's trusted, then no more (stop quick-succession ones)
35433 if (trusted && alreadyDispatched) {
35434 trustedClickDispatch = clickTime;
35435 }
35436 clickDispatch = clickTime;
35437 return;
35438 }
35439 if (self.isPressed || recentlyDragged || recentlyClicked) {
35440 if (!isModern) {
35441 e.returnValue = false;
35442 } else if (!trusted || !e.detail || !recentlyClicked || defaultPrevented) {
35443 e.preventDefault();
35444 if (e.preventManipulation) {
35445 e.preventManipulation(); //for some Microsoft browsers
35446 }
35447 }
35448 }
35449 },
35450
35451 localizePoint = function(p) {
35452 return matrix ? {x:p.x * matrix[0] + p.y * matrix[2] + matrix[4], y:p.x * matrix[1] + p.y * matrix[3] + matrix[5]} : {x:p.x, y:p.y};
35453 };
35454
35455 old = Draggable.get(this.target);
35456 if (old) {
35457 old.kill(); // avoids duplicates (an element can only be controlled by one Draggable)
35458 }
35459
35460 //give the user access to start/stop dragging...
35461 this.startDrag = function(e, align) {
35462 var r1, r2, p1, p2;
35463 onPress(e || self.pointerEvent, true);
35464 //if the pointer isn't on top of the element, adjust things accordingly
35465 if (align && !self.hitTest(e || self.pointerEvent)) {
35466 r1 = _parseRect(e || self.pointerEvent);
35467 r2 = _parseRect(target);
35468 p1 = localizePoint({x:r1.left + r1.width / 2, y:r1.top + r1.height / 2});
35469 p2 = localizePoint({x:r2.left + r2.width / 2, y:r2.top + r2.height / 2});
35470 startPointerX -= p1.x - p2.x;
35471 startPointerY -= p1.y - p2.y;
35472 }
35473 if (!self.isDragging) {
35474 self.isDragging = true;
35475 _dispatchEvent(self, "dragstart", "onDragStart");
35476 }
35477 };
35478 this.drag = onMove;
35479 this.endDrag = function(e) {
35480 onRelease(e || self.pointerEvent, true);
35481 };
35482 this.timeSinceDrag = function() {
35483 return self.isDragging ? 0 : (_getTime() - dragEndTime) / 1000;
35484 };
35485 this.timeSinceClick = function() {
35486 return (_getTime() - clickTime) / 1000;
35487 };
35488 this.hitTest = function(target, threshold) {
35489 return Draggable.hitTest(self.target, target, threshold);
35490 };
35491
35492 this.getDirection = function(from, diagonalThreshold) { //from can be "start" (default), "velocity", or an element
35493 var mode = (from === "velocity" && ThrowPropsPlugin) ? from : (typeof(from) === "object" && !rotationMode) ? "element" : "start",
35494 xChange, yChange, ratio, direction, r1, r2;
35495 if (mode === "element") {
35496 r1 = _parseRect(self.target);
35497 r2 = _parseRect(from);
35498 }
35499 xChange = (mode === "start") ? self.x - startElementX : (mode === "velocity") ? ThrowPropsPlugin.getVelocity(this.target, xProp) : (r1.left + r1.width / 2) - (r2.left + r2.width / 2);
35500 if (rotationMode) {
35501 return xChange < 0 ? "counter-clockwise" : "clockwise";
35502 } else {
35503 diagonalThreshold = diagonalThreshold || 2;
35504 yChange = (mode === "start") ? self.y - startElementY : (mode === "velocity") ? ThrowPropsPlugin.getVelocity(this.target, yProp) : (r1.top + r1.height / 2) - (r2.top + r2.height / 2);
35505 ratio = Math.abs(xChange / yChange);
35506 direction = (ratio < 1 / diagonalThreshold) ? "" : (xChange < 0) ? "left" : "right";
35507 if (ratio < diagonalThreshold) {
35508 if (direction !== "") {
35509 direction += "-";
35510 }
35511 direction += (yChange < 0) ? "up" : "down";
35512 }
35513 }
35514 return direction;
35515 };
35516
35517
35518 this.applyBounds = function(newBounds) {
35519 var x, y, forceZeroVelocity, e, parent, isRoot;
35520 if (newBounds && vars.bounds !== newBounds) {
35521 vars.bounds = newBounds;
35522 return self.update(true);
35523 }
35524 syncXY(true);
35525 calculateBounds();
35526 if (hasBounds) {
35527 x = self.x;
35528 y = self.y;
35529 if (x > maxX) {
35530 x = maxX;
35531 } else if (x < minX) {
35532 x = minX;
35533 }
35534 if (y > maxY) {
35535 y = maxY;
35536 } else if (y < minY) {
35537 y = minY;
35538 }
35539 if (self.x !== x || self.y !== y) {
35540 forceZeroVelocity = true;
35541 self.x = self.endX = x;
35542 if (rotationMode) {
35543 self.endRotation = x;
35544 } else {
35545 self.y = self.endY = y;
35546 }
35547 dirty = true;
35548 render(true);
35549 if (self.autoScroll && !self.isDragging) {
35550 _recordMaxScrolls(target.parentNode);
35551 e = target;
35552 _windowProxy.scrollTop = ((window.pageYOffset != null) ? window.pageYOffset : (_docElement.scrollTop != null) ? _docElement.scrollTop : _doc.body.scrollTop);
35553 _windowProxy.scrollLeft = ((window.pageXOffset != null) ? window.pageXOffset : (_docElement.scrollLeft != null) ? _docElement.scrollLeft : _doc.body.scrollLeft);
35554 while (e && !isRoot) { //walk up the chain and sense wherever the scrollTop/scrollLeft exceeds the maximum.
35555 isRoot = _isRoot(e.parentNode);
35556 parent = isRoot ? _windowProxy : e.parentNode;
35557 if (allowY && parent.scrollTop > parent._gsMaxScrollY) {
35558 parent.scrollTop = parent._gsMaxScrollY;
35559 }
35560 if (allowX && parent.scrollLeft > parent._gsMaxScrollX) {
35561 parent.scrollLeft = parent._gsMaxScrollX;
35562 }
35563 e = parent;
35564 }
35565 }
35566 }
35567 if (self.isThrowing && (forceZeroVelocity || self.endX > maxX || self.endX < minX || self.endY > maxY || self.endY < minY)) {
35568 animate(vars.throwProps, forceZeroVelocity);
35569 }
35570 }
35571 return self;
35572 };
35573
35574 this.update = function(applyBounds, sticky, ignoreExternalChanges) {
35575 var x = self.x,
35576 y = self.y;
35577 updateMatrix(!sticky);
35578 if (applyBounds) {
35579 self.applyBounds();
35580 } else {
35581 if (dirty && ignoreExternalChanges) {
35582 render(true);
35583 }
35584 syncXY(true);
35585 }
35586 if (sticky) {
35587 setPointerPosition(self.pointerX, self.pointerY);
35588 if (dirty) {
35589 render(true);
35590 }
35591 }
35592 if (self.isPressed && !sticky && ((allowX && Math.abs(x - self.x) > 0.01) || (allowY && (Math.abs(y - self.y) > 0.01 && !rotationMode)))) {
35593 recordStartPositions();
35594 }
35595 if (self.autoScroll) {
35596 _recordMaxScrolls(target.parentNode);
35597 checkAutoScrollBounds = self.isDragging;
35598 render(true);
35599 }
35600 if (self.autoScroll) { //in case reparenting occurred.
35601 _removeScrollListener(target, updateScroll);
35602 _addScrollListener(target, updateScroll);
35603 }
35604 return self;
35605 };
35606
35607 this.enable = function(type) {
35608 var id, i, trigger;
35609 if (type !== "soft") {
35610 i = triggers.length;
35611 while (--i > -1) {
35612 trigger = triggers[i];
35613 _addListener(trigger, "mousedown", onPress);
35614 _addListener(trigger, "touchstart", onPress);
35615 _addListener(trigger, "click", onClick, true); //note: used to pass true for capture but it prevented click-to-play-video functionality in Firefox.
35616 if (!rotationMode) {
35617 _setStyle(trigger, "cursor", vars.cursor || "move");
35618 }
35619 _setStyle(trigger, "touchCallout", "none");
35620 _setStyle(trigger, "touchAction", (allowX === allowY) ? "none" : allowX ? "pan-y" : "pan-x");
35621 if (_isSVG(trigger)) { // a bug in chrome doesn't respect touch-action on SVG elements - it only works if we set it on the parent SVG.
35622 _setStyle(trigger.ownerSVGElement || trigger, "touchAction", (allowX === allowY) ? "none" : allowX ? "pan-y" : "pan-x");
35623 }
35624 if (!this.vars.allowContextMenu) {
35625 _addListener(trigger, "contextmenu", onContextMenu);
35626 }
35627 }
35628 _setSelectable(triggers, false);
35629 }
35630 _addScrollListener(target, updateScroll);
35631 enabled = true;
35632 if (ThrowPropsPlugin && type !== "soft") {
35633 ThrowPropsPlugin.track(scrollProxy || target, (xyMode ? "x,y" : rotationMode ? "rotation" : "top,left"));
35634 }
35635 if (scrollProxy) {
35636 scrollProxy.enable();
35637 }
35638 target._gsDragID = id = "d" + (_lookupCount++);
35639 _lookup[id] = this;
35640 if (scrollProxy) {
35641 scrollProxy.element._gsDragID = id;
35642 }
35643 TweenLite["d" /* default */].set(target, {x:"+=0", overwrite:false, data:"_draggable"}); //simply ensures that there's a _gsTransform on the element.
35644 applyObj = {
35645 t:target,
35646 data:_isOldIE ? cssVars : target._gsTransform,
35647 tween:{},
35648 setRatio:(_isOldIE ? function() { TweenLite["d" /* default */].set(target, tempVars); } : CSSPlugin_CSSPlugin._internals.setTransformRatio || CSSPlugin_CSSPlugin._internals.set3DTransformRatio)
35649 };
35650 recordStartPositions();
35651 self.update(true);
35652 return self;
35653 };
35654
35655 this.disable = function(type) {
35656 var dragging = self.isDragging,
35657 i, trigger;
35658 if (!rotationMode) {
35659 i = triggers.length;
35660 while (--i > -1) {
35661 _setStyle(triggers[i], "cursor", null);
35662 }
35663 }
35664 if (type !== "soft") {
35665 i = triggers.length;
35666 while (--i > -1) {
35667 trigger = triggers[i];
35668 _setStyle(trigger, "touchCallout", null);
35669 _setStyle(trigger, "touchAction", null);
35670 _removeListener(trigger, "mousedown", onPress);
35671 _removeListener(trigger, "touchstart", onPress);
35672 _removeListener(trigger, "click", onClick);
35673 _removeListener(trigger, "contextmenu", onContextMenu);
35674 }
35675 _setSelectable(triggers, true);
35676 if (touchEventTarget) {
35677 _removeListener(touchEventTarget, "touchcancel", onRelease);
35678 _removeListener(touchEventTarget, "touchend", onRelease);
35679 _removeListener(touchEventTarget, "touchmove", onMove);
35680 }
35681 _removeListener(_doc, "mouseup", onRelease);
35682 _removeListener(_doc, "mousemove", onMove);
35683 }
35684 _removeScrollListener(target, updateScroll);
35685 enabled = false;
35686 if (ThrowPropsPlugin && type !== "soft") {
35687 ThrowPropsPlugin.untrack(scrollProxy || target, (xyMode ? "x,y" : rotationMode ? "rotation" : "top,left"));
35688 }
35689 if (scrollProxy) {
35690 scrollProxy.disable();
35691 }
35692 _removeFromRenderQueue(render);
35693 self.isDragging = self.isPressed = isClicking = false;
35694 if (dragging) {
35695 _dispatchEvent(self, "dragend", "onDragEnd");
35696 }
35697 return self;
35698 };
35699
35700 this.enabled = function(value, type) {
35701 return arguments.length ? (value ? self.enable(type) : self.disable(type)) : enabled;
35702 };
35703
35704 this.kill = function() {
35705 self.isThrowing = false;
35706 TweenLite["d" /* default */].killTweensOf(scrollProxy || target, true, killProps);
35707 self.disable();
35708 TweenLite["d" /* default */].set(triggers, {clearProps:"userSelect"});
35709 delete _lookup[target._gsDragID];
35710 return self;
35711 };
35712
35713 if (type.indexOf("scroll") !== -1) {
35714 scrollProxy = this.scrollProxy = new ScrollProxy(target, _extend({onKill:function() { //ScrollProxy's onKill() gets called if/when the ScrollProxy senses that the user interacted with the scroll position manually (like using the scrollbar). IE9 doesn't fire the "mouseup" properly when users drag the scrollbar of an element, so this works around that issue.
35715 if (self.isPressed) {
35716 onRelease(null);
35717 }}}, vars));
35718 //a bug in many Android devices' stock browser causes scrollTop to get forced back to 0 after it is altered via JS, so we set overflow to "hidden" on mobile/touch devices (they hide the scroll bar anyway). That works around the bug. (This bug is discussed at https://code.google.com/p/android/issues/detail?id=19625)
35719 target.style.overflowY = (allowY && !_isTouchDevice) ? "auto" : "hidden";
35720 target.style.overflowX = (allowX && !_isTouchDevice) ? "auto" : "hidden";
35721 target = scrollProxy.content;
35722 }
35723
35724 if (vars.force3D !== false) {
35725 TweenLite["d" /* default */].set(target, {force3D:true}); //improve performance by forcing a GPU layer when possible
35726 }
35727 if (rotationMode) {
35728 killProps.rotation = 1;
35729 } else {
35730 if (allowX) {
35731 killProps[xProp] = 1;
35732 }
35733 if (allowY) {
35734 killProps[yProp] = 1;
35735 }
35736 }
35737 if (rotationMode) {
35738 tempVars = _tempVarsRotation;
35739 cssVars = tempVars.css;
35740 tempVars.overwrite = false;
35741 } else if (xyMode) {
35742 tempVars = (allowX && allowY) ? _tempVarsXY : allowX ? _tempVarsX : _tempVarsY;
35743 cssVars = tempVars.css;
35744 tempVars.overwrite = false;
35745 }
35746
35747 this.enable();
35748 },
35749 p = Draggable.prototype = new TweenLite["a" /* EventDispatcher */]();
35750
35751 p.constructor = Draggable;
35752 p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
35753 p.isDragging = p.isPressed = false;
35754 Draggable.version = "0.16.5";
35755 Draggable.zIndex = 1000;
35756
35757 _addListener(_doc, "touchcancel", function() {
35758 //some older Android devices intermittently stop dispatching "touchmove" events if we don't listen for "touchcancel" on the document. Very strange indeed.
35759 });
35760 _addListener(_doc, "contextmenu", function(e) {
35761 var p;
35762 for (p in _lookup) {
35763 if (_lookup[p].isPressed) {
35764 _lookup[p].endDrag();
35765 }
35766 }
35767 });
35768
35769 Draggable.create = function(targets, vars) {
35770 if (typeof(targets) === "string") {
35771 targets = TweenLite["d" /* default */].selector(targets);
35772 }
35773 var a = (!targets || targets.length === 0) ? [] : _isArrayLike(targets) ? _flattenArray(targets) : [targets],
35774 i = a.length;
35775 while (--i > -1) {
35776 a[i] = new Draggable(a[i], vars);
35777 }
35778 return a;
35779 };
35780
35781 Draggable.get = function(target) {
35782 return _lookup[(_unwrapElement(target) || {})._gsDragID];
35783 };
35784
35785 Draggable.timeSinceDrag = function() {
35786 return (_getTime() - _lastDragTime) / 1000;
35787 };
35788
35789 var _tempRect = {}, //reuse to reduce garbage collection tasks
35790 _oldIERect = function(e) { //IE8 doesn't support getBoundingClientRect(), so we use this as a backup.
35791 var top = 0,
35792 left = 0,
35793 width, height;
35794 e = _unwrapElement(e);
35795 width = e.offsetWidth;
35796 height = e.offsetHeight;
35797 while(e) {
35798 top += e.offsetTop;
35799 left += e.offsetLeft;
35800 e = e.offsetParent;
35801 }
35802 return {top: top, left: left, width: width, height: height};
35803 },
35804 _parseRect = function(e, undefined) { //accepts a DOM element, a mouse event, or a rectangle object and returns the corresponding rectangle with left, right, width, height, top, and bottom properties
35805 if (e === window) {
35806 _tempRect.left = _tempRect.top = 0;
35807 _tempRect.width = _tempRect.right = _docElement.clientWidth || e.innerWidth || _doc.body.clientWidth || 0;
35808 _tempRect.height = _tempRect.bottom = ((e.innerHeight || 0) - 20 < _docElement.clientHeight) ? _docElement.clientHeight : e.innerHeight || _doc.body.clientHeight || 0;
35809 return _tempRect;
35810 }
35811 var r = (e.pageX !== undefined) ? {left:e.pageX - _getDocScrollLeft(), top:e.pageY - _getDocScrollTop(), right:e.pageX - _getDocScrollLeft() + 1, bottom:e.pageY - _getDocScrollTop() + 1} : (!e.nodeType && e.left !== undefined && e.top !== undefined) ? e : _isOldIE ? _oldIERect(e) : _unwrapElement(e).getBoundingClientRect();
35812 if (r.right === undefined && r.width !== undefined) {
35813 r.right = r.left + r.width;
35814 r.bottom = r.top + r.height;
35815 } else if (r.width === undefined) { //some browsers don't include width and height properties. We can't just set them directly on r because some browsers throw errors, so create a new generic object.
35816 r = {width: r.right - r.left, height: r.bottom - r.top, right: r.right, left: r.left, bottom: r.bottom, top: r.top};
35817 }
35818 return r;
35819 };
35820
35821 Draggable.hitTest = function(obj1, obj2, threshold) {
35822 if (obj1 === obj2) {
35823 return false;
35824 }
35825 var r1 = _parseRect(obj1),
35826 r2 = _parseRect(obj2),
35827 isOutside = (r2.left > r1.right || r2.right < r1.left || r2.top > r1.bottom || r2.bottom < r1.top),
35828 overlap, area, isRatio;
35829 if (isOutside || !threshold) {
35830 return !isOutside;
35831 }
35832 isRatio = ((threshold + "").indexOf("%") !== -1);
35833 threshold = parseFloat(threshold) || 0;
35834 overlap = {left:Math.max(r1.left, r2.left), top:Math.max(r1.top, r2.top)};
35835 overlap.width = Math.min(r1.right, r2.right) - overlap.left;
35836 overlap.height = Math.min(r1.bottom, r2.bottom) - overlap.top;
35837 if (overlap.width < 0 || overlap.height < 0) {
35838 return false;
35839 }
35840 if (isRatio) {
35841 threshold *= 0.01;
35842 area = overlap.width * overlap.height;
35843 return (area >= r1.width * r1.height * threshold || area >= r2.width * r2.height * threshold);
35844 }
35845 return (overlap.width > threshold && overlap.height > threshold);
35846 };
35847
35848 _placeholderDiv.style.cssText = "visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;";
35849
35850 return Draggable;
35851
35852 }, true);
35853
35854var Draggable_Draggable = TweenLite["e" /* globals */].Draggable;
35855
35856// CONCATENATED MODULE: ./src/type-guards.ts
35857function isElementArray(value) {
35858 return value.length !== undefined;
35859}
35860// Any DOM element has a tagName, this was defined in DOM 1.0 (1998)
35861function isElement(value) {
35862 return value.tagName !== undefined;
35863}
35864function isHTMLElement(value) {
35865 return value.accessKey !== undefined;
35866}
35867function isSvgGraphicsElement(value) {
35868 return value.transform !== undefined;
35869}
35870/* harmony default export */ var type_guards = ({
35871 isElementArray: isElementArray, isElement: isElement, isHTMLElement: isHTMLElement, isSvgGraphicsElement: isSvgGraphicsElement
35872});
35873
35874// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SerifOperator.vue?vue&type=template&id=53db1a5f&
35875var SerifOperatorvue_type_template_id_53db1a5f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"serif"},[_c('span',{staticClass:"toggle-control",on:{"click":_vm.toggleSerif}},[_vm._v("⇿")]),_c('div',{staticClass:"serif-left"}),_c('transition',{attrs:{"name":"trans","mode":"out-in"}},[(_vm.serifExpanded)?_c('serif-control-panel',{key:"serif-expanded",attrs:{"distance":_vm.distance,"on-change-distance":_vm.onChangeDistance}}):_c('distance-indicator',{key:"serif-collapsed",attrs:{"distance":_vm.distance,"stroke":"hsl(45, 100%, 50%)"}})],1),_c('div',{staticClass:"serif-right"})],1)}
35876var SerifOperatorvue_type_template_id_53db1a5f_staticRenderFns = []
35877
35878
35879// CONCATENATED MODULE: ./src/components/SerifOperator.vue?vue&type=template&id=53db1a5f&
35880
35881// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DistanceIndicator.vue?vue&type=template&id=2b007bb5&
35882var DistanceIndicatorvue_type_template_id_2b007bb5_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"distance-indicator"},_vm._l((_vm.distance),function(n){return _c('div',{staticClass:"single-distance-line"})}))}
35883var DistanceIndicatorvue_type_template_id_2b007bb5_staticRenderFns = []
35884
35885
35886// CONCATENATED MODULE: ./src/components/DistanceIndicator.vue?vue&type=template&id=2b007bb5&
35887
35888// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DistanceIndicator.vue?vue&type=script&lang=ts&
35889
35890/* harmony default export */ var DistanceIndicatorvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
35891 props: ['distance', 'stroke'],
35892 components: {},
35893 data: function () {
35894 return {};
35895 },
35896 mounted: function () {
35897 },
35898 methods: {}
35899}));
35900
35901// CONCATENATED MODULE: ./src/components/DistanceIndicator.vue?vue&type=script&lang=ts&
35902 /* harmony default export */ var components_DistanceIndicatorvue_type_script_lang_ts_ = (DistanceIndicatorvue_type_script_lang_ts_);
35903// EXTERNAL MODULE: ./src/components/DistanceIndicator.vue?vue&type=style&index=0&lang=less&
35904var DistanceIndicatorvue_type_style_index_0_lang_less_ = __webpack_require__("93f8");
35905
35906// CONCATENATED MODULE: ./src/components/DistanceIndicator.vue
35907
35908
35909
35910
35911
35912
35913/* normalize component */
35914
35915var DistanceIndicator_component = normalizeComponent(
35916 components_DistanceIndicatorvue_type_script_lang_ts_,
35917 DistanceIndicatorvue_type_template_id_2b007bb5_render,
35918 DistanceIndicatorvue_type_template_id_2b007bb5_staticRenderFns,
35919 false,
35920 null,
35921 null,
35922 null
35923
35924)
35925
35926DistanceIndicator_component.options.__file = "DistanceIndicator.vue"
35927/* harmony default export */ var DistanceIndicator = (DistanceIndicator_component.exports);
35928// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0f87e5ee-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SerifControlPanel.vue?vue&type=template&id=657091f0&
35929var SerifControlPanelvue_type_template_id_657091f0_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"serif-content"},[_vm._m(0),_c('input',{staticClass:"distance-value",attrs:{"type":"number","placeholder":"4"},domProps:{"value":_vm.distance},on:{"change":_vm.onChangeDistance}}),_vm._m(1)])}
35930var SerifControlPanelvue_type_template_id_657091f0_staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('select',{attrs:{"name":"distanceConditionType"}},[_c('option',{attrs:{"value":"distanceConditionType"}},[_vm._v("Within")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('select',{attrs:{"name":"distanceUnit"}},[_c('option',{attrs:{"value":"sentences"}},[_vm._v("Sentences")])])}]
35931
35932
35933// CONCATENATED MODULE: ./src/components/SerifControlPanel.vue?vue&type=template&id=657091f0&
35934
35935// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SerifControlPanel.vue?vue&type=script&lang=ts&
35936
35937/* harmony default export */ var SerifControlPanelvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
35938 props: ['onChangeDistance', 'distance']
35939}));
35940
35941// CONCATENATED MODULE: ./src/components/SerifControlPanel.vue?vue&type=script&lang=ts&
35942 /* harmony default export */ var components_SerifControlPanelvue_type_script_lang_ts_ = (SerifControlPanelvue_type_script_lang_ts_);
35943// EXTERNAL MODULE: ./src/components/SerifControlPanel.vue?vue&type=style&index=0&lang=less&
35944var SerifControlPanelvue_type_style_index_0_lang_less_ = __webpack_require__("1f6c");
35945
35946// CONCATENATED MODULE: ./src/components/SerifControlPanel.vue
35947
35948
35949
35950
35951
35952
35953/* normalize component */
35954
35955var SerifControlPanel_component = normalizeComponent(
35956 components_SerifControlPanelvue_type_script_lang_ts_,
35957 SerifControlPanelvue_type_template_id_657091f0_render,
35958 SerifControlPanelvue_type_template_id_657091f0_staticRenderFns,
35959 false,
35960 null,
35961 null,
35962 null
35963
35964)
35965
35966SerifControlPanel_component.options.__file = "SerifControlPanel.vue"
35967/* harmony default export */ var SerifControlPanel = (SerifControlPanel_component.exports);
35968// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SerifOperator.vue?vue&type=script&lang=ts&
35969
35970
35971
35972/* harmony default export */ var SerifOperatorvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
35973 components: { SerifControlPanel: SerifControlPanel, DistanceIndicator: DistanceIndicator },
35974 data: function () {
35975 return {
35976 serifExpanded: true,
35977 distance: 4
35978 };
35979 },
35980 mounted: function () {
35981 var _this = this;
35982 this.$nextTick(function () {
35983 window.addEventListener('keydown', function (e) {
35984 if (e.key === " ") {
35985 _this.toggleSerif();
35986 }
35987 });
35988 });
35989 },
35990 methods: {
35991 onChangeDistance: function (e) {
35992 if (e.currentTarget === null)
35993 throw new Error('bad');
35994 var target = e.currentTarget;
35995 var casted = target;
35996 this.distance = parseInt(casted.value);
35997 },
35998 toggleSerif: function () {
35999 this.serifExpanded = !this.serifExpanded;
36000 },
36001 }
36002}));
36003
36004// CONCATENATED MODULE: ./src/components/SerifOperator.vue?vue&type=script&lang=ts&
36005 /* harmony default export */ var components_SerifOperatorvue_type_script_lang_ts_ = (SerifOperatorvue_type_script_lang_ts_);
36006// EXTERNAL MODULE: ./src/components/SerifOperator.vue?vue&type=style&index=0&lang=less&
36007var SerifOperatorvue_type_style_index_0_lang_less_ = __webpack_require__("0811");
36008
36009// CONCATENATED MODULE: ./src/components/SerifOperator.vue
36010
36011
36012
36013
36014
36015
36016/* normalize component */
36017
36018var SerifOperator_component = normalizeComponent(
36019 components_SerifOperatorvue_type_script_lang_ts_,
36020 SerifOperatorvue_type_template_id_53db1a5f_render,
36021 SerifOperatorvue_type_template_id_53db1a5f_staticRenderFns,
36022 false,
36023 null,
36024 null,
36025 null
36026
36027)
36028
36029SerifOperator_component.options.__file = "SerifOperator.vue"
36030/* harmony default export */ var SerifOperator = (SerifOperator_component.exports);
36031// CONCATENATED MODULE: ./node_modules/d3-array/src/ascending.js
36032/* harmony default export */ var ascending = (function(a, b) {
36033 return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
36034});
36035
36036// CONCATENATED MODULE: ./node_modules/d3-array/src/bisector.js
36037
36038
36039/* harmony default export */ var bisector = (function(compare) {
36040 if (compare.length === 1) compare = ascendingComparator(compare);
36041 return {
36042 left: function(a, x, lo, hi) {
36043 if (lo == null) lo = 0;
36044 if (hi == null) hi = a.length;
36045 while (lo < hi) {
36046 var mid = lo + hi >>> 1;
36047 if (compare(a[mid], x) < 0) lo = mid + 1;
36048 else hi = mid;
36049 }
36050 return lo;
36051 },
36052 right: function(a, x, lo, hi) {
36053 if (lo == null) lo = 0;
36054 if (hi == null) hi = a.length;
36055 while (lo < hi) {
36056 var mid = lo + hi >>> 1;
36057 if (compare(a[mid], x) > 0) hi = mid;
36058 else lo = mid + 1;
36059 }
36060 return lo;
36061 }
36062 };
36063});
36064
36065function ascendingComparator(f) {
36066 return function(d, x) {
36067 return ascending(f(d), x);
36068 };
36069}
36070
36071// CONCATENATED MODULE: ./node_modules/d3-array/src/bisect.js
36072
36073
36074
36075var ascendingBisect = bisector(ascending);
36076var bisectRight = ascendingBisect.right;
36077var bisectLeft = ascendingBisect.left;
36078/* harmony default export */ var bisect = (bisectRight);
36079
36080// CONCATENATED MODULE: ./node_modules/d3-array/src/pairs.js
36081/* harmony default export */ var pairs = (function(array, f) {
36082 if (f == null) f = pair;
36083 var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);
36084 while (i < n) pairs[i] = f(p, p = array[++i]);
36085 return pairs;
36086});
36087
36088function pair(a, b) {
36089 return [a, b];
36090}
36091
36092// CONCATENATED MODULE: ./node_modules/d3-array/src/cross.js
36093
36094
36095/* harmony default export */ var cross = (function(values0, values1, reduce) {
36096 var n0 = values0.length,
36097 n1 = values1.length,
36098 values = new Array(n0 * n1),
36099 i0,
36100 i1,
36101 i,
36102 value0;
36103
36104 if (reduce == null) reduce = pair;
36105
36106 for (i0 = i = 0; i0 < n0; ++i0) {
36107 for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {
36108 values[i] = reduce(value0, values1[i1]);
36109 }
36110 }
36111
36112 return values;
36113});
36114
36115// CONCATENATED MODULE: ./node_modules/d3-array/src/descending.js
36116/* harmony default export */ var descending = (function(a, b) {
36117 return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
36118});
36119
36120// CONCATENATED MODULE: ./node_modules/d3-array/src/number.js
36121/* harmony default export */ var number = (function(x) {
36122 return x === null ? NaN : +x;
36123});
36124
36125// CONCATENATED MODULE: ./node_modules/d3-array/src/variance.js
36126
36127
36128/* harmony default export */ var variance = (function(values, valueof) {
36129 var n = values.length,
36130 m = 0,
36131 i = -1,
36132 mean = 0,
36133 value,
36134 delta,
36135 sum = 0;
36136
36137 if (valueof == null) {
36138 while (++i < n) {
36139 if (!isNaN(value = number(values[i]))) {
36140 delta = value - mean;
36141 mean += delta / ++m;
36142 sum += delta * (value - mean);
36143 }
36144 }
36145 }
36146
36147 else {
36148 while (++i < n) {
36149 if (!isNaN(value = number(valueof(values[i], i, values)))) {
36150 delta = value - mean;
36151 mean += delta / ++m;
36152 sum += delta * (value - mean);
36153 }
36154 }
36155 }
36156
36157 if (m > 1) return sum / (m - 1);
36158});
36159
36160// CONCATENATED MODULE: ./node_modules/d3-array/src/deviation.js
36161
36162
36163/* harmony default export */ var deviation = (function(array, f) {
36164 var v = variance(array, f);
36165 return v ? Math.sqrt(v) : v;
36166});
36167
36168// CONCATENATED MODULE: ./node_modules/d3-array/src/extent.js
36169/* harmony default export */ var extent = (function(values, valueof) {
36170 var n = values.length,
36171 i = -1,
36172 value,
36173 min,
36174 max;
36175
36176 if (valueof == null) {
36177 while (++i < n) { // Find the first comparable value.
36178 if ((value = values[i]) != null && value >= value) {
36179 min = max = value;
36180 while (++i < n) { // Compare the remaining values.
36181 if ((value = values[i]) != null) {
36182 if (min > value) min = value;
36183 if (max < value) max = value;
36184 }
36185 }
36186 }
36187 }
36188 }
36189
36190 else {
36191 while (++i < n) { // Find the first comparable value.
36192 if ((value = valueof(values[i], i, values)) != null && value >= value) {
36193 min = max = value;
36194 while (++i < n) { // Compare the remaining values.
36195 if ((value = valueof(values[i], i, values)) != null) {
36196 if (min > value) min = value;
36197 if (max < value) max = value;
36198 }
36199 }
36200 }
36201 }
36202 }
36203
36204 return [min, max];
36205});
36206
36207// CONCATENATED MODULE: ./node_modules/d3-array/src/array.js
36208var array_array = Array.prototype;
36209
36210var slice = array_array.slice;
36211var map = array_array.map;
36212
36213// CONCATENATED MODULE: ./node_modules/d3-array/src/constant.js
36214/* harmony default export */ var constant = (function(x) {
36215 return function() {
36216 return x;
36217 };
36218});
36219
36220// CONCATENATED MODULE: ./node_modules/d3-array/src/identity.js
36221/* harmony default export */ var identity = (function(x) {
36222 return x;
36223});
36224
36225// CONCATENATED MODULE: ./node_modules/d3-array/src/range.js
36226/* harmony default export */ var src_range = (function(start, stop, step) {
36227 start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
36228
36229 var i = -1,
36230 n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
36231 range = new Array(n);
36232
36233 while (++i < n) {
36234 range[i] = start + i * step;
36235 }
36236
36237 return range;
36238});
36239
36240// CONCATENATED MODULE: ./node_modules/d3-array/src/ticks.js
36241var e10 = Math.sqrt(50),
36242 e5 = Math.sqrt(10),
36243 e2 = Math.sqrt(2);
36244
36245/* harmony default export */ var ticks = (function(start, stop, count) {
36246 var reverse,
36247 i = -1,
36248 n,
36249 ticks,
36250 step;
36251
36252 stop = +stop, start = +start, count = +count;
36253 if (start === stop && count > 0) return [start];
36254 if (reverse = stop < start) n = start, start = stop, stop = n;
36255 if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
36256
36257 if (step > 0) {
36258 start = Math.ceil(start / step);
36259 stop = Math.floor(stop / step);
36260 ticks = new Array(n = Math.ceil(stop - start + 1));
36261 while (++i < n) ticks[i] = (start + i) * step;
36262 } else {
36263 start = Math.floor(start * step);
36264 stop = Math.ceil(stop * step);
36265 ticks = new Array(n = Math.ceil(start - stop + 1));
36266 while (++i < n) ticks[i] = (start - i) / step;
36267 }
36268
36269 if (reverse) ticks.reverse();
36270
36271 return ticks;
36272});
36273
36274function tickIncrement(start, stop, count) {
36275 var step = (stop - start) / Math.max(0, count),
36276 power = Math.floor(Math.log(step) / Math.LN10),
36277 error = step / Math.pow(10, power);
36278 return power >= 0
36279 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
36280 : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
36281}
36282
36283function tickStep(start, stop, count) {
36284 var step0 = Math.abs(stop - start) / Math.max(0, count),
36285 step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
36286 error = step0 / step1;
36287 if (error >= e10) step1 *= 10;
36288 else if (error >= e5) step1 *= 5;
36289 else if (error >= e2) step1 *= 2;
36290 return stop < start ? -step1 : step1;
36291}
36292
36293// CONCATENATED MODULE: ./node_modules/d3-array/src/threshold/sturges.js
36294/* harmony default export */ var sturges = (function(values) {
36295 return Math.ceil(Math.log(values.length) / Math.LN2) + 1;
36296});
36297
36298// CONCATENATED MODULE: ./node_modules/d3-array/src/histogram.js
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308/* harmony default export */ var src_histogram = (function() {
36309 var value = identity,
36310 domain = extent,
36311 threshold = sturges;
36312
36313 function histogram(data) {
36314 var i,
36315 n = data.length,
36316 x,
36317 values = new Array(n);
36318
36319 for (i = 0; i < n; ++i) {
36320 values[i] = value(data[i], i, data);
36321 }
36322
36323 var xz = domain(values),
36324 x0 = xz[0],
36325 x1 = xz[1],
36326 tz = threshold(values, x0, x1);
36327
36328 // Convert number of thresholds into uniform thresholds.
36329 if (!Array.isArray(tz)) {
36330 tz = tickStep(x0, x1, tz);
36331 tz = src_range(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive
36332 }
36333
36334 // Remove any thresholds outside the domain.
36335 var m = tz.length;
36336 while (tz[0] <= x0) tz.shift(), --m;
36337 while (tz[m - 1] > x1) tz.pop(), --m;
36338
36339 var bins = new Array(m + 1),
36340 bin;
36341
36342 // Initialize bins.
36343 for (i = 0; i <= m; ++i) {
36344 bin = bins[i] = [];
36345 bin.x0 = i > 0 ? tz[i - 1] : x0;
36346 bin.x1 = i < m ? tz[i] : x1;
36347 }
36348
36349 // Assign data to bins by value, ignoring any outside the domain.
36350 for (i = 0; i < n; ++i) {
36351 x = values[i];
36352 if (x0 <= x && x <= x1) {
36353 bins[bisect(tz, x, 0, m)].push(data[i]);
36354 }
36355 }
36356
36357 return bins;
36358 }
36359
36360 histogram.value = function(_) {
36361 return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value;
36362 };
36363
36364 histogram.domain = function(_) {
36365 return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain;
36366 };
36367
36368 histogram.thresholds = function(_) {
36369 return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;
36370 };
36371
36372 return histogram;
36373});
36374
36375// CONCATENATED MODULE: ./node_modules/d3-array/src/quantile.js
36376
36377
36378/* harmony default export */ var quantile = (function(values, p, valueof) {
36379 if (valueof == null) valueof = number;
36380 if (!(n = values.length)) return;
36381 if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
36382 if (p >= 1) return +valueof(values[n - 1], n - 1, values);
36383 var n,
36384 i = (n - 1) * p,
36385 i0 = Math.floor(i),
36386 value0 = +valueof(values[i0], i0, values),
36387 value1 = +valueof(values[i0 + 1], i0 + 1, values);
36388 return value0 + (value1 - value0) * (i - i0);
36389});
36390
36391// CONCATENATED MODULE: ./node_modules/d3-array/src/threshold/freedmanDiaconis.js
36392
36393
36394
36395
36396
36397/* harmony default export */ var freedmanDiaconis = (function(values, min, max) {
36398 values = map.call(values, number).sort(ascending);
36399 return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3)));
36400});
36401
36402// CONCATENATED MODULE: ./node_modules/d3-array/src/threshold/scott.js
36403
36404
36405/* harmony default export */ var scott = (function(values, min, max) {
36406 return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3)));
36407});
36408
36409// CONCATENATED MODULE: ./node_modules/d3-array/src/max.js
36410/* harmony default export */ var src_max = (function(values, valueof) {
36411 var n = values.length,
36412 i = -1,
36413 value,
36414 max;
36415
36416 if (valueof == null) {
36417 while (++i < n) { // Find the first comparable value.
36418 if ((value = values[i]) != null && value >= value) {
36419 max = value;
36420 while (++i < n) { // Compare the remaining values.
36421 if ((value = values[i]) != null && value > max) {
36422 max = value;
36423 }
36424 }
36425 }
36426 }
36427 }
36428
36429 else {
36430 while (++i < n) { // Find the first comparable value.
36431 if ((value = valueof(values[i], i, values)) != null && value >= value) {
36432 max = value;
36433 while (++i < n) { // Compare the remaining values.
36434 if ((value = valueof(values[i], i, values)) != null && value > max) {
36435 max = value;
36436 }
36437 }
36438 }
36439 }
36440 }
36441
36442 return max;
36443});
36444
36445// CONCATENATED MODULE: ./node_modules/d3-array/src/mean.js
36446
36447
36448/* harmony default export */ var src_mean = (function(values, valueof) {
36449 var n = values.length,
36450 m = n,
36451 i = -1,
36452 value,
36453 sum = 0;
36454
36455 if (valueof == null) {
36456 while (++i < n) {
36457 if (!isNaN(value = number(values[i]))) sum += value;
36458 else --m;
36459 }
36460 }
36461
36462 else {
36463 while (++i < n) {
36464 if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value;
36465 else --m;
36466 }
36467 }
36468
36469 if (m) return sum / m;
36470});
36471
36472// CONCATENATED MODULE: ./node_modules/d3-array/src/median.js
36473
36474
36475
36476
36477/* harmony default export */ var median = (function(values, valueof) {
36478 var n = values.length,
36479 i = -1,
36480 value,
36481 numbers = [];
36482
36483 if (valueof == null) {
36484 while (++i < n) {
36485 if (!isNaN(value = number(values[i]))) {
36486 numbers.push(value);
36487 }
36488 }
36489 }
36490
36491 else {
36492 while (++i < n) {
36493 if (!isNaN(value = number(valueof(values[i], i, values)))) {
36494 numbers.push(value);
36495 }
36496 }
36497 }
36498
36499 return quantile(numbers.sort(ascending), 0.5);
36500});
36501
36502// CONCATENATED MODULE: ./node_modules/d3-array/src/merge.js
36503/* harmony default export */ var merge = (function(arrays) {
36504 var n = arrays.length,
36505 m,
36506 i = -1,
36507 j = 0,
36508 merged,
36509 array;
36510
36511 while (++i < n) j += arrays[i].length;
36512 merged = new Array(j);
36513
36514 while (--n >= 0) {
36515 array = arrays[n];
36516 m = array.length;
36517 while (--m >= 0) {
36518 merged[--j] = array[m];
36519 }
36520 }
36521
36522 return merged;
36523});
36524
36525// CONCATENATED MODULE: ./node_modules/d3-array/src/min.js
36526/* harmony default export */ var src_min = (function(values, valueof) {
36527 var n = values.length,
36528 i = -1,
36529 value,
36530 min;
36531
36532 if (valueof == null) {
36533 while (++i < n) { // Find the first comparable value.
36534 if ((value = values[i]) != null && value >= value) {
36535 min = value;
36536 while (++i < n) { // Compare the remaining values.
36537 if ((value = values[i]) != null && min > value) {
36538 min = value;
36539 }
36540 }
36541 }
36542 }
36543 }
36544
36545 else {
36546 while (++i < n) { // Find the first comparable value.
36547 if ((value = valueof(values[i], i, values)) != null && value >= value) {
36548 min = value;
36549 while (++i < n) { // Compare the remaining values.
36550 if ((value = valueof(values[i], i, values)) != null && min > value) {
36551 min = value;
36552 }
36553 }
36554 }
36555 }
36556 }
36557
36558 return min;
36559});
36560
36561// CONCATENATED MODULE: ./node_modules/d3-array/src/permute.js
36562/* harmony default export */ var permute = (function(array, indexes) {
36563 var i = indexes.length, permutes = new Array(i);
36564 while (i--) permutes[i] = array[indexes[i]];
36565 return permutes;
36566});
36567
36568// CONCATENATED MODULE: ./node_modules/d3-array/src/scan.js
36569
36570
36571/* harmony default export */ var scan = (function(values, compare) {
36572 if (!(n = values.length)) return;
36573 var n,
36574 i = 0,
36575 j = 0,
36576 xi,
36577 xj = values[j];
36578
36579 if (compare == null) compare = ascending;
36580
36581 while (++i < n) {
36582 if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {
36583 xj = xi, j = i;
36584 }
36585 }
36586
36587 if (compare(xj, xj) === 0) return j;
36588});
36589
36590// CONCATENATED MODULE: ./node_modules/d3-array/src/shuffle.js
36591/* harmony default export */ var shuffle = (function(array, i0, i1) {
36592 var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),
36593 t,
36594 i;
36595
36596 while (m) {
36597 i = Math.random() * m-- | 0;
36598 t = array[m + i0];
36599 array[m + i0] = array[i + i0];
36600 array[i + i0] = t;
36601 }
36602
36603 return array;
36604});
36605
36606// CONCATENATED MODULE: ./node_modules/d3-array/src/sum.js
36607/* harmony default export */ var src_sum = (function(values, valueof) {
36608 var n = values.length,
36609 i = -1,
36610 value,
36611 sum = 0;
36612
36613 if (valueof == null) {
36614 while (++i < n) {
36615 if (value = +values[i]) sum += value; // Note: zero and null are equivalent.
36616 }
36617 }
36618
36619 else {
36620 while (++i < n) {
36621 if (value = +valueof(values[i], i, values)) sum += value;
36622 }
36623 }
36624
36625 return sum;
36626});
36627
36628// CONCATENATED MODULE: ./node_modules/d3-array/src/transpose.js
36629
36630
36631/* harmony default export */ var src_transpose = (function(matrix) {
36632 if (!(n = matrix.length)) return [];
36633 for (var i = -1, m = src_min(matrix, transpose_length), transpose = new Array(m); ++i < m;) {
36634 for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {
36635 row[j] = matrix[j][i];
36636 }
36637 }
36638 return transpose;
36639});
36640
36641function transpose_length(d) {
36642 return d.length;
36643}
36644
36645// CONCATENATED MODULE: ./node_modules/d3-array/src/zip.js
36646
36647
36648/* harmony default export */ var zip = (function() {
36649 return src_transpose(arguments);
36650});
36651
36652// CONCATENATED MODULE: ./node_modules/d3-array/src/index.js
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681// CONCATENATED MODULE: ./node_modules/d3-collection/src/map.js
36682var map_prefix = "$";
36683
36684function Map() {}
36685
36686Map.prototype = map_map.prototype = {
36687 constructor: Map,
36688 has: function(key) {
36689 return (map_prefix + key) in this;
36690 },
36691 get: function(key) {
36692 return this[map_prefix + key];
36693 },
36694 set: function(key, value) {
36695 this[map_prefix + key] = value;
36696 return this;
36697 },
36698 remove: function(key) {
36699 var property = map_prefix + key;
36700 return property in this && delete this[property];
36701 },
36702 clear: function() {
36703 for (var property in this) if (property[0] === map_prefix) delete this[property];
36704 },
36705 keys: function() {
36706 var keys = [];
36707 for (var property in this) if (property[0] === map_prefix) keys.push(property.slice(1));
36708 return keys;
36709 },
36710 values: function() {
36711 var values = [];
36712 for (var property in this) if (property[0] === map_prefix) values.push(this[property]);
36713 return values;
36714 },
36715 entries: function() {
36716 var entries = [];
36717 for (var property in this) if (property[0] === map_prefix) entries.push({key: property.slice(1), value: this[property]});
36718 return entries;
36719 },
36720 size: function() {
36721 var size = 0;
36722 for (var property in this) if (property[0] === map_prefix) ++size;
36723 return size;
36724 },
36725 empty: function() {
36726 for (var property in this) if (property[0] === map_prefix) return false;
36727 return true;
36728 },
36729 each: function(f) {
36730 for (var property in this) if (property[0] === map_prefix) f(this[property], property.slice(1), this);
36731 }
36732};
36733
36734function map_map(object, f) {
36735 var map = new Map;
36736
36737 // Copy constructor.
36738 if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });
36739
36740 // Index array by numeric index or specified key function.
36741 else if (Array.isArray(object)) {
36742 var i = -1,
36743 n = object.length,
36744 o;
36745
36746 if (f == null) while (++i < n) map.set(i, object[i]);
36747 else while (++i < n) map.set(f(o = object[i], i, object), o);
36748 }
36749
36750 // Convert object to map.
36751 else if (object) for (var key in object) map.set(key, object[key]);
36752
36753 return map;
36754}
36755
36756/* harmony default export */ var src_map = (map_map);
36757
36758// CONCATENATED MODULE: ./node_modules/d3-collection/src/nest.js
36759
36760
36761/* harmony default export */ var src_nest = (function() {
36762 var keys = [],
36763 sortKeys = [],
36764 sortValues,
36765 rollup,
36766 nest;
36767
36768 function apply(array, depth, createResult, setResult) {
36769 if (depth >= keys.length) {
36770 if (sortValues != null) array.sort(sortValues);
36771 return rollup != null ? rollup(array) : array;
36772 }
36773
36774 var i = -1,
36775 n = array.length,
36776 key = keys[depth++],
36777 keyValue,
36778 value,
36779 valuesByKey = src_map(),
36780 values,
36781 result = createResult();
36782
36783 while (++i < n) {
36784 if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) {
36785 values.push(value);
36786 } else {
36787 valuesByKey.set(keyValue, [value]);
36788 }
36789 }
36790
36791 valuesByKey.each(function(values, key) {
36792 setResult(result, key, apply(values, depth, createResult, setResult));
36793 });
36794
36795 return result;
36796 }
36797
36798 function entries(map, depth) {
36799 if (++depth > keys.length) return map;
36800 var array, sortKey = sortKeys[depth - 1];
36801 if (rollup != null && depth >= keys.length) array = map.entries();
36802 else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });
36803 return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;
36804 }
36805
36806 return nest = {
36807 object: function(array) { return apply(array, 0, createObject, setObject); },
36808 map: function(array) { return apply(array, 0, createMap, setMap); },
36809 entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },
36810 key: function(d) { keys.push(d); return nest; },
36811 sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },
36812 sortValues: function(order) { sortValues = order; return nest; },
36813 rollup: function(f) { rollup = f; return nest; }
36814 };
36815});
36816
36817function createObject() {
36818 return {};
36819}
36820
36821function setObject(object, key, value) {
36822 object[key] = value;
36823}
36824
36825function createMap() {
36826 return src_map();
36827}
36828
36829function setMap(map, key, value) {
36830 map.set(key, value);
36831}
36832
36833// CONCATENATED MODULE: ./node_modules/d3-collection/src/set.js
36834
36835
36836function Set() {}
36837
36838var proto = src_map.prototype;
36839
36840Set.prototype = set.prototype = {
36841 constructor: Set,
36842 has: proto.has,
36843 add: function(value) {
36844 value += "";
36845 this[map_prefix + value] = value;
36846 return this;
36847 },
36848 remove: proto.remove,
36849 clear: proto.clear,
36850 values: proto.keys,
36851 size: proto.size,
36852 empty: proto.empty,
36853 each: proto.each
36854};
36855
36856function set(object, f) {
36857 var set = new Set;
36858
36859 // Copy constructor.
36860 if (object instanceof Set) object.each(function(value) { set.add(value); });
36861
36862 // Otherwise, assume it’s an array.
36863 else if (object) {
36864 var i = -1, n = object.length;
36865 if (f == null) while (++i < n) set.add(object[i]);
36866 else while (++i < n) set.add(f(object[i], i, object));
36867 }
36868
36869 return set;
36870}
36871
36872/* harmony default export */ var src_set = (set);
36873
36874// CONCATENATED MODULE: ./node_modules/d3-collection/src/keys.js
36875/* harmony default export */ var src_keys = (function(map) {
36876 var keys = [];
36877 for (var key in map) keys.push(key);
36878 return keys;
36879});
36880
36881// CONCATENATED MODULE: ./node_modules/d3-collection/src/values.js
36882/* harmony default export */ var src_values = (function(map) {
36883 var values = [];
36884 for (var key in map) values.push(map[key]);
36885 return values;
36886});
36887
36888// CONCATENATED MODULE: ./node_modules/d3-collection/src/entries.js
36889/* harmony default export */ var src_entries = (function(map) {
36890 var entries = [];
36891 for (var key in map) entries.push({key: key, value: map[key]});
36892 return entries;
36893});
36894
36895// CONCATENATED MODULE: ./node_modules/d3-collection/src/index.js
36896
36897
36898
36899
36900
36901
36902
36903// CONCATENATED MODULE: ./node_modules/d3-scale/src/array.js
36904var src_array_array = Array.prototype;
36905
36906var array_map = src_array_array.map;
36907var array_slice = src_array_array.slice;
36908
36909// CONCATENATED MODULE: ./node_modules/d3-scale/src/ordinal.js
36910
36911
36912
36913var implicit = {name: "implicit"};
36914
36915function ordinal(range) {
36916 var index = src_map(),
36917 domain = [],
36918 unknown = implicit;
36919
36920 range = range == null ? [] : array_slice.call(range);
36921
36922 function scale(d) {
36923 var key = d + "", i = index.get(key);
36924 if (!i) {
36925 if (unknown !== implicit) return unknown;
36926 index.set(key, i = domain.push(d));
36927 }
36928 return range[(i - 1) % range.length];
36929 }
36930
36931 scale.domain = function(_) {
36932 if (!arguments.length) return domain.slice();
36933 domain = [], index = src_map();
36934 var i = -1, n = _.length, d, key;
36935 while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
36936 return scale;
36937 };
36938
36939 scale.range = function(_) {
36940 return arguments.length ? (range = array_slice.call(_), scale) : range.slice();
36941 };
36942
36943 scale.unknown = function(_) {
36944 return arguments.length ? (unknown = _, scale) : unknown;
36945 };
36946
36947 scale.copy = function() {
36948 return ordinal()
36949 .domain(domain)
36950 .range(range)
36951 .unknown(unknown);
36952 };
36953
36954 return scale;
36955}
36956
36957// CONCATENATED MODULE: ./node_modules/d3-scale/src/band.js
36958
36959
36960
36961function band() {
36962 var scale = ordinal().unknown(undefined),
36963 domain = scale.domain,
36964 ordinalRange = scale.range,
36965 range = [0, 1],
36966 step,
36967 bandwidth,
36968 round = false,
36969 paddingInner = 0,
36970 paddingOuter = 0,
36971 align = 0.5;
36972
36973 delete scale.unknown;
36974
36975 function rescale() {
36976 var n = domain().length,
36977 reverse = range[1] < range[0],
36978 start = range[reverse - 0],
36979 stop = range[1 - reverse];
36980 step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
36981 if (round) step = Math.floor(step);
36982 start += (stop - start - step * (n - paddingInner)) * align;
36983 bandwidth = step * (1 - paddingInner);
36984 if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
36985 var values = src_range(n).map(function(i) { return start + step * i; });
36986 return ordinalRange(reverse ? values.reverse() : values);
36987 }
36988
36989 scale.domain = function(_) {
36990 return arguments.length ? (domain(_), rescale()) : domain();
36991 };
36992
36993 scale.range = function(_) {
36994 return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
36995 };
36996
36997 scale.rangeRound = function(_) {
36998 return range = [+_[0], +_[1]], round = true, rescale();
36999 };
37000
37001 scale.bandwidth = function() {
37002 return bandwidth;
37003 };
37004
37005 scale.step = function() {
37006 return step;
37007 };
37008
37009 scale.round = function(_) {
37010 return arguments.length ? (round = !!_, rescale()) : round;
37011 };
37012
37013 scale.padding = function(_) {
37014 return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
37015 };
37016
37017 scale.paddingInner = function(_) {
37018 return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
37019 };
37020
37021 scale.paddingOuter = function(_) {
37022 return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
37023 };
37024
37025 scale.align = function(_) {
37026 return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
37027 };
37028
37029 scale.copy = function() {
37030 return band()
37031 .domain(domain())
37032 .range(range)
37033 .round(round)
37034 .paddingInner(paddingInner)
37035 .paddingOuter(paddingOuter)
37036 .align(align);
37037 };
37038
37039 return rescale();
37040}
37041
37042function pointish(scale) {
37043 var copy = scale.copy;
37044
37045 scale.padding = scale.paddingOuter;
37046 delete scale.paddingInner;
37047 delete scale.paddingOuter;
37048
37049 scale.copy = function() {
37050 return pointish(copy());
37051 };
37052
37053 return scale;
37054}
37055
37056function point() {
37057 return pointish(band().paddingInner(1));
37058}
37059
37060// CONCATENATED MODULE: ./node_modules/d3-color/src/define.js
37061/* harmony default export */ var define = (function(constructor, factory, prototype) {
37062 constructor.prototype = factory.prototype = prototype;
37063 prototype.constructor = constructor;
37064});
37065
37066function extend(parent, definition) {
37067 var prototype = Object.create(parent.prototype);
37068 for (var key in definition) prototype[key] = definition[key];
37069 return prototype;
37070}
37071
37072// CONCATENATED MODULE: ./node_modules/d3-color/src/color.js
37073
37074
37075function Color() {}
37076
37077var darker = 0.7;
37078var brighter = 1 / darker;
37079
37080var reI = "\\s*([+-]?\\d+)\\s*",
37081 reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
37082 reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
37083 reHex3 = /^#([0-9a-f]{3})$/,
37084 reHex6 = /^#([0-9a-f]{6})$/,
37085 reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
37086 reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
37087 reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
37088 reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
37089 reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
37090 reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
37091
37092var named = {
37093 aliceblue: 0xf0f8ff,
37094 antiquewhite: 0xfaebd7,
37095 aqua: 0x00ffff,
37096 aquamarine: 0x7fffd4,
37097 azure: 0xf0ffff,
37098 beige: 0xf5f5dc,
37099 bisque: 0xffe4c4,
37100 black: 0x000000,
37101 blanchedalmond: 0xffebcd,
37102 blue: 0x0000ff,
37103 blueviolet: 0x8a2be2,
37104 brown: 0xa52a2a,
37105 burlywood: 0xdeb887,
37106 cadetblue: 0x5f9ea0,
37107 chartreuse: 0x7fff00,
37108 chocolate: 0xd2691e,
37109 coral: 0xff7f50,
37110 cornflowerblue: 0x6495ed,
37111 cornsilk: 0xfff8dc,
37112 crimson: 0xdc143c,
37113 cyan: 0x00ffff,
37114 darkblue: 0x00008b,
37115 darkcyan: 0x008b8b,
37116 darkgoldenrod: 0xb8860b,
37117 darkgray: 0xa9a9a9,
37118 darkgreen: 0x006400,
37119 darkgrey: 0xa9a9a9,
37120 darkkhaki: 0xbdb76b,
37121 darkmagenta: 0x8b008b,
37122 darkolivegreen: 0x556b2f,
37123 darkorange: 0xff8c00,
37124 darkorchid: 0x9932cc,
37125 darkred: 0x8b0000,
37126 darksalmon: 0xe9967a,
37127 darkseagreen: 0x8fbc8f,
37128 darkslateblue: 0x483d8b,
37129 darkslategray: 0x2f4f4f,
37130 darkslategrey: 0x2f4f4f,
37131 darkturquoise: 0x00ced1,
37132 darkviolet: 0x9400d3,
37133 deeppink: 0xff1493,
37134 deepskyblue: 0x00bfff,
37135 dimgray: 0x696969,
37136 dimgrey: 0x696969,
37137 dodgerblue: 0x1e90ff,
37138 firebrick: 0xb22222,
37139 floralwhite: 0xfffaf0,
37140 forestgreen: 0x228b22,
37141 fuchsia: 0xff00ff,
37142 gainsboro: 0xdcdcdc,
37143 ghostwhite: 0xf8f8ff,
37144 gold: 0xffd700,
37145 goldenrod: 0xdaa520,
37146 gray: 0x808080,
37147 green: 0x008000,
37148 greenyellow: 0xadff2f,
37149 grey: 0x808080,
37150 honeydew: 0xf0fff0,
37151 hotpink: 0xff69b4,
37152 indianred: 0xcd5c5c,
37153 indigo: 0x4b0082,
37154 ivory: 0xfffff0,
37155 khaki: 0xf0e68c,
37156 lavender: 0xe6e6fa,
37157 lavenderblush: 0xfff0f5,
37158 lawngreen: 0x7cfc00,
37159 lemonchiffon: 0xfffacd,
37160 lightblue: 0xadd8e6,
37161 lightcoral: 0xf08080,
37162 lightcyan: 0xe0ffff,
37163 lightgoldenrodyellow: 0xfafad2,
37164 lightgray: 0xd3d3d3,
37165 lightgreen: 0x90ee90,
37166 lightgrey: 0xd3d3d3,
37167 lightpink: 0xffb6c1,
37168 lightsalmon: 0xffa07a,
37169 lightseagreen: 0x20b2aa,
37170 lightskyblue: 0x87cefa,
37171 lightslategray: 0x778899,
37172 lightslategrey: 0x778899,
37173 lightsteelblue: 0xb0c4de,
37174 lightyellow: 0xffffe0,
37175 lime: 0x00ff00,
37176 limegreen: 0x32cd32,
37177 linen: 0xfaf0e6,
37178 magenta: 0xff00ff,
37179 maroon: 0x800000,
37180 mediumaquamarine: 0x66cdaa,
37181 mediumblue: 0x0000cd,
37182 mediumorchid: 0xba55d3,
37183 mediumpurple: 0x9370db,
37184 mediumseagreen: 0x3cb371,
37185 mediumslateblue: 0x7b68ee,
37186 mediumspringgreen: 0x00fa9a,
37187 mediumturquoise: 0x48d1cc,
37188 mediumvioletred: 0xc71585,
37189 midnightblue: 0x191970,
37190 mintcream: 0xf5fffa,
37191 mistyrose: 0xffe4e1,
37192 moccasin: 0xffe4b5,
37193 navajowhite: 0xffdead,
37194 navy: 0x000080,
37195 oldlace: 0xfdf5e6,
37196 olive: 0x808000,
37197 olivedrab: 0x6b8e23,
37198 orange: 0xffa500,
37199 orangered: 0xff4500,
37200 orchid: 0xda70d6,
37201 palegoldenrod: 0xeee8aa,
37202 palegreen: 0x98fb98,
37203 paleturquoise: 0xafeeee,
37204 palevioletred: 0xdb7093,
37205 papayawhip: 0xffefd5,
37206 peachpuff: 0xffdab9,
37207 peru: 0xcd853f,
37208 pink: 0xffc0cb,
37209 plum: 0xdda0dd,
37210 powderblue: 0xb0e0e6,
37211 purple: 0x800080,
37212 rebeccapurple: 0x663399,
37213 red: 0xff0000,
37214 rosybrown: 0xbc8f8f,
37215 royalblue: 0x4169e1,
37216 saddlebrown: 0x8b4513,
37217 salmon: 0xfa8072,
37218 sandybrown: 0xf4a460,
37219 seagreen: 0x2e8b57,
37220 seashell: 0xfff5ee,
37221 sienna: 0xa0522d,
37222 silver: 0xc0c0c0,
37223 skyblue: 0x87ceeb,
37224 slateblue: 0x6a5acd,
37225 slategray: 0x708090,
37226 slategrey: 0x708090,
37227 snow: 0xfffafa,
37228 springgreen: 0x00ff7f,
37229 steelblue: 0x4682b4,
37230 tan: 0xd2b48c,
37231 teal: 0x008080,
37232 thistle: 0xd8bfd8,
37233 tomato: 0xff6347,
37234 turquoise: 0x40e0d0,
37235 violet: 0xee82ee,
37236 wheat: 0xf5deb3,
37237 white: 0xffffff,
37238 whitesmoke: 0xf5f5f5,
37239 yellow: 0xffff00,
37240 yellowgreen: 0x9acd32
37241};
37242
37243define(Color, color_color, {
37244 displayable: function() {
37245 return this.rgb().displayable();
37246 },
37247 hex: function() {
37248 return this.rgb().hex();
37249 },
37250 toString: function() {
37251 return this.rgb() + "";
37252 }
37253});
37254
37255function color_color(format) {
37256 var m;
37257 format = (format + "").trim().toLowerCase();
37258 return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00
37259 : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000
37260 : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
37261 : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
37262 : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
37263 : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
37264 : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
37265 : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
37266 : named.hasOwnProperty(format) ? rgbn(named[format])
37267 : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
37268 : null;
37269}
37270
37271function rgbn(n) {
37272 return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
37273}
37274
37275function rgba(r, g, b, a) {
37276 if (a <= 0) r = g = b = NaN;
37277 return new Rgb(r, g, b, a);
37278}
37279
37280function rgbConvert(o) {
37281 if (!(o instanceof Color)) o = color_color(o);
37282 if (!o) return new Rgb;
37283 o = o.rgb();
37284 return new Rgb(o.r, o.g, o.b, o.opacity);
37285}
37286
37287function color_rgb(r, g, b, opacity) {
37288 return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
37289}
37290
37291function Rgb(r, g, b, opacity) {
37292 this.r = +r;
37293 this.g = +g;
37294 this.b = +b;
37295 this.opacity = +opacity;
37296}
37297
37298define(Rgb, color_rgb, extend(Color, {
37299 brighter: function(k) {
37300 k = k == null ? brighter : Math.pow(brighter, k);
37301 return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
37302 },
37303 darker: function(k) {
37304 k = k == null ? darker : Math.pow(darker, k);
37305 return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
37306 },
37307 rgb: function() {
37308 return this;
37309 },
37310 displayable: function() {
37311 return (0 <= this.r && this.r <= 255)
37312 && (0 <= this.g && this.g <= 255)
37313 && (0 <= this.b && this.b <= 255)
37314 && (0 <= this.opacity && this.opacity <= 1);
37315 },
37316 hex: function() {
37317 return "#" + hex(this.r) + hex(this.g) + hex(this.b);
37318 },
37319 toString: function() {
37320 var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
37321 return (a === 1 ? "rgb(" : "rgba(")
37322 + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
37323 + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
37324 + Math.max(0, Math.min(255, Math.round(this.b) || 0))
37325 + (a === 1 ? ")" : ", " + a + ")");
37326 }
37327}));
37328
37329function hex(value) {
37330 value = Math.max(0, Math.min(255, Math.round(value) || 0));
37331 return (value < 16 ? "0" : "") + value.toString(16);
37332}
37333
37334function hsla(h, s, l, a) {
37335 if (a <= 0) h = s = l = NaN;
37336 else if (l <= 0 || l >= 1) h = s = NaN;
37337 else if (s <= 0) h = NaN;
37338 return new Hsl(h, s, l, a);
37339}
37340
37341function hslConvert(o) {
37342 if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
37343 if (!(o instanceof Color)) o = color_color(o);
37344 if (!o) return new Hsl;
37345 if (o instanceof Hsl) return o;
37346 o = o.rgb();
37347 var r = o.r / 255,
37348 g = o.g / 255,
37349 b = o.b / 255,
37350 min = Math.min(r, g, b),
37351 max = Math.max(r, g, b),
37352 h = NaN,
37353 s = max - min,
37354 l = (max + min) / 2;
37355 if (s) {
37356 if (r === max) h = (g - b) / s + (g < b) * 6;
37357 else if (g === max) h = (b - r) / s + 2;
37358 else h = (r - g) / s + 4;
37359 s /= l < 0.5 ? max + min : 2 - max - min;
37360 h *= 60;
37361 } else {
37362 s = l > 0 && l < 1 ? 0 : h;
37363 }
37364 return new Hsl(h, s, l, o.opacity);
37365}
37366
37367function hsl(h, s, l, opacity) {
37368 return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
37369}
37370
37371function Hsl(h, s, l, opacity) {
37372 this.h = +h;
37373 this.s = +s;
37374 this.l = +l;
37375 this.opacity = +opacity;
37376}
37377
37378define(Hsl, hsl, extend(Color, {
37379 brighter: function(k) {
37380 k = k == null ? brighter : Math.pow(brighter, k);
37381 return new Hsl(this.h, this.s, this.l * k, this.opacity);
37382 },
37383 darker: function(k) {
37384 k = k == null ? darker : Math.pow(darker, k);
37385 return new Hsl(this.h, this.s, this.l * k, this.opacity);
37386 },
37387 rgb: function() {
37388 var h = this.h % 360 + (this.h < 0) * 360,
37389 s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
37390 l = this.l,
37391 m2 = l + (l < 0.5 ? l : 1 - l) * s,
37392 m1 = 2 * l - m2;
37393 return new Rgb(
37394 hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
37395 hsl2rgb(h, m1, m2),
37396 hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
37397 this.opacity
37398 );
37399 },
37400 displayable: function() {
37401 return (0 <= this.s && this.s <= 1 || isNaN(this.s))
37402 && (0 <= this.l && this.l <= 1)
37403 && (0 <= this.opacity && this.opacity <= 1);
37404 }
37405}));
37406
37407/* From FvD 13.37, CSS Color Module Level 3 */
37408function hsl2rgb(h, m1, m2) {
37409 return (h < 60 ? m1 + (m2 - m1) * h / 60
37410 : h < 180 ? m2
37411 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
37412 : m1) * 255;
37413}
37414
37415// CONCATENATED MODULE: ./node_modules/d3-color/src/math.js
37416var deg2rad = Math.PI / 180;
37417var rad2deg = 180 / Math.PI;
37418
37419// CONCATENATED MODULE: ./node_modules/d3-color/src/lab.js
37420
37421
37422
37423
37424// https://beta.observablehq.com/@mbostock/lab-and-rgb
37425var K = 18,
37426 Xn = 0.96422,
37427 Yn = 1,
37428 Zn = 0.82521,
37429 t0 = 4 / 29,
37430 lab_t1 = 6 / 29,
37431 lab_t2 = 3 * lab_t1 * lab_t1,
37432 lab_t3 = lab_t1 * lab_t1 * lab_t1;
37433
37434function labConvert(o) {
37435 if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
37436 if (o instanceof Hcl) {
37437 if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
37438 var h = o.h * deg2rad;
37439 return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
37440 }
37441 if (!(o instanceof Rgb)) o = rgbConvert(o);
37442 var r = rgb2lrgb(o.r),
37443 g = rgb2lrgb(o.g),
37444 b = rgb2lrgb(o.b),
37445 y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
37446 if (r === g && g === b) x = z = y; else {
37447 x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
37448 z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
37449 }
37450 return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
37451}
37452
37453function gray(l, opacity) {
37454 return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
37455}
37456
37457function lab(l, a, b, opacity) {
37458 return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
37459}
37460
37461function Lab(l, a, b, opacity) {
37462 this.l = +l;
37463 this.a = +a;
37464 this.b = +b;
37465 this.opacity = +opacity;
37466}
37467
37468define(Lab, lab, extend(Color, {
37469 brighter: function(k) {
37470 return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
37471 },
37472 darker: function(k) {
37473 return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
37474 },
37475 rgb: function() {
37476 var y = (this.l + 16) / 116,
37477 x = isNaN(this.a) ? y : y + this.a / 500,
37478 z = isNaN(this.b) ? y : y - this.b / 200;
37479 x = Xn * lab2xyz(x);
37480 y = Yn * lab2xyz(y);
37481 z = Zn * lab2xyz(z);
37482 return new Rgb(
37483 lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
37484 lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
37485 lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
37486 this.opacity
37487 );
37488 }
37489}));
37490
37491function xyz2lab(t) {
37492 return t > lab_t3 ? Math.pow(t, 1 / 3) : t / lab_t2 + t0;
37493}
37494
37495function lab2xyz(t) {
37496 return t > lab_t1 ? t * t * t : lab_t2 * (t - t0);
37497}
37498
37499function lrgb2rgb(x) {
37500 return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
37501}
37502
37503function rgb2lrgb(x) {
37504 return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
37505}
37506
37507function hclConvert(o) {
37508 if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
37509 if (!(o instanceof Lab)) o = labConvert(o);
37510 if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0, o.l, o.opacity);
37511 var h = Math.atan2(o.b, o.a) * rad2deg;
37512 return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
37513}
37514
37515function lch(l, c, h, opacity) {
37516 return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
37517}
37518
37519function hcl(h, c, l, opacity) {
37520 return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
37521}
37522
37523function Hcl(h, c, l, opacity) {
37524 this.h = +h;
37525 this.c = +c;
37526 this.l = +l;
37527 this.opacity = +opacity;
37528}
37529
37530define(Hcl, hcl, extend(Color, {
37531 brighter: function(k) {
37532 return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
37533 },
37534 darker: function(k) {
37535 return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
37536 },
37537 rgb: function() {
37538 return labConvert(this).rgb();
37539 }
37540}));
37541
37542// CONCATENATED MODULE: ./node_modules/d3-color/src/cubehelix.js
37543
37544
37545
37546
37547var A = -0.14861,
37548 B = +1.78277,
37549 C = -0.29227,
37550 D = -0.90649,
37551 E = +1.97294,
37552 ED = E * D,
37553 EB = E * B,
37554 BC_DA = B * C - D * A;
37555
37556function cubehelixConvert(o) {
37557 if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
37558 if (!(o instanceof Rgb)) o = rgbConvert(o);
37559 var r = o.r / 255,
37560 g = o.g / 255,
37561 b = o.b / 255,
37562 l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
37563 bl = b - l,
37564 k = (E * (g - l) - C * bl) / D,
37565 s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
37566 h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;
37567 return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
37568}
37569
37570function cubehelix_cubehelix(h, s, l, opacity) {
37571 return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
37572}
37573
37574function Cubehelix(h, s, l, opacity) {
37575 this.h = +h;
37576 this.s = +s;
37577 this.l = +l;
37578 this.opacity = +opacity;
37579}
37580
37581define(Cubehelix, cubehelix_cubehelix, extend(Color, {
37582 brighter: function(k) {
37583 k = k == null ? brighter : Math.pow(brighter, k);
37584 return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
37585 },
37586 darker: function(k) {
37587 k = k == null ? darker : Math.pow(darker, k);
37588 return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
37589 },
37590 rgb: function() {
37591 var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,
37592 l = +this.l,
37593 a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
37594 cosh = Math.cos(h),
37595 sinh = Math.sin(h);
37596 return new Rgb(
37597 255 * (l + a * (A * cosh + B * sinh)),
37598 255 * (l + a * (C * cosh + D * sinh)),
37599 255 * (l + a * (E * cosh)),
37600 this.opacity
37601 );
37602 }
37603}));
37604
37605// CONCATENATED MODULE: ./node_modules/d3-color/src/index.js
37606
37607
37608
37609
37610// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/basis.js
37611function basis(t1, v0, v1, v2, v3) {
37612 var t2 = t1 * t1, t3 = t2 * t1;
37613 return ((1 - 3 * t1 + 3 * t2 - t3) * v0
37614 + (4 - 6 * t2 + 3 * t3) * v1
37615 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
37616 + t3 * v3) / 6;
37617}
37618
37619/* harmony default export */ var src_basis = (function(values) {
37620 var n = values.length - 1;
37621 return function(t) {
37622 var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
37623 v1 = values[i],
37624 v2 = values[i + 1],
37625 v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
37626 v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
37627 return basis((t - i / n) * n, v0, v1, v2, v3);
37628 };
37629});
37630
37631// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/basisClosed.js
37632
37633
37634/* harmony default export */ var basisClosed = (function(values) {
37635 var n = values.length;
37636 return function(t) {
37637 var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
37638 v0 = values[(i + n - 1) % n],
37639 v1 = values[i % n],
37640 v2 = values[(i + 1) % n],
37641 v3 = values[(i + 2) % n];
37642 return basis((t - i / n) * n, v0, v1, v2, v3);
37643 };
37644});
37645
37646// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/constant.js
37647/* harmony default export */ var src_constant = (function(x) {
37648 return function() {
37649 return x;
37650 };
37651});
37652
37653// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/color.js
37654
37655
37656function linear(a, d) {
37657 return function(t) {
37658 return a + t * d;
37659 };
37660}
37661
37662function exponential(a, b, y) {
37663 return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
37664 return Math.pow(a + t * b, y);
37665 };
37666}
37667
37668function color_hue(a, b) {
37669 var d = b - a;
37670 return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : src_constant(isNaN(a) ? b : a);
37671}
37672
37673function gamma(y) {
37674 return (y = +y) === 1 ? nogamma : function(a, b) {
37675 return b - a ? exponential(a, b, y) : src_constant(isNaN(a) ? b : a);
37676 };
37677}
37678
37679function nogamma(a, b) {
37680 var d = b - a;
37681 return d ? linear(a, d) : src_constant(isNaN(a) ? b : a);
37682}
37683
37684// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/rgb.js
37685
37686
37687
37688
37689
37690/* harmony default export */ var src_rgb = ((function rgbGamma(y) {
37691 var color = gamma(y);
37692
37693 function rgb(start, end) {
37694 var r = color((start = color_rgb(start)).r, (end = color_rgb(end)).r),
37695 g = color(start.g, end.g),
37696 b = color(start.b, end.b),
37697 opacity = nogamma(start.opacity, end.opacity);
37698 return function(t) {
37699 start.r = r(t);
37700 start.g = g(t);
37701 start.b = b(t);
37702 start.opacity = opacity(t);
37703 return start + "";
37704 };
37705 }
37706
37707 rgb.gamma = rgbGamma;
37708
37709 return rgb;
37710})(1));
37711
37712function rgbSpline(spline) {
37713 return function(colors) {
37714 var n = colors.length,
37715 r = new Array(n),
37716 g = new Array(n),
37717 b = new Array(n),
37718 i, color;
37719 for (i = 0; i < n; ++i) {
37720 color = color_rgb(colors[i]);
37721 r[i] = color.r || 0;
37722 g[i] = color.g || 0;
37723 b[i] = color.b || 0;
37724 }
37725 r = spline(r);
37726 g = spline(g);
37727 b = spline(b);
37728 color.opacity = 1;
37729 return function(t) {
37730 color.r = r(t);
37731 color.g = g(t);
37732 color.b = b(t);
37733 return color + "";
37734 };
37735 };
37736}
37737
37738var rgbBasis = rgbSpline(src_basis);
37739var rgbBasisClosed = rgbSpline(basisClosed);
37740
37741// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/array.js
37742
37743
37744/* harmony default export */ var src_array = (function(a, b) {
37745 var nb = b ? b.length : 0,
37746 na = a ? Math.min(nb, a.length) : 0,
37747 x = new Array(na),
37748 c = new Array(nb),
37749 i;
37750
37751 for (i = 0; i < na; ++i) x[i] = src_value(a[i], b[i]);
37752 for (; i < nb; ++i) c[i] = b[i];
37753
37754 return function(t) {
37755 for (i = 0; i < na; ++i) c[i] = x[i](t);
37756 return c;
37757 };
37758});
37759
37760// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/date.js
37761/* harmony default export */ var src_date = (function(a, b) {
37762 var d = new Date;
37763 return a = +a, b -= a, function(t) {
37764 return d.setTime(a + b * t), d;
37765 };
37766});
37767
37768// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/number.js
37769/* harmony default export */ var src_number = (function(a, b) {
37770 return a = +a, b -= a, function(t) {
37771 return a + b * t;
37772 };
37773});
37774
37775// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/object.js
37776
37777
37778/* harmony default export */ var object = (function(a, b) {
37779 var i = {},
37780 c = {},
37781 k;
37782
37783 if (a === null || typeof a !== "object") a = {};
37784 if (b === null || typeof b !== "object") b = {};
37785
37786 for (k in b) {
37787 if (k in a) {
37788 i[k] = src_value(a[k], b[k]);
37789 } else {
37790 c[k] = b[k];
37791 }
37792 }
37793
37794 return function(t) {
37795 for (k in i) c[k] = i[k](t);
37796 return c;
37797 };
37798});
37799
37800// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/string.js
37801
37802
37803var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
37804 reB = new RegExp(reA.source, "g");
37805
37806function string_zero(b) {
37807 return function() {
37808 return b;
37809 };
37810}
37811
37812function one(b) {
37813 return function(t) {
37814 return b(t) + "";
37815 };
37816}
37817
37818/* harmony default export */ var src_string = (function(a, b) {
37819 var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
37820 am, // current match in a
37821 bm, // current match in b
37822 bs, // string preceding current number in b, if any
37823 i = -1, // index in s
37824 s = [], // string constants and placeholders
37825 q = []; // number interpolators
37826
37827 // Coerce inputs to strings.
37828 a = a + "", b = b + "";
37829
37830 // Interpolate pairs of numbers in a & b.
37831 while ((am = reA.exec(a))
37832 && (bm = reB.exec(b))) {
37833 if ((bs = bm.index) > bi) { // a string precedes the next number in b
37834 bs = b.slice(bi, bs);
37835 if (s[i]) s[i] += bs; // coalesce with previous string
37836 else s[++i] = bs;
37837 }
37838 if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
37839 if (s[i]) s[i] += bm; // coalesce with previous string
37840 else s[++i] = bm;
37841 } else { // interpolate non-matching numbers
37842 s[++i] = null;
37843 q.push({i: i, x: src_number(am, bm)});
37844 }
37845 bi = reB.lastIndex;
37846 }
37847
37848 // Add remains of b.
37849 if (bi < b.length) {
37850 bs = b.slice(bi);
37851 if (s[i]) s[i] += bs; // coalesce with previous string
37852 else s[++i] = bs;
37853 }
37854
37855 // Special optimization for only a single match.
37856 // Otherwise, interpolate each of the numbers and rejoin the string.
37857 return s.length < 2 ? (q[0]
37858 ? one(q[0].x)
37859 : string_zero(b))
37860 : (b = q.length, function(t) {
37861 for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
37862 return s.join("");
37863 });
37864});
37865
37866// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/value.js
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876/* harmony default export */ var src_value = (function(a, b) {
37877 var t = typeof b, c;
37878 return b == null || t === "boolean" ? src_constant(b)
37879 : (t === "number" ? src_number
37880 : t === "string" ? ((c = color_color(b)) ? (b = c, src_rgb) : src_string)
37881 : b instanceof color_color ? src_rgb
37882 : b instanceof Date ? src_date
37883 : Array.isArray(b) ? src_array
37884 : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object
37885 : src_number)(a, b);
37886});
37887
37888// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/discrete.js
37889/* harmony default export */ var discrete = (function(range) {
37890 var n = range.length;
37891 return function(t) {
37892 return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
37893 };
37894});
37895
37896// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/hue.js
37897
37898
37899/* harmony default export */ var src_hue = (function(a, b) {
37900 var i = color_hue(+a, +b);
37901 return function(t) {
37902 var x = i(t);
37903 return x - 360 * Math.floor(x / 360);
37904 };
37905});
37906
37907// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/round.js
37908/* harmony default export */ var src_round = (function(a, b) {
37909 return a = +a, b -= a, function(t) {
37910 return Math.round(a + b * t);
37911 };
37912});
37913
37914// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/decompose.js
37915var degrees = 180 / Math.PI;
37916
37917var decompose_identity = {
37918 translateX: 0,
37919 translateY: 0,
37920 rotate: 0,
37921 skewX: 0,
37922 scaleX: 1,
37923 scaleY: 1
37924};
37925
37926/* harmony default export */ var decompose = (function(a, b, c, d, e, f) {
37927 var scaleX, scaleY, skewX;
37928 if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
37929 if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
37930 if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
37931 if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
37932 return {
37933 translateX: e,
37934 translateY: f,
37935 rotate: Math.atan2(b, a) * degrees,
37936 skewX: Math.atan(skewX) * degrees,
37937 scaleX: scaleX,
37938 scaleY: scaleY
37939 };
37940});
37941
37942// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/parse.js
37943
37944
37945var cssNode,
37946 cssRoot,
37947 cssView,
37948 svgNode;
37949
37950function parseCss(value) {
37951 if (value === "none") return decompose_identity;
37952 if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView;
37953 cssNode.style.transform = value;
37954 value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform");
37955 cssRoot.removeChild(cssNode);
37956 value = value.slice(7, -1).split(",");
37957 return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);
37958}
37959
37960function parseSvg(value) {
37961 if (value == null) return decompose_identity;
37962 if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
37963 svgNode.setAttribute("transform", value);
37964 if (!(value = svgNode.transform.baseVal.consolidate())) return decompose_identity;
37965 value = value.matrix;
37966 return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
37967}
37968
37969// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/index.js
37970
37971
37972
37973function interpolateTransform(parse, pxComma, pxParen, degParen) {
37974
37975 function pop(s) {
37976 return s.length ? s.pop() + " " : "";
37977 }
37978
37979 function translate(xa, ya, xb, yb, s, q) {
37980 if (xa !== xb || ya !== yb) {
37981 var i = s.push("translate(", null, pxComma, null, pxParen);
37982 q.push({i: i - 4, x: src_number(xa, xb)}, {i: i - 2, x: src_number(ya, yb)});
37983 } else if (xb || yb) {
37984 s.push("translate(" + xb + pxComma + yb + pxParen);
37985 }
37986 }
37987
37988 function rotate(a, b, s, q) {
37989 if (a !== b) {
37990 if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
37991 q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: src_number(a, b)});
37992 } else if (b) {
37993 s.push(pop(s) + "rotate(" + b + degParen);
37994 }
37995 }
37996
37997 function skewX(a, b, s, q) {
37998 if (a !== b) {
37999 q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: src_number(a, b)});
38000 } else if (b) {
38001 s.push(pop(s) + "skewX(" + b + degParen);
38002 }
38003 }
38004
38005 function scale(xa, ya, xb, yb, s, q) {
38006 if (xa !== xb || ya !== yb) {
38007 var i = s.push(pop(s) + "scale(", null, ",", null, ")");
38008 q.push({i: i - 4, x: src_number(xa, xb)}, {i: i - 2, x: src_number(ya, yb)});
38009 } else if (xb !== 1 || yb !== 1) {
38010 s.push(pop(s) + "scale(" + xb + "," + yb + ")");
38011 }
38012 }
38013
38014 return function(a, b) {
38015 var s = [], // string constants and placeholders
38016 q = []; // number interpolators
38017 a = parse(a), b = parse(b);
38018 translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
38019 rotate(a.rotate, b.rotate, s, q);
38020 skewX(a.skewX, b.skewX, s, q);
38021 scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
38022 a = b = null; // gc
38023 return function(t) {
38024 var i = -1, n = q.length, o;
38025 while (++i < n) s[(o = q[i]).i] = o.x(t);
38026 return s.join("");
38027 };
38028 };
38029}
38030
38031var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
38032var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
38033
38034// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/zoom.js
38035var rho = Math.SQRT2,
38036 rho2 = 2,
38037 rho4 = 4,
38038 epsilon2 = 1e-12;
38039
38040function zoom_cosh(x) {
38041 return ((x = Math.exp(x)) + 1 / x) / 2;
38042}
38043
38044function zoom_sinh(x) {
38045 return ((x = Math.exp(x)) - 1 / x) / 2;
38046}
38047
38048function tanh(x) {
38049 return ((x = Math.exp(2 * x)) - 1) / (x + 1);
38050}
38051
38052// p0 = [ux0, uy0, w0]
38053// p1 = [ux1, uy1, w1]
38054/* harmony default export */ var zoom = (function(p0, p1) {
38055 var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
38056 ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
38057 dx = ux1 - ux0,
38058 dy = uy1 - uy0,
38059 d2 = dx * dx + dy * dy,
38060 i,
38061 S;
38062
38063 // Special case for u0 ≅ u1.
38064 if (d2 < epsilon2) {
38065 S = Math.log(w1 / w0) / rho;
38066 i = function(t) {
38067 return [
38068 ux0 + t * dx,
38069 uy0 + t * dy,
38070 w0 * Math.exp(rho * t * S)
38071 ];
38072 }
38073 }
38074
38075 // General case.
38076 else {
38077 var d1 = Math.sqrt(d2),
38078 b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
38079 b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
38080 r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
38081 r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
38082 S = (r1 - r0) / rho;
38083 i = function(t) {
38084 var s = t * S,
38085 coshr0 = zoom_cosh(r0),
38086 u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - zoom_sinh(r0));
38087 return [
38088 ux0 + u * dx,
38089 uy0 + u * dy,
38090 w0 * coshr0 / zoom_cosh(rho * s + r0)
38091 ];
38092 }
38093 }
38094
38095 i.duration = S * 1000;
38096
38097 return i;
38098});
38099
38100// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/hsl.js
38101
38102
38103
38104function hsl_hsl(hue) {
38105 return function(start, end) {
38106 var h = hue((start = hsl(start)).h, (end = hsl(end)).h),
38107 s = nogamma(start.s, end.s),
38108 l = nogamma(start.l, end.l),
38109 opacity = nogamma(start.opacity, end.opacity);
38110 return function(t) {
38111 start.h = h(t);
38112 start.s = s(t);
38113 start.l = l(t);
38114 start.opacity = opacity(t);
38115 return start + "";
38116 };
38117 }
38118}
38119
38120/* harmony default export */ var src_hsl = (hsl_hsl(color_hue));
38121var hslLong = hsl_hsl(nogamma);
38122
38123// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/lab.js
38124
38125
38126
38127function lab_lab(start, end) {
38128 var l = nogamma((start = lab(start)).l, (end = lab(end)).l),
38129 a = nogamma(start.a, end.a),
38130 b = nogamma(start.b, end.b),
38131 opacity = nogamma(start.opacity, end.opacity);
38132 return function(t) {
38133 start.l = l(t);
38134 start.a = a(t);
38135 start.b = b(t);
38136 start.opacity = opacity(t);
38137 return start + "";
38138 };
38139}
38140
38141// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/hcl.js
38142
38143
38144
38145function hcl_hcl(hue) {
38146 return function(start, end) {
38147 var h = hue((start = hcl(start)).h, (end = hcl(end)).h),
38148 c = nogamma(start.c, end.c),
38149 l = nogamma(start.l, end.l),
38150 opacity = nogamma(start.opacity, end.opacity);
38151 return function(t) {
38152 start.h = h(t);
38153 start.c = c(t);
38154 start.l = l(t);
38155 start.opacity = opacity(t);
38156 return start + "";
38157 };
38158 }
38159}
38160
38161/* harmony default export */ var src_hcl = (hcl_hcl(color_hue));
38162var hclLong = hcl_hcl(nogamma);
38163
38164// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/cubehelix.js
38165
38166
38167
38168function src_cubehelix_cubehelix(hue) {
38169 return (function cubehelixGamma(y) {
38170 y = +y;
38171
38172 function cubehelix(start, end) {
38173 var h = hue((start = cubehelix_cubehelix(start)).h, (end = cubehelix_cubehelix(end)).h),
38174 s = nogamma(start.s, end.s),
38175 l = nogamma(start.l, end.l),
38176 opacity = nogamma(start.opacity, end.opacity);
38177 return function(t) {
38178 start.h = h(t);
38179 start.s = s(t);
38180 start.l = l(Math.pow(t, y));
38181 start.opacity = opacity(t);
38182 return start + "";
38183 };
38184 }
38185
38186 cubehelix.gamma = cubehelixGamma;
38187
38188 return cubehelix;
38189 })(1);
38190}
38191
38192/* harmony default export */ var src_cubehelix = (src_cubehelix_cubehelix(color_hue));
38193var cubehelixLong = src_cubehelix_cubehelix(nogamma);
38194
38195// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/piecewise.js
38196function piecewise_piecewise(interpolate, values) {
38197 var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
38198 while (i < n) I[i] = interpolate(v, v = values[++i]);
38199 return function(t) {
38200 var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
38201 return I[i](t - i);
38202 };
38203}
38204
38205// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/quantize.js
38206/* harmony default export */ var quantize = (function(interpolator, n) {
38207 var samples = new Array(n);
38208 for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
38209 return samples;
38210});
38211
38212// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/index.js
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
38231
38232
38233
38234// CONCATENATED MODULE: ./node_modules/d3-scale/src/constant.js
38235/* harmony default export */ var d3_scale_src_constant = (function(x) {
38236 return function() {
38237 return x;
38238 };
38239});
38240
38241// CONCATENATED MODULE: ./node_modules/d3-scale/src/number.js
38242/* harmony default export */ var d3_scale_src_number = (function(x) {
38243 return +x;
38244});
38245
38246// CONCATENATED MODULE: ./node_modules/d3-scale/src/continuous.js
38247
38248
38249
38250
38251
38252
38253var unit = [0, 1];
38254
38255function deinterpolateLinear(a, b) {
38256 return (b -= (a = +a))
38257 ? function(x) { return (x - a) / b; }
38258 : d3_scale_src_constant(b);
38259}
38260
38261function deinterpolateClamp(deinterpolate) {
38262 return function(a, b) {
38263 var d = deinterpolate(a = +a, b = +b);
38264 return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
38265 };
38266}
38267
38268function reinterpolateClamp(reinterpolate) {
38269 return function(a, b) {
38270 var r = reinterpolate(a = +a, b = +b);
38271 return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
38272 };
38273}
38274
38275function bimap(domain, range, deinterpolate, reinterpolate) {
38276 var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
38277 if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
38278 else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
38279 return function(x) { return r0(d0(x)); };
38280}
38281
38282function polymap(domain, range, deinterpolate, reinterpolate) {
38283 var j = Math.min(domain.length, range.length) - 1,
38284 d = new Array(j),
38285 r = new Array(j),
38286 i = -1;
38287
38288 // Reverse descending domains.
38289 if (domain[j] < domain[0]) {
38290 domain = domain.slice().reverse();
38291 range = range.slice().reverse();
38292 }
38293
38294 while (++i < j) {
38295 d[i] = deinterpolate(domain[i], domain[i + 1]);
38296 r[i] = reinterpolate(range[i], range[i + 1]);
38297 }
38298
38299 return function(x) {
38300 var i = bisect(domain, x, 1, j) - 1;
38301 return r[i](d[i](x));
38302 };
38303}
38304
38305function continuous_copy(source, target) {
38306 return target
38307 .domain(source.domain())
38308 .range(source.range())
38309 .interpolate(source.interpolate())
38310 .clamp(source.clamp());
38311}
38312
38313// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
38314// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
38315function continuous(deinterpolate, reinterpolate) {
38316 var domain = unit,
38317 range = unit,
38318 interpolate = src_value,
38319 clamp = false,
38320 piecewise,
38321 output,
38322 input;
38323
38324 function rescale() {
38325 piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
38326 output = input = null;
38327 return scale;
38328 }
38329
38330 function scale(x) {
38331 return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);
38332 }
38333
38334 scale.invert = function(y) {
38335 return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
38336 };
38337
38338 scale.domain = function(_) {
38339 return arguments.length ? (domain = array_map.call(_, d3_scale_src_number), rescale()) : domain.slice();
38340 };
38341
38342 scale.range = function(_) {
38343 return arguments.length ? (range = array_slice.call(_), rescale()) : range.slice();
38344 };
38345
38346 scale.rangeRound = function(_) {
38347 return range = array_slice.call(_), interpolate = src_round, rescale();
38348 };
38349
38350 scale.clamp = function(_) {
38351 return arguments.length ? (clamp = !!_, rescale()) : clamp;
38352 };
38353
38354 scale.interpolate = function(_) {
38355 return arguments.length ? (interpolate = _, rescale()) : interpolate;
38356 };
38357
38358 return rescale();
38359}
38360
38361// CONCATENATED MODULE: ./node_modules/d3-format/src/formatDecimal.js
38362// Computes the decimal coefficient and exponent of the specified number x with
38363// significant digits p, where x is positive and p is in [1, 21] or undefined.
38364// For example, formatDecimal(1.23) returns ["123", 0].
38365/* harmony default export */ var formatDecimal = (function(x, p) {
38366 if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
38367 var i, coefficient = x.slice(0, i);
38368
38369 // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
38370 // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
38371 return [
38372 coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
38373 +x.slice(i + 1)
38374 ];
38375});
38376
38377// CONCATENATED MODULE: ./node_modules/d3-format/src/exponent.js
38378
38379
38380/* harmony default export */ var src_exponent = (function(x) {
38381 return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;
38382});
38383
38384// CONCATENATED MODULE: ./node_modules/d3-format/src/formatGroup.js
38385/* harmony default export */ var formatGroup = (function(grouping, thousands) {
38386 return function(value, width) {
38387 var i = value.length,
38388 t = [],
38389 j = 0,
38390 g = grouping[0],
38391 length = 0;
38392
38393 while (i > 0 && g > 0) {
38394 if (length + g + 1 > width) g = Math.max(1, width - length);
38395 t.push(value.substring(i -= g, i + g));
38396 if ((length += g + 1) > width) break;
38397 g = grouping[j = (j + 1) % grouping.length];
38398 }
38399
38400 return t.reverse().join(thousands);
38401 };
38402});
38403
38404// CONCATENATED MODULE: ./node_modules/d3-format/src/formatNumerals.js
38405/* harmony default export */ var formatNumerals = (function(numerals) {
38406 return function(value) {
38407 return value.replace(/[0-9]/g, function(i) {
38408 return numerals[+i];
38409 });
38410 };
38411});
38412
38413// CONCATENATED MODULE: ./node_modules/d3-format/src/formatSpecifier.js
38414// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
38415var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
38416
38417function formatSpecifier(specifier) {
38418 return new FormatSpecifier(specifier);
38419}
38420
38421formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
38422
38423function FormatSpecifier(specifier) {
38424 if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
38425 var match;
38426 this.fill = match[1] || " ";
38427 this.align = match[2] || ">";
38428 this.sign = match[3] || "-";
38429 this.symbol = match[4] || "";
38430 this.zero = !!match[5];
38431 this.width = match[6] && +match[6];
38432 this.comma = !!match[7];
38433 this.precision = match[8] && +match[8].slice(1);
38434 this.trim = !!match[9];
38435 this.type = match[10] || "";
38436}
38437
38438FormatSpecifier.prototype.toString = function() {
38439 return this.fill
38440 + this.align
38441 + this.sign
38442 + this.symbol
38443 + (this.zero ? "0" : "")
38444 + (this.width == null ? "" : Math.max(1, this.width | 0))
38445 + (this.comma ? "," : "")
38446 + (this.precision == null ? "" : "." + Math.max(0, this.precision | 0))
38447 + (this.trim ? "~" : "")
38448 + this.type;
38449};
38450
38451// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTrim.js
38452// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
38453/* harmony default export */ var formatTrim = (function(s) {
38454 out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
38455 switch (s[i]) {
38456 case ".": i0 = i1 = i; break;
38457 case "0": if (i0 === 0) i0 = i; i1 = i; break;
38458 default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;
38459 }
38460 }
38461 return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
38462});
38463
38464// CONCATENATED MODULE: ./node_modules/d3-format/src/formatPrefixAuto.js
38465
38466
38467var prefixExponent;
38468
38469/* harmony default export */ var formatPrefixAuto = (function(x, p) {
38470 var d = formatDecimal(x, p);
38471 if (!d) return x + "";
38472 var coefficient = d[0],
38473 exponent = d[1],
38474 i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
38475 n = coefficient.length;
38476 return i === n ? coefficient
38477 : i > n ? coefficient + new Array(i - n + 1).join("0")
38478 : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
38479 : "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!
38480});
38481
38482// CONCATENATED MODULE: ./node_modules/d3-format/src/formatRounded.js
38483
38484
38485/* harmony default export */ var formatRounded = (function(x, p) {
38486 var d = formatDecimal(x, p);
38487 if (!d) return x + "";
38488 var coefficient = d[0],
38489 exponent = d[1];
38490 return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
38491 : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
38492 : coefficient + new Array(exponent - coefficient.length + 2).join("0");
38493});
38494
38495// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTypes.js
38496
38497
38498
38499/* harmony default export */ var formatTypes = ({
38500 "%": function(x, p) { return (x * 100).toFixed(p); },
38501 "b": function(x) { return Math.round(x).toString(2); },
38502 "c": function(x) { return x + ""; },
38503 "d": function(x) { return Math.round(x).toString(10); },
38504 "e": function(x, p) { return x.toExponential(p); },
38505 "f": function(x, p) { return x.toFixed(p); },
38506 "g": function(x, p) { return x.toPrecision(p); },
38507 "o": function(x) { return Math.round(x).toString(8); },
38508 "p": function(x, p) { return formatRounded(x * 100, p); },
38509 "r": formatRounded,
38510 "s": formatPrefixAuto,
38511 "X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
38512 "x": function(x) { return Math.round(x).toString(16); }
38513});
38514
38515// CONCATENATED MODULE: ./node_modules/d3-format/src/identity.js
38516/* harmony default export */ var src_identity = (function(x) {
38517 return x;
38518});
38519
38520// CONCATENATED MODULE: ./node_modules/d3-format/src/locale.js
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530var prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
38531
38532/* harmony default export */ var src_locale = (function(locale) {
38533 var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : src_identity,
38534 currency = locale.currency,
38535 decimal = locale.decimal,
38536 numerals = locale.numerals ? formatNumerals(locale.numerals) : src_identity,
38537 percent = locale.percent || "%";
38538
38539 function newFormat(specifier) {
38540 specifier = formatSpecifier(specifier);
38541
38542 var fill = specifier.fill,
38543 align = specifier.align,
38544 sign = specifier.sign,
38545 symbol = specifier.symbol,
38546 zero = specifier.zero,
38547 width = specifier.width,
38548 comma = specifier.comma,
38549 precision = specifier.precision,
38550 trim = specifier.trim,
38551 type = specifier.type;
38552
38553 // The "n" type is an alias for ",g".
38554 if (type === "n") comma = true, type = "g";
38555
38556 // The "" type, and any invalid type, is an alias for ".12~g".
38557 else if (!formatTypes[type]) precision == null && (precision = 12), trim = true, type = "g";
38558
38559 // If zero fill is specified, padding goes after sign and before digits.
38560 if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
38561
38562 // Compute the prefix and suffix.
38563 // For SI-prefix, the suffix is lazily computed.
38564 var prefix = symbol === "$" ? currency[0] : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
38565 suffix = symbol === "$" ? currency[1] : /[%p]/.test(type) ? percent : "";
38566
38567 // What format function should we use?
38568 // Is this an integer type?
38569 // Can this type generate exponential notation?
38570 var formatType = formatTypes[type],
38571 maybeSuffix = /[defgprs%]/.test(type);
38572
38573 // Set the default precision if not specified,
38574 // or clamp the specified precision to the supported range.
38575 // For significant precision, it must be in [1, 21].
38576 // For fixed precision, it must be in [0, 20].
38577 precision = precision == null ? 6
38578 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
38579 : Math.max(0, Math.min(20, precision));
38580
38581 function format(value) {
38582 var valuePrefix = prefix,
38583 valueSuffix = suffix,
38584 i, n, c;
38585
38586 if (type === "c") {
38587 valueSuffix = formatType(value) + valueSuffix;
38588 value = "";
38589 } else {
38590 value = +value;
38591
38592 // Perform the initial formatting.
38593 var valueNegative = value < 0;
38594 value = formatType(Math.abs(value), precision);
38595
38596 // Trim insignificant zeros.
38597 if (trim) value = formatTrim(value);
38598
38599 // If a negative value rounds to zero during formatting, treat as positive.
38600 if (valueNegative && +value === 0) valueNegative = false;
38601
38602 // Compute the prefix and suffix.
38603 valuePrefix = (valueNegative ? (sign === "(" ? sign : "-") : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
38604 valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
38605
38606 // Break the formatted value into the integer “value” part that can be
38607 // grouped, and fractional or exponential “suffix” part that is not.
38608 if (maybeSuffix) {
38609 i = -1, n = value.length;
38610 while (++i < n) {
38611 if (c = value.charCodeAt(i), 48 > c || c > 57) {
38612 valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
38613 value = value.slice(0, i);
38614 break;
38615 }
38616 }
38617 }
38618 }
38619
38620 // If the fill character is not "0", grouping is applied before padding.
38621 if (comma && !zero) value = group(value, Infinity);
38622
38623 // Compute the padding.
38624 var length = valuePrefix.length + value.length + valueSuffix.length,
38625 padding = length < width ? new Array(width - length + 1).join(fill) : "";
38626
38627 // If the fill character is "0", grouping is applied after padding.
38628 if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
38629
38630 // Reconstruct the final output based on the desired alignment.
38631 switch (align) {
38632 case "<": value = valuePrefix + value + valueSuffix + padding; break;
38633 case "=": value = valuePrefix + padding + value + valueSuffix; break;
38634 case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
38635 default: value = padding + valuePrefix + value + valueSuffix; break;
38636 }
38637
38638 return numerals(value);
38639 }
38640
38641 format.toString = function() {
38642 return specifier + "";
38643 };
38644
38645 return format;
38646 }
38647
38648 function formatPrefix(specifier, value) {
38649 var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
38650 e = Math.max(-8, Math.min(8, Math.floor(src_exponent(value) / 3))) * 3,
38651 k = Math.pow(10, -e),
38652 prefix = prefixes[8 + e / 3];
38653 return function(value) {
38654 return f(k * value) + prefix;
38655 };
38656 }
38657
38658 return {
38659 format: newFormat,
38660 formatPrefix: formatPrefix
38661 };
38662});
38663
38664// CONCATENATED MODULE: ./node_modules/d3-format/src/defaultLocale.js
38665
38666
38667var defaultLocale_locale;
38668var defaultLocale_format;
38669var defaultLocale_formatPrefix;
38670
38671defaultLocale({
38672 decimal: ".",
38673 thousands: ",",
38674 grouping: [3],
38675 currency: ["$", ""]
38676});
38677
38678function defaultLocale(definition) {
38679 defaultLocale_locale = src_locale(definition);
38680 defaultLocale_format = defaultLocale_locale.format;
38681 defaultLocale_formatPrefix = defaultLocale_locale.formatPrefix;
38682 return defaultLocale_locale;
38683}
38684
38685// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionFixed.js
38686
38687
38688/* harmony default export */ var precisionFixed = (function(step) {
38689 return Math.max(0, -src_exponent(Math.abs(step)));
38690});
38691
38692// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionPrefix.js
38693
38694
38695/* harmony default export */ var precisionPrefix = (function(step, value) {
38696 return Math.max(0, Math.max(-8, Math.min(8, Math.floor(src_exponent(value) / 3))) * 3 - src_exponent(Math.abs(step)));
38697});
38698
38699// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionRound.js
38700
38701
38702/* harmony default export */ var precisionRound = (function(step, max) {
38703 step = Math.abs(step), max = Math.abs(max) - step;
38704 return Math.max(0, src_exponent(max) - src_exponent(step)) + 1;
38705});
38706
38707// CONCATENATED MODULE: ./node_modules/d3-format/src/index.js
38708
38709
38710
38711
38712
38713
38714
38715// CONCATENATED MODULE: ./node_modules/d3-scale/src/tickFormat.js
38716
38717
38718
38719/* harmony default export */ var src_tickFormat = (function(domain, count, specifier) {
38720 var start = domain[0],
38721 stop = domain[domain.length - 1],
38722 step = tickStep(start, stop, count == null ? 10 : count),
38723 precision;
38724 specifier = formatSpecifier(specifier == null ? ",f" : specifier);
38725 switch (specifier.type) {
38726 case "s": {
38727 var value = Math.max(Math.abs(start), Math.abs(stop));
38728 if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
38729 return defaultLocale_formatPrefix(specifier, value);
38730 }
38731 case "":
38732 case "e":
38733 case "g":
38734 case "p":
38735 case "r": {
38736 if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
38737 break;
38738 }
38739 case "f":
38740 case "%": {
38741 if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
38742 break;
38743 }
38744 }
38745 return defaultLocale_format(specifier);
38746});
38747
38748// CONCATENATED MODULE: ./node_modules/d3-scale/src/linear.js
38749
38750
38751
38752
38753
38754function linearish(scale) {
38755 var domain = scale.domain;
38756
38757 scale.ticks = function(count) {
38758 var d = domain();
38759 return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
38760 };
38761
38762 scale.tickFormat = function(count, specifier) {
38763 return src_tickFormat(domain(), count, specifier);
38764 };
38765
38766 scale.nice = function(count) {
38767 if (count == null) count = 10;
38768
38769 var d = domain(),
38770 i0 = 0,
38771 i1 = d.length - 1,
38772 start = d[i0],
38773 stop = d[i1],
38774 step;
38775
38776 if (stop < start) {
38777 step = start, start = stop, stop = step;
38778 step = i0, i0 = i1, i1 = step;
38779 }
38780
38781 step = tickIncrement(start, stop, count);
38782
38783 if (step > 0) {
38784 start = Math.floor(start / step) * step;
38785 stop = Math.ceil(stop / step) * step;
38786 step = tickIncrement(start, stop, count);
38787 } else if (step < 0) {
38788 start = Math.ceil(start * step) / step;
38789 stop = Math.floor(stop * step) / step;
38790 step = tickIncrement(start, stop, count);
38791 }
38792
38793 if (step > 0) {
38794 d[i0] = Math.floor(start / step) * step;
38795 d[i1] = Math.ceil(stop / step) * step;
38796 domain(d);
38797 } else if (step < 0) {
38798 d[i0] = Math.ceil(start * step) / step;
38799 d[i1] = Math.floor(stop * step) / step;
38800 domain(d);
38801 }
38802
38803 return scale;
38804 };
38805
38806 return scale;
38807}
38808
38809function linear_linear() {
38810 var scale = continuous(deinterpolateLinear, src_number);
38811
38812 scale.copy = function() {
38813 return continuous_copy(scale, linear_linear());
38814 };
38815
38816 return linearish(scale);
38817}
38818
38819// CONCATENATED MODULE: ./node_modules/d3-scale/src/identity.js
38820
38821
38822
38823
38824function identity_identity() {
38825 var domain = [0, 1];
38826
38827 function scale(x) {
38828 return +x;
38829 }
38830
38831 scale.invert = scale;
38832
38833 scale.domain = scale.range = function(_) {
38834 return arguments.length ? (domain = array_map.call(_, d3_scale_src_number), scale) : domain.slice();
38835 };
38836
38837 scale.copy = function() {
38838 return identity_identity().domain(domain);
38839 };
38840
38841 return linearish(scale);
38842}
38843
38844// CONCATENATED MODULE: ./node_modules/d3-scale/src/nice.js
38845/* harmony default export */ var nice = (function(domain, interval) {
38846 domain = domain.slice();
38847
38848 var i0 = 0,
38849 i1 = domain.length - 1,
38850 x0 = domain[i0],
38851 x1 = domain[i1],
38852 t;
38853
38854 if (x1 < x0) {
38855 t = i0, i0 = i1, i1 = t;
38856 t = x0, x0 = x1, x1 = t;
38857 }
38858
38859 domain[i0] = interval.floor(x0);
38860 domain[i1] = interval.ceil(x1);
38861 return domain;
38862});
38863
38864// CONCATENATED MODULE: ./node_modules/d3-scale/src/log.js
38865
38866
38867
38868
38869
38870
38871function log_deinterpolate(a, b) {
38872 return (b = Math.log(b / a))
38873 ? function(x) { return Math.log(x / a) / b; }
38874 : d3_scale_src_constant(b);
38875}
38876
38877function log_reinterpolate(a, b) {
38878 return a < 0
38879 ? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
38880 : function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
38881}
38882
38883function pow10(x) {
38884 return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
38885}
38886
38887function powp(base) {
38888 return base === 10 ? pow10
38889 : base === Math.E ? Math.exp
38890 : function(x) { return Math.pow(base, x); };
38891}
38892
38893function logp(base) {
38894 return base === Math.E ? Math.log
38895 : base === 10 && Math.log10
38896 || base === 2 && Math.log2
38897 || (base = Math.log(base), function(x) { return Math.log(x) / base; });
38898}
38899
38900function reflect(f) {
38901 return function(x) {
38902 return -f(-x);
38903 };
38904}
38905
38906function log() {
38907 var scale = continuous(log_deinterpolate, log_reinterpolate).domain([1, 10]),
38908 domain = scale.domain,
38909 base = 10,
38910 logs = logp(10),
38911 pows = powp(10);
38912
38913 function rescale() {
38914 logs = logp(base), pows = powp(base);
38915 if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);
38916 return scale;
38917 }
38918
38919 scale.base = function(_) {
38920 return arguments.length ? (base = +_, rescale()) : base;
38921 };
38922
38923 scale.domain = function(_) {
38924 return arguments.length ? (domain(_), rescale()) : domain();
38925 };
38926
38927 scale.ticks = function(count) {
38928 var d = domain(),
38929 u = d[0],
38930 v = d[d.length - 1],
38931 r;
38932
38933 if (r = v < u) i = u, u = v, v = i;
38934
38935 var i = logs(u),
38936 j = logs(v),
38937 p,
38938 k,
38939 t,
38940 n = count == null ? 10 : +count,
38941 z = [];
38942
38943 if (!(base % 1) && j - i < n) {
38944 i = Math.round(i) - 1, j = Math.round(j) + 1;
38945 if (u > 0) for (; i < j; ++i) {
38946 for (k = 1, p = pows(i); k < base; ++k) {
38947 t = p * k;
38948 if (t < u) continue;
38949 if (t > v) break;
38950 z.push(t);
38951 }
38952 } else for (; i < j; ++i) {
38953 for (k = base - 1, p = pows(i); k >= 1; --k) {
38954 t = p * k;
38955 if (t < u) continue;
38956 if (t > v) break;
38957 z.push(t);
38958 }
38959 }
38960 } else {
38961 z = ticks(i, j, Math.min(j - i, n)).map(pows);
38962 }
38963
38964 return r ? z.reverse() : z;
38965 };
38966
38967 scale.tickFormat = function(count, specifier) {
38968 if (specifier == null) specifier = base === 10 ? ".0e" : ",";
38969 if (typeof specifier !== "function") specifier = defaultLocale_format(specifier);
38970 if (count === Infinity) return specifier;
38971 if (count == null) count = 10;
38972 var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
38973 return function(d) {
38974 var i = d / pows(Math.round(logs(d)));
38975 if (i * base < base - 0.5) i *= base;
38976 return i <= k ? specifier(d) : "";
38977 };
38978 };
38979
38980 scale.nice = function() {
38981 return domain(nice(domain(), {
38982 floor: function(x) { return pows(Math.floor(logs(x))); },
38983 ceil: function(x) { return pows(Math.ceil(logs(x))); }
38984 }));
38985 };
38986
38987 scale.copy = function() {
38988 return continuous_copy(scale, log().base(base));
38989 };
38990
38991 return scale;
38992}
38993
38994// CONCATENATED MODULE: ./node_modules/d3-scale/src/pow.js
38995
38996
38997
38998
38999function raise(x, exponent) {
39000 return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
39001}
39002
39003function pow() {
39004 var exponent = 1,
39005 scale = continuous(deinterpolate, reinterpolate),
39006 domain = scale.domain;
39007
39008 function deinterpolate(a, b) {
39009 return (b = raise(b, exponent) - (a = raise(a, exponent)))
39010 ? function(x) { return (raise(x, exponent) - a) / b; }
39011 : d3_scale_src_constant(b);
39012 }
39013
39014 function reinterpolate(a, b) {
39015 b = raise(b, exponent) - (a = raise(a, exponent));
39016 return function(t) { return raise(a + b * t, 1 / exponent); };
39017 }
39018
39019 scale.exponent = function(_) {
39020 return arguments.length ? (exponent = +_, domain(domain())) : exponent;
39021 };
39022
39023 scale.copy = function() {
39024 return continuous_copy(scale, pow().exponent(exponent));
39025 };
39026
39027 return linearish(scale);
39028}
39029
39030function sqrt() {
39031 return pow().exponent(0.5);
39032}
39033
39034// CONCATENATED MODULE: ./node_modules/d3-scale/src/quantile.js
39035
39036
39037
39038function quantile_quantile() {
39039 var domain = [],
39040 range = [],
39041 thresholds = [];
39042
39043 function rescale() {
39044 var i = 0, n = Math.max(1, range.length);
39045 thresholds = new Array(n - 1);
39046 while (++i < n) thresholds[i - 1] = quantile(domain, i / n);
39047 return scale;
39048 }
39049
39050 function scale(x) {
39051 if (!isNaN(x = +x)) return range[bisect(thresholds, x)];
39052 }
39053
39054 scale.invertExtent = function(y) {
39055 var i = range.indexOf(y);
39056 return i < 0 ? [NaN, NaN] : [
39057 i > 0 ? thresholds[i - 1] : domain[0],
39058 i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
39059 ];
39060 };
39061
39062 scale.domain = function(_) {
39063 if (!arguments.length) return domain.slice();
39064 domain = [];
39065 for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
39066 domain.sort(ascending);
39067 return rescale();
39068 };
39069
39070 scale.range = function(_) {
39071 return arguments.length ? (range = array_slice.call(_), rescale()) : range.slice();
39072 };
39073
39074 scale.quantiles = function() {
39075 return thresholds.slice();
39076 };
39077
39078 scale.copy = function() {
39079 return quantile_quantile()
39080 .domain(domain)
39081 .range(range);
39082 };
39083
39084 return scale;
39085}
39086
39087// CONCATENATED MODULE: ./node_modules/d3-scale/src/quantize.js
39088
39089
39090
39091
39092function quantize_quantize() {
39093 var x0 = 0,
39094 x1 = 1,
39095 n = 1,
39096 domain = [0.5],
39097 range = [0, 1];
39098
39099 function scale(x) {
39100 if (x <= x) return range[bisect(domain, x, 0, n)];
39101 }
39102
39103 function rescale() {
39104 var i = -1;
39105 domain = new Array(n);
39106 while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
39107 return scale;
39108 }
39109
39110 scale.domain = function(_) {
39111 return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
39112 };
39113
39114 scale.range = function(_) {
39115 return arguments.length ? (n = (range = array_slice.call(_)).length - 1, rescale()) : range.slice();
39116 };
39117
39118 scale.invertExtent = function(y) {
39119 var i = range.indexOf(y);
39120 return i < 0 ? [NaN, NaN]
39121 : i < 1 ? [x0, domain[0]]
39122 : i >= n ? [domain[n - 1], x1]
39123 : [domain[i - 1], domain[i]];
39124 };
39125
39126 scale.copy = function() {
39127 return quantize_quantize()
39128 .domain([x0, x1])
39129 .range(range);
39130 };
39131
39132 return linearish(scale);
39133}
39134
39135// CONCATENATED MODULE: ./node_modules/d3-scale/src/threshold.js
39136
39137
39138
39139function threshold_threshold() {
39140 var domain = [0.5],
39141 range = [0, 1],
39142 n = 1;
39143
39144 function scale(x) {
39145 if (x <= x) return range[bisect(domain, x, 0, n)];
39146 }
39147
39148 scale.domain = function(_) {
39149 return arguments.length ? (domain = array_slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
39150 };
39151
39152 scale.range = function(_) {
39153 return arguments.length ? (range = array_slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
39154 };
39155
39156 scale.invertExtent = function(y) {
39157 var i = range.indexOf(y);
39158 return [domain[i - 1], domain[i]];
39159 };
39160
39161 scale.copy = function() {
39162 return threshold_threshold()
39163 .domain(domain)
39164 .range(range);
39165 };
39166
39167 return scale;
39168}
39169
39170// CONCATENATED MODULE: ./node_modules/d3-time/src/interval.js
39171var interval_t0 = new Date,
39172 interval_t1 = new Date;
39173
39174function newInterval(floori, offseti, count, field) {
39175
39176 function interval(date) {
39177 return floori(date = new Date(+date)), date;
39178 }
39179
39180 interval.floor = interval;
39181
39182 interval.ceil = function(date) {
39183 return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
39184 };
39185
39186 interval.round = function(date) {
39187 var d0 = interval(date),
39188 d1 = interval.ceil(date);
39189 return date - d0 < d1 - date ? d0 : d1;
39190 };
39191
39192 interval.offset = function(date, step) {
39193 return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
39194 };
39195
39196 interval.range = function(start, stop, step) {
39197 var range = [], previous;
39198 start = interval.ceil(start);
39199 step = step == null ? 1 : Math.floor(step);
39200 if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
39201 do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
39202 while (previous < start && start < stop);
39203 return range;
39204 };
39205
39206 interval.filter = function(test) {
39207 return newInterval(function(date) {
39208 if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
39209 }, function(date, step) {
39210 if (date >= date) {
39211 if (step < 0) while (++step <= 0) {
39212 while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
39213 } else while (--step >= 0) {
39214 while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
39215 }
39216 }
39217 });
39218 };
39219
39220 if (count) {
39221 interval.count = function(start, end) {
39222 interval_t0.setTime(+start), interval_t1.setTime(+end);
39223 floori(interval_t0), floori(interval_t1);
39224 return Math.floor(count(interval_t0, interval_t1));
39225 };
39226
39227 interval.every = function(step) {
39228 step = Math.floor(step);
39229 return !isFinite(step) || !(step > 0) ? null
39230 : !(step > 1) ? interval
39231 : interval.filter(field
39232 ? function(d) { return field(d) % step === 0; }
39233 : function(d) { return interval.count(0, d) % step === 0; });
39234 };
39235 }
39236
39237 return interval;
39238}
39239
39240// CONCATENATED MODULE: ./node_modules/d3-time/src/millisecond.js
39241
39242
39243var millisecond_millisecond = newInterval(function() {
39244 // noop
39245}, function(date, step) {
39246 date.setTime(+date + step);
39247}, function(start, end) {
39248 return end - start;
39249});
39250
39251// An optimized implementation for this simple case.
39252millisecond_millisecond.every = function(k) {
39253 k = Math.floor(k);
39254 if (!isFinite(k) || !(k > 0)) return null;
39255 if (!(k > 1)) return millisecond_millisecond;
39256 return newInterval(function(date) {
39257 date.setTime(Math.floor(date / k) * k);
39258 }, function(date, step) {
39259 date.setTime(+date + step * k);
39260 }, function(start, end) {
39261 return (end - start) / k;
39262 });
39263};
39264
39265/* harmony default export */ var src_millisecond = (millisecond_millisecond);
39266var milliseconds = millisecond_millisecond.range;
39267
39268// CONCATENATED MODULE: ./node_modules/d3-time/src/duration.js
39269var durationSecond = 1e3;
39270var durationMinute = 6e4;
39271var durationHour = 36e5;
39272var durationDay = 864e5;
39273var durationWeek = 6048e5;
39274
39275// CONCATENATED MODULE: ./node_modules/d3-time/src/second.js
39276
39277
39278
39279var second_second = newInterval(function(date) {
39280 date.setTime(Math.floor(date / durationSecond) * durationSecond);
39281}, function(date, step) {
39282 date.setTime(+date + step * durationSecond);
39283}, function(start, end) {
39284 return (end - start) / durationSecond;
39285}, function(date) {
39286 return date.getUTCSeconds();
39287});
39288
39289/* harmony default export */ var src_second = (second_second);
39290var seconds = second_second.range;
39291
39292// CONCATENATED MODULE: ./node_modules/d3-time/src/minute.js
39293
39294
39295
39296var minute_minute = newInterval(function(date) {
39297 date.setTime(Math.floor(date / durationMinute) * durationMinute);
39298}, function(date, step) {
39299 date.setTime(+date + step * durationMinute);
39300}, function(start, end) {
39301 return (end - start) / durationMinute;
39302}, function(date) {
39303 return date.getMinutes();
39304});
39305
39306/* harmony default export */ var src_minute = (minute_minute);
39307var minutes = minute_minute.range;
39308
39309// CONCATENATED MODULE: ./node_modules/d3-time/src/hour.js
39310
39311
39312
39313var hour_hour = newInterval(function(date) {
39314 var offset = date.getTimezoneOffset() * durationMinute % durationHour;
39315 if (offset < 0) offset += durationHour;
39316 date.setTime(Math.floor((+date - offset) / durationHour) * durationHour + offset);
39317}, function(date, step) {
39318 date.setTime(+date + step * durationHour);
39319}, function(start, end) {
39320 return (end - start) / durationHour;
39321}, function(date) {
39322 return date.getHours();
39323});
39324
39325/* harmony default export */ var src_hour = (hour_hour);
39326var hours = hour_hour.range;
39327
39328// CONCATENATED MODULE: ./node_modules/d3-time/src/day.js
39329
39330
39331
39332var day_day = newInterval(function(date) {
39333 date.setHours(0, 0, 0, 0);
39334}, function(date, step) {
39335 date.setDate(date.getDate() + step);
39336}, function(start, end) {
39337 return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;
39338}, function(date) {
39339 return date.getDate() - 1;
39340});
39341
39342/* harmony default export */ var src_day = (day_day);
39343var days = day_day.range;
39344
39345// CONCATENATED MODULE: ./node_modules/d3-time/src/week.js
39346
39347
39348
39349function weekday(i) {
39350 return newInterval(function(date) {
39351 date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
39352 date.setHours(0, 0, 0, 0);
39353 }, function(date, step) {
39354 date.setDate(date.getDate() + step * 7);
39355 }, function(start, end) {
39356 return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
39357 });
39358}
39359
39360var sunday = weekday(0);
39361var monday = weekday(1);
39362var tuesday = weekday(2);
39363var wednesday = weekday(3);
39364var thursday = weekday(4);
39365var friday = weekday(5);
39366var saturday = weekday(6);
39367
39368var sundays = sunday.range;
39369var mondays = monday.range;
39370var tuesdays = tuesday.range;
39371var wednesdays = wednesday.range;
39372var thursdays = thursday.range;
39373var fridays = friday.range;
39374var saturdays = saturday.range;
39375
39376// CONCATENATED MODULE: ./node_modules/d3-time/src/month.js
39377
39378
39379var month_month = newInterval(function(date) {
39380 date.setDate(1);
39381 date.setHours(0, 0, 0, 0);
39382}, function(date, step) {
39383 date.setMonth(date.getMonth() + step);
39384}, function(start, end) {
39385 return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
39386}, function(date) {
39387 return date.getMonth();
39388});
39389
39390/* harmony default export */ var src_month = (month_month);
39391var months = month_month.range;
39392
39393// CONCATENATED MODULE: ./node_modules/d3-time/src/year.js
39394
39395
39396var year_year = newInterval(function(date) {
39397 date.setMonth(0, 1);
39398 date.setHours(0, 0, 0, 0);
39399}, function(date, step) {
39400 date.setFullYear(date.getFullYear() + step);
39401}, function(start, end) {
39402 return end.getFullYear() - start.getFullYear();
39403}, function(date) {
39404 return date.getFullYear();
39405});
39406
39407// An optimized implementation for this simple case.
39408year_year.every = function(k) {
39409 return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
39410 date.setFullYear(Math.floor(date.getFullYear() / k) * k);
39411 date.setMonth(0, 1);
39412 date.setHours(0, 0, 0, 0);
39413 }, function(date, step) {
39414 date.setFullYear(date.getFullYear() + step * k);
39415 });
39416};
39417
39418/* harmony default export */ var src_year = (year_year);
39419var years = year_year.range;
39420
39421// CONCATENATED MODULE: ./node_modules/d3-time/src/utcMinute.js
39422
39423
39424
39425var utcMinute = newInterval(function(date) {
39426 date.setUTCSeconds(0, 0);
39427}, function(date, step) {
39428 date.setTime(+date + step * durationMinute);
39429}, function(start, end) {
39430 return (end - start) / durationMinute;
39431}, function(date) {
39432 return date.getUTCMinutes();
39433});
39434
39435/* harmony default export */ var src_utcMinute = (utcMinute);
39436var utcMinutes = utcMinute.range;
39437
39438// CONCATENATED MODULE: ./node_modules/d3-time/src/utcHour.js
39439
39440
39441
39442var utcHour = newInterval(function(date) {
39443 date.setUTCMinutes(0, 0, 0);
39444}, function(date, step) {
39445 date.setTime(+date + step * durationHour);
39446}, function(start, end) {
39447 return (end - start) / durationHour;
39448}, function(date) {
39449 return date.getUTCHours();
39450});
39451
39452/* harmony default export */ var src_utcHour = (utcHour);
39453var utcHours = utcHour.range;
39454
39455// CONCATENATED MODULE: ./node_modules/d3-time/src/utcDay.js
39456
39457
39458
39459var utcDay = newInterval(function(date) {
39460 date.setUTCHours(0, 0, 0, 0);
39461}, function(date, step) {
39462 date.setUTCDate(date.getUTCDate() + step);
39463}, function(start, end) {
39464 return (end - start) / durationDay;
39465}, function(date) {
39466 return date.getUTCDate() - 1;
39467});
39468
39469/* harmony default export */ var src_utcDay = (utcDay);
39470var utcDays = utcDay.range;
39471
39472// CONCATENATED MODULE: ./node_modules/d3-time/src/utcWeek.js
39473
39474
39475
39476function utcWeekday(i) {
39477 return newInterval(function(date) {
39478 date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
39479 date.setUTCHours(0, 0, 0, 0);
39480 }, function(date, step) {
39481 date.setUTCDate(date.getUTCDate() + step * 7);
39482 }, function(start, end) {
39483 return (end - start) / durationWeek;
39484 });
39485}
39486
39487var utcSunday = utcWeekday(0);
39488var utcMonday = utcWeekday(1);
39489var utcTuesday = utcWeekday(2);
39490var utcWednesday = utcWeekday(3);
39491var utcThursday = utcWeekday(4);
39492var utcFriday = utcWeekday(5);
39493var utcSaturday = utcWeekday(6);
39494
39495var utcSundays = utcSunday.range;
39496var utcMondays = utcMonday.range;
39497var utcTuesdays = utcTuesday.range;
39498var utcWednesdays = utcWednesday.range;
39499var utcThursdays = utcThursday.range;
39500var utcFridays = utcFriday.range;
39501var utcSaturdays = utcSaturday.range;
39502
39503// CONCATENATED MODULE: ./node_modules/d3-time/src/utcMonth.js
39504
39505
39506var utcMonth = newInterval(function(date) {
39507 date.setUTCDate(1);
39508 date.setUTCHours(0, 0, 0, 0);
39509}, function(date, step) {
39510 date.setUTCMonth(date.getUTCMonth() + step);
39511}, function(start, end) {
39512 return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
39513}, function(date) {
39514 return date.getUTCMonth();
39515});
39516
39517/* harmony default export */ var src_utcMonth = (utcMonth);
39518var utcMonths = utcMonth.range;
39519
39520// CONCATENATED MODULE: ./node_modules/d3-time/src/utcYear.js
39521
39522
39523var utcYear = newInterval(function(date) {
39524 date.setUTCMonth(0, 1);
39525 date.setUTCHours(0, 0, 0, 0);
39526}, function(date, step) {
39527 date.setUTCFullYear(date.getUTCFullYear() + step);
39528}, function(start, end) {
39529 return end.getUTCFullYear() - start.getUTCFullYear();
39530}, function(date) {
39531 return date.getUTCFullYear();
39532});
39533
39534// An optimized implementation for this simple case.
39535utcYear.every = function(k) {
39536 return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
39537 date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
39538 date.setUTCMonth(0, 1);
39539 date.setUTCHours(0, 0, 0, 0);
39540 }, function(date, step) {
39541 date.setUTCFullYear(date.getUTCFullYear() + step * k);
39542 });
39543};
39544
39545/* harmony default export */ var src_utcYear = (utcYear);
39546var utcYears = utcYear.range;
39547
39548// CONCATENATED MODULE: ./node_modules/d3-time/src/index.js
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579// CONCATENATED MODULE: ./node_modules/d3-time-format/src/locale.js
39580
39581
39582function localDate(d) {
39583 if (0 <= d.y && d.y < 100) {
39584 var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
39585 date.setFullYear(d.y);
39586 return date;
39587 }
39588 return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
39589}
39590
39591function utcDate(d) {
39592 if (0 <= d.y && d.y < 100) {
39593 var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
39594 date.setUTCFullYear(d.y);
39595 return date;
39596 }
39597 return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
39598}
39599
39600function newYear(y) {
39601 return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0};
39602}
39603
39604function formatLocale(locale) {
39605 var locale_dateTime = locale.dateTime,
39606 locale_date = locale.date,
39607 locale_time = locale.time,
39608 locale_periods = locale.periods,
39609 locale_weekdays = locale.days,
39610 locale_shortWeekdays = locale.shortDays,
39611 locale_months = locale.months,
39612 locale_shortMonths = locale.shortMonths;
39613
39614 var periodRe = formatRe(locale_periods),
39615 periodLookup = formatLookup(locale_periods),
39616 weekdayRe = formatRe(locale_weekdays),
39617 weekdayLookup = formatLookup(locale_weekdays),
39618 shortWeekdayRe = formatRe(locale_shortWeekdays),
39619 shortWeekdayLookup = formatLookup(locale_shortWeekdays),
39620 monthRe = formatRe(locale_months),
39621 monthLookup = formatLookup(locale_months),
39622 shortMonthRe = formatRe(locale_shortMonths),
39623 shortMonthLookup = formatLookup(locale_shortMonths);
39624
39625 var formats = {
39626 "a": formatShortWeekday,
39627 "A": formatWeekday,
39628 "b": formatShortMonth,
39629 "B": formatMonth,
39630 "c": null,
39631 "d": formatDayOfMonth,
39632 "e": formatDayOfMonth,
39633 "f": formatMicroseconds,
39634 "H": formatHour24,
39635 "I": formatHour12,
39636 "j": formatDayOfYear,
39637 "L": formatMilliseconds,
39638 "m": formatMonthNumber,
39639 "M": formatMinutes,
39640 "p": formatPeriod,
39641 "Q": formatUnixTimestamp,
39642 "s": formatUnixTimestampSeconds,
39643 "S": formatSeconds,
39644 "u": formatWeekdayNumberMonday,
39645 "U": formatWeekNumberSunday,
39646 "V": formatWeekNumberISO,
39647 "w": formatWeekdayNumberSunday,
39648 "W": formatWeekNumberMonday,
39649 "x": null,
39650 "X": null,
39651 "y": locale_formatYear,
39652 "Y": formatFullYear,
39653 "Z": formatZone,
39654 "%": formatLiteralPercent
39655 };
39656
39657 var utcFormats = {
39658 "a": formatUTCShortWeekday,
39659 "A": formatUTCWeekday,
39660 "b": formatUTCShortMonth,
39661 "B": formatUTCMonth,
39662 "c": null,
39663 "d": formatUTCDayOfMonth,
39664 "e": formatUTCDayOfMonth,
39665 "f": formatUTCMicroseconds,
39666 "H": formatUTCHour24,
39667 "I": formatUTCHour12,
39668 "j": formatUTCDayOfYear,
39669 "L": formatUTCMilliseconds,
39670 "m": formatUTCMonthNumber,
39671 "M": formatUTCMinutes,
39672 "p": formatUTCPeriod,
39673 "Q": formatUnixTimestamp,
39674 "s": formatUnixTimestampSeconds,
39675 "S": formatUTCSeconds,
39676 "u": formatUTCWeekdayNumberMonday,
39677 "U": formatUTCWeekNumberSunday,
39678 "V": formatUTCWeekNumberISO,
39679 "w": formatUTCWeekdayNumberSunday,
39680 "W": formatUTCWeekNumberMonday,
39681 "x": null,
39682 "X": null,
39683 "y": formatUTCYear,
39684 "Y": formatUTCFullYear,
39685 "Z": formatUTCZone,
39686 "%": formatLiteralPercent
39687 };
39688
39689 var parses = {
39690 "a": parseShortWeekday,
39691 "A": parseWeekday,
39692 "b": parseShortMonth,
39693 "B": parseMonth,
39694 "c": parseLocaleDateTime,
39695 "d": parseDayOfMonth,
39696 "e": parseDayOfMonth,
39697 "f": parseMicroseconds,
39698 "H": parseHour24,
39699 "I": parseHour24,
39700 "j": parseDayOfYear,
39701 "L": parseMilliseconds,
39702 "m": parseMonthNumber,
39703 "M": parseMinutes,
39704 "p": parsePeriod,
39705 "Q": parseUnixTimestamp,
39706 "s": parseUnixTimestampSeconds,
39707 "S": parseSeconds,
39708 "u": parseWeekdayNumberMonday,
39709 "U": parseWeekNumberSunday,
39710 "V": parseWeekNumberISO,
39711 "w": parseWeekdayNumberSunday,
39712 "W": parseWeekNumberMonday,
39713 "x": parseLocaleDate,
39714 "X": parseLocaleTime,
39715 "y": parseYear,
39716 "Y": parseFullYear,
39717 "Z": parseZone,
39718 "%": parseLiteralPercent
39719 };
39720
39721 // These recursive directive definitions must be deferred.
39722 formats.x = newFormat(locale_date, formats);
39723 formats.X = newFormat(locale_time, formats);
39724 formats.c = newFormat(locale_dateTime, formats);
39725 utcFormats.x = newFormat(locale_date, utcFormats);
39726 utcFormats.X = newFormat(locale_time, utcFormats);
39727 utcFormats.c = newFormat(locale_dateTime, utcFormats);
39728
39729 function newFormat(specifier, formats) {
39730 return function(date) {
39731 var string = [],
39732 i = -1,
39733 j = 0,
39734 n = specifier.length,
39735 c,
39736 pad,
39737 format;
39738
39739 if (!(date instanceof Date)) date = new Date(+date);
39740
39741 while (++i < n) {
39742 if (specifier.charCodeAt(i) === 37) {
39743 string.push(specifier.slice(j, i));
39744 if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
39745 else pad = c === "e" ? " " : "0";
39746 if (format = formats[c]) c = format(date, pad);
39747 string.push(c);
39748 j = i + 1;
39749 }
39750 }
39751
39752 string.push(specifier.slice(j, i));
39753 return string.join("");
39754 };
39755 }
39756
39757 function newParse(specifier, newDate) {
39758 return function(string) {
39759 var d = newYear(1900),
39760 i = parseSpecifier(d, specifier, string += "", 0),
39761 week, day;
39762 if (i != string.length) return null;
39763
39764 // If a UNIX timestamp is specified, return it.
39765 if ("Q" in d) return new Date(d.Q);
39766
39767 // The am-pm flag is 0 for AM, and 1 for PM.
39768 if ("p" in d) d.H = d.H % 12 + d.p * 12;
39769
39770 // Convert day-of-week and week-of-year to day-of-year.
39771 if ("V" in d) {
39772 if (d.V < 1 || d.V > 53) return null;
39773 if (!("w" in d)) d.w = 1;
39774 if ("Z" in d) {
39775 week = utcDate(newYear(d.y)), day = week.getUTCDay();
39776 week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
39777 week = src_utcDay.offset(week, (d.V - 1) * 7);
39778 d.y = week.getUTCFullYear();
39779 d.m = week.getUTCMonth();
39780 d.d = week.getUTCDate() + (d.w + 6) % 7;
39781 } else {
39782 week = newDate(newYear(d.y)), day = week.getDay();
39783 week = day > 4 || day === 0 ? monday.ceil(week) : monday(week);
39784 week = src_day.offset(week, (d.V - 1) * 7);
39785 d.y = week.getFullYear();
39786 d.m = week.getMonth();
39787 d.d = week.getDate() + (d.w + 6) % 7;
39788 }
39789 } else if ("W" in d || "U" in d) {
39790 if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
39791 day = "Z" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay();
39792 d.m = 0;
39793 d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
39794 }
39795
39796 // If a time zone is specified, all fields are interpreted as UTC and then
39797 // offset according to the specified time zone.
39798 if ("Z" in d) {
39799 d.H += d.Z / 100 | 0;
39800 d.M += d.Z % 100;
39801 return utcDate(d);
39802 }
39803
39804 // Otherwise, all fields are in local time.
39805 return newDate(d);
39806 };
39807 }
39808
39809 function parseSpecifier(d, specifier, string, j) {
39810 var i = 0,
39811 n = specifier.length,
39812 m = string.length,
39813 c,
39814 parse;
39815
39816 while (i < n) {
39817 if (j >= m) return -1;
39818 c = specifier.charCodeAt(i++);
39819 if (c === 37) {
39820 c = specifier.charAt(i++);
39821 parse = parses[c in pads ? specifier.charAt(i++) : c];
39822 if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
39823 } else if (c != string.charCodeAt(j++)) {
39824 return -1;
39825 }
39826 }
39827
39828 return j;
39829 }
39830
39831 function parsePeriod(d, string, i) {
39832 var n = periodRe.exec(string.slice(i));
39833 return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
39834 }
39835
39836 function parseShortWeekday(d, string, i) {
39837 var n = shortWeekdayRe.exec(string.slice(i));
39838 return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
39839 }
39840
39841 function parseWeekday(d, string, i) {
39842 var n = weekdayRe.exec(string.slice(i));
39843 return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
39844 }
39845
39846 function parseShortMonth(d, string, i) {
39847 var n = shortMonthRe.exec(string.slice(i));
39848 return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
39849 }
39850
39851 function parseMonth(d, string, i) {
39852 var n = monthRe.exec(string.slice(i));
39853 return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
39854 }
39855
39856 function parseLocaleDateTime(d, string, i) {
39857 return parseSpecifier(d, locale_dateTime, string, i);
39858 }
39859
39860 function parseLocaleDate(d, string, i) {
39861 return parseSpecifier(d, locale_date, string, i);
39862 }
39863
39864 function parseLocaleTime(d, string, i) {
39865 return parseSpecifier(d, locale_time, string, i);
39866 }
39867
39868 function formatShortWeekday(d) {
39869 return locale_shortWeekdays[d.getDay()];
39870 }
39871
39872 function formatWeekday(d) {
39873 return locale_weekdays[d.getDay()];
39874 }
39875
39876 function formatShortMonth(d) {
39877 return locale_shortMonths[d.getMonth()];
39878 }
39879
39880 function formatMonth(d) {
39881 return locale_months[d.getMonth()];
39882 }
39883
39884 function formatPeriod(d) {
39885 return locale_periods[+(d.getHours() >= 12)];
39886 }
39887
39888 function formatUTCShortWeekday(d) {
39889 return locale_shortWeekdays[d.getUTCDay()];
39890 }
39891
39892 function formatUTCWeekday(d) {
39893 return locale_weekdays[d.getUTCDay()];
39894 }
39895
39896 function formatUTCShortMonth(d) {
39897 return locale_shortMonths[d.getUTCMonth()];
39898 }
39899
39900 function formatUTCMonth(d) {
39901 return locale_months[d.getUTCMonth()];
39902 }
39903
39904 function formatUTCPeriod(d) {
39905 return locale_periods[+(d.getUTCHours() >= 12)];
39906 }
39907
39908 return {
39909 format: function(specifier) {
39910 var f = newFormat(specifier += "", formats);
39911 f.toString = function() { return specifier; };
39912 return f;
39913 },
39914 parse: function(specifier) {
39915 var p = newParse(specifier += "", localDate);
39916 p.toString = function() { return specifier; };
39917 return p;
39918 },
39919 utcFormat: function(specifier) {
39920 var f = newFormat(specifier += "", utcFormats);
39921 f.toString = function() { return specifier; };
39922 return f;
39923 },
39924 utcParse: function(specifier) {
39925 var p = newParse(specifier, utcDate);
39926 p.toString = function() { return specifier; };
39927 return p;
39928 }
39929 };
39930}
39931
39932var pads = {"-": "", "_": " ", "0": "0"},
39933 numberRe = /^\s*\d+/, // note: ignores next directive
39934 percentRe = /^%/,
39935 requoteRe = /[\\^$*+?|[\]().{}]/g;
39936
39937function pad(value, fill, width) {
39938 var sign = value < 0 ? "-" : "",
39939 string = (sign ? -value : value) + "",
39940 length = string.length;
39941 return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
39942}
39943
39944function requote(s) {
39945 return s.replace(requoteRe, "\\$&");
39946}
39947
39948function formatRe(names) {
39949 return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
39950}
39951
39952function formatLookup(names) {
39953 var map = {}, i = -1, n = names.length;
39954 while (++i < n) map[names[i].toLowerCase()] = i;
39955 return map;
39956}
39957
39958function parseWeekdayNumberSunday(d, string, i) {
39959 var n = numberRe.exec(string.slice(i, i + 1));
39960 return n ? (d.w = +n[0], i + n[0].length) : -1;
39961}
39962
39963function parseWeekdayNumberMonday(d, string, i) {
39964 var n = numberRe.exec(string.slice(i, i + 1));
39965 return n ? (d.u = +n[0], i + n[0].length) : -1;
39966}
39967
39968function parseWeekNumberSunday(d, string, i) {
39969 var n = numberRe.exec(string.slice(i, i + 2));
39970 return n ? (d.U = +n[0], i + n[0].length) : -1;
39971}
39972
39973function parseWeekNumberISO(d, string, i) {
39974 var n = numberRe.exec(string.slice(i, i + 2));
39975 return n ? (d.V = +n[0], i + n[0].length) : -1;
39976}
39977
39978function parseWeekNumberMonday(d, string, i) {
39979 var n = numberRe.exec(string.slice(i, i + 2));
39980 return n ? (d.W = +n[0], i + n[0].length) : -1;
39981}
39982
39983function parseFullYear(d, string, i) {
39984 var n = numberRe.exec(string.slice(i, i + 4));
39985 return n ? (d.y = +n[0], i + n[0].length) : -1;
39986}
39987
39988function parseYear(d, string, i) {
39989 var n = numberRe.exec(string.slice(i, i + 2));
39990 return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
39991}
39992
39993function parseZone(d, string, i) {
39994 var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
39995 return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
39996}
39997
39998function parseMonthNumber(d, string, i) {
39999 var n = numberRe.exec(string.slice(i, i + 2));
40000 return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
40001}
40002
40003function parseDayOfMonth(d, string, i) {
40004 var n = numberRe.exec(string.slice(i, i + 2));
40005 return n ? (d.d = +n[0], i + n[0].length) : -1;
40006}
40007
40008function parseDayOfYear(d, string, i) {
40009 var n = numberRe.exec(string.slice(i, i + 3));
40010 return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
40011}
40012
40013function parseHour24(d, string, i) {
40014 var n = numberRe.exec(string.slice(i, i + 2));
40015 return n ? (d.H = +n[0], i + n[0].length) : -1;
40016}
40017
40018function parseMinutes(d, string, i) {
40019 var n = numberRe.exec(string.slice(i, i + 2));
40020 return n ? (d.M = +n[0], i + n[0].length) : -1;
40021}
40022
40023function parseSeconds(d, string, i) {
40024 var n = numberRe.exec(string.slice(i, i + 2));
40025 return n ? (d.S = +n[0], i + n[0].length) : -1;
40026}
40027
40028function parseMilliseconds(d, string, i) {
40029 var n = numberRe.exec(string.slice(i, i + 3));
40030 return n ? (d.L = +n[0], i + n[0].length) : -1;
40031}
40032
40033function parseMicroseconds(d, string, i) {
40034 var n = numberRe.exec(string.slice(i, i + 6));
40035 return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
40036}
40037
40038function parseLiteralPercent(d, string, i) {
40039 var n = percentRe.exec(string.slice(i, i + 1));
40040 return n ? i + n[0].length : -1;
40041}
40042
40043function parseUnixTimestamp(d, string, i) {
40044 var n = numberRe.exec(string.slice(i));
40045 return n ? (d.Q = +n[0], i + n[0].length) : -1;
40046}
40047
40048function parseUnixTimestampSeconds(d, string, i) {
40049 var n = numberRe.exec(string.slice(i));
40050 return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1;
40051}
40052
40053function formatDayOfMonth(d, p) {
40054 return pad(d.getDate(), p, 2);
40055}
40056
40057function formatHour24(d, p) {
40058 return pad(d.getHours(), p, 2);
40059}
40060
40061function formatHour12(d, p) {
40062 return pad(d.getHours() % 12 || 12, p, 2);
40063}
40064
40065function formatDayOfYear(d, p) {
40066 return pad(1 + src_day.count(src_year(d), d), p, 3);
40067}
40068
40069function formatMilliseconds(d, p) {
40070 return pad(d.getMilliseconds(), p, 3);
40071}
40072
40073function formatMicroseconds(d, p) {
40074 return formatMilliseconds(d, p) + "000";
40075}
40076
40077function formatMonthNumber(d, p) {
40078 return pad(d.getMonth() + 1, p, 2);
40079}
40080
40081function formatMinutes(d, p) {
40082 return pad(d.getMinutes(), p, 2);
40083}
40084
40085function formatSeconds(d, p) {
40086 return pad(d.getSeconds(), p, 2);
40087}
40088
40089function formatWeekdayNumberMonday(d) {
40090 var day = d.getDay();
40091 return day === 0 ? 7 : day;
40092}
40093
40094function formatWeekNumberSunday(d, p) {
40095 return pad(sunday.count(src_year(d), d), p, 2);
40096}
40097
40098function formatWeekNumberISO(d, p) {
40099 var day = d.getDay();
40100 d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d);
40101 return pad(thursday.count(src_year(d), d) + (src_year(d).getDay() === 4), p, 2);
40102}
40103
40104function formatWeekdayNumberSunday(d) {
40105 return d.getDay();
40106}
40107
40108function formatWeekNumberMonday(d, p) {
40109 return pad(monday.count(src_year(d), d), p, 2);
40110}
40111
40112function locale_formatYear(d, p) {
40113 return pad(d.getFullYear() % 100, p, 2);
40114}
40115
40116function formatFullYear(d, p) {
40117 return pad(d.getFullYear() % 10000, p, 4);
40118}
40119
40120function formatZone(d) {
40121 var z = d.getTimezoneOffset();
40122 return (z > 0 ? "-" : (z *= -1, "+"))
40123 + pad(z / 60 | 0, "0", 2)
40124 + pad(z % 60, "0", 2);
40125}
40126
40127function formatUTCDayOfMonth(d, p) {
40128 return pad(d.getUTCDate(), p, 2);
40129}
40130
40131function formatUTCHour24(d, p) {
40132 return pad(d.getUTCHours(), p, 2);
40133}
40134
40135function formatUTCHour12(d, p) {
40136 return pad(d.getUTCHours() % 12 || 12, p, 2);
40137}
40138
40139function formatUTCDayOfYear(d, p) {
40140 return pad(1 + src_utcDay.count(src_utcYear(d), d), p, 3);
40141}
40142
40143function formatUTCMilliseconds(d, p) {
40144 return pad(d.getUTCMilliseconds(), p, 3);
40145}
40146
40147function formatUTCMicroseconds(d, p) {
40148 return formatUTCMilliseconds(d, p) + "000";
40149}
40150
40151function formatUTCMonthNumber(d, p) {
40152 return pad(d.getUTCMonth() + 1, p, 2);
40153}
40154
40155function formatUTCMinutes(d, p) {
40156 return pad(d.getUTCMinutes(), p, 2);
40157}
40158
40159function formatUTCSeconds(d, p) {
40160 return pad(d.getUTCSeconds(), p, 2);
40161}
40162
40163function formatUTCWeekdayNumberMonday(d) {
40164 var dow = d.getUTCDay();
40165 return dow === 0 ? 7 : dow;
40166}
40167
40168function formatUTCWeekNumberSunday(d, p) {
40169 return pad(utcSunday.count(src_utcYear(d), d), p, 2);
40170}
40171
40172function formatUTCWeekNumberISO(d, p) {
40173 var day = d.getUTCDay();
40174 d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
40175 return pad(utcThursday.count(src_utcYear(d), d) + (src_utcYear(d).getUTCDay() === 4), p, 2);
40176}
40177
40178function formatUTCWeekdayNumberSunday(d) {
40179 return d.getUTCDay();
40180}
40181
40182function formatUTCWeekNumberMonday(d, p) {
40183 return pad(utcMonday.count(src_utcYear(d), d), p, 2);
40184}
40185
40186function formatUTCYear(d, p) {
40187 return pad(d.getUTCFullYear() % 100, p, 2);
40188}
40189
40190function formatUTCFullYear(d, p) {
40191 return pad(d.getUTCFullYear() % 10000, p, 4);
40192}
40193
40194function formatUTCZone() {
40195 return "+0000";
40196}
40197
40198function formatLiteralPercent() {
40199 return "%";
40200}
40201
40202function formatUnixTimestamp(d) {
40203 return +d;
40204}
40205
40206function formatUnixTimestampSeconds(d) {
40207 return Math.floor(+d / 1000);
40208}
40209
40210// CONCATENATED MODULE: ./node_modules/d3-time-format/src/defaultLocale.js
40211
40212
40213var src_defaultLocale_locale;
40214var timeFormat;
40215var timeParse;
40216var utcFormat;
40217var utcParse;
40218
40219defaultLocale_defaultLocale({
40220 dateTime: "%x, %X",
40221 date: "%-m/%-d/%Y",
40222 time: "%-I:%M:%S %p",
40223 periods: ["AM", "PM"],
40224 days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
40225 shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
40226 months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
40227 shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
40228});
40229
40230function defaultLocale_defaultLocale(definition) {
40231 src_defaultLocale_locale = formatLocale(definition);
40232 timeFormat = src_defaultLocale_locale.format;
40233 timeParse = src_defaultLocale_locale.parse;
40234 utcFormat = src_defaultLocale_locale.utcFormat;
40235 utcParse = src_defaultLocale_locale.utcParse;
40236 return src_defaultLocale_locale;
40237}
40238
40239// CONCATENATED MODULE: ./node_modules/d3-time-format/src/isoFormat.js
40240
40241
40242var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
40243
40244function formatIsoNative(date) {
40245 return date.toISOString();
40246}
40247
40248var formatIso = Date.prototype.toISOString
40249 ? formatIsoNative
40250 : utcFormat(isoSpecifier);
40251
40252/* harmony default export */ var isoFormat = (formatIso);
40253
40254// CONCATENATED MODULE: ./node_modules/d3-time-format/src/isoParse.js
40255
40256
40257
40258function parseIsoNative(string) {
40259 var date = new Date(string);
40260 return isNaN(date) ? null : date;
40261}
40262
40263var parseIso = +new Date("2000-01-01T00:00:00.000Z")
40264 ? parseIsoNative
40265 : utcParse(isoSpecifier);
40266
40267/* harmony default export */ var isoParse = (parseIso);
40268
40269// CONCATENATED MODULE: ./node_modules/d3-time-format/src/index.js
40270
40271
40272
40273
40274
40275// CONCATENATED MODULE: ./node_modules/d3-scale/src/time.js
40276
40277
40278
40279
40280
40281
40282
40283
40284var time_durationSecond = 1000,
40285 time_durationMinute = time_durationSecond * 60,
40286 time_durationHour = time_durationMinute * 60,
40287 time_durationDay = time_durationHour * 24,
40288 time_durationWeek = time_durationDay * 7,
40289 durationMonth = time_durationDay * 30,
40290 durationYear = time_durationDay * 365;
40291
40292function time_date(t) {
40293 return new Date(t);
40294}
40295
40296function time_number(t) {
40297 return t instanceof Date ? +t : +new Date(+t);
40298}
40299
40300function calendar(year, month, week, day, hour, minute, second, millisecond, format) {
40301 var scale = continuous(deinterpolateLinear, src_number),
40302 invert = scale.invert,
40303 domain = scale.domain;
40304
40305 var formatMillisecond = format(".%L"),
40306 formatSecond = format(":%S"),
40307 formatMinute = format("%I:%M"),
40308 formatHour = format("%I %p"),
40309 formatDay = format("%a %d"),
40310 formatWeek = format("%b %d"),
40311 formatMonth = format("%B"),
40312 formatYear = format("%Y");
40313
40314 var tickIntervals = [
40315 [second, 1, time_durationSecond],
40316 [second, 5, 5 * time_durationSecond],
40317 [second, 15, 15 * time_durationSecond],
40318 [second, 30, 30 * time_durationSecond],
40319 [minute, 1, time_durationMinute],
40320 [minute, 5, 5 * time_durationMinute],
40321 [minute, 15, 15 * time_durationMinute],
40322 [minute, 30, 30 * time_durationMinute],
40323 [ hour, 1, time_durationHour ],
40324 [ hour, 3, 3 * time_durationHour ],
40325 [ hour, 6, 6 * time_durationHour ],
40326 [ hour, 12, 12 * time_durationHour ],
40327 [ day, 1, time_durationDay ],
40328 [ day, 2, 2 * time_durationDay ],
40329 [ week, 1, time_durationWeek ],
40330 [ month, 1, durationMonth ],
40331 [ month, 3, 3 * durationMonth ],
40332 [ year, 1, durationYear ]
40333 ];
40334
40335 function tickFormat(date) {
40336 return (second(date) < date ? formatMillisecond
40337 : minute(date) < date ? formatSecond
40338 : hour(date) < date ? formatMinute
40339 : day(date) < date ? formatHour
40340 : month(date) < date ? (week(date) < date ? formatDay : formatWeek)
40341 : year(date) < date ? formatMonth
40342 : formatYear)(date);
40343 }
40344
40345 function tickInterval(interval, start, stop, step) {
40346 if (interval == null) interval = 10;
40347
40348 // If a desired tick count is specified, pick a reasonable tick interval
40349 // based on the extent of the domain and a rough estimate of tick size.
40350 // Otherwise, assume interval is already a time interval and use it.
40351 if (typeof interval === "number") {
40352 var target = Math.abs(stop - start) / interval,
40353 i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
40354 if (i === tickIntervals.length) {
40355 step = tickStep(start / durationYear, stop / durationYear, interval);
40356 interval = year;
40357 } else if (i) {
40358 i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
40359 step = i[1];
40360 interval = i[0];
40361 } else {
40362 step = Math.max(tickStep(start, stop, interval), 1);
40363 interval = millisecond;
40364 }
40365 }
40366
40367 return step == null ? interval : interval.every(step);
40368 }
40369
40370 scale.invert = function(y) {
40371 return new Date(invert(y));
40372 };
40373
40374 scale.domain = function(_) {
40375 return arguments.length ? domain(array_map.call(_, time_number)) : domain().map(time_date);
40376 };
40377
40378 scale.ticks = function(interval, step) {
40379 var d = domain(),
40380 t0 = d[0],
40381 t1 = d[d.length - 1],
40382 r = t1 < t0,
40383 t;
40384 if (r) t = t0, t0 = t1, t1 = t;
40385 t = tickInterval(interval, t0, t1, step);
40386 t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
40387 return r ? t.reverse() : t;
40388 };
40389
40390 scale.tickFormat = function(count, specifier) {
40391 return specifier == null ? tickFormat : format(specifier);
40392 };
40393
40394 scale.nice = function(interval, step) {
40395 var d = domain();
40396 return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
40397 ? domain(nice(d, interval))
40398 : scale;
40399 };
40400
40401 scale.copy = function() {
40402 return continuous_copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));
40403 };
40404
40405 return scale;
40406}
40407
40408/* harmony default export */ var src_time = (function() {
40409 return calendar(src_year, src_month, sunday, src_day, src_hour, src_minute, src_second, src_millisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);
40410});
40411
40412// CONCATENATED MODULE: ./node_modules/d3-scale/src/utcTime.js
40413
40414
40415
40416
40417/* harmony default export */ var utcTime = (function() {
40418 return calendar(src_utcYear, src_utcMonth, utcSunday, src_utcDay, src_utcHour, src_utcMinute, src_second, src_millisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);
40419});
40420
40421// CONCATENATED MODULE: ./node_modules/d3-scale/src/sequential.js
40422
40423
40424function sequential(interpolator) {
40425 var x0 = 0,
40426 x1 = 1,
40427 k10 = 1,
40428 clamp = false;
40429
40430 function scale(x) {
40431 var t = (x - x0) * k10;
40432 return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t);
40433 }
40434
40435 scale.domain = function(_) {
40436 return arguments.length ? (x0 = +_[0], x1 = +_[1], k10 = x0 === x1 ? 0 : 1 / (x1 - x0), scale) : [x0, x1];
40437 };
40438
40439 scale.clamp = function(_) {
40440 return arguments.length ? (clamp = !!_, scale) : clamp;
40441 };
40442
40443 scale.interpolator = function(_) {
40444 return arguments.length ? (interpolator = _, scale) : interpolator;
40445 };
40446
40447 scale.copy = function() {
40448 return sequential(interpolator).domain([x0, x1]).clamp(clamp);
40449 };
40450
40451 return linearish(scale);
40452}
40453
40454// CONCATENATED MODULE: ./node_modules/d3-scale/src/diverging.js
40455
40456
40457function diverging(interpolator) {
40458 var x0 = 0,
40459 x1 = 0.5,
40460 x2 = 1,
40461 k10 = 1,
40462 k21 = 1,
40463 clamp = false;
40464
40465 function scale(x) {
40466 var t = 0.5 + ((x = +x) - x1) * (x < x1 ? k10 : k21);
40467 return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t);
40468 }
40469
40470 scale.domain = function(_) {
40471 return arguments.length ? (x0 = +_[0], x1 = +_[1], x2 = +_[2], k10 = x0 === x1 ? 0 : 0.5 / (x1 - x0), k21 = x1 === x2 ? 0 : 0.5 / (x2 - x1), scale) : [x0, x1, x2];
40472 };
40473
40474 scale.clamp = function(_) {
40475 return arguments.length ? (clamp = !!_, scale) : clamp;
40476 };
40477
40478 scale.interpolator = function(_) {
40479 return arguments.length ? (interpolator = _, scale) : interpolator;
40480 };
40481
40482 scale.copy = function() {
40483 return diverging(interpolator).domain([x0, x1, x2]).clamp(clamp);
40484 };
40485
40486 return linearish(scale);
40487}
40488
40489// CONCATENATED MODULE: ./node_modules/d3-scale/src/index.js
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/colors.js
40517/* harmony default export */ var src_colors = (function(specifier) {
40518 var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
40519 while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
40520 return colors;
40521});
40522
40523// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/category10.js
40524
40525
40526/* harmony default export */ var category10 = (src_colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"));
40527
40528// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Accent.js
40529
40530
40531/* harmony default export */ var Accent = (src_colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"));
40532
40533// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js
40534
40535
40536/* harmony default export */ var Dark2 = (src_colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"));
40537
40538// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Paired.js
40539
40540
40541/* harmony default export */ var Paired = (src_colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"));
40542
40543// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js
40544
40545
40546/* harmony default export */ var Pastel1 = (src_colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"));
40547
40548// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js
40549
40550
40551/* harmony default export */ var Pastel2 = (src_colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"));
40552
40553// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Set1.js
40554
40555
40556/* harmony default export */ var Set1 = (src_colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"));
40557
40558// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Set2.js
40559
40560
40561/* harmony default export */ var Set2 = (src_colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"));
40562
40563// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/categorical/Set3.js
40564
40565
40566/* harmony default export */ var Set3 = (src_colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"));
40567
40568// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/ramp.js
40569
40570
40571/* harmony default export */ var ramp = (function(scheme) {
40572 return rgbBasis(scheme[scheme.length - 1]);
40573});
40574
40575// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js
40576
40577
40578
40579var BrBG_scheme = new Array(3).concat(
40580 "d8b365f5f5f55ab4ac",
40581 "a6611adfc27d80cdc1018571",
40582 "a6611adfc27df5f5f580cdc1018571",
40583 "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
40584 "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
40585 "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
40586 "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
40587 "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
40588 "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
40589).map(src_colors);
40590
40591/* harmony default export */ var BrBG = (ramp(BrBG_scheme));
40592
40593// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js
40594
40595
40596
40597var PRGn_scheme = new Array(3).concat(
40598 "af8dc3f7f7f77fbf7b",
40599 "7b3294c2a5cfa6dba0008837",
40600 "7b3294c2a5cff7f7f7a6dba0008837",
40601 "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
40602 "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
40603 "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
40604 "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
40605 "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
40606 "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
40607).map(src_colors);
40608
40609/* harmony default export */ var PRGn = (ramp(PRGn_scheme));
40610
40611// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js
40612
40613
40614
40615var PiYG_scheme = new Array(3).concat(
40616 "e9a3c9f7f7f7a1d76a",
40617 "d01c8bf1b6dab8e1864dac26",
40618 "d01c8bf1b6daf7f7f7b8e1864dac26",
40619 "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
40620 "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
40621 "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
40622 "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
40623 "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
40624 "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
40625).map(src_colors);
40626
40627/* harmony default export */ var PiYG = (ramp(PiYG_scheme));
40628
40629// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js
40630
40631
40632
40633var PuOr_scheme = new Array(3).concat(
40634 "998ec3f7f7f7f1a340",
40635 "5e3c99b2abd2fdb863e66101",
40636 "5e3c99b2abd2f7f7f7fdb863e66101",
40637 "542788998ec3d8daebfee0b6f1a340b35806",
40638 "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
40639 "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
40640 "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
40641 "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
40642 "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
40643).map(src_colors);
40644
40645/* harmony default export */ var PuOr = (ramp(PuOr_scheme));
40646
40647// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js
40648
40649
40650
40651var RdBu_scheme = new Array(3).concat(
40652 "ef8a62f7f7f767a9cf",
40653 "ca0020f4a58292c5de0571b0",
40654 "ca0020f4a582f7f7f792c5de0571b0",
40655 "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
40656 "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
40657 "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
40658 "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
40659 "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
40660 "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
40661).map(src_colors);
40662
40663/* harmony default export */ var RdBu = (ramp(RdBu_scheme));
40664
40665// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js
40666
40667
40668
40669var RdGy_scheme = new Array(3).concat(
40670 "ef8a62ffffff999999",
40671 "ca0020f4a582bababa404040",
40672 "ca0020f4a582ffffffbababa404040",
40673 "b2182bef8a62fddbc7e0e0e09999994d4d4d",
40674 "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
40675 "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
40676 "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
40677 "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
40678 "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
40679).map(src_colors);
40680
40681/* harmony default export */ var RdGy = (ramp(RdGy_scheme));
40682
40683// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js
40684
40685
40686
40687var RdYlBu_scheme = new Array(3).concat(
40688 "fc8d59ffffbf91bfdb",
40689 "d7191cfdae61abd9e92c7bb6",
40690 "d7191cfdae61ffffbfabd9e92c7bb6",
40691 "d73027fc8d59fee090e0f3f891bfdb4575b4",
40692 "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
40693 "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
40694 "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
40695 "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
40696 "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
40697).map(src_colors);
40698
40699/* harmony default export */ var RdYlBu = (ramp(RdYlBu_scheme));
40700
40701// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js
40702
40703
40704
40705var RdYlGn_scheme = new Array(3).concat(
40706 "fc8d59ffffbf91cf60",
40707 "d7191cfdae61a6d96a1a9641",
40708 "d7191cfdae61ffffbfa6d96a1a9641",
40709 "d73027fc8d59fee08bd9ef8b91cf601a9850",
40710 "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
40711 "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
40712 "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
40713 "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
40714 "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
40715).map(src_colors);
40716
40717/* harmony default export */ var RdYlGn = (ramp(RdYlGn_scheme));
40718
40719// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js
40720
40721
40722
40723var Spectral_scheme = new Array(3).concat(
40724 "fc8d59ffffbf99d594",
40725 "d7191cfdae61abdda42b83ba",
40726 "d7191cfdae61ffffbfabdda42b83ba",
40727 "d53e4ffc8d59fee08be6f59899d5943288bd",
40728 "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
40729 "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
40730 "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
40731 "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
40732 "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
40733).map(src_colors);
40734
40735/* harmony default export */ var Spectral = (ramp(Spectral_scheme));
40736
40737// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js
40738
40739
40740
40741var BuGn_scheme = new Array(3).concat(
40742 "e5f5f999d8c92ca25f",
40743 "edf8fbb2e2e266c2a4238b45",
40744 "edf8fbb2e2e266c2a42ca25f006d2c",
40745 "edf8fbccece699d8c966c2a42ca25f006d2c",
40746 "edf8fbccece699d8c966c2a441ae76238b45005824",
40747 "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
40748 "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
40749).map(src_colors);
40750
40751/* harmony default export */ var BuGn = (ramp(BuGn_scheme));
40752
40753// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js
40754
40755
40756
40757var BuPu_scheme = new Array(3).concat(
40758 "e0ecf49ebcda8856a7",
40759 "edf8fbb3cde38c96c688419d",
40760 "edf8fbb3cde38c96c68856a7810f7c",
40761 "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
40762 "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
40763 "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
40764 "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
40765).map(src_colors);
40766
40767/* harmony default export */ var BuPu = (ramp(BuPu_scheme));
40768
40769// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js
40770
40771
40772
40773var GnBu_scheme = new Array(3).concat(
40774 "e0f3dba8ddb543a2ca",
40775 "f0f9e8bae4bc7bccc42b8cbe",
40776 "f0f9e8bae4bc7bccc443a2ca0868ac",
40777 "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
40778 "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
40779 "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
40780 "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
40781).map(src_colors);
40782
40783/* harmony default export */ var GnBu = (ramp(GnBu_scheme));
40784
40785// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js
40786
40787
40788
40789var OrRd_scheme = new Array(3).concat(
40790 "fee8c8fdbb84e34a33",
40791 "fef0d9fdcc8afc8d59d7301f",
40792 "fef0d9fdcc8afc8d59e34a33b30000",
40793 "fef0d9fdd49efdbb84fc8d59e34a33b30000",
40794 "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
40795 "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
40796 "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
40797).map(src_colors);
40798
40799/* harmony default export */ var OrRd = (ramp(OrRd_scheme));
40800
40801// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js
40802
40803
40804
40805var PuBuGn_scheme = new Array(3).concat(
40806 "ece2f0a6bddb1c9099",
40807 "f6eff7bdc9e167a9cf02818a",
40808 "f6eff7bdc9e167a9cf1c9099016c59",
40809 "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
40810 "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
40811 "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
40812 "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
40813).map(src_colors);
40814
40815/* harmony default export */ var PuBuGn = (ramp(PuBuGn_scheme));
40816
40817// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js
40818
40819
40820
40821var PuBu_scheme = new Array(3).concat(
40822 "ece7f2a6bddb2b8cbe",
40823 "f1eef6bdc9e174a9cf0570b0",
40824 "f1eef6bdc9e174a9cf2b8cbe045a8d",
40825 "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
40826 "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
40827 "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
40828 "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
40829).map(src_colors);
40830
40831/* harmony default export */ var PuBu = (ramp(PuBu_scheme));
40832
40833// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js
40834
40835
40836
40837var PuRd_scheme = new Array(3).concat(
40838 "e7e1efc994c7dd1c77",
40839 "f1eef6d7b5d8df65b0ce1256",
40840 "f1eef6d7b5d8df65b0dd1c77980043",
40841 "f1eef6d4b9dac994c7df65b0dd1c77980043",
40842 "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
40843 "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
40844 "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
40845).map(src_colors);
40846
40847/* harmony default export */ var PuRd = (ramp(PuRd_scheme));
40848
40849// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js
40850
40851
40852
40853var RdPu_scheme = new Array(3).concat(
40854 "fde0ddfa9fb5c51b8a",
40855 "feebe2fbb4b9f768a1ae017e",
40856 "feebe2fbb4b9f768a1c51b8a7a0177",
40857 "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
40858 "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
40859 "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
40860 "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
40861).map(src_colors);
40862
40863/* harmony default export */ var RdPu = (ramp(RdPu_scheme));
40864
40865// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js
40866
40867
40868
40869var YlGnBu_scheme = new Array(3).concat(
40870 "edf8b17fcdbb2c7fb8",
40871 "ffffcca1dab441b6c4225ea8",
40872 "ffffcca1dab441b6c42c7fb8253494",
40873 "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
40874 "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
40875 "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
40876 "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
40877).map(src_colors);
40878
40879/* harmony default export */ var YlGnBu = (ramp(YlGnBu_scheme));
40880
40881// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js
40882
40883
40884
40885var YlGn_scheme = new Array(3).concat(
40886 "f7fcb9addd8e31a354",
40887 "ffffccc2e69978c679238443",
40888 "ffffccc2e69978c67931a354006837",
40889 "ffffccd9f0a3addd8e78c67931a354006837",
40890 "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
40891 "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
40892 "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
40893).map(src_colors);
40894
40895/* harmony default export */ var YlGn = (ramp(YlGn_scheme));
40896
40897// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js
40898
40899
40900
40901var YlOrBr_scheme = new Array(3).concat(
40902 "fff7bcfec44fd95f0e",
40903 "ffffd4fed98efe9929cc4c02",
40904 "ffffd4fed98efe9929d95f0e993404",
40905 "ffffd4fee391fec44ffe9929d95f0e993404",
40906 "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
40907 "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
40908 "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
40909).map(src_colors);
40910
40911/* harmony default export */ var YlOrBr = (ramp(YlOrBr_scheme));
40912
40913// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js
40914
40915
40916
40917var YlOrRd_scheme = new Array(3).concat(
40918 "ffeda0feb24cf03b20",
40919 "ffffb2fecc5cfd8d3ce31a1c",
40920 "ffffb2fecc5cfd8d3cf03b20bd0026",
40921 "ffffb2fed976feb24cfd8d3cf03b20bd0026",
40922 "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
40923 "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
40924 "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
40925).map(src_colors);
40926
40927/* harmony default export */ var YlOrRd = (ramp(YlOrRd_scheme));
40928
40929// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js
40930
40931
40932
40933var Blues_scheme = new Array(3).concat(
40934 "deebf79ecae13182bd",
40935 "eff3ffbdd7e76baed62171b5",
40936 "eff3ffbdd7e76baed63182bd08519c",
40937 "eff3ffc6dbef9ecae16baed63182bd08519c",
40938 "eff3ffc6dbef9ecae16baed64292c62171b5084594",
40939 "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
40940 "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
40941).map(src_colors);
40942
40943/* harmony default export */ var Blues = (ramp(Blues_scheme));
40944
40945// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js
40946
40947
40948
40949var Greens_scheme = new Array(3).concat(
40950 "e5f5e0a1d99b31a354",
40951 "edf8e9bae4b374c476238b45",
40952 "edf8e9bae4b374c47631a354006d2c",
40953 "edf8e9c7e9c0a1d99b74c47631a354006d2c",
40954 "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
40955 "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
40956 "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
40957).map(src_colors);
40958
40959/* harmony default export */ var Greens = (ramp(Greens_scheme));
40960
40961// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js
40962
40963
40964
40965var Greys_scheme = new Array(3).concat(
40966 "f0f0f0bdbdbd636363",
40967 "f7f7f7cccccc969696525252",
40968 "f7f7f7cccccc969696636363252525",
40969 "f7f7f7d9d9d9bdbdbd969696636363252525",
40970 "f7f7f7d9d9d9bdbdbd969696737373525252252525",
40971 "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
40972 "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
40973).map(src_colors);
40974
40975/* harmony default export */ var Greys = (ramp(Greys_scheme));
40976
40977// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js
40978
40979
40980
40981var Purples_scheme = new Array(3).concat(
40982 "efedf5bcbddc756bb1",
40983 "f2f0f7cbc9e29e9ac86a51a3",
40984 "f2f0f7cbc9e29e9ac8756bb154278f",
40985 "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
40986 "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
40987 "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
40988 "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
40989).map(src_colors);
40990
40991/* harmony default export */ var Purples = (ramp(Purples_scheme));
40992
40993// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js
40994
40995
40996
40997var Reds_scheme = new Array(3).concat(
40998 "fee0d2fc9272de2d26",
40999 "fee5d9fcae91fb6a4acb181d",
41000 "fee5d9fcae91fb6a4ade2d26a50f15",
41001 "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
41002 "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
41003 "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
41004 "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
41005).map(src_colors);
41006
41007/* harmony default export */ var Reds = (ramp(Reds_scheme));
41008
41009// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js
41010
41011
41012
41013var Oranges_scheme = new Array(3).concat(
41014 "fee6cefdae6be6550d",
41015 "feeddefdbe85fd8d3cd94701",
41016 "feeddefdbe85fd8d3ce6550da63603",
41017 "feeddefdd0a2fdae6bfd8d3ce6550da63603",
41018 "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
41019 "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
41020 "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
41021).map(src_colors);
41022
41023/* harmony default export */ var Oranges = (ramp(Oranges_scheme));
41024
41025// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js
41026
41027
41028
41029/* harmony default export */ var sequential_multi_cubehelix = (cubehelixLong(cubehelix_cubehelix(300, 0.5, 0.0), cubehelix_cubehelix(-240, 0.5, 1.0)));
41030
41031// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js
41032
41033
41034
41035var warm = cubehelixLong(cubehelix_cubehelix(-100, 0.75, 0.35), cubehelix_cubehelix(80, 1.50, 0.8));
41036
41037var cool = cubehelixLong(cubehelix_cubehelix(260, 0.75, 0.35), cubehelix_cubehelix(80, 1.50, 0.8));
41038
41039var rainbow_c = cubehelix_cubehelix();
41040
41041/* harmony default export */ var rainbow = (function(t) {
41042 if (t < 0 || t > 1) t -= Math.floor(t);
41043 var ts = Math.abs(t - 0.5);
41044 rainbow_c.h = 360 * t - 100;
41045 rainbow_c.s = 1.5 - 1.5 * ts;
41046 rainbow_c.l = 0.8 - 0.9 * ts;
41047 return rainbow_c + "";
41048});
41049
41050// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js
41051
41052
41053var sinebow_c = color_rgb(),
41054 pi_1_3 = Math.PI / 3,
41055 pi_2_3 = Math.PI * 2 / 3;
41056
41057/* harmony default export */ var sinebow = (function(t) {
41058 var x;
41059 t = (0.5 - t) * Math.PI;
41060 sinebow_c.r = 255 * (x = Math.sin(t)) * x;
41061 sinebow_c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;
41062 sinebow_c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;
41063 return sinebow_c + "";
41064});
41065
41066// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js
41067
41068
41069function viridis_ramp(range) {
41070 var n = range.length;
41071 return function(t) {
41072 return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
41073 };
41074}
41075
41076/* harmony default export */ var viridis = (viridis_ramp(src_colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")));
41077
41078var magma = viridis_ramp(src_colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
41079
41080var inferno = viridis_ramp(src_colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
41081
41082var plasma = viridis_ramp(src_colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
41083
41084// CONCATENATED MODULE: ./node_modules/d3-scale-chromatic/src/index.js
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126// CONCATENATED MODULE: ./node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js
41127/*!
41128 * perfect-scrollbar v1.4.0
41129 * (c) 2018 Hyunje Jun
41130 * @license MIT
41131 */
41132function get(element) {
41133 return getComputedStyle(element);
41134}
41135
41136function perfect_scrollbar_esm_set(element, obj) {
41137 for (var key in obj) {
41138 var val = obj[key];
41139 if (typeof val === 'number') {
41140 val = val + "px";
41141 }
41142 element.style[key] = val;
41143 }
41144 return element;
41145}
41146
41147function div(className) {
41148 var div = document.createElement('div');
41149 div.className = className;
41150 return div;
41151}
41152
41153var elMatches =
41154 typeof Element !== 'undefined' &&
41155 (Element.prototype.matches ||
41156 Element.prototype.webkitMatchesSelector ||
41157 Element.prototype.mozMatchesSelector ||
41158 Element.prototype.msMatchesSelector);
41159
41160function matches(element, query) {
41161 if (!elMatches) {
41162 throw new Error('No element matching method supported');
41163 }
41164
41165 return elMatches.call(element, query);
41166}
41167
41168function remove(element) {
41169 if (element.remove) {
41170 element.remove();
41171 } else {
41172 if (element.parentNode) {
41173 element.parentNode.removeChild(element);
41174 }
41175 }
41176}
41177
41178function queryChildren(element, selector) {
41179 return Array.prototype.filter.call(element.children, function (child) { return matches(child, selector); }
41180 );
41181}
41182
41183var cls = {
41184 main: 'ps',
41185 element: {
41186 thumb: function (x) { return ("ps__thumb-" + x); },
41187 rail: function (x) { return ("ps__rail-" + x); },
41188 consuming: 'ps__child--consume',
41189 },
41190 state: {
41191 focus: 'ps--focus',
41192 clicking: 'ps--clicking',
41193 active: function (x) { return ("ps--active-" + x); },
41194 scrolling: function (x) { return ("ps--scrolling-" + x); },
41195 },
41196};
41197
41198/*
41199 * Helper methods
41200 */
41201var scrollingClassTimeout = { x: null, y: null };
41202
41203function addScrollingClass(i, x) {
41204 var classList = i.element.classList;
41205 var className = cls.state.scrolling(x);
41206
41207 if (classList.contains(className)) {
41208 clearTimeout(scrollingClassTimeout[x]);
41209 } else {
41210 classList.add(className);
41211 }
41212}
41213
41214function removeScrollingClass(i, x) {
41215 scrollingClassTimeout[x] = setTimeout(
41216 function () { return i.isAlive && i.element.classList.remove(cls.state.scrolling(x)); },
41217 i.settings.scrollingThreshold
41218 );
41219}
41220
41221function setScrollingClassInstantly(i, x) {
41222 addScrollingClass(i, x);
41223 removeScrollingClass(i, x);
41224}
41225
41226var EventElement = function EventElement(element) {
41227 this.element = element;
41228 this.handlers = {};
41229};
41230
41231var perfect_scrollbar_esm_prototypeAccessors = { isEmpty: { configurable: true } };
41232
41233EventElement.prototype.bind = function bind (eventName, handler) {
41234 if (typeof this.handlers[eventName] === 'undefined') {
41235 this.handlers[eventName] = [];
41236 }
41237 this.handlers[eventName].push(handler);
41238 this.element.addEventListener(eventName, handler, false);
41239};
41240
41241EventElement.prototype.unbind = function unbind (eventName, target) {
41242 var this$1 = this;
41243
41244 this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {
41245 if (target && handler !== target) {
41246 return true;
41247 }
41248 this$1.element.removeEventListener(eventName, handler, false);
41249 return false;
41250 });
41251};
41252
41253EventElement.prototype.unbindAll = function unbindAll () {
41254 var this$1 = this;
41255
41256 for (var name in this$1.handlers) {
41257 this$1.unbind(name);
41258 }
41259};
41260
41261perfect_scrollbar_esm_prototypeAccessors.isEmpty.get = function () {
41262 var this$1 = this;
41263
41264 return Object.keys(this.handlers).every(
41265 function (key) { return this$1.handlers[key].length === 0; }
41266 );
41267};
41268
41269Object.defineProperties( EventElement.prototype, perfect_scrollbar_esm_prototypeAccessors );
41270
41271var EventManager = function EventManager() {
41272 this.eventElements = [];
41273};
41274
41275EventManager.prototype.eventElement = function eventElement (element) {
41276 var ee = this.eventElements.filter(function (ee) { return ee.element === element; })[0];
41277 if (!ee) {
41278 ee = new EventElement(element);
41279 this.eventElements.push(ee);
41280 }
41281 return ee;
41282};
41283
41284EventManager.prototype.bind = function bind (element, eventName, handler) {
41285 this.eventElement(element).bind(eventName, handler);
41286};
41287
41288EventManager.prototype.unbind = function unbind (element, eventName, handler) {
41289 var ee = this.eventElement(element);
41290 ee.unbind(eventName, handler);
41291
41292 if (ee.isEmpty) {
41293 // remove
41294 this.eventElements.splice(this.eventElements.indexOf(ee), 1);
41295 }
41296};
41297
41298EventManager.prototype.unbindAll = function unbindAll () {
41299 this.eventElements.forEach(function (e) { return e.unbindAll(); });
41300 this.eventElements = [];
41301};
41302
41303EventManager.prototype.once = function once (element, eventName, handler) {
41304 var ee = this.eventElement(element);
41305 var onceHandler = function (evt) {
41306 ee.unbind(eventName, onceHandler);
41307 handler(evt);
41308 };
41309 ee.bind(eventName, onceHandler);
41310};
41311
41312function createEvent(name) {
41313 if (typeof window.CustomEvent === 'function') {
41314 return new CustomEvent(name);
41315 } else {
41316 var evt = document.createEvent('CustomEvent');
41317 evt.initCustomEvent(name, false, false, undefined);
41318 return evt;
41319 }
41320}
41321
41322var processScrollDiff = function(
41323 i,
41324 axis,
41325 diff,
41326 useScrollingClass,
41327 forceFireReachEvent
41328) {
41329 if ( useScrollingClass === void 0 ) useScrollingClass = true;
41330 if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;
41331
41332 var fields;
41333 if (axis === 'top') {
41334 fields = [
41335 'contentHeight',
41336 'containerHeight',
41337 'scrollTop',
41338 'y',
41339 'up',
41340 'down' ];
41341 } else if (axis === 'left') {
41342 fields = [
41343 'contentWidth',
41344 'containerWidth',
41345 'scrollLeft',
41346 'x',
41347 'left',
41348 'right' ];
41349 } else {
41350 throw new Error('A proper axis should be provided');
41351 }
41352
41353 processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);
41354};
41355
41356function processScrollDiff$1(
41357 i,
41358 diff,
41359 ref,
41360 useScrollingClass,
41361 forceFireReachEvent
41362) {
41363 var contentHeight = ref[0];
41364 var containerHeight = ref[1];
41365 var scrollTop = ref[2];
41366 var y = ref[3];
41367 var up = ref[4];
41368 var down = ref[5];
41369 if ( useScrollingClass === void 0 ) useScrollingClass = true;
41370 if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;
41371
41372 var element = i.element;
41373
41374 // reset reach
41375 i.reach[y] = null;
41376
41377 // 1 for subpixel rounding
41378 if (element[scrollTop] < 1) {
41379 i.reach[y] = 'start';
41380 }
41381
41382 // 1 for subpixel rounding
41383 if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {
41384 i.reach[y] = 'end';
41385 }
41386
41387 if (diff) {
41388 element.dispatchEvent(createEvent(("ps-scroll-" + y)));
41389
41390 if (diff < 0) {
41391 element.dispatchEvent(createEvent(("ps-scroll-" + up)));
41392 } else if (diff > 0) {
41393 element.dispatchEvent(createEvent(("ps-scroll-" + down)));
41394 }
41395
41396 if (useScrollingClass) {
41397 setScrollingClassInstantly(i, y);
41398 }
41399 }
41400
41401 if (i.reach[y] && (diff || forceFireReachEvent)) {
41402 element.dispatchEvent(createEvent(("ps-" + y + "-reach-" + (i.reach[y]))));
41403 }
41404}
41405
41406function toInt(x) {
41407 return parseInt(x, 10) || 0;
41408}
41409
41410function isEditable(el) {
41411 return (
41412 matches(el, 'input,[contenteditable]') ||
41413 matches(el, 'select,[contenteditable]') ||
41414 matches(el, 'textarea,[contenteditable]') ||
41415 matches(el, 'button,[contenteditable]')
41416 );
41417}
41418
41419function perfect_scrollbar_esm_outerWidth(element) {
41420 var styles = get(element);
41421 return (
41422 toInt(styles.width) +
41423 toInt(styles.paddingLeft) +
41424 toInt(styles.paddingRight) +
41425 toInt(styles.borderLeftWidth) +
41426 toInt(styles.borderRightWidth)
41427 );
41428}
41429
41430var env = {
41431 isWebKit:
41432 typeof document !== 'undefined' &&
41433 'WebkitAppearance' in document.documentElement.style,
41434 supportsTouch:
41435 typeof window !== 'undefined' &&
41436 ('ontouchstart' in window ||
41437 (window.DocumentTouch && document instanceof window.DocumentTouch)),
41438 supportsIePointer:
41439 typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,
41440 isChrome:
41441 typeof navigator !== 'undefined' &&
41442 /Chrome/i.test(navigator && navigator.userAgent),
41443};
41444
41445var updateGeometry = function(i) {
41446 var element = i.element;
41447 var roundedScrollTop = Math.floor(element.scrollTop);
41448
41449 i.containerWidth = element.clientWidth;
41450 i.containerHeight = element.clientHeight;
41451 i.contentWidth = element.scrollWidth;
41452 i.contentHeight = element.scrollHeight;
41453
41454 if (!element.contains(i.scrollbarXRail)) {
41455 // clean up and append
41456 queryChildren(element, cls.element.rail('x')).forEach(function (el) { return remove(el); }
41457 );
41458 element.appendChild(i.scrollbarXRail);
41459 }
41460 if (!element.contains(i.scrollbarYRail)) {
41461 // clean up and append
41462 queryChildren(element, cls.element.rail('y')).forEach(function (el) { return remove(el); }
41463 );
41464 element.appendChild(i.scrollbarYRail);
41465 }
41466
41467 if (
41468 !i.settings.suppressScrollX &&
41469 i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth
41470 ) {
41471 i.scrollbarXActive = true;
41472 i.railXWidth = i.containerWidth - i.railXMarginWidth;
41473 i.railXRatio = i.containerWidth / i.railXWidth;
41474 i.scrollbarXWidth = getThumbSize(
41475 i,
41476 toInt(i.railXWidth * i.containerWidth / i.contentWidth)
41477 );
41478 i.scrollbarXLeft = toInt(
41479 (i.negativeScrollAdjustment + element.scrollLeft) *
41480 (i.railXWidth - i.scrollbarXWidth) /
41481 (i.contentWidth - i.containerWidth)
41482 );
41483 } else {
41484 i.scrollbarXActive = false;
41485 }
41486
41487 if (
41488 !i.settings.suppressScrollY &&
41489 i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight
41490 ) {
41491 i.scrollbarYActive = true;
41492 i.railYHeight = i.containerHeight - i.railYMarginHeight;
41493 i.railYRatio = i.containerHeight / i.railYHeight;
41494 i.scrollbarYHeight = getThumbSize(
41495 i,
41496 toInt(i.railYHeight * i.containerHeight / i.contentHeight)
41497 );
41498 i.scrollbarYTop = toInt(
41499 roundedScrollTop *
41500 (i.railYHeight - i.scrollbarYHeight) /
41501 (i.contentHeight - i.containerHeight)
41502 );
41503 } else {
41504 i.scrollbarYActive = false;
41505 }
41506
41507 if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
41508 i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
41509 }
41510 if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
41511 i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
41512 }
41513
41514 updateCss(element, i);
41515
41516 if (i.scrollbarXActive) {
41517 element.classList.add(cls.state.active('x'));
41518 } else {
41519 element.classList.remove(cls.state.active('x'));
41520 i.scrollbarXWidth = 0;
41521 i.scrollbarXLeft = 0;
41522 element.scrollLeft = 0;
41523 }
41524 if (i.scrollbarYActive) {
41525 element.classList.add(cls.state.active('y'));
41526 } else {
41527 element.classList.remove(cls.state.active('y'));
41528 i.scrollbarYHeight = 0;
41529 i.scrollbarYTop = 0;
41530 element.scrollTop = 0;
41531 }
41532};
41533
41534function getThumbSize(i, thumbSize) {
41535 if (i.settings.minScrollbarLength) {
41536 thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);
41537 }
41538 if (i.settings.maxScrollbarLength) {
41539 thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);
41540 }
41541 return thumbSize;
41542}
41543
41544function updateCss(element, i) {
41545 var xRailOffset = { width: i.railXWidth };
41546 var roundedScrollTop = Math.floor(element.scrollTop);
41547
41548 if (i.isRtl) {
41549 xRailOffset.left =
41550 i.negativeScrollAdjustment +
41551 element.scrollLeft +
41552 i.containerWidth -
41553 i.contentWidth;
41554 } else {
41555 xRailOffset.left = element.scrollLeft;
41556 }
41557 if (i.isScrollbarXUsingBottom) {
41558 xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;
41559 } else {
41560 xRailOffset.top = i.scrollbarXTop + roundedScrollTop;
41561 }
41562 perfect_scrollbar_esm_set(i.scrollbarXRail, xRailOffset);
41563
41564 var yRailOffset = { top: roundedScrollTop, height: i.railYHeight };
41565 if (i.isScrollbarYUsingRight) {
41566 if (i.isRtl) {
41567 yRailOffset.right =
41568 i.contentWidth -
41569 (i.negativeScrollAdjustment + element.scrollLeft) -
41570 i.scrollbarYRight -
41571 i.scrollbarYOuterWidth;
41572 } else {
41573 yRailOffset.right = i.scrollbarYRight - element.scrollLeft;
41574 }
41575 } else {
41576 if (i.isRtl) {
41577 yRailOffset.left =
41578 i.negativeScrollAdjustment +
41579 element.scrollLeft +
41580 i.containerWidth * 2 -
41581 i.contentWidth -
41582 i.scrollbarYLeft -
41583 i.scrollbarYOuterWidth;
41584 } else {
41585 yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
41586 }
41587 }
41588 perfect_scrollbar_esm_set(i.scrollbarYRail, yRailOffset);
41589
41590 perfect_scrollbar_esm_set(i.scrollbarX, {
41591 left: i.scrollbarXLeft,
41592 width: i.scrollbarXWidth - i.railBorderXWidth,
41593 });
41594 perfect_scrollbar_esm_set(i.scrollbarY, {
41595 top: i.scrollbarYTop,
41596 height: i.scrollbarYHeight - i.railBorderYWidth,
41597 });
41598}
41599
41600var clickRail = function(i) {
41601 i.event.bind(i.scrollbarY, 'mousedown', function (e) { return e.stopPropagation(); });
41602 i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {
41603 var positionTop =
41604 e.pageY -
41605 window.pageYOffset -
41606 i.scrollbarYRail.getBoundingClientRect().top;
41607 var direction = positionTop > i.scrollbarYTop ? 1 : -1;
41608
41609 i.element.scrollTop += direction * i.containerHeight;
41610 updateGeometry(i);
41611
41612 e.stopPropagation();
41613 });
41614
41615 i.event.bind(i.scrollbarX, 'mousedown', function (e) { return e.stopPropagation(); });
41616 i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {
41617 var positionLeft =
41618 e.pageX -
41619 window.pageXOffset -
41620 i.scrollbarXRail.getBoundingClientRect().left;
41621 var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
41622
41623 i.element.scrollLeft += direction * i.containerWidth;
41624 updateGeometry(i);
41625
41626 e.stopPropagation();
41627 });
41628};
41629
41630var dragThumb = function(i) {
41631 bindMouseScrollHandler(i, [
41632 'containerWidth',
41633 'contentWidth',
41634 'pageX',
41635 'railXWidth',
41636 'scrollbarX',
41637 'scrollbarXWidth',
41638 'scrollLeft',
41639 'x',
41640 'scrollbarXRail' ]);
41641 bindMouseScrollHandler(i, [
41642 'containerHeight',
41643 'contentHeight',
41644 'pageY',
41645 'railYHeight',
41646 'scrollbarY',
41647 'scrollbarYHeight',
41648 'scrollTop',
41649 'y',
41650 'scrollbarYRail' ]);
41651};
41652
41653function bindMouseScrollHandler(
41654 i,
41655 ref
41656) {
41657 var containerHeight = ref[0];
41658 var contentHeight = ref[1];
41659 var pageY = ref[2];
41660 var railYHeight = ref[3];
41661 var scrollbarY = ref[4];
41662 var scrollbarYHeight = ref[5];
41663 var scrollTop = ref[6];
41664 var y = ref[7];
41665 var scrollbarYRail = ref[8];
41666
41667 var element = i.element;
41668
41669 var startingScrollTop = null;
41670 var startingMousePageY = null;
41671 var scrollBy = null;
41672
41673 function mouseMoveHandler(e) {
41674 element[scrollTop] =
41675 startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);
41676 addScrollingClass(i, y);
41677 updateGeometry(i);
41678
41679 e.stopPropagation();
41680 e.preventDefault();
41681 }
41682
41683 function mouseUpHandler() {
41684 removeScrollingClass(i, y);
41685 i[scrollbarYRail].classList.remove(cls.state.clicking);
41686 i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
41687 }
41688
41689 i.event.bind(i[scrollbarY], 'mousedown', function (e) {
41690 startingScrollTop = element[scrollTop];
41691 startingMousePageY = e[pageY];
41692 scrollBy =
41693 (i[contentHeight] - i[containerHeight]) /
41694 (i[railYHeight] - i[scrollbarYHeight]);
41695
41696 i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
41697 i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
41698
41699 i[scrollbarYRail].classList.add(cls.state.clicking);
41700
41701 e.stopPropagation();
41702 e.preventDefault();
41703 });
41704}
41705
41706var keyboard = function(i) {
41707 var element = i.element;
41708
41709 var elementHovered = function () { return matches(element, ':hover'); };
41710 var scrollbarFocused = function () { return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus'); };
41711
41712 function shouldPreventDefault(deltaX, deltaY) {
41713 var scrollTop = Math.floor(element.scrollTop);
41714 if (deltaX === 0) {
41715 if (!i.scrollbarYActive) {
41716 return false;
41717 }
41718 if (
41719 (scrollTop === 0 && deltaY > 0) ||
41720 (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)
41721 ) {
41722 return !i.settings.wheelPropagation;
41723 }
41724 }
41725
41726 var scrollLeft = element.scrollLeft;
41727 if (deltaY === 0) {
41728 if (!i.scrollbarXActive) {
41729 return false;
41730 }
41731 if (
41732 (scrollLeft === 0 && deltaX < 0) ||
41733 (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)
41734 ) {
41735 return !i.settings.wheelPropagation;
41736 }
41737 }
41738 return true;
41739 }
41740
41741 i.event.bind(i.ownerDocument, 'keydown', function (e) {
41742 if (
41743 (e.isDefaultPrevented && e.isDefaultPrevented()) ||
41744 e.defaultPrevented
41745 ) {
41746 return;
41747 }
41748
41749 if (!elementHovered() && !scrollbarFocused()) {
41750 return;
41751 }
41752
41753 var activeElement = document.activeElement
41754 ? document.activeElement
41755 : i.ownerDocument.activeElement;
41756 if (activeElement) {
41757 if (activeElement.tagName === 'IFRAME') {
41758 activeElement = activeElement.contentDocument.activeElement;
41759 } else {
41760 // go deeper if element is a webcomponent
41761 while (activeElement.shadowRoot) {
41762 activeElement = activeElement.shadowRoot.activeElement;
41763 }
41764 }
41765 if (isEditable(activeElement)) {
41766 return;
41767 }
41768 }
41769
41770 var deltaX = 0;
41771 var deltaY = 0;
41772
41773 switch (e.which) {
41774 case 37: // left
41775 if (e.metaKey) {
41776 deltaX = -i.contentWidth;
41777 } else if (e.altKey) {
41778 deltaX = -i.containerWidth;
41779 } else {
41780 deltaX = -30;
41781 }
41782 break;
41783 case 38: // up
41784 if (e.metaKey) {
41785 deltaY = i.contentHeight;
41786 } else if (e.altKey) {
41787 deltaY = i.containerHeight;
41788 } else {
41789 deltaY = 30;
41790 }
41791 break;
41792 case 39: // right
41793 if (e.metaKey) {
41794 deltaX = i.contentWidth;
41795 } else if (e.altKey) {
41796 deltaX = i.containerWidth;
41797 } else {
41798 deltaX = 30;
41799 }
41800 break;
41801 case 40: // down
41802 if (e.metaKey) {
41803 deltaY = -i.contentHeight;
41804 } else if (e.altKey) {
41805 deltaY = -i.containerHeight;
41806 } else {
41807 deltaY = -30;
41808 }
41809 break;
41810 case 32: // space bar
41811 if (e.shiftKey) {
41812 deltaY = i.containerHeight;
41813 } else {
41814 deltaY = -i.containerHeight;
41815 }
41816 break;
41817 case 33: // page up
41818 deltaY = i.containerHeight;
41819 break;
41820 case 34: // page down
41821 deltaY = -i.containerHeight;
41822 break;
41823 case 36: // home
41824 deltaY = i.contentHeight;
41825 break;
41826 case 35: // end
41827 deltaY = -i.contentHeight;
41828 break;
41829 default:
41830 return;
41831 }
41832
41833 if (i.settings.suppressScrollX && deltaX !== 0) {
41834 return;
41835 }
41836 if (i.settings.suppressScrollY && deltaY !== 0) {
41837 return;
41838 }
41839
41840 element.scrollTop -= deltaY;
41841 element.scrollLeft += deltaX;
41842 updateGeometry(i);
41843
41844 if (shouldPreventDefault(deltaX, deltaY)) {
41845 e.preventDefault();
41846 }
41847 });
41848};
41849
41850var wheel = function(i) {
41851 var element = i.element;
41852
41853 function shouldPreventDefault(deltaX, deltaY) {
41854 var roundedScrollTop = Math.floor(element.scrollTop);
41855 var isTop = element.scrollTop === 0;
41856 var isBottom =
41857 roundedScrollTop + element.offsetHeight === element.scrollHeight;
41858 var isLeft = element.scrollLeft === 0;
41859 var isRight =
41860 element.scrollLeft + element.offsetWidth === element.scrollWidth;
41861
41862 var hitsBound;
41863
41864 // pick axis with primary direction
41865 if (Math.abs(deltaY) > Math.abs(deltaX)) {
41866 hitsBound = isTop || isBottom;
41867 } else {
41868 hitsBound = isLeft || isRight;
41869 }
41870
41871 return hitsBound ? !i.settings.wheelPropagation : true;
41872 }
41873
41874 function getDeltaFromEvent(e) {
41875 var deltaX = e.deltaX;
41876 var deltaY = -1 * e.deltaY;
41877
41878 if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {
41879 // OS X Safari
41880 deltaX = -1 * e.wheelDeltaX / 6;
41881 deltaY = e.wheelDeltaY / 6;
41882 }
41883
41884 if (e.deltaMode && e.deltaMode === 1) {
41885 // Firefox in deltaMode 1: Line scrolling
41886 deltaX *= 10;
41887 deltaY *= 10;
41888 }
41889
41890 if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {
41891 // IE in some mouse drivers
41892 deltaX = 0;
41893 deltaY = e.wheelDelta;
41894 }
41895
41896 if (e.shiftKey) {
41897 // reverse axis with shift key
41898 return [-deltaY, -deltaX];
41899 }
41900 return [deltaX, deltaY];
41901 }
41902
41903 function shouldBeConsumedByChild(target, deltaX, deltaY) {
41904 // FIXME: this is a workaround for <select> issue in FF and IE #571
41905 if (!env.isWebKit && element.querySelector('select:focus')) {
41906 return true;
41907 }
41908
41909 if (!element.contains(target)) {
41910 return false;
41911 }
41912
41913 var cursor = target;
41914
41915 while (cursor && cursor !== element) {
41916 if (cursor.classList.contains(cls.element.consuming)) {
41917 return true;
41918 }
41919
41920 var style = get(cursor);
41921 var overflow = [style.overflow, style.overflowX, style.overflowY].join(
41922 ''
41923 );
41924
41925 // if scrollable
41926 if (overflow.match(/(scroll|auto)/)) {
41927 var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
41928 if (maxScrollTop > 0) {
41929 if (
41930 !(cursor.scrollTop === 0 && deltaY > 0) &&
41931 !(cursor.scrollTop === maxScrollTop && deltaY < 0)
41932 ) {
41933 return true;
41934 }
41935 }
41936 var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;
41937 if (maxScrollLeft > 0) {
41938 if (
41939 !(cursor.scrollLeft === 0 && deltaX < 0) &&
41940 !(cursor.scrollLeft === maxScrollLeft && deltaX > 0)
41941 ) {
41942 return true;
41943 }
41944 }
41945 }
41946
41947 cursor = cursor.parentNode;
41948 }
41949
41950 return false;
41951 }
41952
41953 function mousewheelHandler(e) {
41954 var ref = getDeltaFromEvent(e);
41955 var deltaX = ref[0];
41956 var deltaY = ref[1];
41957
41958 if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {
41959 return;
41960 }
41961
41962 var shouldPrevent = false;
41963 if (!i.settings.useBothWheelAxes) {
41964 // deltaX will only be used for horizontal scrolling and deltaY will
41965 // only be used for vertical scrolling - this is the default
41966 element.scrollTop -= deltaY * i.settings.wheelSpeed;
41967 element.scrollLeft += deltaX * i.settings.wheelSpeed;
41968 } else if (i.scrollbarYActive && !i.scrollbarXActive) {
41969 // only vertical scrollbar is active and useBothWheelAxes option is
41970 // active, so let's scroll vertical bar using both mouse wheel axes
41971 if (deltaY) {
41972 element.scrollTop -= deltaY * i.settings.wheelSpeed;
41973 } else {
41974 element.scrollTop += deltaX * i.settings.wheelSpeed;
41975 }
41976 shouldPrevent = true;
41977 } else if (i.scrollbarXActive && !i.scrollbarYActive) {
41978 // useBothWheelAxes and only horizontal bar is active, so use both
41979 // wheel axes for horizontal bar
41980 if (deltaX) {
41981 element.scrollLeft += deltaX * i.settings.wheelSpeed;
41982 } else {
41983 element.scrollLeft -= deltaY * i.settings.wheelSpeed;
41984 }
41985 shouldPrevent = true;
41986 }
41987
41988 updateGeometry(i);
41989
41990 shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);
41991 if (shouldPrevent && !e.ctrlKey) {
41992 e.stopPropagation();
41993 e.preventDefault();
41994 }
41995 }
41996
41997 if (typeof window.onwheel !== 'undefined') {
41998 i.event.bind(element, 'wheel', mousewheelHandler);
41999 } else if (typeof window.onmousewheel !== 'undefined') {
42000 i.event.bind(element, 'mousewheel', mousewheelHandler);
42001 }
42002};
42003
42004var perfect_scrollbar_esm_touch = function(i) {
42005 if (!env.supportsTouch && !env.supportsIePointer) {
42006 return;
42007 }
42008
42009 var element = i.element;
42010
42011 function shouldPrevent(deltaX, deltaY) {
42012 var scrollTop = Math.floor(element.scrollTop);
42013 var scrollLeft = element.scrollLeft;
42014 var magnitudeX = Math.abs(deltaX);
42015 var magnitudeY = Math.abs(deltaY);
42016
42017 if (magnitudeY > magnitudeX) {
42018 // user is perhaps trying to swipe up/down the page
42019
42020 if (
42021 (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||
42022 (deltaY > 0 && scrollTop === 0)
42023 ) {
42024 // set prevent for mobile Chrome refresh
42025 return window.scrollY === 0 && deltaY > 0 && env.isChrome;
42026 }
42027 } else if (magnitudeX > magnitudeY) {
42028 // user is perhaps trying to swipe left/right across the page
42029
42030 if (
42031 (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||
42032 (deltaX > 0 && scrollLeft === 0)
42033 ) {
42034 return true;
42035 }
42036 }
42037
42038 return true;
42039 }
42040
42041 function applyTouchMove(differenceX, differenceY) {
42042 element.scrollTop -= differenceY;
42043 element.scrollLeft -= differenceX;
42044
42045 updateGeometry(i);
42046 }
42047
42048 var startOffset = {};
42049 var startTime = 0;
42050 var speed = {};
42051 var easingLoop = null;
42052
42053 function getTouch(e) {
42054 if (e.targetTouches) {
42055 return e.targetTouches[0];
42056 } else {
42057 // Maybe IE pointer
42058 return e;
42059 }
42060 }
42061
42062 function shouldHandle(e) {
42063 if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {
42064 return false;
42065 }
42066 if (e.targetTouches && e.targetTouches.length === 1) {
42067 return true;
42068 }
42069 if (
42070 e.pointerType &&
42071 e.pointerType !== 'mouse' &&
42072 e.pointerType !== e.MSPOINTER_TYPE_MOUSE
42073 ) {
42074 return true;
42075 }
42076 return false;
42077 }
42078
42079 function touchStart(e) {
42080 if (!shouldHandle(e)) {
42081 return;
42082 }
42083
42084 var touch = getTouch(e);
42085
42086 startOffset.pageX = touch.pageX;
42087 startOffset.pageY = touch.pageY;
42088
42089 startTime = new Date().getTime();
42090
42091 if (easingLoop !== null) {
42092 clearInterval(easingLoop);
42093 }
42094 }
42095
42096 function shouldBeConsumedByChild(target, deltaX, deltaY) {
42097 if (!element.contains(target)) {
42098 return false;
42099 }
42100
42101 var cursor = target;
42102
42103 while (cursor && cursor !== element) {
42104 if (cursor.classList.contains(cls.element.consuming)) {
42105 return true;
42106 }
42107
42108 var style = get(cursor);
42109 var overflow = [style.overflow, style.overflowX, style.overflowY].join(
42110 ''
42111 );
42112
42113 // if scrollable
42114 if (overflow.match(/(scroll|auto)/)) {
42115 var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
42116 if (maxScrollTop > 0) {
42117 if (
42118 !(cursor.scrollTop === 0 && deltaY > 0) &&
42119 !(cursor.scrollTop === maxScrollTop && deltaY < 0)
42120 ) {
42121 return true;
42122 }
42123 }
42124 var maxScrollLeft = cursor.scrollLeft - cursor.clientWidth;
42125 if (maxScrollLeft > 0) {
42126 if (
42127 !(cursor.scrollLeft === 0 && deltaX < 0) &&
42128 !(cursor.scrollLeft === maxScrollLeft && deltaX > 0)
42129 ) {
42130 return true;
42131 }
42132 }
42133 }
42134
42135 cursor = cursor.parentNode;
42136 }
42137
42138 return false;
42139 }
42140
42141 function touchMove(e) {
42142 if (shouldHandle(e)) {
42143 var touch = getTouch(e);
42144
42145 var currentOffset = { pageX: touch.pageX, pageY: touch.pageY };
42146
42147 var differenceX = currentOffset.pageX - startOffset.pageX;
42148 var differenceY = currentOffset.pageY - startOffset.pageY;
42149
42150 if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {
42151 return;
42152 }
42153
42154 applyTouchMove(differenceX, differenceY);
42155 startOffset = currentOffset;
42156
42157 var currentTime = new Date().getTime();
42158
42159 var timeGap = currentTime - startTime;
42160 if (timeGap > 0) {
42161 speed.x = differenceX / timeGap;
42162 speed.y = differenceY / timeGap;
42163 startTime = currentTime;
42164 }
42165
42166 if (shouldPrevent(differenceX, differenceY)) {
42167 e.preventDefault();
42168 }
42169 }
42170 }
42171 function touchEnd() {
42172 if (i.settings.swipeEasing) {
42173 clearInterval(easingLoop);
42174 easingLoop = setInterval(function() {
42175 if (i.isInitialized) {
42176 clearInterval(easingLoop);
42177 return;
42178 }
42179
42180 if (!speed.x && !speed.y) {
42181 clearInterval(easingLoop);
42182 return;
42183 }
42184
42185 if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
42186 clearInterval(easingLoop);
42187 return;
42188 }
42189
42190 applyTouchMove(speed.x * 30, speed.y * 30);
42191
42192 speed.x *= 0.8;
42193 speed.y *= 0.8;
42194 }, 10);
42195 }
42196 }
42197
42198 if (env.supportsTouch) {
42199 i.event.bind(element, 'touchstart', touchStart);
42200 i.event.bind(element, 'touchmove', touchMove);
42201 i.event.bind(element, 'touchend', touchEnd);
42202 } else if (env.supportsIePointer) {
42203 if (window.PointerEvent) {
42204 i.event.bind(element, 'pointerdown', touchStart);
42205 i.event.bind(element, 'pointermove', touchMove);
42206 i.event.bind(element, 'pointerup', touchEnd);
42207 } else if (window.MSPointerEvent) {
42208 i.event.bind(element, 'MSPointerDown', touchStart);
42209 i.event.bind(element, 'MSPointerMove', touchMove);
42210 i.event.bind(element, 'MSPointerUp', touchEnd);
42211 }
42212 }
42213};
42214
42215var defaultSettings = function () { return ({
42216 handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],
42217 maxScrollbarLength: null,
42218 minScrollbarLength: null,
42219 scrollingThreshold: 1000,
42220 scrollXMarginOffset: 0,
42221 scrollYMarginOffset: 0,
42222 suppressScrollX: false,
42223 suppressScrollY: false,
42224 swipeEasing: true,
42225 useBothWheelAxes: false,
42226 wheelPropagation: true,
42227 wheelSpeed: 1,
42228}); };
42229
42230var handlers = {
42231 'click-rail': clickRail,
42232 'drag-thumb': dragThumb,
42233 keyboard: keyboard,
42234 wheel: wheel,
42235 touch: perfect_scrollbar_esm_touch,
42236};
42237
42238var PerfectScrollbar = function PerfectScrollbar(element, userSettings) {
42239 var this$1 = this;
42240 if ( userSettings === void 0 ) userSettings = {};
42241
42242 if (typeof element === 'string') {
42243 element = document.querySelector(element);
42244 }
42245
42246 if (!element || !element.nodeName) {
42247 throw new Error('no element is specified to initialize PerfectScrollbar');
42248 }
42249
42250 this.element = element;
42251
42252 element.classList.add(cls.main);
42253
42254 this.settings = defaultSettings();
42255 for (var key in userSettings) {
42256 this$1.settings[key] = userSettings[key];
42257 }
42258
42259 this.containerWidth = null;
42260 this.containerHeight = null;
42261 this.contentWidth = null;
42262 this.contentHeight = null;
42263
42264 var focus = function () { return element.classList.add(cls.state.focus); };
42265 var blur = function () { return element.classList.remove(cls.state.focus); };
42266
42267 this.isRtl = get(element).direction === 'rtl';
42268 this.isNegativeScroll = (function () {
42269 var originalScrollLeft = element.scrollLeft;
42270 var result = null;
42271 element.scrollLeft = -1;
42272 result = element.scrollLeft < 0;
42273 element.scrollLeft = originalScrollLeft;
42274 return result;
42275 })();
42276 this.negativeScrollAdjustment = this.isNegativeScroll
42277 ? element.scrollWidth - element.clientWidth
42278 : 0;
42279 this.event = new EventManager();
42280 this.ownerDocument = element.ownerDocument || document;
42281
42282 this.scrollbarXRail = div(cls.element.rail('x'));
42283 element.appendChild(this.scrollbarXRail);
42284 this.scrollbarX = div(cls.element.thumb('x'));
42285 this.scrollbarXRail.appendChild(this.scrollbarX);
42286 this.scrollbarX.setAttribute('tabindex', 0);
42287 this.event.bind(this.scrollbarX, 'focus', focus);
42288 this.event.bind(this.scrollbarX, 'blur', blur);
42289 this.scrollbarXActive = null;
42290 this.scrollbarXWidth = null;
42291 this.scrollbarXLeft = null;
42292 var railXStyle = get(this.scrollbarXRail);
42293 this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);
42294 if (isNaN(this.scrollbarXBottom)) {
42295 this.isScrollbarXUsingBottom = false;
42296 this.scrollbarXTop = toInt(railXStyle.top);
42297 } else {
42298 this.isScrollbarXUsingBottom = true;
42299 }
42300 this.railBorderXWidth =
42301 toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);
42302 // Set rail to display:block to calculate margins
42303 perfect_scrollbar_esm_set(this.scrollbarXRail, { display: 'block' });
42304 this.railXMarginWidth =
42305 toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);
42306 perfect_scrollbar_esm_set(this.scrollbarXRail, { display: '' });
42307 this.railXWidth = null;
42308 this.railXRatio = null;
42309
42310 this.scrollbarYRail = div(cls.element.rail('y'));
42311 element.appendChild(this.scrollbarYRail);
42312 this.scrollbarY = div(cls.element.thumb('y'));
42313 this.scrollbarYRail.appendChild(this.scrollbarY);
42314 this.scrollbarY.setAttribute('tabindex', 0);
42315 this.event.bind(this.scrollbarY, 'focus', focus);
42316 this.event.bind(this.scrollbarY, 'blur', blur);
42317 this.scrollbarYActive = null;
42318 this.scrollbarYHeight = null;
42319 this.scrollbarYTop = null;
42320 var railYStyle = get(this.scrollbarYRail);
42321 this.scrollbarYRight = parseInt(railYStyle.right, 10);
42322 if (isNaN(this.scrollbarYRight)) {
42323 this.isScrollbarYUsingRight = false;
42324 this.scrollbarYLeft = toInt(railYStyle.left);
42325 } else {
42326 this.isScrollbarYUsingRight = true;
42327 }
42328 this.scrollbarYOuterWidth = this.isRtl ? perfect_scrollbar_esm_outerWidth(this.scrollbarY) : null;
42329 this.railBorderYWidth =
42330 toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);
42331 perfect_scrollbar_esm_set(this.scrollbarYRail, { display: 'block' });
42332 this.railYMarginHeight =
42333 toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);
42334 perfect_scrollbar_esm_set(this.scrollbarYRail, { display: '' });
42335 this.railYHeight = null;
42336 this.railYRatio = null;
42337
42338 this.reach = {
42339 x:
42340 element.scrollLeft <= 0
42341 ? 'start'
42342 : element.scrollLeft >= this.contentWidth - this.containerWidth
42343 ? 'end'
42344 : null,
42345 y:
42346 element.scrollTop <= 0
42347 ? 'start'
42348 : element.scrollTop >= this.contentHeight - this.containerHeight
42349 ? 'end'
42350 : null,
42351 };
42352
42353 this.isAlive = true;
42354
42355 this.settings.handlers.forEach(function (handlerName) { return handlers[handlerName](this$1); });
42356
42357 this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only
42358 this.lastScrollLeft = element.scrollLeft; // for onScroll only
42359 this.event.bind(this.element, 'scroll', function (e) { return this$1.onScroll(e); });
42360 updateGeometry(this);
42361};
42362
42363PerfectScrollbar.prototype.update = function update () {
42364 if (!this.isAlive) {
42365 return;
42366 }
42367
42368 // Recalcuate negative scrollLeft adjustment
42369 this.negativeScrollAdjustment = this.isNegativeScroll
42370 ? this.element.scrollWidth - this.element.clientWidth
42371 : 0;
42372
42373 // Recalculate rail margins
42374 perfect_scrollbar_esm_set(this.scrollbarXRail, { display: 'block' });
42375 perfect_scrollbar_esm_set(this.scrollbarYRail, { display: 'block' });
42376 this.railXMarginWidth =
42377 toInt(get(this.scrollbarXRail).marginLeft) +
42378 toInt(get(this.scrollbarXRail).marginRight);
42379 this.railYMarginHeight =
42380 toInt(get(this.scrollbarYRail).marginTop) +
42381 toInt(get(this.scrollbarYRail).marginBottom);
42382
42383 // Hide scrollbars not to affect scrollWidth and scrollHeight
42384 perfect_scrollbar_esm_set(this.scrollbarXRail, { display: 'none' });
42385 perfect_scrollbar_esm_set(this.scrollbarYRail, { display: 'none' });
42386
42387 updateGeometry(this);
42388
42389 processScrollDiff(this, 'top', 0, false, true);
42390 processScrollDiff(this, 'left', 0, false, true);
42391
42392 perfect_scrollbar_esm_set(this.scrollbarXRail, { display: '' });
42393 perfect_scrollbar_esm_set(this.scrollbarYRail, { display: '' });
42394};
42395
42396PerfectScrollbar.prototype.onScroll = function onScroll (e) {
42397 if (!this.isAlive) {
42398 return;
42399 }
42400
42401 updateGeometry(this);
42402 processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);
42403 processScrollDiff(
42404 this,
42405 'left',
42406 this.element.scrollLeft - this.lastScrollLeft
42407 );
42408
42409 this.lastScrollTop = Math.floor(this.element.scrollTop);
42410 this.lastScrollLeft = this.element.scrollLeft;
42411};
42412
42413PerfectScrollbar.prototype.destroy = function destroy () {
42414 if (!this.isAlive) {
42415 return;
42416 }
42417
42418 this.event.unbindAll();
42419 remove(this.scrollbarX);
42420 remove(this.scrollbarY);
42421 remove(this.scrollbarXRail);
42422 remove(this.scrollbarYRail);
42423 this.removePsClasses();
42424
42425 // unset elements
42426 this.element = null;
42427 this.scrollbarX = null;
42428 this.scrollbarY = null;
42429 this.scrollbarXRail = null;
42430 this.scrollbarYRail = null;
42431
42432 this.isAlive = false;
42433};
42434
42435PerfectScrollbar.prototype.removePsClasses = function removePsClasses () {
42436 this.element.className = this.element.className
42437 .split(' ')
42438 .filter(function (name) { return !name.match(/^ps([-_].+|)$/); })
42439 .join(' ');
42440};
42441
42442/* harmony default export */ var perfect_scrollbar_esm = (PerfectScrollbar);
42443
42444// EXTERNAL MODULE: ./node_modules/perfect-scrollbar/css/perfect-scrollbar.css
42445var perfect_scrollbar = __webpack_require__("7da8");
42446
42447// CONCATENATED MODULE: ./src/assert.ts
42448function assert_assert(condition, message) {
42449 if (condition !== true) {
42450 throw new Error("assertion failed: " + message);
42451 }
42452}
42453/* harmony default export */ var src_assert = (assert_assert);
42454
42455// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/ts-loader??ref--12-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/WidgetView.vue?vue&type=script&lang=ts&
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471;
42472;
42473;
42474/* harmony default export */ var WidgetViewvue_type_script_lang_ts_ = (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({
42475 components: { SerifOperator: SerifOperator, CompoundWidget: CompoundWidget },
42476 props: ['taxonomies'],
42477 data: function () {
42478 return {
42479 renderCount: 0
42480 };
42481 },
42482 created: function () {
42483 this.$store.commit(mutation_constants.INITIALIZE_TAXONOMIES, this.taxonomies);
42484 },
42485 mounted: function () {
42486 // Because we start off with no data, we don't have to initially bind
42487 // everything, but this may not always be the case...
42488 // this.reRender();
42489 },
42490 watch: {
42491 compoundWidgets: function (val) {
42492 this.reRender();
42493 },
42494 },
42495 methods: {
42496 reRender: function () {
42497 var _this = this;
42498 this.renderCount++;
42499 this.$nextTick(function () {
42500 _this.setupScrollbar();
42501 _this.bindCompoundWidgets();
42502 });
42503 },
42504 bindCompoundWidgets: function () {
42505 loglevel["debug"]("inside mounted callback");
42506 var widgetsToBind = this.getCompoundWidgetElements();
42507 loglevel["debug"]("widgets to bind = %o", widgetsToBind);
42508 // forEach will pass the index to the callback implicitly
42509 widgetsToBind.forEach(this.bindCompoundWidget);
42510 },
42511 bindCompoundWidget: function (compoundWidget, index) {
42512 var _this = this;
42513 var component = this;
42514 loglevel["debug"]("value of compoundWidget is %o", compoundWidget);
42515 var handle = compoundWidget.querySelector('.move-handle');
42516 src_assert(handle !== null, "move handle must be found");
42517 loglevel["debug"]("I will try to bind the draggable to element %o", handle);
42518 var vars = {
42519 trigger: handle,
42520 type: 'x',
42521 onPress: function () { return _this.$store.commit(mutation_constants.COMPOUND_WIDGET_DRAG_FLAG_ON, index); },
42522 onRelease: function () { return _this.$store.commit(mutation_constants.COMPOUND_WIDGET_DRAG_FLAG_OFF, index); },
42523 // Need to pass the appropriate index which we know here.
42524 onDragEnd: function (e) {
42525 component.onDragEnd(this, e, index);
42526 }
42527 };
42528 Draggable_Draggable.create(compoundWidget, vars);
42529 },
42530 onDragEnd: function (draggable, e, sourceIndex) {
42531 loglevel["debug"]("drag ended");
42532 var validElements = this.getCompoundWidgetElements();
42533 var collisions = util.getCollidingElements(draggable, validElements);
42534 if (collisions.length === 0) {
42535 // Spring back to where you were before dragging
42536 this.reRender();
42537 }
42538 else if (collisions.length > 1) {
42539 throw new Error("Ambiguous drag");
42540 }
42541 else {
42542 var targetIndex = validElements.indexOf(collisions[0]);
42543 this.$store.commit(mutation_constants.SWAP_COMPOUND_WIDGETS, { sourceIndex: sourceIndex, targetIndex: targetIndex });
42544 this.reRender();
42545 }
42546 },
42547 getCompoundWidgetElements: function () {
42548 loglevel["debug"]("compoundWidgets ref is %o", this.$refs.compoundWidgets);
42549 return this.$refs.compoundWidgets.map(function (v) { return v.$el; });
42550 },
42551 setupScrollbar: function () {
42552 if (type_guards.isHTMLElement(this.$refs.mainViewContainer)) {
42553 var mainViewContainer = this.$refs.mainViewContainer;
42554 var options = {
42555 suppressScrollY: true,
42556 useBothWheelAxes: true // make it wheel-scrollable
42557 };
42558 var ps = new perfect_scrollbar_esm(mainViewContainer, options);
42559 ps.update();
42560 loglevel["debug"]("set up scrollbar with %o", ps);
42561 }
42562 },
42563 shuffleTaxonSelectors: function () {
42564 this.$store.commit(mutation_constants.SHUFFLE_TAXON_SELECTORS);
42565 },
42566 loadSampleData: function () {
42567 this.$store.commit(mutation_constants.LOAD_SAMPLE_DATA);
42568 },
42569 addCompoundWidget: function () {
42570 this.$store.commit(mutation_constants.ADD_COMPOUND_WIDGET);
42571 },
42572 getQuery: function () {
42573 return this.serializedQuery;
42574 }
42575 },
42576 computed: __assign({ sortedTaxonomyTypeKeys: function () {
42577 var keys = Object.keys(this.taxonomies);
42578 keys.sort();
42579 return keys;
42580 },
42581 widgetStyle: function () {
42582 // Render widget styles upfront, this might enable vue to cache
42583 // these calls
42584 var scale = ordinal();
42585 scale.domain(this.sortedTaxonomyTypeKeys);
42586 scale.range(Pastel1);
42587 var result = {};
42588 this.sortedTaxonomyTypeKeys.forEach(function (taxonomyType) {
42589 result[taxonomyType] = {
42590 'background-color': scale(taxonomyType)
42591 };
42592 });
42593 loglevel["debug"]("result was %o", result);
42594 return result;
42595 } }, mapGetters(['compoundWidgets', 'serializedQuery'])),
42596}));
42597
42598// CONCATENATED MODULE: ./src/components/WidgetView.vue?vue&type=script&lang=ts&
42599 /* harmony default export */ var components_WidgetViewvue_type_script_lang_ts_ = (WidgetViewvue_type_script_lang_ts_);
42600// EXTERNAL MODULE: ./src/components/WidgetView.vue?vue&type=style&index=0&lang=less&
42601var WidgetViewvue_type_style_index_0_lang_less_ = __webpack_require__("452a");
42602
42603// CONCATENATED MODULE: ./src/components/WidgetView.vue
42604
42605
42606
42607
42608
42609
42610/* normalize component */
42611
42612var WidgetView_component = normalizeComponent(
42613 components_WidgetViewvue_type_script_lang_ts_,
42614 WidgetViewvue_type_template_id_89990cc4_render,
42615 staticRenderFns,
42616 false,
42617 null,
42618 null,
42619 null
42620
42621)
42622
42623WidgetView_component.options.__file = "WidgetView.vue"
42624/* harmony default export */ var WidgetView = (WidgetView_component.exports);
42625// CONCATENATED MODULE: ./src/classes.ts
42626var DefinedPathSegment = /** @class */ (function () {
42627 function DefinedPathSegment(id, content) {
42628 this.isVisible = true;
42629 this.nodeId = id;
42630 this.content = content;
42631 }
42632 DefinedPathSegment.prototype.toTaxonDisplayInfo = function (level) {
42633 return {
42634 level: level,
42635 value: this.content,
42636 isVisible: this.isVisible
42637 };
42638 };
42639 DefinedPathSegment.prototype.hasDefiniteValue = function () {
42640 return true;
42641 };
42642 DefinedPathSegment.prototype.toPathElements = function () {
42643 return [this.nodeId];
42644 };
42645 return DefinedPathSegment;
42646}());
42647
42648var TentativePathSegment = /** @class */ (function () {
42649 function TentativePathSegment() {
42650 this.isVisible = true;
42651 }
42652 TentativePathSegment.prototype.hasDefiniteValue = function () {
42653 return false;
42654 };
42655 TentativePathSegment.prototype.toTaxonDisplayInfo = function (level) {
42656 if (level < 1)
42657 throw new Error("level must be 1-based");
42658 return {
42659 level: level,
42660 value: "",
42661 isVisible: this.isVisible
42662 };
42663 };
42664 // It should not be counted.
42665 TentativePathSegment.prototype.toPathElements = function () {
42666 return [];
42667 };
42668 return TentativePathSegment;
42669}());
42670
42671
42672// EXTERNAL MODULE: ./node_modules/tree-model/index.js
42673var tree_model = __webpack_require__("73ec");
42674var tree_model_default = /*#__PURE__*/__webpack_require__.n(tree_model);
42675
42676// CONCATENATED MODULE: ./src/sample-data.ts
42677// paths defined by reference to an existing taxonomy
42678// all taxon data has been removed -- we should refactor path to designate
42679// PathSegment instead
42680/* harmony default export */ var sample_data = ([
42681 {
42682 taxonomyRef: 'Occupation',
42683 isCurrentlyBeingDragged: false,
42684 selectedPath: [
42685 { nodeId: "0", isVisible: true },
42686 { nodeId: "1", isVisible: true },
42687 { nodeId: "2", isVisible: true },
42688 { nodeId: "3", isVisible: true }
42689 ],
42690 hasTentativeTaxonSelector: false
42691 },
42692 {
42693 taxonomyRef: 'Place',
42694 isCurrentlyBeingDragged: false,
42695 selectedPath: [
42696 { nodeId: "0", isVisible: true },
42697 { nodeId: "1", isVisible: true },
42698 { nodeId: "2", isVisible: true },
42699 ],
42700 hasTentativeTaxonSelector: false
42701 },
42702 {
42703 taxonomyRef: 'Occupation',
42704 isCurrentlyBeingDragged: false,
42705 selectedPath: [
42706 { nodeId: "0", isVisible: true },
42707 { nodeId: "1", isVisible: true },
42708 { nodeId: "2", isVisible: true },
42709 { nodeId: "3", isVisible: true }
42710 ],
42711 hasTentativeTaxonSelector: false
42712 },
42713 {
42714 taxonomyRef: 'Place',
42715 isCurrentlyBeingDragged: false,
42716 selectedPath: [
42717 { nodeId: "0", isVisible: true },
42718 { nodeId: "1", isVisible: true },
42719 { nodeId: "2", isVisible: true },
42720 ],
42721 hasTentativeTaxonSelector: false
42722 },
42723]);
42724
42725// CONCATENATED MODULE: ./src/sample-taxonomy-data.ts
42726var TAXONOMY_DATA = {
42727 'children': [{
42728 'content': 'Rock', 'id': 1, 'label': 'Taxon',
42729 'children': [{ 'content': 'Metal', 'id': 3, 'label': 'Taxon' }]
42730 },
42731 {
42732 'content': 'Classical', 'id': 2, 'label': 'Taxon',
42733 'children': [{ 'content': 'Baroque', 'id': 4, 'label': 'Taxon' }]
42734 }],
42735 'content': 'Music',
42736 'id': 0,
42737 'label': 'Taxon'
42738};
42739/* harmony default export */ var sample_taxonomy_data = (TAXONOMY_DATA);
42740
42741// CONCATENATED MODULE: ./src/vuex-module.ts
42742var vuex_module_a;
42743
42744
42745
42746
42747
42748
42749
42750var config = {};
42751var treeModel = new tree_model_default.a(config);
42752var widgets = {
42753 state: {
42754 widgetState: [
42755 { isVisible: true }
42756 ],
42757 taxonomyData: sample_taxonomy_data,
42758 selectedPathTS2: [],
42759 // This is used for the orthodox view
42760 compoundWidgets: [],
42761 taxonomiesData: {}
42762 },
42763 mutations: (vuex_module_a = {},
42764 vuex_module_a[mutation_constants.ADD_NEW_WIDGET] = function (state) {
42765 state.widgetState.push({ isVisible: true });
42766 },
42767 vuex_module_a[mutation_constants.HIDE_WIDGET] = function (state, index) {
42768 state.widgetState[index].isVisible = false;
42769 },
42770 vuex_module_a[mutation_constants.COMPOUND_WIDGET_DRAG_FLAG_ON] = function (state, index) {
42771 state.compoundWidgets[index].isCurrentlyBeingDragged = true;
42772 },
42773 vuex_module_a[mutation_constants.COMPOUND_WIDGET_DRAG_FLAG_OFF] = function (state, index) {
42774 state.compoundWidgets[index].isCurrentlyBeingDragged = false;
42775 },
42776 vuex_module_a[mutation_constants.SWAP_COMPOUND_WIDGETS] = function (state, params) {
42777 var cutItems = state.compoundWidgets.splice(params.sourceIndex, 1);
42778 var theItem = cutItems[0];
42779 state.compoundWidgets.splice(params.targetIndex, 0, theItem);
42780 },
42781 vuex_module_a[mutation_constants.KILL_TAXON_SELECTOR] = function (state, params) {
42782 var path = state.compoundWidgets[params.compoundWidgetIndex].selectedPath;
42783 path.splice(params.taxonSelectorIndex);
42784 },
42785 vuex_module_a[mutation_constants.LOAD_SAMPLE_DATA] = function (state) {
42786 state.compoundWidgets = sample_data;
42787 },
42788 vuex_module_a[mutation_constants.ADD_COMPOUND_WIDGET] = function (state) {
42789 state.compoundWidgets.push(util.makeEmptyCompoundWidget());
42790 },
42791 vuex_module_a[mutation_constants.INITIALIZE_TAXONOMIES] = function (state, taxonomiesData) {
42792 state.taxonomiesData = taxonomiesData;
42793 },
42794 vuex_module_a[mutation_constants.TOGGLE_TAXON_SELECTOR_VISIBILITY] = function (state, params) {
42795 var path = state.compoundWidgets[params.compoundWidgetIndex].selectedPath;
42796 var ts = path[params.taxonSelectorIndex];
42797 ts.isVisible = !ts.isVisible;
42798 },
42799 vuex_module_a[mutation_constants.MAKE_TENTATIVE_SELECTOR] = function (state, compoundWidgetIndex) {
42800 var compoundWidget = state.compoundWidgets[compoundWidgetIndex];
42801 var newSegment = new TentativePathSegment();
42802 compoundWidget.selectedPath.push(newSegment);
42803 compoundWidget.hasTentativeTaxonSelector = false;
42804 },
42805 vuex_module_a[mutation_constants.SET_TAXONOMY_REF] = function (state, parameters) {
42806 state.compoundWidgets[parameters.compoundWidgetIndex].taxonomyRef = parameters.taxonomyRef;
42807 },
42808 vuex_module_a[mutation_constants.REPLACE_PATH_SEGMENT] = function (state, parameters) {
42809 loglevel["debug"]("would replace path segment, %o", parameters);
42810 var compoundWidget = state.compoundWidgets[parameters.compoundWidgetIndex];
42811 var newSegment = new DefinedPathSegment(parameters.nodeIdentifier, parameters.taxonContent);
42812 compoundWidget.selectedPath.splice(parameters.selectedPathIndex, 1, newSegment);
42813 },
42814 vuex_module_a[mutation_constants.KILL_COMPOUND_WIDGET] = function (state, index) {
42815 state.compoundWidgets.splice(index, 1);
42816 },
42817 vuex_module_a),
42818 actions: {},
42819 getters: {
42820 taxonomyTree: function (state, getters) {
42821 return treeModel.parse(state.taxonomyData);
42822 },
42823 selectedPathTS2: function (state, getters) {
42824 return state.selectedPathTS2;
42825 },
42826 definedWidgetCount: function (state, getters) {
42827 return state.widgetState.length;
42828 },
42829 widgetVisibility: function (state) {
42830 return state.widgetState.map(function (w) { return w.isVisible; });
42831 },
42832 // method-style access that's used in the child compound widget
42833 isSpecificCompoundWidgetBeingDragged: function (state) {
42834 return function (index) { return state.compoundWidgets[index].isCurrentlyBeingDragged; };
42835 },
42836 hasTentativeTaxonSelector: function (state) {
42837 return function (index) { return state.compoundWidgets[index].hasTentativeTaxonSelector; };
42838 },
42839 compoundWidgets: function (state) {
42840 return state.compoundWidgets;
42841 },
42842 getTaxonSelectorVisibility: function (state, getters) {
42843 return function (compoundWidgetIndex, taxonSelectorIndex) {
42844 return state.compoundWidgets[compoundWidgetIndex].selectedPath[taxonSelectorIndex].isVisible;
42845 };
42846 },
42847 getSelectedPath: function (state) {
42848 return function (index) { return state.compoundWidgets[index].selectedPath; };
42849 },
42850 taxonomies: function (state) {
42851 var allKeys = Object.keys(state.taxonomiesData);
42852 var result = {};
42853 allKeys.forEach(function (k) {
42854 result[k] = treeModel.parse(state.taxonomiesData[k]);
42855 });
42856 return result;
42857 },
42858 getTaxonsByCompoundWidgetIndex: function (state, getters) {
42859 return function (index) {
42860 var path = getters.getSelectedPath(index);
42861 return path.map(function (segment, n) { return segment.toTaxonDisplayInfo(n + 1); });
42862 };
42863 },
42864 serializedQuery: function (state, getters) {
42865 // Narrow the state of each path to its node id which is an immutable
42866 // string. Skip ones without a taxonomyRef.
42867 var result = [];
42868 for (var _i = 0, _a = state.compoundWidgets; _i < _a.length; _i++) {
42869 var w = _a[_i];
42870 if (w.taxonomyRef === null)
42871 continue;
42872 result.push(util.getQuerySegment(w));
42873 }
42874 return result;
42875 }
42876 }
42877};
42878/* harmony default export */ var vuex_module = (widgets);
42879
42880// CONCATENATED MODULE: ./src/library-entry.ts
42881
42882
42883
42884
42885// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
42886/* concated harmony reexport WidgetView */__webpack_require__.d(__webpack_exports__, "WidgetView", function() { return WidgetView; });
42887/* concated harmony reexport WidgetsModule */__webpack_require__.d(__webpack_exports__, "WidgetsModule", function() { return vuex_module; });
42888
42889
42890
42891
42892/***/ }),
42893
42894/***/ "fb64":
42895/***/ (function(module, exports, __webpack_require__) {
42896
42897// extracted by mini-css-extract-plugin
42898
42899/***/ })
42900
42901/******/ });
42902//# sourceMappingURL=amoe-butterworth-widgets.common.js.map
\No newline at end of file