UNPKG

1.6 MBJavaScriptView Raw
1var call = Function.call;
2
3var copyPrototype = function copyPrototypeMethods(prototype) {
4 /* eslint-disable local-rules/no-prototype-methods */
5 return Object.getOwnPropertyNames(prototype).reduce(function(result, name) {
6 // ignore size because it throws from Map
7 if (
8 name !== "size" &&
9 name !== "caller" &&
10 name !== "callee" &&
11 name !== "arguments" &&
12 typeof prototype[name] === "function"
13 ) {
14 result[name] = call.bind(prototype[name]);
15 }
16
17 return result;
18 }, Object.create(null));
19};
20
21var array = copyPrototype(Array.prototype);
22
23var every = array.every;
24
25function hasCallsLeft(callMap, spy) {
26 if (callMap[spy.id] === undefined) {
27 callMap[spy.id] = 0;
28 }
29
30 return callMap[spy.id] < spy.callCount;
31}
32
33function checkAdjacentCalls(callMap, spy, index, spies) {
34 var calledBeforeNext = true;
35
36 if (index !== spies.length - 1) {
37 calledBeforeNext = spy.calledBefore(spies[index + 1]);
38 }
39
40 if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
41 callMap[spy.id] += 1;
42 return true;
43 }
44
45 return false;
46}
47
48var calledInOrder = function calledInOrder(spies) {
49 var callMap = {};
50 // eslint-disable-next-line no-underscore-dangle
51 var _spies = arguments.length > 1 ? arguments : spies;
52
53 return every(_spies, checkAdjacentCalls.bind(null, callMap));
54};
55
56var functionName = function functionName(func) {
57 if (!func) {
58 return "";
59 }
60
61 return (
62 func.displayName ||
63 func.name ||
64 // Use function decomposition as a last resort to get function
65 // name. Does not rely on function decomposition to work - if it
66 // doesn't debugging will be slightly less informative
67 // (i.e. toString will say 'spy' rather than 'myFunc').
68 (String(func).match(/function ([^\s(]+)/) || [])[1]
69 );
70};
71
72var className = function className(value) {
73 return (
74 (value.constructor && value.constructor.name) ||
75 // The next branch is for IE11 support only:
76 // Because the name property is not set on the prototype
77 // of the Function object, we finally try to grab the
78 // name from its definition. This will never be reached
79 // in node, so we are not able to test this properly.
80 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name
81 (typeof value.constructor === "function" &&
82 /* istanbul ignore next */
83 functionName(value.constructor)) ||
84 null
85 );
86};
87
88var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
89
90function commonjsRequire () {
91 throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
92}
93
94function unwrapExports (x) {
95 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;
96}
97
98function createCommonjsModule(fn, module) {
99 return module = { exports: {} }, fn(module, module.exports), module.exports;
100}
101
102var deprecated = createCommonjsModule(function (module, exports) {
103
104// wrap returns a function that will invoke the supplied function and print a deprecation warning to the console each
105// time it is called.
106exports.wrap = function(func, msg) {
107 var wrapped = function() {
108 exports.printWarning(msg);
109 return func.apply(this, arguments);
110 };
111 if (func.prototype) {
112 wrapped.prototype = func.prototype;
113 }
114 return wrapped;
115};
116
117// defaultMsg returns a string which can be supplied to `wrap()` to notify the user that a particular part of the
118// sinon API has been deprecated.
119exports.defaultMsg = function(packageName, funcName) {
120 return (
121 packageName +
122 "." +
123 funcName +
124 " is deprecated and will be removed from the public API in a future version of " +
125 packageName +
126 "."
127 );
128};
129
130exports.printWarning = function(msg) {
131 // Watch out for IE7 and below! :(
132 /* istanbul ignore next */
133 if (typeof console !== "undefined") {
134 if (console.info) {
135 console.info(msg);
136 } else {
137 console.log(msg);
138 }
139 }
140};
141});
142var deprecated_1 = deprecated.wrap;
143var deprecated_2 = deprecated.defaultMsg;
144var deprecated_3 = deprecated.printWarning;
145
146// This is an `every` implementation that works for all iterables
147var every$1 = function every(obj, fn) {
148 var pass = true;
149
150 try {
151 /* eslint-disable-next-line local-rules/no-prototype-methods */
152 obj.forEach(function() {
153 if (!fn.apply(this, arguments)) {
154 // Throwing an error is the only way to break `forEach`
155 throw new Error();
156 }
157 });
158 } catch (e) {
159 pass = false;
160 }
161
162 return pass;
163};
164
165var sort = array.sort;
166var slice = array.slice;
167
168function comparator(a, b) {
169 // uuid, won't ever be equal
170 var aCall = a.getCall(0);
171 var bCall = b.getCall(0);
172 var aId = (aCall && aCall.callId) || -1;
173 var bId = (bCall && bCall.callId) || -1;
174
175 return aId < bId ? -1 : 1;
176}
177
178var orderByFirstCall = function orderByFirstCall(spies) {
179 return sort(slice(spies), comparator);
180};
181
182var _function = copyPrototype(Function.prototype);
183
184var object = copyPrototype(Object.prototype);
185
186var string = copyPrototype(String.prototype);
187
188var prototypes = {
189 array: array,
190 function: _function,
191 object: object,
192 string: string
193};
194
195var typeDetect = createCommonjsModule(function (module, exports) {
196(function (global, factory) {
197 module.exports = factory();
198}(commonjsGlobal, (function () {
199/* !
200 * type-detect
201 * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
202 * MIT Licensed
203 */
204var promiseExists = typeof Promise === 'function';
205
206/* eslint-disable no-undef */
207var globalObject = typeof self === 'object' ? self : commonjsGlobal; // eslint-disable-line id-blacklist
208
209var symbolExists = typeof Symbol !== 'undefined';
210var mapExists = typeof Map !== 'undefined';
211var setExists = typeof Set !== 'undefined';
212var weakMapExists = typeof WeakMap !== 'undefined';
213var weakSetExists = typeof WeakSet !== 'undefined';
214var dataViewExists = typeof DataView !== 'undefined';
215var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';
216var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';
217var setEntriesExists = setExists && typeof Set.prototype.entries === 'function';
218var mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';
219var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());
220var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());
221var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';
222var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());
223var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';
224var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());
225var toStringLeftSliceLength = 8;
226var toStringRightSliceLength = -1;
227/**
228 * ### typeOf (obj)
229 *
230 * Uses `Object.prototype.toString` to determine the type of an object,
231 * normalising behaviour across engine versions & well optimised.
232 *
233 * @param {Mixed} object
234 * @return {String} object type
235 * @api public
236 */
237function typeDetect(obj) {
238 /* ! Speed optimisation
239 * Pre:
240 * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)
241 * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)
242 * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)
243 * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)
244 * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)
245 * Post:
246 * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)
247 * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)
248 * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)
249 * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)
250 * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)
251 */
252 var typeofObj = typeof obj;
253 if (typeofObj !== 'object') {
254 return typeofObj;
255 }
256
257 /* ! Speed optimisation
258 * Pre:
259 * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)
260 * Post:
261 * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)
262 */
263 if (obj === null) {
264 return 'null';
265 }
266
267 /* ! Spec Conformance
268 * Test: `Object.prototype.toString.call(window)``
269 * - Node === "[object global]"
270 * - Chrome === "[object global]"
271 * - Firefox === "[object Window]"
272 * - PhantomJS === "[object Window]"
273 * - Safari === "[object Window]"
274 * - IE 11 === "[object Window]"
275 * - IE Edge === "[object Window]"
276 * Test: `Object.prototype.toString.call(this)``
277 * - Chrome Worker === "[object global]"
278 * - Firefox Worker === "[object DedicatedWorkerGlobalScope]"
279 * - Safari Worker === "[object DedicatedWorkerGlobalScope]"
280 * - IE 11 Worker === "[object WorkerGlobalScope]"
281 * - IE Edge Worker === "[object WorkerGlobalScope]"
282 */
283 if (obj === globalObject) {
284 return 'global';
285 }
286
287 /* ! Speed optimisation
288 * Pre:
289 * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)
290 * Post:
291 * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)
292 */
293 if (
294 Array.isArray(obj) &&
295 (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))
296 ) {
297 return 'Array';
298 }
299
300 // Not caching existence of `window` and related properties due to potential
301 // for `window` to be unset before tests in quasi-browser environments.
302 if (typeof window === 'object' && window !== null) {
303 /* ! Spec Conformance
304 * (https://html.spec.whatwg.org/multipage/browsers.html#location)
305 * WhatWG HTML$7.7.3 - The `Location` interface
306 * Test: `Object.prototype.toString.call(window.location)``
307 * - IE <=11 === "[object Object]"
308 * - IE Edge <=13 === "[object Object]"
309 */
310 if (typeof window.location === 'object' && obj === window.location) {
311 return 'Location';
312 }
313
314 /* ! Spec Conformance
315 * (https://html.spec.whatwg.org/#document)
316 * WhatWG HTML$3.1.1 - The `Document` object
317 * Note: Most browsers currently adher to the W3C DOM Level 2 spec
318 * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)
319 * which suggests that browsers should use HTMLTableCellElement for
320 * both TD and TH elements. WhatWG separates these.
321 * WhatWG HTML states:
322 * > For historical reasons, Window objects must also have a
323 * > writable, configurable, non-enumerable property named
324 * > HTMLDocument whose value is the Document interface object.
325 * Test: `Object.prototype.toString.call(document)``
326 * - Chrome === "[object HTMLDocument]"
327 * - Firefox === "[object HTMLDocument]"
328 * - Safari === "[object HTMLDocument]"
329 * - IE <=10 === "[object Document]"
330 * - IE 11 === "[object HTMLDocument]"
331 * - IE Edge <=13 === "[object HTMLDocument]"
332 */
333 if (typeof window.document === 'object' && obj === window.document) {
334 return 'Document';
335 }
336
337 if (typeof window.navigator === 'object') {
338 /* ! Spec Conformance
339 * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)
340 * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray
341 * Test: `Object.prototype.toString.call(navigator.mimeTypes)``
342 * - IE <=10 === "[object MSMimeTypesCollection]"
343 */
344 if (typeof window.navigator.mimeTypes === 'object' &&
345 obj === window.navigator.mimeTypes) {
346 return 'MimeTypeArray';
347 }
348
349 /* ! Spec Conformance
350 * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)
351 * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray
352 * Test: `Object.prototype.toString.call(navigator.plugins)``
353 * - IE <=10 === "[object MSPluginsCollection]"
354 */
355 if (typeof window.navigator.plugins === 'object' &&
356 obj === window.navigator.plugins) {
357 return 'PluginArray';
358 }
359 }
360
361 if ((typeof window.HTMLElement === 'function' ||
362 typeof window.HTMLElement === 'object') &&
363 obj instanceof window.HTMLElement) {
364 /* ! Spec Conformance
365 * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)
366 * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`
367 * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``
368 * - IE <=10 === "[object HTMLBlockElement]"
369 */
370 if (obj.tagName === 'BLOCKQUOTE') {
371 return 'HTMLQuoteElement';
372 }
373
374 /* ! Spec Conformance
375 * (https://html.spec.whatwg.org/#htmltabledatacellelement)
376 * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`
377 * Note: Most browsers currently adher to the W3C DOM Level 2 spec
378 * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)
379 * which suggests that browsers should use HTMLTableCellElement for
380 * both TD and TH elements. WhatWG separates these.
381 * Test: Object.prototype.toString.call(document.createElement('td'))
382 * - Chrome === "[object HTMLTableCellElement]"
383 * - Firefox === "[object HTMLTableCellElement]"
384 * - Safari === "[object HTMLTableCellElement]"
385 */
386 if (obj.tagName === 'TD') {
387 return 'HTMLTableDataCellElement';
388 }
389
390 /* ! Spec Conformance
391 * (https://html.spec.whatwg.org/#htmltableheadercellelement)
392 * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`
393 * Note: Most browsers currently adher to the W3C DOM Level 2 spec
394 * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)
395 * which suggests that browsers should use HTMLTableCellElement for
396 * both TD and TH elements. WhatWG separates these.
397 * Test: Object.prototype.toString.call(document.createElement('th'))
398 * - Chrome === "[object HTMLTableCellElement]"
399 * - Firefox === "[object HTMLTableCellElement]"
400 * - Safari === "[object HTMLTableCellElement]"
401 */
402 if (obj.tagName === 'TH') {
403 return 'HTMLTableHeaderCellElement';
404 }
405 }
406 }
407
408 /* ! Speed optimisation
409 * Pre:
410 * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)
411 * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)
412 * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)
413 * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)
414 * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)
415 * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)
416 * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)
417 * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)
418 * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)
419 * Post:
420 * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)
421 * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)
422 * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)
423 * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)
424 * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)
425 * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)
426 * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)
427 * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)
428 * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)
429 */
430 var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);
431 if (typeof stringTag === 'string') {
432 return stringTag;
433 }
434
435 var objPrototype = Object.getPrototypeOf(obj);
436 /* ! Speed optimisation
437 * Pre:
438 * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)
439 * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)
440 * Post:
441 * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)
442 * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)
443 */
444 if (objPrototype === RegExp.prototype) {
445 return 'RegExp';
446 }
447
448 /* ! Speed optimisation
449 * Pre:
450 * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)
451 * Post:
452 * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)
453 */
454 if (objPrototype === Date.prototype) {
455 return 'Date';
456 }
457
458 /* ! Spec Conformance
459 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)
460 * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise":
461 * Test: `Object.prototype.toString.call(Promise.resolve())``
462 * - Chrome <=47 === "[object Object]"
463 * - Edge <=20 === "[object Object]"
464 * - Firefox 29-Latest === "[object Promise]"
465 * - Safari 7.1-Latest === "[object Promise]"
466 */
467 if (promiseExists && objPrototype === Promise.prototype) {
468 return 'Promise';
469 }
470
471 /* ! Speed optimisation
472 * Pre:
473 * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)
474 * Post:
475 * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)
476 */
477 if (setExists && objPrototype === Set.prototype) {
478 return 'Set';
479 }
480
481 /* ! Speed optimisation
482 * Pre:
483 * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)
484 * Post:
485 * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)
486 */
487 if (mapExists && objPrototype === Map.prototype) {
488 return 'Map';
489 }
490
491 /* ! Speed optimisation
492 * Pre:
493 * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)
494 * Post:
495 * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)
496 */
497 if (weakSetExists && objPrototype === WeakSet.prototype) {
498 return 'WeakSet';
499 }
500
501 /* ! Speed optimisation
502 * Pre:
503 * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)
504 * Post:
505 * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)
506 */
507 if (weakMapExists && objPrototype === WeakMap.prototype) {
508 return 'WeakMap';
509 }
510
511 /* ! Spec Conformance
512 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)
513 * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView":
514 * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``
515 * - Edge <=13 === "[object Object]"
516 */
517 if (dataViewExists && objPrototype === DataView.prototype) {
518 return 'DataView';
519 }
520
521 /* ! Spec Conformance
522 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)
523 * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator":
524 * Test: `Object.prototype.toString.call(new Map().entries())``
525 * - Edge <=13 === "[object Object]"
526 */
527 if (mapExists && objPrototype === mapIteratorPrototype) {
528 return 'Map Iterator';
529 }
530
531 /* ! Spec Conformance
532 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)
533 * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator":
534 * Test: `Object.prototype.toString.call(new Set().entries())``
535 * - Edge <=13 === "[object Object]"
536 */
537 if (setExists && objPrototype === setIteratorPrototype) {
538 return 'Set Iterator';
539 }
540
541 /* ! Spec Conformance
542 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)
543 * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator":
544 * Test: `Object.prototype.toString.call([][Symbol.iterator]())``
545 * - Edge <=13 === "[object Object]"
546 */
547 if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {
548 return 'Array Iterator';
549 }
550
551 /* ! Spec Conformance
552 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)
553 * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator":
554 * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``
555 * - Edge <=13 === "[object Object]"
556 */
557 if (stringIteratorExists && objPrototype === stringIteratorPrototype) {
558 return 'String Iterator';
559 }
560
561 /* ! Speed optimisation
562 * Pre:
563 * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)
564 * Post:
565 * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)
566 */
567 if (objPrototype === null) {
568 return 'Object';
569 }
570
571 return Object
572 .prototype
573 .toString
574 .call(obj)
575 .slice(toStringLeftSliceLength, toStringRightSliceLength);
576}
577
578return typeDetect;
579
580})));
581});
582
583var typeOf = function typeOf(value) {
584 return typeDetect(value).toLowerCase();
585};
586
587function valueToString(value) {
588 if (value && value.toString) {
589 /* eslint-disable-next-line local-rules/no-prototype-methods */
590 return value.toString();
591 }
592 return String(value);
593}
594
595var valueToString_1 = valueToString;
596
597var lib = {
598 calledInOrder: calledInOrder,
599 className: className,
600 deprecated: deprecated,
601 every: every$1,
602 functionName: functionName,
603 orderByFirstCall: orderByFirstCall,
604 prototypes: prototypes,
605 typeOf: typeOf,
606 valueToString: valueToString_1
607};
608
609var arrayProto = lib.prototypes.array;
610var hasOwnProperty = lib.prototypes.object.hasOwnProperty;
611
612var join = arrayProto.join;
613var push = arrayProto.push;
614var slice$1 = arrayProto.slice;
615
616// Adapted from https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
617var hasDontEnumBug = (function() {
618 var obj = {
619 constructor: function() {
620 return "0";
621 },
622 toString: function() {
623 return "1";
624 },
625 valueOf: function() {
626 return "2";
627 },
628 toLocaleString: function() {
629 return "3";
630 },
631 prototype: function() {
632 return "4";
633 },
634 isPrototypeOf: function() {
635 return "5";
636 },
637 propertyIsEnumerable: function() {
638 return "6";
639 },
640 hasOwnProperty: function() {
641 return "7";
642 },
643 length: function() {
644 return "8";
645 },
646 unique: function() {
647 return "9";
648 }
649 };
650
651 var result = [];
652 for (var prop in obj) {
653 if (hasOwnProperty(obj, prop)) {
654 push(result, obj[prop]());
655 }
656 }
657 return join(result, "") !== "0123456789";
658})();
659
660function extendCommon(target, sources, doCopy) {
661 var source, i, prop;
662
663 for (i = 0; i < sources.length; i++) {
664 source = sources[i];
665
666 for (prop in source) {
667 if (hasOwnProperty(source, prop)) {
668 doCopy(target, source, prop);
669 }
670 }
671
672 // Make sure we copy (own) toString method even when in JScript with DontEnum bug
673 // See https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
674 if (hasDontEnumBug && hasOwnProperty(source, "toString") && source.toString !== target.toString) {
675 target.toString = source.toString;
676 }
677 }
678
679 return target;
680}
681
682/** Public: Extend target in place with all (own) properties from sources in-order. Thus, last source will
683 * override properties in previous sources.
684 *
685 * @arg {Object} target - The Object to extend
686 * @arg {Object[]} sources - Objects to copy properties from.
687 *
688 * @returns {Object} the extended target
689 */
690var extend = function extend(target /*, sources */) {
691 var sources = slice$1(arguments, 1);
692
693 return extendCommon(target, sources, function copyValue(dest, source, prop) {
694 dest[prop] = source[prop];
695 });
696};
697
698/** Public: Extend target in place with all (own) properties from sources in-order. Thus, last source will
699 * override properties in previous sources. Define the properties as non enumerable.
700 *
701 * @arg {Object} target - The Object to extend
702 * @arg {Object[]} sources - Objects to copy properties from.
703 *
704 * @returns {Object} the extended target
705 */
706var nonEnum = function extendNonEnum(target /*, sources */) {
707 var sources = slice$1(arguments, 1);
708
709 return extendCommon(target, sources, function copyProperty(dest, source, prop) {
710 Object.defineProperty(dest, prop, {
711 value: source[prop],
712 enumerable: false,
713 configurable: true,
714 writable: true
715 });
716 });
717};
718extend.nonEnum = nonEnum;
719
720/* istanbul ignore next : not testing that setTimeout works */
721function nextTick(callback) {
722 setTimeout(callback, 0);
723}
724
725var getNextTick = function getNextTick(process, setImmediate) {
726 if (typeof process === "object" && typeof process.nextTick === "function") {
727 return process.nextTick;
728 }
729
730 if (typeof setImmediate === "function") {
731 return setImmediate;
732 }
733
734 return nextTick;
735};
736
737/* istanbul ignore next */
738var root = typeof window !== "undefined" ? window : commonjsGlobal;
739
740var nextTick$1 = getNextTick(root.process, root.setImmediate);
741
742var arrayProto$1 = lib.prototypes.array;
743var reduce = arrayProto$1.reduce;
744
745var exportAsyncBehaviors = function exportAsyncBehaviors(behaviorMethods) {
746 return reduce(
747 Object.keys(behaviorMethods),
748 function(acc, method) {
749 // need to avoid creating another async versions of the newly added async methods
750 if (method.match(/^(callsArg|yields)/) && !method.match(/Async/)) {
751 acc[method + "Async"] = function() {
752 var result = behaviorMethods[method].apply(this, arguments);
753 this.callbackAsync = true;
754 return result;
755 };
756 }
757 return acc;
758 },
759 {}
760 );
761};
762
763var arrayProto$2 = lib.prototypes.array;
764
765var functionName$1 = lib.functionName;
766
767var valueToString$1 = lib.valueToString;
768
769
770var concat = arrayProto$2.concat;
771var join$1 = arrayProto$2.join;
772var reverse = arrayProto$2.reverse;
773var slice$2 = arrayProto$2.slice;
774
775var useLeftMostCallback = -1;
776var useRightMostCallback = -2;
777
778function getCallback(behavior, args) {
779 var callArgAt = behavior.callArgAt;
780
781 if (callArgAt >= 0) {
782 return args[callArgAt];
783 }
784
785 var argumentList;
786
787 if (callArgAt === useLeftMostCallback) {
788 argumentList = args;
789 }
790
791 if (callArgAt === useRightMostCallback) {
792 argumentList = reverse(slice$2(args));
793 }
794
795 var callArgProp = behavior.callArgProp;
796
797 for (var i = 0, l = argumentList.length; i < l; ++i) {
798 if (!callArgProp && typeof argumentList[i] === "function") {
799 return argumentList[i];
800 }
801
802 if (callArgProp && argumentList[i] && typeof argumentList[i][callArgProp] === "function") {
803 return argumentList[i][callArgProp];
804 }
805 }
806
807 return null;
808}
809
810function getCallbackError(behavior, func, args) {
811 if (behavior.callArgAt < 0) {
812 var msg;
813
814 if (behavior.callArgProp) {
815 msg =
816 functionName$1(behavior.stub) +
817 " expected to yield to '" +
818 valueToString$1(behavior.callArgProp) +
819 "', but no object with such a property was passed.";
820 } else {
821 msg = functionName$1(behavior.stub) + " expected to yield, but no callback was passed.";
822 }
823
824 if (args.length > 0) {
825 msg += " Received [" + join$1(args, ", ") + "]";
826 }
827
828 return msg;
829 }
830
831 return "argument at index " + behavior.callArgAt + " is not a function: " + func;
832}
833
834function ensureArgs(name, behavior, args) {
835 // map function name to internal property
836 // callsArg => callArgAt
837 var property = name.replace(/sArg/, "ArgAt");
838 var index = behavior[property];
839
840 if (index >= args.length) {
841 throw new TypeError(
842 name + " failed: " + (index + 1) + " arguments required but only " + args.length + " present"
843 );
844 }
845}
846
847function callCallback(behavior, args) {
848 if (typeof behavior.callArgAt === "number") {
849 ensureArgs("callsArg", behavior, args);
850 var func = getCallback(behavior, args);
851
852 if (typeof func !== "function") {
853 throw new TypeError(getCallbackError(behavior, func, args));
854 }
855
856 if (behavior.callbackAsync) {
857 nextTick$1(function() {
858 func.apply(behavior.callbackContext, behavior.callbackArguments);
859 });
860 } else {
861 return func.apply(behavior.callbackContext, behavior.callbackArguments);
862 }
863 }
864
865 return undefined;
866}
867
868var proto = {
869 create: function create(stub) {
870 var behavior = extend({}, proto);
871 delete behavior.create;
872 delete behavior.addBehavior;
873 delete behavior.createBehavior;
874 behavior.stub = stub;
875
876 if (stub.defaultBehavior && stub.defaultBehavior.promiseLibrary) {
877 behavior.promiseLibrary = stub.defaultBehavior.promiseLibrary;
878 }
879
880 return behavior;
881 },
882
883 isPresent: function isPresent() {
884 return (
885 typeof this.callArgAt === "number" ||
886 this.exception ||
887 this.exceptionCreator ||
888 typeof this.returnArgAt === "number" ||
889 this.returnThis ||
890 typeof this.resolveArgAt === "number" ||
891 this.resolveThis ||
892 typeof this.throwArgAt === "number" ||
893 this.fakeFn ||
894 this.returnValueDefined
895 );
896 },
897
898 invoke: function invoke(context, args) {
899 /*
900 * callCallback (conditionally) calls ensureArgs
901 *
902 * Note: callCallback intentionally happens before
903 * everything else and cannot be moved lower
904 */
905 var returnValue = callCallback(this, args);
906
907 if (this.exception) {
908 throw this.exception;
909 } else if (this.exceptionCreator) {
910 this.exception = this.exceptionCreator();
911 this.exceptionCreator = undefined;
912 throw this.exception;
913 } else if (typeof this.returnArgAt === "number") {
914 ensureArgs("returnsArg", this, args);
915 return args[this.returnArgAt];
916 } else if (this.returnThis) {
917 return context;
918 } else if (typeof this.throwArgAt === "number") {
919 ensureArgs("throwsArg", this, args);
920 throw args[this.throwArgAt];
921 } else if (this.fakeFn) {
922 return this.fakeFn.apply(context, args);
923 } else if (typeof this.resolveArgAt === "number") {
924 ensureArgs("resolvesArg", this, args);
925 return (this.promiseLibrary || Promise).resolve(args[this.resolveArgAt]);
926 } else if (this.resolveThis) {
927 return (this.promiseLibrary || Promise).resolve(context);
928 } else if (this.resolve) {
929 return (this.promiseLibrary || Promise).resolve(this.returnValue);
930 } else if (this.reject) {
931 return (this.promiseLibrary || Promise).reject(this.returnValue);
932 } else if (this.callsThrough) {
933 return this.stub.wrappedMethod.apply(context, args);
934 } else if (typeof this.returnValue !== "undefined") {
935 return this.returnValue;
936 } else if (typeof this.callArgAt === "number") {
937 return returnValue;
938 }
939
940 return this.returnValue;
941 },
942
943 onCall: function onCall(index) {
944 return this.stub.onCall(index);
945 },
946
947 onFirstCall: function onFirstCall() {
948 return this.stub.onFirstCall();
949 },
950
951 onSecondCall: function onSecondCall() {
952 return this.stub.onSecondCall();
953 },
954
955 onThirdCall: function onThirdCall() {
956 return this.stub.onThirdCall();
957 },
958
959 withArgs: function withArgs(/* arguments */) {
960 throw new Error(
961 'Defining a stub by invoking "stub.onCall(...).withArgs(...)" ' +
962 'is not supported. Use "stub.withArgs(...).onCall(...)" ' +
963 "to define sequential behavior for calls with certain arguments."
964 );
965 }
966};
967
968function createBehavior(behaviorMethod) {
969 return function() {
970 this.defaultBehavior = this.defaultBehavior || proto.create(this);
971 this.defaultBehavior[behaviorMethod].apply(this.defaultBehavior, arguments);
972 return this;
973 };
974}
975
976function addBehavior(stub, name, fn) {
977 proto[name] = function() {
978 fn.apply(this, concat([this], slice$2(arguments)));
979 return this.stub || this;
980 };
981
982 stub[name] = createBehavior(name);
983}
984
985proto.addBehavior = addBehavior;
986proto.createBehavior = createBehavior;
987
988var asyncBehaviors = exportAsyncBehaviors(proto);
989
990var behavior = extend.nonEnum({}, proto, asyncBehaviors);
991
992var forEach = lib.prototypes.array.forEach;
993
994function walkInternal(obj, iterator, context, originalObj, seen) {
995 var proto, prop;
996
997 if (typeof Object.getOwnPropertyNames !== "function") {
998 // We explicitly want to enumerate through all of the prototype's properties
999 // in this case, therefore we deliberately leave out an own property check.
1000 /* eslint-disable-next-line guard-for-in */
1001 for (prop in obj) {
1002 iterator.call(context, obj[prop], prop, obj);
1003 }
1004
1005 return;
1006 }
1007
1008 forEach(Object.getOwnPropertyNames(obj), function(k) {
1009 if (seen[k] !== true) {
1010 seen[k] = true;
1011 var target = typeof Object.getOwnPropertyDescriptor(obj, k).get === "function" ? originalObj : obj;
1012 iterator.call(context, k, target);
1013 }
1014 });
1015
1016 proto = Object.getPrototypeOf(obj);
1017 if (proto) {
1018 walkInternal(proto, iterator, context, originalObj, seen);
1019 }
1020}
1021
1022/* Walks the prototype chain of an object and iterates over every own property
1023 * name encountered. The iterator is called in the same fashion that Array.prototype.forEach
1024 * works, where it is passed the value, key, and own object as the 1st, 2nd, and 3rd positional
1025 * argument, respectively. In cases where Object.getOwnPropertyNames is not available, walk will
1026 * default to using a simple for..in loop.
1027 *
1028 * obj - The object to walk the prototype chain for.
1029 * iterator - The function to be called on each pass of the walk.
1030 * context - (Optional) When given, the iterator will be called with this object as the receiver.
1031 */
1032var walk = function walk(obj, iterator, context) {
1033 return walkInternal(obj, iterator, context, obj, {});
1034};
1035
1036var getPropertyDescriptor = function getPropertyDescriptor(object, property) {
1037 var proto = object;
1038 var descriptor;
1039
1040 while (proto && !(descriptor = Object.getOwnPropertyDescriptor(proto, property))) {
1041 proto = Object.getPrototypeOf(proto);
1042 }
1043 return descriptor;
1044};
1045
1046var hasOwnProperty$1 = lib.prototypes.object.hasOwnProperty;
1047var push$1 = lib.prototypes.array.push;
1048
1049function collectMethod(methods, object, prop, propOwner) {
1050 if (typeof getPropertyDescriptor(propOwner, prop).value === "function" && hasOwnProperty$1(object, prop)) {
1051 push$1(methods, object[prop]);
1052 }
1053}
1054
1055// This function returns an array of all the own methods on the passed object
1056function collectOwnMethods(object) {
1057 var methods = [];
1058
1059 walk(object, collectMethod.bind(null, methods, object));
1060
1061 return methods;
1062}
1063
1064var collectOwnMethods_1 = collectOwnMethods;
1065
1066/**
1067 * Verify if an object is a ECMAScript Module
1068 *
1069 * As the exports from a module is immutable we cannot alter the exports
1070 * using spies or stubs. Let the consumer know this to avoid bug reports
1071 * on weird error messages.
1072 *
1073 * @param {Object} object The object to examine
1074 *
1075 * @returns {Boolean} true when the object is a module
1076 */
1077var isEsModule = function(object) {
1078 return (
1079 object && typeof Symbol !== "undefined" && object[Symbol.toStringTag] === "Module" && Object.isSealed(object)
1080 );
1081};
1082
1083function isPropertyConfigurable(obj, propName) {
1084 var propertyDescriptor = getPropertyDescriptor(obj, propName);
1085
1086 return propertyDescriptor ? propertyDescriptor.configurable : true;
1087}
1088
1089var isPropertyConfigurable_1 = isPropertyConfigurable;
1090
1091function isNonExistentOwnProperty(object, property) {
1092 return object && typeof property !== "undefined" && !(property in object);
1093}
1094
1095var isNonExistentOwnProperty_1 = isNonExistentOwnProperty;
1096
1097function isNaN$1(value) {
1098 // Unlike global isNaN, this avoids type coercion
1099 // typeof check avoids IE host object issues, hat tip to
1100 // lodash
1101 var val = value; // JsLint thinks value !== value is "weird"
1102 return typeof value === "number" && value !== val;
1103}
1104
1105var isNan = isNaN$1;
1106
1107/**
1108 * @name samsam.isNegZero
1109 * @param Object value
1110 *
1111 * Returns ``true`` if ``value`` is ``-0``.
1112 */
1113function isNegZero(value) {
1114 return value === 0 && 1 / value === -Infinity;
1115}
1116
1117var isNegZero_1 = isNegZero;
1118
1119/**
1120 * @name samsam.equal
1121 * @param Object obj1
1122 * @param Object obj2
1123 *
1124 * Returns ``true`` if two objects are strictly equal. Compared to
1125 * ``===`` there are two exceptions:
1126 *
1127 * - NaN is considered equal to NaN
1128 * - -0 and +0 are not considered equal
1129 */
1130function identical(obj1, obj2) {
1131 if (obj1 === obj2 || (isNan(obj1) && isNan(obj2))) {
1132 return obj1 !== 0 || isNegZero_1(obj1) === isNegZero_1(obj2);
1133 }
1134
1135 return false;
1136}
1137
1138var identical_1 = identical;
1139
1140var o = Object.prototype;
1141
1142function getClass(value) {
1143 // Returns the internal [[Class]] by calling Object.prototype.toString
1144 // with the provided value as this. Return value is a string, naming the
1145 // internal class, e.g. "Array"
1146 return o.toString.call(value).split(/[ \]]/)[1];
1147}
1148
1149var getClass_1 = getClass;
1150
1151/**
1152 * @name samsam.isArguments
1153 * @param Object object
1154 *
1155 * Returns ``true`` if ``object`` is an ``arguments`` object,
1156 * ``false`` otherwise.
1157 */
1158function isArguments(object) {
1159 if (getClass_1(object) === "Arguments") {
1160 return true;
1161 }
1162 if (
1163 typeof object !== "object" ||
1164 typeof object.length !== "number" ||
1165 getClass_1(object) === "Array"
1166 ) {
1167 return false;
1168 }
1169 if (typeof object.callee === "function") {
1170 return true;
1171 }
1172 try {
1173 object[object.length] = 6;
1174 delete object[object.length];
1175 } catch (e) {
1176 return true;
1177 }
1178 return false;
1179}
1180
1181var isArguments_1 = isArguments;
1182
1183var div = typeof document !== "undefined" && document.createElement("div");
1184
1185/**
1186 * @name samsam.isElement
1187 * @param Object object
1188 *
1189 * Returns ``true`` if ``object`` is a DOM element node. Unlike
1190 * Underscore.js/lodash, this function will return ``false`` if ``object``
1191 * is an *element-like* object, i.e. a regular object with a ``nodeType``
1192 * property that holds the value ``1``.
1193 */
1194function isElement(object) {
1195 if (!object || object.nodeType !== 1 || !div) {
1196 return false;
1197 }
1198 try {
1199 object.appendChild(div);
1200 object.removeChild(div);
1201 } catch (e) {
1202 return false;
1203 }
1204 return true;
1205}
1206
1207var isElement_1 = isElement;
1208
1209function isSet(val) {
1210 return (typeof Set !== "undefined" && val instanceof Set) || false;
1211}
1212
1213var isSet_1 = isSet;
1214
1215function isDate(value) {
1216 return value instanceof Date;
1217}
1218
1219var isDate_1 = isDate;
1220
1221// Returns true when the value is a regular Object and not a specialized Object
1222//
1223// This helps speeding up deepEqual cyclic checks
1224// The premise is that only Objects are stored in the visited array.
1225// So if this function returns false, we don't have to do the
1226// expensive operation of searching for the value in the the array of already
1227// visited objects
1228function isObject(value) {
1229 return (
1230 typeof value === "object" &&
1231 value !== null &&
1232 // none of these are collection objects, so we can return false
1233 !(value instanceof Boolean) &&
1234 !(value instanceof Date) &&
1235 !(value instanceof Error) &&
1236 !(value instanceof Number) &&
1237 !(value instanceof RegExp) &&
1238 !(value instanceof String)
1239 );
1240}
1241
1242var isObject_1 = isObject;
1243
1244function isSubset(s1, s2, compare) {
1245 var allContained = true;
1246 s1.forEach(function(v1) {
1247 var includes = false;
1248 s2.forEach(function(v2) {
1249 if (compare(v2, v1)) {
1250 includes = true;
1251 }
1252 });
1253 allContained = allContained && includes;
1254 });
1255
1256 return allContained;
1257}
1258
1259var isSubset_1 = isSubset;
1260
1261var valueToString$2 = lib.valueToString;
1262
1263var re = /function (\w+)\s*\(/;
1264
1265function getClassName(value) {
1266 if (value.constructor && "name" in value.constructor) {
1267 return value.constructor.name;
1268 }
1269
1270 if (typeof value.constructor === "function") {
1271 var match = valueToString$2(value.constructor).match(re);
1272 if (match.length > 1) {
1273 return match[1];
1274 }
1275 }
1276
1277 return null;
1278}
1279
1280var getClassName_1 = getClassName;
1281
1282var valueToString$3 = lib.valueToString;
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295var every$2 = Array.prototype.every;
1296var getTime = Date.prototype.getTime;
1297var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
1298var indexOf = Array.prototype.indexOf;
1299var keys = Object.keys;
1300var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1301
1302/**
1303 * @name samsam.deepEqual
1304 * @param Object actual
1305 * @param Object expectation
1306 *
1307 * Deep equal comparison. Two values are "deep equal" if:
1308 *
1309 * - They are equal, according to samsam.identical
1310 * - They are both date objects representing the same time
1311 * - They are both arrays containing elements that are all deepEqual
1312 * - They are objects with the same set of properties, and each property
1313 * in ``actual`` is deepEqual to the corresponding property in ``expectation``
1314 *
1315 * Supports cyclic objects.
1316 */
1317function deepEqualCyclic(actual, expectation, match) {
1318 // used for cyclic comparison
1319 // contain already visited objects
1320 var actualObjects = [];
1321 var expectationObjects = [];
1322 // contain pathes (position in the object structure)
1323 // of the already visited objects
1324 // indexes same as in objects arrays
1325 var actualPaths = [];
1326 var expectationPaths = [];
1327 // contains combinations of already compared objects
1328 // in the manner: { "$1['ref']$2['ref']": true }
1329 var compared = {};
1330
1331 // does the recursion for the deep equal check
1332 return (function deepEqual(
1333 actualObj,
1334 expectationObj,
1335 actualPath,
1336 expectationPath
1337 ) {
1338 // If both are matchers they must be the same instance in order to be
1339 // considered equal If we didn't do that we would end up running one
1340 // matcher against the other
1341 if (match && match.isMatcher(expectationObj)) {
1342 if (match.isMatcher(actualObj)) {
1343 return actualObj === expectationObj;
1344 }
1345 return expectationObj.test(actualObj);
1346 }
1347
1348 var actualType = typeof actualObj;
1349 var expectationType = typeof expectationObj;
1350
1351 // == null also matches undefined
1352 if (
1353 actualObj === expectationObj ||
1354 isNan(actualObj) ||
1355 isNan(expectationObj) ||
1356 actualObj == null ||
1357 expectationObj == null ||
1358 actualType !== "object" ||
1359 expectationType !== "object"
1360 ) {
1361 return identical_1(actualObj, expectationObj);
1362 }
1363
1364 // Elements are only equal if identical(expected, actual)
1365 if (isElement_1(actualObj) || isElement_1(expectationObj)) {
1366 return false;
1367 }
1368
1369 var isActualDate = isDate_1(actualObj);
1370 var isExpectationDate = isDate_1(expectationObj);
1371 if (isActualDate || isExpectationDate) {
1372 if (
1373 !isActualDate ||
1374 !isExpectationDate ||
1375 getTime.call(actualObj) !== getTime.call(expectationObj)
1376 ) {
1377 return false;
1378 }
1379 }
1380
1381 if (actualObj instanceof RegExp && expectationObj instanceof RegExp) {
1382 if (valueToString$3(actualObj) !== valueToString$3(expectationObj)) {
1383 return false;
1384 }
1385 }
1386
1387 if (actualObj instanceof Error && expectationObj instanceof Error) {
1388 return actualObj === expectationObj;
1389 }
1390
1391 var actualClass = getClass_1(actualObj);
1392 var expectationClass = getClass_1(expectationObj);
1393 var actualKeys = keys(actualObj);
1394 var expectationKeys = keys(expectationObj);
1395 var actualName = getClassName_1(actualObj);
1396 var expectationName = getClassName_1(expectationObj);
1397 var expectationSymbols =
1398 typeof Object.getOwnPropertySymbols === "function"
1399 ? getOwnPropertySymbols(expectationObj)
1400 : [];
1401 var expectationKeysAndSymbols = expectationKeys.concat(
1402 expectationSymbols
1403 );
1404
1405 if (isArguments_1(actualObj) || isArguments_1(expectationObj)) {
1406 if (actualObj.length !== expectationObj.length) {
1407 return false;
1408 }
1409 } else {
1410 if (
1411 actualType !== expectationType ||
1412 actualClass !== expectationClass ||
1413 actualKeys.length !== expectationKeys.length ||
1414 (actualName &&
1415 expectationName &&
1416 actualName !== expectationName)
1417 ) {
1418 return false;
1419 }
1420 }
1421
1422 if (isSet_1(actualObj) || isSet_1(expectationObj)) {
1423 if (
1424 !isSet_1(actualObj) ||
1425 !isSet_1(expectationObj) ||
1426 actualObj.size !== expectationObj.size
1427 ) {
1428 return false;
1429 }
1430
1431 return isSubset_1(actualObj, expectationObj, deepEqual);
1432 }
1433
1434 return every$2.call(expectationKeysAndSymbols, function(key) {
1435 if (!hasOwnProperty$2.call(actualObj, key)) {
1436 return false;
1437 }
1438
1439 var actualValue = actualObj[key];
1440 var expectationValue = expectationObj[key];
1441 var actualObject = isObject_1(actualValue);
1442 var expectationObject = isObject_1(expectationValue);
1443 // determines, if the objects were already visited
1444 // (it's faster to check for isObject first, than to
1445 // get -1 from getIndex for non objects)
1446 var actualIndex = actualObject
1447 ? indexOf.call(actualObjects, actualValue)
1448 : -1;
1449 var expectationIndex = expectationObject
1450 ? indexOf.call(expectationObjects, expectationValue)
1451 : -1;
1452 // determines the new paths of the objects
1453 // - for non cyclic objects the current path will be extended
1454 // by current property name
1455 // - for cyclic objects the stored path is taken
1456 var newActualPath =
1457 actualIndex !== -1
1458 ? actualPaths[actualIndex]
1459 : actualPath + "[" + JSON.stringify(key) + "]";
1460 var newExpectationPath =
1461 expectationIndex !== -1
1462 ? expectationPaths[expectationIndex]
1463 : expectationPath + "[" + JSON.stringify(key) + "]";
1464 var combinedPath = newActualPath + newExpectationPath;
1465
1466 // stop recursion if current objects are already compared
1467 if (compared[combinedPath]) {
1468 return true;
1469 }
1470
1471 // remember the current objects and their paths
1472 if (actualIndex === -1 && actualObject) {
1473 actualObjects.push(actualValue);
1474 actualPaths.push(newActualPath);
1475 }
1476 if (expectationIndex === -1 && expectationObject) {
1477 expectationObjects.push(expectationValue);
1478 expectationPaths.push(newExpectationPath);
1479 }
1480
1481 // remember that the current objects are already compared
1482 if (actualObject && expectationObject) {
1483 compared[combinedPath] = true;
1484 }
1485
1486 // End of cyclic logic
1487
1488 // neither actualValue nor expectationValue is a cycle
1489 // continue with next level
1490 return deepEqual(
1491 actualValue,
1492 expectationValue,
1493 newActualPath,
1494 newExpectationPath
1495 );
1496 });
1497 })(actual, expectation, "$1", "$2");
1498}
1499
1500deepEqualCyclic.use = function(match) {
1501 return function(a, b) {
1502 return deepEqualCyclic(a, b, match);
1503 };
1504};
1505
1506var deepEqual = deepEqualCyclic;
1507
1508var lodash = createCommonjsModule(function (module, exports) {
1509(function() {
1510
1511 /** Used as a safe reference for `undefined` in pre-ES5 environments. */
1512 var undefined;
1513
1514 /** Used as the semantic version number. */
1515 var VERSION = '4.17.11';
1516
1517 /** Used as the size to enable large array optimizations. */
1518 var LARGE_ARRAY_SIZE = 200;
1519
1520 /** Error message constants. */
1521 var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
1522 FUNC_ERROR_TEXT = 'Expected a function';
1523
1524 /** Used to stand-in for `undefined` hash values. */
1525 var HASH_UNDEFINED = '__lodash_hash_undefined__';
1526
1527 /** Used as the maximum memoize cache size. */
1528 var MAX_MEMOIZE_SIZE = 500;
1529
1530 /** Used as the internal argument placeholder. */
1531 var PLACEHOLDER = '__lodash_placeholder__';
1532
1533 /** Used to compose bitmasks for cloning. */
1534 var CLONE_DEEP_FLAG = 1,
1535 CLONE_FLAT_FLAG = 2,
1536 CLONE_SYMBOLS_FLAG = 4;
1537
1538 /** Used to compose bitmasks for value comparisons. */
1539 var COMPARE_PARTIAL_FLAG = 1,
1540 COMPARE_UNORDERED_FLAG = 2;
1541
1542 /** Used to compose bitmasks for function metadata. */
1543 var WRAP_BIND_FLAG = 1,
1544 WRAP_BIND_KEY_FLAG = 2,
1545 WRAP_CURRY_BOUND_FLAG = 4,
1546 WRAP_CURRY_FLAG = 8,
1547 WRAP_CURRY_RIGHT_FLAG = 16,
1548 WRAP_PARTIAL_FLAG = 32,
1549 WRAP_PARTIAL_RIGHT_FLAG = 64,
1550 WRAP_ARY_FLAG = 128,
1551 WRAP_REARG_FLAG = 256,
1552 WRAP_FLIP_FLAG = 512;
1553
1554 /** Used as default options for `_.truncate`. */
1555 var DEFAULT_TRUNC_LENGTH = 30,
1556 DEFAULT_TRUNC_OMISSION = '...';
1557
1558 /** Used to detect hot functions by number of calls within a span of milliseconds. */
1559 var HOT_COUNT = 800,
1560 HOT_SPAN = 16;
1561
1562 /** Used to indicate the type of lazy iteratees. */
1563 var LAZY_FILTER_FLAG = 1,
1564 LAZY_MAP_FLAG = 2,
1565 LAZY_WHILE_FLAG = 3;
1566
1567 /** Used as references for various `Number` constants. */
1568 var INFINITY = 1 / 0,
1569 MAX_SAFE_INTEGER = 9007199254740991,
1570 MAX_INTEGER = 1.7976931348623157e+308,
1571 NAN = 0 / 0;
1572
1573 /** Used as references for the maximum length and index of an array. */
1574 var MAX_ARRAY_LENGTH = 4294967295,
1575 MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
1576 HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
1577
1578 /** Used to associate wrap methods with their bit flags. */
1579 var wrapFlags = [
1580 ['ary', WRAP_ARY_FLAG],
1581 ['bind', WRAP_BIND_FLAG],
1582 ['bindKey', WRAP_BIND_KEY_FLAG],
1583 ['curry', WRAP_CURRY_FLAG],
1584 ['curryRight', WRAP_CURRY_RIGHT_FLAG],
1585 ['flip', WRAP_FLIP_FLAG],
1586 ['partial', WRAP_PARTIAL_FLAG],
1587 ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
1588 ['rearg', WRAP_REARG_FLAG]
1589 ];
1590
1591 /** `Object#toString` result references. */
1592 var argsTag = '[object Arguments]',
1593 arrayTag = '[object Array]',
1594 asyncTag = '[object AsyncFunction]',
1595 boolTag = '[object Boolean]',
1596 dateTag = '[object Date]',
1597 domExcTag = '[object DOMException]',
1598 errorTag = '[object Error]',
1599 funcTag = '[object Function]',
1600 genTag = '[object GeneratorFunction]',
1601 mapTag = '[object Map]',
1602 numberTag = '[object Number]',
1603 nullTag = '[object Null]',
1604 objectTag = '[object Object]',
1605 promiseTag = '[object Promise]',
1606 proxyTag = '[object Proxy]',
1607 regexpTag = '[object RegExp]',
1608 setTag = '[object Set]',
1609 stringTag = '[object String]',
1610 symbolTag = '[object Symbol]',
1611 undefinedTag = '[object Undefined]',
1612 weakMapTag = '[object WeakMap]',
1613 weakSetTag = '[object WeakSet]';
1614
1615 var arrayBufferTag = '[object ArrayBuffer]',
1616 dataViewTag = '[object DataView]',
1617 float32Tag = '[object Float32Array]',
1618 float64Tag = '[object Float64Array]',
1619 int8Tag = '[object Int8Array]',
1620 int16Tag = '[object Int16Array]',
1621 int32Tag = '[object Int32Array]',
1622 uint8Tag = '[object Uint8Array]',
1623 uint8ClampedTag = '[object Uint8ClampedArray]',
1624 uint16Tag = '[object Uint16Array]',
1625 uint32Tag = '[object Uint32Array]';
1626
1627 /** Used to match empty string literals in compiled template source. */
1628 var reEmptyStringLeading = /\b__p \+= '';/g,
1629 reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
1630 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
1631
1632 /** Used to match HTML entities and HTML characters. */
1633 var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
1634 reUnescapedHtml = /[&<>"']/g,
1635 reHasEscapedHtml = RegExp(reEscapedHtml.source),
1636 reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
1637
1638 /** Used to match template delimiters. */
1639 var reEscape = /<%-([\s\S]+?)%>/g,
1640 reEvaluate = /<%([\s\S]+?)%>/g,
1641 reInterpolate = /<%=([\s\S]+?)%>/g;
1642
1643 /** Used to match property names within property paths. */
1644 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1645 reIsPlainProp = /^\w*$/,
1646 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1647
1648 /**
1649 * Used to match `RegExp`
1650 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1651 */
1652 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
1653 reHasRegExpChar = RegExp(reRegExpChar.source);
1654
1655 /** Used to match leading and trailing whitespace. */
1656 var reTrim = /^\s+|\s+$/g,
1657 reTrimStart = /^\s+/,
1658 reTrimEnd = /\s+$/;
1659
1660 /** Used to match wrap detail comments. */
1661 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
1662 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
1663 reSplitDetails = /,? & /;
1664
1665 /** Used to match words composed of alphanumeric characters. */
1666 var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
1667
1668 /** Used to match backslashes in property paths. */
1669 var reEscapeChar = /\\(\\)?/g;
1670
1671 /**
1672 * Used to match
1673 * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
1674 */
1675 var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
1676
1677 /** Used to match `RegExp` flags from their coerced string values. */
1678 var reFlags = /\w*$/;
1679
1680 /** Used to detect bad signed hexadecimal string values. */
1681 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1682
1683 /** Used to detect binary string values. */
1684 var reIsBinary = /^0b[01]+$/i;
1685
1686 /** Used to detect host constructors (Safari). */
1687 var reIsHostCtor = /^\[object .+?Constructor\]$/;
1688
1689 /** Used to detect octal string values. */
1690 var reIsOctal = /^0o[0-7]+$/i;
1691
1692 /** Used to detect unsigned integer values. */
1693 var reIsUint = /^(?:0|[1-9]\d*)$/;
1694
1695 /** Used to match Latin Unicode letters (excluding mathematical operators). */
1696 var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
1697
1698 /** Used to ensure capturing order of template delimiters. */
1699 var reNoMatch = /($^)/;
1700
1701 /** Used to match unescaped characters in compiled string literals. */
1702 var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
1703
1704 /** Used to compose unicode character classes. */
1705 var rsAstralRange = '\\ud800-\\udfff',
1706 rsComboMarksRange = '\\u0300-\\u036f',
1707 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
1708 rsComboSymbolsRange = '\\u20d0-\\u20ff',
1709 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
1710 rsDingbatRange = '\\u2700-\\u27bf',
1711 rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
1712 rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
1713 rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
1714 rsPunctuationRange = '\\u2000-\\u206f',
1715 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',
1716 rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
1717 rsVarRange = '\\ufe0e\\ufe0f',
1718 rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
1719
1720 /** Used to compose unicode capture groups. */
1721 var rsApos = "['\u2019]",
1722 rsAstral = '[' + rsAstralRange + ']',
1723 rsBreak = '[' + rsBreakRange + ']',
1724 rsCombo = '[' + rsComboRange + ']',
1725 rsDigits = '\\d+',
1726 rsDingbat = '[' + rsDingbatRange + ']',
1727 rsLower = '[' + rsLowerRange + ']',
1728 rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
1729 rsFitz = '\\ud83c[\\udffb-\\udfff]',
1730 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
1731 rsNonAstral = '[^' + rsAstralRange + ']',
1732 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
1733 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
1734 rsUpper = '[' + rsUpperRange + ']',
1735 rsZWJ = '\\u200d';
1736
1737 /** Used to compose unicode regexes. */
1738 var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
1739 rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
1740 rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
1741 rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
1742 reOptMod = rsModifier + '?',
1743 rsOptVar = '[' + rsVarRange + ']?',
1744 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
1745 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
1746 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
1747 rsSeq = rsOptVar + reOptMod + rsOptJoin,
1748 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
1749 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
1750
1751 /** Used to match apostrophes. */
1752 var reApos = RegExp(rsApos, 'g');
1753
1754 /**
1755 * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
1756 * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
1757 */
1758 var reComboMark = RegExp(rsCombo, 'g');
1759
1760 /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
1761 var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
1762
1763 /** Used to match complex or compound words. */
1764 var reUnicodeWord = RegExp([
1765 rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
1766 rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
1767 rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
1768 rsUpper + '+' + rsOptContrUpper,
1769 rsOrdUpper,
1770 rsOrdLower,
1771 rsDigits,
1772 rsEmoji
1773 ].join('|'), 'g');
1774
1775 /** 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/). */
1776 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
1777
1778 /** Used to detect strings that need a more robust regexp to match words. */
1779 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 ]/;
1780
1781 /** Used to assign default `context` object properties. */
1782 var contextProps = [
1783 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
1784 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
1785 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
1786 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
1787 '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
1788 ];
1789
1790 /** Used to make template sourceURLs easier to identify. */
1791 var templateCounter = -1;
1792
1793 /** Used to identify `toStringTag` values of typed arrays. */
1794 var typedArrayTags = {};
1795 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1796 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1797 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1798 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1799 typedArrayTags[uint32Tag] = true;
1800 typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
1801 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1802 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
1803 typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1804 typedArrayTags[mapTag] = typedArrayTags[numberTag] =
1805 typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
1806 typedArrayTags[setTag] = typedArrayTags[stringTag] =
1807 typedArrayTags[weakMapTag] = false;
1808
1809 /** Used to identify `toStringTag` values supported by `_.clone`. */
1810 var cloneableTags = {};
1811 cloneableTags[argsTag] = cloneableTags[arrayTag] =
1812 cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1813 cloneableTags[boolTag] = cloneableTags[dateTag] =
1814 cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1815 cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1816 cloneableTags[int32Tag] = cloneableTags[mapTag] =
1817 cloneableTags[numberTag] = cloneableTags[objectTag] =
1818 cloneableTags[regexpTag] = cloneableTags[setTag] =
1819 cloneableTags[stringTag] = cloneableTags[symbolTag] =
1820 cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1821 cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1822 cloneableTags[errorTag] = cloneableTags[funcTag] =
1823 cloneableTags[weakMapTag] = false;
1824
1825 /** Used to map Latin Unicode letters to basic Latin letters. */
1826 var deburredLetters = {
1827 // Latin-1 Supplement block.
1828 '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
1829 '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
1830 '\xc7': 'C', '\xe7': 'c',
1831 '\xd0': 'D', '\xf0': 'd',
1832 '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
1833 '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
1834 '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
1835 '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
1836 '\xd1': 'N', '\xf1': 'n',
1837 '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
1838 '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
1839 '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
1840 '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
1841 '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
1842 '\xc6': 'Ae', '\xe6': 'ae',
1843 '\xde': 'Th', '\xfe': 'th',
1844 '\xdf': 'ss',
1845 // Latin Extended-A block.
1846 '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
1847 '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
1848 '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
1849 '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
1850 '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
1851 '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
1852 '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
1853 '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
1854 '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
1855 '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
1856 '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
1857 '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
1858 '\u0134': 'J', '\u0135': 'j',
1859 '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
1860 '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
1861 '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
1862 '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
1863 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
1864 '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
1865 '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
1866 '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
1867 '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
1868 '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
1869 '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
1870 '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
1871 '\u0163': 't', '\u0165': 't', '\u0167': 't',
1872 '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
1873 '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
1874 '\u0174': 'W', '\u0175': 'w',
1875 '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
1876 '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
1877 '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
1878 '\u0132': 'IJ', '\u0133': 'ij',
1879 '\u0152': 'Oe', '\u0153': 'oe',
1880 '\u0149': "'n", '\u017f': 's'
1881 };
1882
1883 /** Used to map characters to HTML entities. */
1884 var htmlEscapes = {
1885 '&': '&amp;',
1886 '<': '&lt;',
1887 '>': '&gt;',
1888 '"': '&quot;',
1889 "'": '&#39;'
1890 };
1891
1892 /** Used to map HTML entities to characters. */
1893 var htmlUnescapes = {
1894 '&amp;': '&',
1895 '&lt;': '<',
1896 '&gt;': '>',
1897 '&quot;': '"',
1898 '&#39;': "'"
1899 };
1900
1901 /** Used to escape characters for inclusion in compiled string literals. */
1902 var stringEscapes = {
1903 '\\': '\\',
1904 "'": "'",
1905 '\n': 'n',
1906 '\r': 'r',
1907 '\u2028': 'u2028',
1908 '\u2029': 'u2029'
1909 };
1910
1911 /** Built-in method references without a dependency on `root`. */
1912 var freeParseFloat = parseFloat,
1913 freeParseInt = parseInt;
1914
1915 /** Detect free variable `global` from Node.js. */
1916 var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
1917
1918 /** Detect free variable `self`. */
1919 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
1920
1921 /** Used as a reference to the global object. */
1922 var root = freeGlobal || freeSelf || Function('return this')();
1923
1924 /** Detect free variable `exports`. */
1925 var freeExports = exports && !exports.nodeType && exports;
1926
1927 /** Detect free variable `module`. */
1928 var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1929
1930 /** Detect the popular CommonJS extension `module.exports`. */
1931 var moduleExports = freeModule && freeModule.exports === freeExports;
1932
1933 /** Detect free variable `process` from Node.js. */
1934 var freeProcess = moduleExports && freeGlobal.process;
1935
1936 /** Used to access faster Node.js helpers. */
1937 var nodeUtil = (function() {
1938 try {
1939 // Use `util.types` for Node.js 10+.
1940 var types = freeModule && freeModule.require && freeModule.require('util').types;
1941
1942 if (types) {
1943 return types;
1944 }
1945
1946 // Legacy `process.binding('util')` for Node.js < 10.
1947 return freeProcess && freeProcess.binding && freeProcess.binding('util');
1948 } catch (e) {}
1949 }());
1950
1951 /* Node.js helper references. */
1952 var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
1953 nodeIsDate = nodeUtil && nodeUtil.isDate,
1954 nodeIsMap = nodeUtil && nodeUtil.isMap,
1955 nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
1956 nodeIsSet = nodeUtil && nodeUtil.isSet,
1957 nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1958
1959 /*--------------------------------------------------------------------------*/
1960
1961 /**
1962 * A faster alternative to `Function#apply`, this function invokes `func`
1963 * with the `this` binding of `thisArg` and the arguments of `args`.
1964 *
1965 * @private
1966 * @param {Function} func The function to invoke.
1967 * @param {*} thisArg The `this` binding of `func`.
1968 * @param {Array} args The arguments to invoke `func` with.
1969 * @returns {*} Returns the result of `func`.
1970 */
1971 function apply(func, thisArg, args) {
1972 switch (args.length) {
1973 case 0: return func.call(thisArg);
1974 case 1: return func.call(thisArg, args[0]);
1975 case 2: return func.call(thisArg, args[0], args[1]);
1976 case 3: return func.call(thisArg, args[0], args[1], args[2]);
1977 }
1978 return func.apply(thisArg, args);
1979 }
1980
1981 /**
1982 * A specialized version of `baseAggregator` for arrays.
1983 *
1984 * @private
1985 * @param {Array} [array] The array to iterate over.
1986 * @param {Function} setter The function to set `accumulator` values.
1987 * @param {Function} iteratee The iteratee to transform keys.
1988 * @param {Object} accumulator The initial aggregated object.
1989 * @returns {Function} Returns `accumulator`.
1990 */
1991 function arrayAggregator(array, setter, iteratee, accumulator) {
1992 var index = -1,
1993 length = array == null ? 0 : array.length;
1994
1995 while (++index < length) {
1996 var value = array[index];
1997 setter(accumulator, value, iteratee(value), array);
1998 }
1999 return accumulator;
2000 }
2001
2002 /**
2003 * A specialized version of `_.forEach` for arrays without support for
2004 * iteratee shorthands.
2005 *
2006 * @private
2007 * @param {Array} [array] The array to iterate over.
2008 * @param {Function} iteratee The function invoked per iteration.
2009 * @returns {Array} Returns `array`.
2010 */
2011 function arrayEach(array, iteratee) {
2012 var index = -1,
2013 length = array == null ? 0 : array.length;
2014
2015 while (++index < length) {
2016 if (iteratee(array[index], index, array) === false) {
2017 break;
2018 }
2019 }
2020 return array;
2021 }
2022
2023 /**
2024 * A specialized version of `_.forEachRight` for arrays without support for
2025 * iteratee shorthands.
2026 *
2027 * @private
2028 * @param {Array} [array] The array to iterate over.
2029 * @param {Function} iteratee The function invoked per iteration.
2030 * @returns {Array} Returns `array`.
2031 */
2032 function arrayEachRight(array, iteratee) {
2033 var length = array == null ? 0 : array.length;
2034
2035 while (length--) {
2036 if (iteratee(array[length], length, array) === false) {
2037 break;
2038 }
2039 }
2040 return array;
2041 }
2042
2043 /**
2044 * A specialized version of `_.every` for arrays without support for
2045 * iteratee shorthands.
2046 *
2047 * @private
2048 * @param {Array} [array] The array to iterate over.
2049 * @param {Function} predicate The function invoked per iteration.
2050 * @returns {boolean} Returns `true` if all elements pass the predicate check,
2051 * else `false`.
2052 */
2053 function arrayEvery(array, predicate) {
2054 var index = -1,
2055 length = array == null ? 0 : array.length;
2056
2057 while (++index < length) {
2058 if (!predicate(array[index], index, array)) {
2059 return false;
2060 }
2061 }
2062 return true;
2063 }
2064
2065 /**
2066 * A specialized version of `_.filter` for arrays without support for
2067 * iteratee shorthands.
2068 *
2069 * @private
2070 * @param {Array} [array] The array to iterate over.
2071 * @param {Function} predicate The function invoked per iteration.
2072 * @returns {Array} Returns the new filtered array.
2073 */
2074 function arrayFilter(array, predicate) {
2075 var index = -1,
2076 length = array == null ? 0 : array.length,
2077 resIndex = 0,
2078 result = [];
2079
2080 while (++index < length) {
2081 var value = array[index];
2082 if (predicate(value, index, array)) {
2083 result[resIndex++] = value;
2084 }
2085 }
2086 return result;
2087 }
2088
2089 /**
2090 * A specialized version of `_.includes` for arrays without support for
2091 * specifying an index to search from.
2092 *
2093 * @private
2094 * @param {Array} [array] The array to inspect.
2095 * @param {*} target The value to search for.
2096 * @returns {boolean} Returns `true` if `target` is found, else `false`.
2097 */
2098 function arrayIncludes(array, value) {
2099 var length = array == null ? 0 : array.length;
2100 return !!length && baseIndexOf(array, value, 0) > -1;
2101 }
2102
2103 /**
2104 * This function is like `arrayIncludes` except that it accepts a comparator.
2105 *
2106 * @private
2107 * @param {Array} [array] The array to inspect.
2108 * @param {*} target The value to search for.
2109 * @param {Function} comparator The comparator invoked per element.
2110 * @returns {boolean} Returns `true` if `target` is found, else `false`.
2111 */
2112 function arrayIncludesWith(array, value, comparator) {
2113 var index = -1,
2114 length = array == null ? 0 : array.length;
2115
2116 while (++index < length) {
2117 if (comparator(value, array[index])) {
2118 return true;
2119 }
2120 }
2121 return false;
2122 }
2123
2124 /**
2125 * A specialized version of `_.map` for arrays without support for iteratee
2126 * shorthands.
2127 *
2128 * @private
2129 * @param {Array} [array] The array to iterate over.
2130 * @param {Function} iteratee The function invoked per iteration.
2131 * @returns {Array} Returns the new mapped array.
2132 */
2133 function arrayMap(array, iteratee) {
2134 var index = -1,
2135 length = array == null ? 0 : array.length,
2136 result = Array(length);
2137
2138 while (++index < length) {
2139 result[index] = iteratee(array[index], index, array);
2140 }
2141 return result;
2142 }
2143
2144 /**
2145 * Appends the elements of `values` to `array`.
2146 *
2147 * @private
2148 * @param {Array} array The array to modify.
2149 * @param {Array} values The values to append.
2150 * @returns {Array} Returns `array`.
2151 */
2152 function arrayPush(array, values) {
2153 var index = -1,
2154 length = values.length,
2155 offset = array.length;
2156
2157 while (++index < length) {
2158 array[offset + index] = values[index];
2159 }
2160 return array;
2161 }
2162
2163 /**
2164 * A specialized version of `_.reduce` for arrays without support for
2165 * iteratee shorthands.
2166 *
2167 * @private
2168 * @param {Array} [array] The array to iterate over.
2169 * @param {Function} iteratee The function invoked per iteration.
2170 * @param {*} [accumulator] The initial value.
2171 * @param {boolean} [initAccum] Specify using the first element of `array` as
2172 * the initial value.
2173 * @returns {*} Returns the accumulated value.
2174 */
2175 function arrayReduce(array, iteratee, accumulator, initAccum) {
2176 var index = -1,
2177 length = array == null ? 0 : array.length;
2178
2179 if (initAccum && length) {
2180 accumulator = array[++index];
2181 }
2182 while (++index < length) {
2183 accumulator = iteratee(accumulator, array[index], index, array);
2184 }
2185 return accumulator;
2186 }
2187
2188 /**
2189 * A specialized version of `_.reduceRight` for arrays without support for
2190 * iteratee shorthands.
2191 *
2192 * @private
2193 * @param {Array} [array] The array to iterate over.
2194 * @param {Function} iteratee The function invoked per iteration.
2195 * @param {*} [accumulator] The initial value.
2196 * @param {boolean} [initAccum] Specify using the last element of `array` as
2197 * the initial value.
2198 * @returns {*} Returns the accumulated value.
2199 */
2200 function arrayReduceRight(array, iteratee, accumulator, initAccum) {
2201 var length = array == null ? 0 : array.length;
2202 if (initAccum && length) {
2203 accumulator = array[--length];
2204 }
2205 while (length--) {
2206 accumulator = iteratee(accumulator, array[length], length, array);
2207 }
2208 return accumulator;
2209 }
2210
2211 /**
2212 * A specialized version of `_.some` for arrays without support for iteratee
2213 * shorthands.
2214 *
2215 * @private
2216 * @param {Array} [array] The array to iterate over.
2217 * @param {Function} predicate The function invoked per iteration.
2218 * @returns {boolean} Returns `true` if any element passes the predicate check,
2219 * else `false`.
2220 */
2221 function arraySome(array, predicate) {
2222 var index = -1,
2223 length = array == null ? 0 : array.length;
2224
2225 while (++index < length) {
2226 if (predicate(array[index], index, array)) {
2227 return true;
2228 }
2229 }
2230 return false;
2231 }
2232
2233 /**
2234 * Gets the size of an ASCII `string`.
2235 *
2236 * @private
2237 * @param {string} string The string inspect.
2238 * @returns {number} Returns the string size.
2239 */
2240 var asciiSize = baseProperty('length');
2241
2242 /**
2243 * Converts an ASCII `string` to an array.
2244 *
2245 * @private
2246 * @param {string} string The string to convert.
2247 * @returns {Array} Returns the converted array.
2248 */
2249 function asciiToArray(string) {
2250 return string.split('');
2251 }
2252
2253 /**
2254 * Splits an ASCII `string` into an array of its words.
2255 *
2256 * @private
2257 * @param {string} The string to inspect.
2258 * @returns {Array} Returns the words of `string`.
2259 */
2260 function asciiWords(string) {
2261 return string.match(reAsciiWord) || [];
2262 }
2263
2264 /**
2265 * The base implementation of methods like `_.findKey` and `_.findLastKey`,
2266 * without support for iteratee shorthands, which iterates over `collection`
2267 * using `eachFunc`.
2268 *
2269 * @private
2270 * @param {Array|Object} collection The collection to inspect.
2271 * @param {Function} predicate The function invoked per iteration.
2272 * @param {Function} eachFunc The function to iterate over `collection`.
2273 * @returns {*} Returns the found element or its key, else `undefined`.
2274 */
2275 function baseFindKey(collection, predicate, eachFunc) {
2276 var result;
2277 eachFunc(collection, function(value, key, collection) {
2278 if (predicate(value, key, collection)) {
2279 result = key;
2280 return false;
2281 }
2282 });
2283 return result;
2284 }
2285
2286 /**
2287 * The base implementation of `_.findIndex` and `_.findLastIndex` without
2288 * support for iteratee shorthands.
2289 *
2290 * @private
2291 * @param {Array} array The array to inspect.
2292 * @param {Function} predicate The function invoked per iteration.
2293 * @param {number} fromIndex The index to search from.
2294 * @param {boolean} [fromRight] Specify iterating from right to left.
2295 * @returns {number} Returns the index of the matched value, else `-1`.
2296 */
2297 function baseFindIndex(array, predicate, fromIndex, fromRight) {
2298 var length = array.length,
2299 index = fromIndex + (fromRight ? 1 : -1);
2300
2301 while ((fromRight ? index-- : ++index < length)) {
2302 if (predicate(array[index], index, array)) {
2303 return index;
2304 }
2305 }
2306 return -1;
2307 }
2308
2309 /**
2310 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
2311 *
2312 * @private
2313 * @param {Array} array The array to inspect.
2314 * @param {*} value The value to search for.
2315 * @param {number} fromIndex The index to search from.
2316 * @returns {number} Returns the index of the matched value, else `-1`.
2317 */
2318 function baseIndexOf(array, value, fromIndex) {
2319 return value === value
2320 ? strictIndexOf(array, value, fromIndex)
2321 : baseFindIndex(array, baseIsNaN, fromIndex);
2322 }
2323
2324 /**
2325 * This function is like `baseIndexOf` except that it accepts a comparator.
2326 *
2327 * @private
2328 * @param {Array} array The array to inspect.
2329 * @param {*} value The value to search for.
2330 * @param {number} fromIndex The index to search from.
2331 * @param {Function} comparator The comparator invoked per element.
2332 * @returns {number} Returns the index of the matched value, else `-1`.
2333 */
2334 function baseIndexOfWith(array, value, fromIndex, comparator) {
2335 var index = fromIndex - 1,
2336 length = array.length;
2337
2338 while (++index < length) {
2339 if (comparator(array[index], value)) {
2340 return index;
2341 }
2342 }
2343 return -1;
2344 }
2345
2346 /**
2347 * The base implementation of `_.isNaN` without support for number objects.
2348 *
2349 * @private
2350 * @param {*} value The value to check.
2351 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
2352 */
2353 function baseIsNaN(value) {
2354 return value !== value;
2355 }
2356
2357 /**
2358 * The base implementation of `_.mean` and `_.meanBy` without support for
2359 * iteratee shorthands.
2360 *
2361 * @private
2362 * @param {Array} array The array to iterate over.
2363 * @param {Function} iteratee The function invoked per iteration.
2364 * @returns {number} Returns the mean.
2365 */
2366 function baseMean(array, iteratee) {
2367 var length = array == null ? 0 : array.length;
2368 return length ? (baseSum(array, iteratee) / length) : NAN;
2369 }
2370
2371 /**
2372 * The base implementation of `_.property` without support for deep paths.
2373 *
2374 * @private
2375 * @param {string} key The key of the property to get.
2376 * @returns {Function} Returns the new accessor function.
2377 */
2378 function baseProperty(key) {
2379 return function(object) {
2380 return object == null ? undefined : object[key];
2381 };
2382 }
2383
2384 /**
2385 * The base implementation of `_.propertyOf` without support for deep paths.
2386 *
2387 * @private
2388 * @param {Object} object The object to query.
2389 * @returns {Function} Returns the new accessor function.
2390 */
2391 function basePropertyOf(object) {
2392 return function(key) {
2393 return object == null ? undefined : object[key];
2394 };
2395 }
2396
2397 /**
2398 * The base implementation of `_.reduce` and `_.reduceRight`, without support
2399 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
2400 *
2401 * @private
2402 * @param {Array|Object} collection The collection to iterate over.
2403 * @param {Function} iteratee The function invoked per iteration.
2404 * @param {*} accumulator The initial value.
2405 * @param {boolean} initAccum Specify using the first or last element of
2406 * `collection` as the initial value.
2407 * @param {Function} eachFunc The function to iterate over `collection`.
2408 * @returns {*} Returns the accumulated value.
2409 */
2410 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
2411 eachFunc(collection, function(value, index, collection) {
2412 accumulator = initAccum
2413 ? (initAccum = false, value)
2414 : iteratee(accumulator, value, index, collection);
2415 });
2416 return accumulator;
2417 }
2418
2419 /**
2420 * The base implementation of `_.sortBy` which uses `comparer` to define the
2421 * sort order of `array` and replaces criteria objects with their corresponding
2422 * values.
2423 *
2424 * @private
2425 * @param {Array} array The array to sort.
2426 * @param {Function} comparer The function to define sort order.
2427 * @returns {Array} Returns `array`.
2428 */
2429 function baseSortBy(array, comparer) {
2430 var length = array.length;
2431
2432 array.sort(comparer);
2433 while (length--) {
2434 array[length] = array[length].value;
2435 }
2436 return array;
2437 }
2438
2439 /**
2440 * The base implementation of `_.sum` and `_.sumBy` without support for
2441 * iteratee shorthands.
2442 *
2443 * @private
2444 * @param {Array} array The array to iterate over.
2445 * @param {Function} iteratee The function invoked per iteration.
2446 * @returns {number} Returns the sum.
2447 */
2448 function baseSum(array, iteratee) {
2449 var result,
2450 index = -1,
2451 length = array.length;
2452
2453 while (++index < length) {
2454 var current = iteratee(array[index]);
2455 if (current !== undefined) {
2456 result = result === undefined ? current : (result + current);
2457 }
2458 }
2459 return result;
2460 }
2461
2462 /**
2463 * The base implementation of `_.times` without support for iteratee shorthands
2464 * or max array length checks.
2465 *
2466 * @private
2467 * @param {number} n The number of times to invoke `iteratee`.
2468 * @param {Function} iteratee The function invoked per iteration.
2469 * @returns {Array} Returns the array of results.
2470 */
2471 function baseTimes(n, iteratee) {
2472 var index = -1,
2473 result = Array(n);
2474
2475 while (++index < n) {
2476 result[index] = iteratee(index);
2477 }
2478 return result;
2479 }
2480
2481 /**
2482 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
2483 * of key-value pairs for `object` corresponding to the property names of `props`.
2484 *
2485 * @private
2486 * @param {Object} object The object to query.
2487 * @param {Array} props The property names to get values for.
2488 * @returns {Object} Returns the key-value pairs.
2489 */
2490 function baseToPairs(object, props) {
2491 return arrayMap(props, function(key) {
2492 return [key, object[key]];
2493 });
2494 }
2495
2496 /**
2497 * The base implementation of `_.unary` without support for storing metadata.
2498 *
2499 * @private
2500 * @param {Function} func The function to cap arguments for.
2501 * @returns {Function} Returns the new capped function.
2502 */
2503 function baseUnary(func) {
2504 return function(value) {
2505 return func(value);
2506 };
2507 }
2508
2509 /**
2510 * The base implementation of `_.values` and `_.valuesIn` which creates an
2511 * array of `object` property values corresponding to the property names
2512 * of `props`.
2513 *
2514 * @private
2515 * @param {Object} object The object to query.
2516 * @param {Array} props The property names to get values for.
2517 * @returns {Object} Returns the array of property values.
2518 */
2519 function baseValues(object, props) {
2520 return arrayMap(props, function(key) {
2521 return object[key];
2522 });
2523 }
2524
2525 /**
2526 * Checks if a `cache` value for `key` exists.
2527 *
2528 * @private
2529 * @param {Object} cache The cache to query.
2530 * @param {string} key The key of the entry to check.
2531 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2532 */
2533 function cacheHas(cache, key) {
2534 return cache.has(key);
2535 }
2536
2537 /**
2538 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
2539 * that is not found in the character symbols.
2540 *
2541 * @private
2542 * @param {Array} strSymbols The string symbols to inspect.
2543 * @param {Array} chrSymbols The character symbols to find.
2544 * @returns {number} Returns the index of the first unmatched string symbol.
2545 */
2546 function charsStartIndex(strSymbols, chrSymbols) {
2547 var index = -1,
2548 length = strSymbols.length;
2549
2550 while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
2551 return index;
2552 }
2553
2554 /**
2555 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
2556 * that is not found in the character symbols.
2557 *
2558 * @private
2559 * @param {Array} strSymbols The string symbols to inspect.
2560 * @param {Array} chrSymbols The character symbols to find.
2561 * @returns {number} Returns the index of the last unmatched string symbol.
2562 */
2563 function charsEndIndex(strSymbols, chrSymbols) {
2564 var index = strSymbols.length;
2565
2566 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
2567 return index;
2568 }
2569
2570 /**
2571 * Gets the number of `placeholder` occurrences in `array`.
2572 *
2573 * @private
2574 * @param {Array} array The array to inspect.
2575 * @param {*} placeholder The placeholder to search for.
2576 * @returns {number} Returns the placeholder count.
2577 */
2578 function countHolders(array, placeholder) {
2579 var length = array.length,
2580 result = 0;
2581
2582 while (length--) {
2583 if (array[length] === placeholder) {
2584 ++result;
2585 }
2586 }
2587 return result;
2588 }
2589
2590 /**
2591 * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2592 * letters to basic Latin letters.
2593 *
2594 * @private
2595 * @param {string} letter The matched letter to deburr.
2596 * @returns {string} Returns the deburred letter.
2597 */
2598 var deburrLetter = basePropertyOf(deburredLetters);
2599
2600 /**
2601 * Used by `_.escape` to convert characters to HTML entities.
2602 *
2603 * @private
2604 * @param {string} chr The matched character to escape.
2605 * @returns {string} Returns the escaped character.
2606 */
2607 var escapeHtmlChar = basePropertyOf(htmlEscapes);
2608
2609 /**
2610 * Used by `_.template` to escape characters for inclusion in compiled string literals.
2611 *
2612 * @private
2613 * @param {string} chr The matched character to escape.
2614 * @returns {string} Returns the escaped character.
2615 */
2616 function escapeStringChar(chr) {
2617 return '\\' + stringEscapes[chr];
2618 }
2619
2620 /**
2621 * Gets the value at `key` of `object`.
2622 *
2623 * @private
2624 * @param {Object} [object] The object to query.
2625 * @param {string} key The key of the property to get.
2626 * @returns {*} Returns the property value.
2627 */
2628 function getValue(object, key) {
2629 return object == null ? undefined : object[key];
2630 }
2631
2632 /**
2633 * Checks if `string` contains Unicode symbols.
2634 *
2635 * @private
2636 * @param {string} string The string to inspect.
2637 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
2638 */
2639 function hasUnicode(string) {
2640 return reHasUnicode.test(string);
2641 }
2642
2643 /**
2644 * Checks if `string` contains a word composed of Unicode symbols.
2645 *
2646 * @private
2647 * @param {string} string The string to inspect.
2648 * @returns {boolean} Returns `true` if a word is found, else `false`.
2649 */
2650 function hasUnicodeWord(string) {
2651 return reHasUnicodeWord.test(string);
2652 }
2653
2654 /**
2655 * Converts `iterator` to an array.
2656 *
2657 * @private
2658 * @param {Object} iterator The iterator to convert.
2659 * @returns {Array} Returns the converted array.
2660 */
2661 function iteratorToArray(iterator) {
2662 var data,
2663 result = [];
2664
2665 while (!(data = iterator.next()).done) {
2666 result.push(data.value);
2667 }
2668 return result;
2669 }
2670
2671 /**
2672 * Converts `map` to its key-value pairs.
2673 *
2674 * @private
2675 * @param {Object} map The map to convert.
2676 * @returns {Array} Returns the key-value pairs.
2677 */
2678 function mapToArray(map) {
2679 var index = -1,
2680 result = Array(map.size);
2681
2682 map.forEach(function(value, key) {
2683 result[++index] = [key, value];
2684 });
2685 return result;
2686 }
2687
2688 /**
2689 * Creates a unary function that invokes `func` with its argument transformed.
2690 *
2691 * @private
2692 * @param {Function} func The function to wrap.
2693 * @param {Function} transform The argument transform.
2694 * @returns {Function} Returns the new function.
2695 */
2696 function overArg(func, transform) {
2697 return function(arg) {
2698 return func(transform(arg));
2699 };
2700 }
2701
2702 /**
2703 * Replaces all `placeholder` elements in `array` with an internal placeholder
2704 * and returns an array of their indexes.
2705 *
2706 * @private
2707 * @param {Array} array The array to modify.
2708 * @param {*} placeholder The placeholder to replace.
2709 * @returns {Array} Returns the new array of placeholder indexes.
2710 */
2711 function replaceHolders(array, placeholder) {
2712 var index = -1,
2713 length = array.length,
2714 resIndex = 0,
2715 result = [];
2716
2717 while (++index < length) {
2718 var value = array[index];
2719 if (value === placeholder || value === PLACEHOLDER) {
2720 array[index] = PLACEHOLDER;
2721 result[resIndex++] = index;
2722 }
2723 }
2724 return result;
2725 }
2726
2727 /**
2728 * Converts `set` to an array of its values.
2729 *
2730 * @private
2731 * @param {Object} set The set to convert.
2732 * @returns {Array} Returns the values.
2733 */
2734 function setToArray(set) {
2735 var index = -1,
2736 result = Array(set.size);
2737
2738 set.forEach(function(value) {
2739 result[++index] = value;
2740 });
2741 return result;
2742 }
2743
2744 /**
2745 * Converts `set` to its value-value pairs.
2746 *
2747 * @private
2748 * @param {Object} set The set to convert.
2749 * @returns {Array} Returns the value-value pairs.
2750 */
2751 function setToPairs(set) {
2752 var index = -1,
2753 result = Array(set.size);
2754
2755 set.forEach(function(value) {
2756 result[++index] = [value, value];
2757 });
2758 return result;
2759 }
2760
2761 /**
2762 * A specialized version of `_.indexOf` which performs strict equality
2763 * comparisons of values, i.e. `===`.
2764 *
2765 * @private
2766 * @param {Array} array The array to inspect.
2767 * @param {*} value The value to search for.
2768 * @param {number} fromIndex The index to search from.
2769 * @returns {number} Returns the index of the matched value, else `-1`.
2770 */
2771 function strictIndexOf(array, value, fromIndex) {
2772 var index = fromIndex - 1,
2773 length = array.length;
2774
2775 while (++index < length) {
2776 if (array[index] === value) {
2777 return index;
2778 }
2779 }
2780 return -1;
2781 }
2782
2783 /**
2784 * A specialized version of `_.lastIndexOf` which performs strict equality
2785 * comparisons of values, i.e. `===`.
2786 *
2787 * @private
2788 * @param {Array} array The array to inspect.
2789 * @param {*} value The value to search for.
2790 * @param {number} fromIndex The index to search from.
2791 * @returns {number} Returns the index of the matched value, else `-1`.
2792 */
2793 function strictLastIndexOf(array, value, fromIndex) {
2794 var index = fromIndex + 1;
2795 while (index--) {
2796 if (array[index] === value) {
2797 return index;
2798 }
2799 }
2800 return index;
2801 }
2802
2803 /**
2804 * Gets the number of symbols in `string`.
2805 *
2806 * @private
2807 * @param {string} string The string to inspect.
2808 * @returns {number} Returns the string size.
2809 */
2810 function stringSize(string) {
2811 return hasUnicode(string)
2812 ? unicodeSize(string)
2813 : asciiSize(string);
2814 }
2815
2816 /**
2817 * Converts `string` to an array.
2818 *
2819 * @private
2820 * @param {string} string The string to convert.
2821 * @returns {Array} Returns the converted array.
2822 */
2823 function stringToArray(string) {
2824 return hasUnicode(string)
2825 ? unicodeToArray(string)
2826 : asciiToArray(string);
2827 }
2828
2829 /**
2830 * Used by `_.unescape` to convert HTML entities to characters.
2831 *
2832 * @private
2833 * @param {string} chr The matched character to unescape.
2834 * @returns {string} Returns the unescaped character.
2835 */
2836 var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
2837
2838 /**
2839 * Gets the size of a Unicode `string`.
2840 *
2841 * @private
2842 * @param {string} string The string inspect.
2843 * @returns {number} Returns the string size.
2844 */
2845 function unicodeSize(string) {
2846 var result = reUnicode.lastIndex = 0;
2847 while (reUnicode.test(string)) {
2848 ++result;
2849 }
2850 return result;
2851 }
2852
2853 /**
2854 * Converts a Unicode `string` to an array.
2855 *
2856 * @private
2857 * @param {string} string The string to convert.
2858 * @returns {Array} Returns the converted array.
2859 */
2860 function unicodeToArray(string) {
2861 return string.match(reUnicode) || [];
2862 }
2863
2864 /**
2865 * Splits a Unicode `string` into an array of its words.
2866 *
2867 * @private
2868 * @param {string} The string to inspect.
2869 * @returns {Array} Returns the words of `string`.
2870 */
2871 function unicodeWords(string) {
2872 return string.match(reUnicodeWord) || [];
2873 }
2874
2875 /*--------------------------------------------------------------------------*/
2876
2877 /**
2878 * Create a new pristine `lodash` function using the `context` object.
2879 *
2880 * @static
2881 * @memberOf _
2882 * @since 1.1.0
2883 * @category Util
2884 * @param {Object} [context=root] The context object.
2885 * @returns {Function} Returns a new `lodash` function.
2886 * @example
2887 *
2888 * _.mixin({ 'foo': _.constant('foo') });
2889 *
2890 * var lodash = _.runInContext();
2891 * lodash.mixin({ 'bar': lodash.constant('bar') });
2892 *
2893 * _.isFunction(_.foo);
2894 * // => true
2895 * _.isFunction(_.bar);
2896 * // => false
2897 *
2898 * lodash.isFunction(lodash.foo);
2899 * // => false
2900 * lodash.isFunction(lodash.bar);
2901 * // => true
2902 *
2903 * // Create a suped-up `defer` in Node.js.
2904 * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
2905 */
2906 var runInContext = (function runInContext(context) {
2907 context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
2908
2909 /** Built-in constructor references. */
2910 var Array = context.Array,
2911 Date = context.Date,
2912 Error = context.Error,
2913 Function = context.Function,
2914 Math = context.Math,
2915 Object = context.Object,
2916 RegExp = context.RegExp,
2917 String = context.String,
2918 TypeError = context.TypeError;
2919
2920 /** Used for built-in method references. */
2921 var arrayProto = Array.prototype,
2922 funcProto = Function.prototype,
2923 objectProto = Object.prototype;
2924
2925 /** Used to detect overreaching core-js shims. */
2926 var coreJsData = context['__core-js_shared__'];
2927
2928 /** Used to resolve the decompiled source of functions. */
2929 var funcToString = funcProto.toString;
2930
2931 /** Used to check objects for own properties. */
2932 var hasOwnProperty = objectProto.hasOwnProperty;
2933
2934 /** Used to generate unique IDs. */
2935 var idCounter = 0;
2936
2937 /** Used to detect methods masquerading as native. */
2938 var maskSrcKey = (function() {
2939 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2940 return uid ? ('Symbol(src)_1.' + uid) : '';
2941 }());
2942
2943 /**
2944 * Used to resolve the
2945 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2946 * of values.
2947 */
2948 var nativeObjectToString = objectProto.toString;
2949
2950 /** Used to infer the `Object` constructor. */
2951 var objectCtorString = funcToString.call(Object);
2952
2953 /** Used to restore the original `_` reference in `_.noConflict`. */
2954 var oldDash = root._;
2955
2956 /** Used to detect if a method is native. */
2957 var reIsNative = RegExp('^' +
2958 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
2959 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
2960 );
2961
2962 /** Built-in value references. */
2963 var Buffer = moduleExports ? context.Buffer : undefined,
2964 Symbol = context.Symbol,
2965 Uint8Array = context.Uint8Array,
2966 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
2967 getPrototype = overArg(Object.getPrototypeOf, Object),
2968 objectCreate = Object.create,
2969 propertyIsEnumerable = objectProto.propertyIsEnumerable,
2970 splice = arrayProto.splice,
2971 spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
2972 symIterator = Symbol ? Symbol.iterator : undefined,
2973 symToStringTag = Symbol ? Symbol.toStringTag : undefined;
2974
2975 var defineProperty = (function() {
2976 try {
2977 var func = getNative(Object, 'defineProperty');
2978 func({}, '', {});
2979 return func;
2980 } catch (e) {}
2981 }());
2982
2983 /** Mocked built-ins. */
2984 var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
2985 ctxNow = Date && Date.now !== root.Date.now && Date.now,
2986 ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
2987
2988 /* Built-in method references for those with the same name as other `lodash` methods. */
2989 var nativeCeil = Math.ceil,
2990 nativeFloor = Math.floor,
2991 nativeGetSymbols = Object.getOwnPropertySymbols,
2992 nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
2993 nativeIsFinite = context.isFinite,
2994 nativeJoin = arrayProto.join,
2995 nativeKeys = overArg(Object.keys, Object),
2996 nativeMax = Math.max,
2997 nativeMin = Math.min,
2998 nativeNow = Date.now,
2999 nativeParseInt = context.parseInt,
3000 nativeRandom = Math.random,
3001 nativeReverse = arrayProto.reverse;
3002
3003 /* Built-in method references that are verified to be native. */
3004 var DataView = getNative(context, 'DataView'),
3005 Map = getNative(context, 'Map'),
3006 Promise = getNative(context, 'Promise'),
3007 Set = getNative(context, 'Set'),
3008 WeakMap = getNative(context, 'WeakMap'),
3009 nativeCreate = getNative(Object, 'create');
3010
3011 /** Used to store function metadata. */
3012 var metaMap = WeakMap && new WeakMap;
3013
3014 /** Used to lookup unminified function names. */
3015 var realNames = {};
3016
3017 /** Used to detect maps, sets, and weakmaps. */
3018 var dataViewCtorString = toSource(DataView),
3019 mapCtorString = toSource(Map),
3020 promiseCtorString = toSource(Promise),
3021 setCtorString = toSource(Set),
3022 weakMapCtorString = toSource(WeakMap);
3023
3024 /** Used to convert symbols to primitives and strings. */
3025 var symbolProto = Symbol ? Symbol.prototype : undefined,
3026 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
3027 symbolToString = symbolProto ? symbolProto.toString : undefined;
3028
3029 /*------------------------------------------------------------------------*/
3030
3031 /**
3032 * Creates a `lodash` object which wraps `value` to enable implicit method
3033 * chain sequences. Methods that operate on and return arrays, collections,
3034 * and functions can be chained together. Methods that retrieve a single value
3035 * or may return a primitive value will automatically end the chain sequence
3036 * and return the unwrapped value. Otherwise, the value must be unwrapped
3037 * with `_#value`.
3038 *
3039 * Explicit chain sequences, which must be unwrapped with `_#value`, may be
3040 * enabled using `_.chain`.
3041 *
3042 * The execution of chained methods is lazy, that is, it's deferred until
3043 * `_#value` is implicitly or explicitly called.
3044 *
3045 * Lazy evaluation allows several methods to support shortcut fusion.
3046 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
3047 * the creation of intermediate arrays and can greatly reduce the number of
3048 * iteratee executions. Sections of a chain sequence qualify for shortcut
3049 * fusion if the section is applied to an array and iteratees accept only
3050 * one argument. The heuristic for whether a section qualifies for shortcut
3051 * fusion is subject to change.
3052 *
3053 * Chaining is supported in custom builds as long as the `_#value` method is
3054 * directly or indirectly included in the build.
3055 *
3056 * In addition to lodash methods, wrappers have `Array` and `String` methods.
3057 *
3058 * The wrapper `Array` methods are:
3059 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
3060 *
3061 * The wrapper `String` methods are:
3062 * `replace` and `split`
3063 *
3064 * The wrapper methods that support shortcut fusion are:
3065 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
3066 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
3067 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
3068 *
3069 * The chainable wrapper methods are:
3070 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
3071 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
3072 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
3073 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
3074 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
3075 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
3076 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
3077 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
3078 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
3079 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
3080 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
3081 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
3082 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
3083 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
3084 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
3085 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
3086 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
3087 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
3088 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
3089 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
3090 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
3091 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
3092 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
3093 * `zipObject`, `zipObjectDeep`, and `zipWith`
3094 *
3095 * The wrapper methods that are **not** chainable by default are:
3096 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
3097 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
3098 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
3099 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
3100 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
3101 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
3102 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
3103 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
3104 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
3105 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
3106 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
3107 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
3108 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
3109 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
3110 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
3111 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
3112 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
3113 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
3114 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
3115 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
3116 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
3117 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
3118 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
3119 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
3120 * `upperFirst`, `value`, and `words`
3121 *
3122 * @name _
3123 * @constructor
3124 * @category Seq
3125 * @param {*} value The value to wrap in a `lodash` instance.
3126 * @returns {Object} Returns the new `lodash` wrapper instance.
3127 * @example
3128 *
3129 * function square(n) {
3130 * return n * n;
3131 * }
3132 *
3133 * var wrapped = _([1, 2, 3]);
3134 *
3135 * // Returns an unwrapped value.
3136 * wrapped.reduce(_.add);
3137 * // => 6
3138 *
3139 * // Returns a wrapped value.
3140 * var squares = wrapped.map(square);
3141 *
3142 * _.isArray(squares);
3143 * // => false
3144 *
3145 * _.isArray(squares.value());
3146 * // => true
3147 */
3148 function lodash(value) {
3149 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
3150 if (value instanceof LodashWrapper) {
3151 return value;
3152 }
3153 if (hasOwnProperty.call(value, '__wrapped__')) {
3154 return wrapperClone(value);
3155 }
3156 }
3157 return new LodashWrapper(value);
3158 }
3159
3160 /**
3161 * The base implementation of `_.create` without support for assigning
3162 * properties to the created object.
3163 *
3164 * @private
3165 * @param {Object} proto The object to inherit from.
3166 * @returns {Object} Returns the new object.
3167 */
3168 var baseCreate = (function() {
3169 function object() {}
3170 return function(proto) {
3171 if (!isObject(proto)) {
3172 return {};
3173 }
3174 if (objectCreate) {
3175 return objectCreate(proto);
3176 }
3177 object.prototype = proto;
3178 var result = new object;
3179 object.prototype = undefined;
3180 return result;
3181 };
3182 }());
3183
3184 /**
3185 * The function whose prototype chain sequence wrappers inherit from.
3186 *
3187 * @private
3188 */
3189 function baseLodash() {
3190 // No operation performed.
3191 }
3192
3193 /**
3194 * The base constructor for creating `lodash` wrapper objects.
3195 *
3196 * @private
3197 * @param {*} value The value to wrap.
3198 * @param {boolean} [chainAll] Enable explicit method chain sequences.
3199 */
3200 function LodashWrapper(value, chainAll) {
3201 this.__wrapped__ = value;
3202 this.__actions__ = [];
3203 this.__chain__ = !!chainAll;
3204 this.__index__ = 0;
3205 this.__values__ = undefined;
3206 }
3207
3208 /**
3209 * By default, the template delimiters used by lodash are like those in
3210 * embedded Ruby (ERB) as well as ES2015 template strings. Change the
3211 * following template settings to use alternative delimiters.
3212 *
3213 * @static
3214 * @memberOf _
3215 * @type {Object}
3216 */
3217 lodash.templateSettings = {
3218
3219 /**
3220 * Used to detect `data` property values to be HTML-escaped.
3221 *
3222 * @memberOf _.templateSettings
3223 * @type {RegExp}
3224 */
3225 'escape': reEscape,
3226
3227 /**
3228 * Used to detect code to be evaluated.
3229 *
3230 * @memberOf _.templateSettings
3231 * @type {RegExp}
3232 */
3233 'evaluate': reEvaluate,
3234
3235 /**
3236 * Used to detect `data` property values to inject.
3237 *
3238 * @memberOf _.templateSettings
3239 * @type {RegExp}
3240 */
3241 'interpolate': reInterpolate,
3242
3243 /**
3244 * Used to reference the data object in the template text.
3245 *
3246 * @memberOf _.templateSettings
3247 * @type {string}
3248 */
3249 'variable': '',
3250
3251 /**
3252 * Used to import variables into the compiled template.
3253 *
3254 * @memberOf _.templateSettings
3255 * @type {Object}
3256 */
3257 'imports': {
3258
3259 /**
3260 * A reference to the `lodash` function.
3261 *
3262 * @memberOf _.templateSettings.imports
3263 * @type {Function}
3264 */
3265 '_': lodash
3266 }
3267 };
3268
3269 // Ensure wrappers are instances of `baseLodash`.
3270 lodash.prototype = baseLodash.prototype;
3271 lodash.prototype.constructor = lodash;
3272
3273 LodashWrapper.prototype = baseCreate(baseLodash.prototype);
3274 LodashWrapper.prototype.constructor = LodashWrapper;
3275
3276 /*------------------------------------------------------------------------*/
3277
3278 /**
3279 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
3280 *
3281 * @private
3282 * @constructor
3283 * @param {*} value The value to wrap.
3284 */
3285 function LazyWrapper(value) {
3286 this.__wrapped__ = value;
3287 this.__actions__ = [];
3288 this.__dir__ = 1;
3289 this.__filtered__ = false;
3290 this.__iteratees__ = [];
3291 this.__takeCount__ = MAX_ARRAY_LENGTH;
3292 this.__views__ = [];
3293 }
3294
3295 /**
3296 * Creates a clone of the lazy wrapper object.
3297 *
3298 * @private
3299 * @name clone
3300 * @memberOf LazyWrapper
3301 * @returns {Object} Returns the cloned `LazyWrapper` object.
3302 */
3303 function lazyClone() {
3304 var result = new LazyWrapper(this.__wrapped__);
3305 result.__actions__ = copyArray(this.__actions__);
3306 result.__dir__ = this.__dir__;
3307 result.__filtered__ = this.__filtered__;
3308 result.__iteratees__ = copyArray(this.__iteratees__);
3309 result.__takeCount__ = this.__takeCount__;
3310 result.__views__ = copyArray(this.__views__);
3311 return result;
3312 }
3313
3314 /**
3315 * Reverses the direction of lazy iteration.
3316 *
3317 * @private
3318 * @name reverse
3319 * @memberOf LazyWrapper
3320 * @returns {Object} Returns the new reversed `LazyWrapper` object.
3321 */
3322 function lazyReverse() {
3323 if (this.__filtered__) {
3324 var result = new LazyWrapper(this);
3325 result.__dir__ = -1;
3326 result.__filtered__ = true;
3327 } else {
3328 result = this.clone();
3329 result.__dir__ *= -1;
3330 }
3331 return result;
3332 }
3333
3334 /**
3335 * Extracts the unwrapped value from its lazy wrapper.
3336 *
3337 * @private
3338 * @name value
3339 * @memberOf LazyWrapper
3340 * @returns {*} Returns the unwrapped value.
3341 */
3342 function lazyValue() {
3343 var array = this.__wrapped__.value(),
3344 dir = this.__dir__,
3345 isArr = isArray(array),
3346 isRight = dir < 0,
3347 arrLength = isArr ? array.length : 0,
3348 view = getView(0, arrLength, this.__views__),
3349 start = view.start,
3350 end = view.end,
3351 length = end - start,
3352 index = isRight ? end : (start - 1),
3353 iteratees = this.__iteratees__,
3354 iterLength = iteratees.length,
3355 resIndex = 0,
3356 takeCount = nativeMin(length, this.__takeCount__);
3357
3358 if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
3359 return baseWrapperValue(array, this.__actions__);
3360 }
3361 var result = [];
3362
3363 outer:
3364 while (length-- && resIndex < takeCount) {
3365 index += dir;
3366
3367 var iterIndex = -1,
3368 value = array[index];
3369
3370 while (++iterIndex < iterLength) {
3371 var data = iteratees[iterIndex],
3372 iteratee = data.iteratee,
3373 type = data.type,
3374 computed = iteratee(value);
3375
3376 if (type == LAZY_MAP_FLAG) {
3377 value = computed;
3378 } else if (!computed) {
3379 if (type == LAZY_FILTER_FLAG) {
3380 continue outer;
3381 } else {
3382 break outer;
3383 }
3384 }
3385 }
3386 result[resIndex++] = value;
3387 }
3388 return result;
3389 }
3390
3391 // Ensure `LazyWrapper` is an instance of `baseLodash`.
3392 LazyWrapper.prototype = baseCreate(baseLodash.prototype);
3393 LazyWrapper.prototype.constructor = LazyWrapper;
3394
3395 /*------------------------------------------------------------------------*/
3396
3397 /**
3398 * Creates a hash object.
3399 *
3400 * @private
3401 * @constructor
3402 * @param {Array} [entries] The key-value pairs to cache.
3403 */
3404 function Hash(entries) {
3405 var index = -1,
3406 length = entries == null ? 0 : entries.length;
3407
3408 this.clear();
3409 while (++index < length) {
3410 var entry = entries[index];
3411 this.set(entry[0], entry[1]);
3412 }
3413 }
3414
3415 /**
3416 * Removes all key-value entries from the hash.
3417 *
3418 * @private
3419 * @name clear
3420 * @memberOf Hash
3421 */
3422 function hashClear() {
3423 this.__data__ = nativeCreate ? nativeCreate(null) : {};
3424 this.size = 0;
3425 }
3426
3427 /**
3428 * Removes `key` and its value from the hash.
3429 *
3430 * @private
3431 * @name delete
3432 * @memberOf Hash
3433 * @param {Object} hash The hash to modify.
3434 * @param {string} key The key of the value to remove.
3435 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3436 */
3437 function hashDelete(key) {
3438 var result = this.has(key) && delete this.__data__[key];
3439 this.size -= result ? 1 : 0;
3440 return result;
3441 }
3442
3443 /**
3444 * Gets the hash value for `key`.
3445 *
3446 * @private
3447 * @name get
3448 * @memberOf Hash
3449 * @param {string} key The key of the value to get.
3450 * @returns {*} Returns the entry value.
3451 */
3452 function hashGet(key) {
3453 var data = this.__data__;
3454 if (nativeCreate) {
3455 var result = data[key];
3456 return result === HASH_UNDEFINED ? undefined : result;
3457 }
3458 return hasOwnProperty.call(data, key) ? data[key] : undefined;
3459 }
3460
3461 /**
3462 * Checks if a hash value for `key` exists.
3463 *
3464 * @private
3465 * @name has
3466 * @memberOf Hash
3467 * @param {string} key The key of the entry to check.
3468 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3469 */
3470 function hashHas(key) {
3471 var data = this.__data__;
3472 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
3473 }
3474
3475 /**
3476 * Sets the hash `key` to `value`.
3477 *
3478 * @private
3479 * @name set
3480 * @memberOf Hash
3481 * @param {string} key The key of the value to set.
3482 * @param {*} value The value to set.
3483 * @returns {Object} Returns the hash instance.
3484 */
3485 function hashSet(key, value) {
3486 var data = this.__data__;
3487 this.size += this.has(key) ? 0 : 1;
3488 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3489 return this;
3490 }
3491
3492 // Add methods to `Hash`.
3493 Hash.prototype.clear = hashClear;
3494 Hash.prototype['delete'] = hashDelete;
3495 Hash.prototype.get = hashGet;
3496 Hash.prototype.has = hashHas;
3497 Hash.prototype.set = hashSet;
3498
3499 /*------------------------------------------------------------------------*/
3500
3501 /**
3502 * Creates an list cache object.
3503 *
3504 * @private
3505 * @constructor
3506 * @param {Array} [entries] The key-value pairs to cache.
3507 */
3508 function ListCache(entries) {
3509 var index = -1,
3510 length = entries == null ? 0 : entries.length;
3511
3512 this.clear();
3513 while (++index < length) {
3514 var entry = entries[index];
3515 this.set(entry[0], entry[1]);
3516 }
3517 }
3518
3519 /**
3520 * Removes all key-value entries from the list cache.
3521 *
3522 * @private
3523 * @name clear
3524 * @memberOf ListCache
3525 */
3526 function listCacheClear() {
3527 this.__data__ = [];
3528 this.size = 0;
3529 }
3530
3531 /**
3532 * Removes `key` and its value from the list cache.
3533 *
3534 * @private
3535 * @name delete
3536 * @memberOf ListCache
3537 * @param {string} key The key of the value to remove.
3538 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3539 */
3540 function listCacheDelete(key) {
3541 var data = this.__data__,
3542 index = assocIndexOf(data, key);
3543
3544 if (index < 0) {
3545 return false;
3546 }
3547 var lastIndex = data.length - 1;
3548 if (index == lastIndex) {
3549 data.pop();
3550 } else {
3551 splice.call(data, index, 1);
3552 }
3553 --this.size;
3554 return true;
3555 }
3556
3557 /**
3558 * Gets the list cache value for `key`.
3559 *
3560 * @private
3561 * @name get
3562 * @memberOf ListCache
3563 * @param {string} key The key of the value to get.
3564 * @returns {*} Returns the entry value.
3565 */
3566 function listCacheGet(key) {
3567 var data = this.__data__,
3568 index = assocIndexOf(data, key);
3569
3570 return index < 0 ? undefined : data[index][1];
3571 }
3572
3573 /**
3574 * Checks if a list cache value for `key` exists.
3575 *
3576 * @private
3577 * @name has
3578 * @memberOf ListCache
3579 * @param {string} key The key of the entry to check.
3580 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3581 */
3582 function listCacheHas(key) {
3583 return assocIndexOf(this.__data__, key) > -1;
3584 }
3585
3586 /**
3587 * Sets the list cache `key` to `value`.
3588 *
3589 * @private
3590 * @name set
3591 * @memberOf ListCache
3592 * @param {string} key The key of the value to set.
3593 * @param {*} value The value to set.
3594 * @returns {Object} Returns the list cache instance.
3595 */
3596 function listCacheSet(key, value) {
3597 var data = this.__data__,
3598 index = assocIndexOf(data, key);
3599
3600 if (index < 0) {
3601 ++this.size;
3602 data.push([key, value]);
3603 } else {
3604 data[index][1] = value;
3605 }
3606 return this;
3607 }
3608
3609 // Add methods to `ListCache`.
3610 ListCache.prototype.clear = listCacheClear;
3611 ListCache.prototype['delete'] = listCacheDelete;
3612 ListCache.prototype.get = listCacheGet;
3613 ListCache.prototype.has = listCacheHas;
3614 ListCache.prototype.set = listCacheSet;
3615
3616 /*------------------------------------------------------------------------*/
3617
3618 /**
3619 * Creates a map cache object to store key-value pairs.
3620 *
3621 * @private
3622 * @constructor
3623 * @param {Array} [entries] The key-value pairs to cache.
3624 */
3625 function MapCache(entries) {
3626 var index = -1,
3627 length = entries == null ? 0 : entries.length;
3628
3629 this.clear();
3630 while (++index < length) {
3631 var entry = entries[index];
3632 this.set(entry[0], entry[1]);
3633 }
3634 }
3635
3636 /**
3637 * Removes all key-value entries from the map.
3638 *
3639 * @private
3640 * @name clear
3641 * @memberOf MapCache
3642 */
3643 function mapCacheClear() {
3644 this.size = 0;
3645 this.__data__ = {
3646 'hash': new Hash,
3647 'map': new (Map || ListCache),
3648 'string': new Hash
3649 };
3650 }
3651
3652 /**
3653 * Removes `key` and its value from the map.
3654 *
3655 * @private
3656 * @name delete
3657 * @memberOf MapCache
3658 * @param {string} key The key of the value to remove.
3659 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3660 */
3661 function mapCacheDelete(key) {
3662 var result = getMapData(this, key)['delete'](key);
3663 this.size -= result ? 1 : 0;
3664 return result;
3665 }
3666
3667 /**
3668 * Gets the map value for `key`.
3669 *
3670 * @private
3671 * @name get
3672 * @memberOf MapCache
3673 * @param {string} key The key of the value to get.
3674 * @returns {*} Returns the entry value.
3675 */
3676 function mapCacheGet(key) {
3677 return getMapData(this, key).get(key);
3678 }
3679
3680 /**
3681 * Checks if a map value for `key` exists.
3682 *
3683 * @private
3684 * @name has
3685 * @memberOf MapCache
3686 * @param {string} key The key of the entry to check.
3687 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3688 */
3689 function mapCacheHas(key) {
3690 return getMapData(this, key).has(key);
3691 }
3692
3693 /**
3694 * Sets the map `key` to `value`.
3695 *
3696 * @private
3697 * @name set
3698 * @memberOf MapCache
3699 * @param {string} key The key of the value to set.
3700 * @param {*} value The value to set.
3701 * @returns {Object} Returns the map cache instance.
3702 */
3703 function mapCacheSet(key, value) {
3704 var data = getMapData(this, key),
3705 size = data.size;
3706
3707 data.set(key, value);
3708 this.size += data.size == size ? 0 : 1;
3709 return this;
3710 }
3711
3712 // Add methods to `MapCache`.
3713 MapCache.prototype.clear = mapCacheClear;
3714 MapCache.prototype['delete'] = mapCacheDelete;
3715 MapCache.prototype.get = mapCacheGet;
3716 MapCache.prototype.has = mapCacheHas;
3717 MapCache.prototype.set = mapCacheSet;
3718
3719 /*------------------------------------------------------------------------*/
3720
3721 /**
3722 *
3723 * Creates an array cache object to store unique values.
3724 *
3725 * @private
3726 * @constructor
3727 * @param {Array} [values] The values to cache.
3728 */
3729 function SetCache(values) {
3730 var index = -1,
3731 length = values == null ? 0 : values.length;
3732
3733 this.__data__ = new MapCache;
3734 while (++index < length) {
3735 this.add(values[index]);
3736 }
3737 }
3738
3739 /**
3740 * Adds `value` to the array cache.
3741 *
3742 * @private
3743 * @name add
3744 * @memberOf SetCache
3745 * @alias push
3746 * @param {*} value The value to cache.
3747 * @returns {Object} Returns the cache instance.
3748 */
3749 function setCacheAdd(value) {
3750 this.__data__.set(value, HASH_UNDEFINED);
3751 return this;
3752 }
3753
3754 /**
3755 * Checks if `value` is in the array cache.
3756 *
3757 * @private
3758 * @name has
3759 * @memberOf SetCache
3760 * @param {*} value The value to search for.
3761 * @returns {number} Returns `true` if `value` is found, else `false`.
3762 */
3763 function setCacheHas(value) {
3764 return this.__data__.has(value);
3765 }
3766
3767 // Add methods to `SetCache`.
3768 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
3769 SetCache.prototype.has = setCacheHas;
3770
3771 /*------------------------------------------------------------------------*/
3772
3773 /**
3774 * Creates a stack cache object to store key-value pairs.
3775 *
3776 * @private
3777 * @constructor
3778 * @param {Array} [entries] The key-value pairs to cache.
3779 */
3780 function Stack(entries) {
3781 var data = this.__data__ = new ListCache(entries);
3782 this.size = data.size;
3783 }
3784
3785 /**
3786 * Removes all key-value entries from the stack.
3787 *
3788 * @private
3789 * @name clear
3790 * @memberOf Stack
3791 */
3792 function stackClear() {
3793 this.__data__ = new ListCache;
3794 this.size = 0;
3795 }
3796
3797 /**
3798 * Removes `key` and its value from the stack.
3799 *
3800 * @private
3801 * @name delete
3802 * @memberOf Stack
3803 * @param {string} key The key of the value to remove.
3804 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3805 */
3806 function stackDelete(key) {
3807 var data = this.__data__,
3808 result = data['delete'](key);
3809
3810 this.size = data.size;
3811 return result;
3812 }
3813
3814 /**
3815 * Gets the stack value for `key`.
3816 *
3817 * @private
3818 * @name get
3819 * @memberOf Stack
3820 * @param {string} key The key of the value to get.
3821 * @returns {*} Returns the entry value.
3822 */
3823 function stackGet(key) {
3824 return this.__data__.get(key);
3825 }
3826
3827 /**
3828 * Checks if a stack value for `key` exists.
3829 *
3830 * @private
3831 * @name has
3832 * @memberOf Stack
3833 * @param {string} key The key of the entry to check.
3834 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3835 */
3836 function stackHas(key) {
3837 return this.__data__.has(key);
3838 }
3839
3840 /**
3841 * Sets the stack `key` to `value`.
3842 *
3843 * @private
3844 * @name set
3845 * @memberOf Stack
3846 * @param {string} key The key of the value to set.
3847 * @param {*} value The value to set.
3848 * @returns {Object} Returns the stack cache instance.
3849 */
3850 function stackSet(key, value) {
3851 var data = this.__data__;
3852 if (data instanceof ListCache) {
3853 var pairs = data.__data__;
3854 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
3855 pairs.push([key, value]);
3856 this.size = ++data.size;
3857 return this;
3858 }
3859 data = this.__data__ = new MapCache(pairs);
3860 }
3861 data.set(key, value);
3862 this.size = data.size;
3863 return this;
3864 }
3865
3866 // Add methods to `Stack`.
3867 Stack.prototype.clear = stackClear;
3868 Stack.prototype['delete'] = stackDelete;
3869 Stack.prototype.get = stackGet;
3870 Stack.prototype.has = stackHas;
3871 Stack.prototype.set = stackSet;
3872
3873 /*------------------------------------------------------------------------*/
3874
3875 /**
3876 * Creates an array of the enumerable property names of the array-like `value`.
3877 *
3878 * @private
3879 * @param {*} value The value to query.
3880 * @param {boolean} inherited Specify returning inherited property names.
3881 * @returns {Array} Returns the array of property names.
3882 */
3883 function arrayLikeKeys(value, inherited) {
3884 var isArr = isArray(value),
3885 isArg = !isArr && isArguments(value),
3886 isBuff = !isArr && !isArg && isBuffer(value),
3887 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
3888 skipIndexes = isArr || isArg || isBuff || isType,
3889 result = skipIndexes ? baseTimes(value.length, String) : [],
3890 length = result.length;
3891
3892 for (var key in value) {
3893 if ((inherited || hasOwnProperty.call(value, key)) &&
3894 !(skipIndexes && (
3895 // Safari 9 has enumerable `arguments.length` in strict mode.
3896 key == 'length' ||
3897 // Node.js 0.10 has enumerable non-index properties on buffers.
3898 (isBuff && (key == 'offset' || key == 'parent')) ||
3899 // PhantomJS 2 has enumerable non-index properties on typed arrays.
3900 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
3901 // Skip index properties.
3902 isIndex(key, length)
3903 ))) {
3904 result.push(key);
3905 }
3906 }
3907 return result;
3908 }
3909
3910 /**
3911 * A specialized version of `_.sample` for arrays.
3912 *
3913 * @private
3914 * @param {Array} array The array to sample.
3915 * @returns {*} Returns the random element.
3916 */
3917 function arraySample(array) {
3918 var length = array.length;
3919 return length ? array[baseRandom(0, length - 1)] : undefined;
3920 }
3921
3922 /**
3923 * A specialized version of `_.sampleSize` for arrays.
3924 *
3925 * @private
3926 * @param {Array} array The array to sample.
3927 * @param {number} n The number of elements to sample.
3928 * @returns {Array} Returns the random elements.
3929 */
3930 function arraySampleSize(array, n) {
3931 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
3932 }
3933
3934 /**
3935 * A specialized version of `_.shuffle` for arrays.
3936 *
3937 * @private
3938 * @param {Array} array The array to shuffle.
3939 * @returns {Array} Returns the new shuffled array.
3940 */
3941 function arrayShuffle(array) {
3942 return shuffleSelf(copyArray(array));
3943 }
3944
3945 /**
3946 * This function is like `assignValue` except that it doesn't assign
3947 * `undefined` values.
3948 *
3949 * @private
3950 * @param {Object} object The object to modify.
3951 * @param {string} key The key of the property to assign.
3952 * @param {*} value The value to assign.
3953 */
3954 function assignMergeValue(object, key, value) {
3955 if ((value !== undefined && !eq(object[key], value)) ||
3956 (value === undefined && !(key in object))) {
3957 baseAssignValue(object, key, value);
3958 }
3959 }
3960
3961 /**
3962 * Assigns `value` to `key` of `object` if the existing value is not equivalent
3963 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3964 * for equality comparisons.
3965 *
3966 * @private
3967 * @param {Object} object The object to modify.
3968 * @param {string} key The key of the property to assign.
3969 * @param {*} value The value to assign.
3970 */
3971 function assignValue(object, key, value) {
3972 var objValue = object[key];
3973 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
3974 (value === undefined && !(key in object))) {
3975 baseAssignValue(object, key, value);
3976 }
3977 }
3978
3979 /**
3980 * Gets the index at which the `key` is found in `array` of key-value pairs.
3981 *
3982 * @private
3983 * @param {Array} array The array to inspect.
3984 * @param {*} key The key to search for.
3985 * @returns {number} Returns the index of the matched value, else `-1`.
3986 */
3987 function assocIndexOf(array, key) {
3988 var length = array.length;
3989 while (length--) {
3990 if (eq(array[length][0], key)) {
3991 return length;
3992 }
3993 }
3994 return -1;
3995 }
3996
3997 /**
3998 * Aggregates elements of `collection` on `accumulator` with keys transformed
3999 * by `iteratee` and values set by `setter`.
4000 *
4001 * @private
4002 * @param {Array|Object} collection The collection to iterate over.
4003 * @param {Function} setter The function to set `accumulator` values.
4004 * @param {Function} iteratee The iteratee to transform keys.
4005 * @param {Object} accumulator The initial aggregated object.
4006 * @returns {Function} Returns `accumulator`.
4007 */
4008 function baseAggregator(collection, setter, iteratee, accumulator) {
4009 baseEach(collection, function(value, key, collection) {
4010 setter(accumulator, value, iteratee(value), collection);
4011 });
4012 return accumulator;
4013 }
4014
4015 /**
4016 * The base implementation of `_.assign` without support for multiple sources
4017 * or `customizer` functions.
4018 *
4019 * @private
4020 * @param {Object} object The destination object.
4021 * @param {Object} source The source object.
4022 * @returns {Object} Returns `object`.
4023 */
4024 function baseAssign(object, source) {
4025 return object && copyObject(source, keys(source), object);
4026 }
4027
4028 /**
4029 * The base implementation of `_.assignIn` without support for multiple sources
4030 * or `customizer` functions.
4031 *
4032 * @private
4033 * @param {Object} object The destination object.
4034 * @param {Object} source The source object.
4035 * @returns {Object} Returns `object`.
4036 */
4037 function baseAssignIn(object, source) {
4038 return object && copyObject(source, keysIn(source), object);
4039 }
4040
4041 /**
4042 * The base implementation of `assignValue` and `assignMergeValue` without
4043 * value checks.
4044 *
4045 * @private
4046 * @param {Object} object The object to modify.
4047 * @param {string} key The key of the property to assign.
4048 * @param {*} value The value to assign.
4049 */
4050 function baseAssignValue(object, key, value) {
4051 if (key == '__proto__' && defineProperty) {
4052 defineProperty(object, key, {
4053 'configurable': true,
4054 'enumerable': true,
4055 'value': value,
4056 'writable': true
4057 });
4058 } else {
4059 object[key] = value;
4060 }
4061 }
4062
4063 /**
4064 * The base implementation of `_.at` without support for individual paths.
4065 *
4066 * @private
4067 * @param {Object} object The object to iterate over.
4068 * @param {string[]} paths The property paths to pick.
4069 * @returns {Array} Returns the picked elements.
4070 */
4071 function baseAt(object, paths) {
4072 var index = -1,
4073 length = paths.length,
4074 result = Array(length),
4075 skip = object == null;
4076
4077 while (++index < length) {
4078 result[index] = skip ? undefined : get(object, paths[index]);
4079 }
4080 return result;
4081 }
4082
4083 /**
4084 * The base implementation of `_.clamp` which doesn't coerce arguments.
4085 *
4086 * @private
4087 * @param {number} number The number to clamp.
4088 * @param {number} [lower] The lower bound.
4089 * @param {number} upper The upper bound.
4090 * @returns {number} Returns the clamped number.
4091 */
4092 function baseClamp(number, lower, upper) {
4093 if (number === number) {
4094 if (upper !== undefined) {
4095 number = number <= upper ? number : upper;
4096 }
4097 if (lower !== undefined) {
4098 number = number >= lower ? number : lower;
4099 }
4100 }
4101 return number;
4102 }
4103
4104 /**
4105 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4106 * traversed objects.
4107 *
4108 * @private
4109 * @param {*} value The value to clone.
4110 * @param {boolean} bitmask The bitmask flags.
4111 * 1 - Deep clone
4112 * 2 - Flatten inherited properties
4113 * 4 - Clone symbols
4114 * @param {Function} [customizer] The function to customize cloning.
4115 * @param {string} [key] The key of `value`.
4116 * @param {Object} [object] The parent object of `value`.
4117 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4118 * @returns {*} Returns the cloned value.
4119 */
4120 function baseClone(value, bitmask, customizer, key, object, stack) {
4121 var result,
4122 isDeep = bitmask & CLONE_DEEP_FLAG,
4123 isFlat = bitmask & CLONE_FLAT_FLAG,
4124 isFull = bitmask & CLONE_SYMBOLS_FLAG;
4125
4126 if (customizer) {
4127 result = object ? customizer(value, key, object, stack) : customizer(value);
4128 }
4129 if (result !== undefined) {
4130 return result;
4131 }
4132 if (!isObject(value)) {
4133 return value;
4134 }
4135 var isArr = isArray(value);
4136 if (isArr) {
4137 result = initCloneArray(value);
4138 if (!isDeep) {
4139 return copyArray(value, result);
4140 }
4141 } else {
4142 var tag = getTag(value),
4143 isFunc = tag == funcTag || tag == genTag;
4144
4145 if (isBuffer(value)) {
4146 return cloneBuffer(value, isDeep);
4147 }
4148 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
4149 result = (isFlat || isFunc) ? {} : initCloneObject(value);
4150 if (!isDeep) {
4151 return isFlat
4152 ? copySymbolsIn(value, baseAssignIn(result, value))
4153 : copySymbols(value, baseAssign(result, value));
4154 }
4155 } else {
4156 if (!cloneableTags[tag]) {
4157 return object ? value : {};
4158 }
4159 result = initCloneByTag(value, tag, isDeep);
4160 }
4161 }
4162 // Check for circular references and return its corresponding clone.
4163 stack || (stack = new Stack);
4164 var stacked = stack.get(value);
4165 if (stacked) {
4166 return stacked;
4167 }
4168 stack.set(value, result);
4169
4170 if (isSet(value)) {
4171 value.forEach(function(subValue) {
4172 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
4173 });
4174
4175 return result;
4176 }
4177
4178 if (isMap(value)) {
4179 value.forEach(function(subValue, key) {
4180 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
4181 });
4182
4183 return result;
4184 }
4185
4186 var keysFunc = isFull
4187 ? (isFlat ? getAllKeysIn : getAllKeys)
4188 : (isFlat ? keysIn : keys);
4189
4190 var props = isArr ? undefined : keysFunc(value);
4191 arrayEach(props || value, function(subValue, key) {
4192 if (props) {
4193 key = subValue;
4194 subValue = value[key];
4195 }
4196 // Recursively populate clone (susceptible to call stack limits).
4197 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
4198 });
4199 return result;
4200 }
4201
4202 /**
4203 * The base implementation of `_.conforms` which doesn't clone `source`.
4204 *
4205 * @private
4206 * @param {Object} source The object of property predicates to conform to.
4207 * @returns {Function} Returns the new spec function.
4208 */
4209 function baseConforms(source) {
4210 var props = keys(source);
4211 return function(object) {
4212 return baseConformsTo(object, source, props);
4213 };
4214 }
4215
4216 /**
4217 * The base implementation of `_.conformsTo` which accepts `props` to check.
4218 *
4219 * @private
4220 * @param {Object} object The object to inspect.
4221 * @param {Object} source The object of property predicates to conform to.
4222 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
4223 */
4224 function baseConformsTo(object, source, props) {
4225 var length = props.length;
4226 if (object == null) {
4227 return !length;
4228 }
4229 object = Object(object);
4230 while (length--) {
4231 var key = props[length],
4232 predicate = source[key],
4233 value = object[key];
4234
4235 if ((value === undefined && !(key in object)) || !predicate(value)) {
4236 return false;
4237 }
4238 }
4239 return true;
4240 }
4241
4242 /**
4243 * The base implementation of `_.delay` and `_.defer` which accepts `args`
4244 * to provide to `func`.
4245 *
4246 * @private
4247 * @param {Function} func The function to delay.
4248 * @param {number} wait The number of milliseconds to delay invocation.
4249 * @param {Array} args The arguments to provide to `func`.
4250 * @returns {number|Object} Returns the timer id or timeout object.
4251 */
4252 function baseDelay(func, wait, args) {
4253 if (typeof func != 'function') {
4254 throw new TypeError(FUNC_ERROR_TEXT);
4255 }
4256 return setTimeout(function() { func.apply(undefined, args); }, wait);
4257 }
4258
4259 /**
4260 * The base implementation of methods like `_.difference` without support
4261 * for excluding multiple arrays or iteratee shorthands.
4262 *
4263 * @private
4264 * @param {Array} array The array to inspect.
4265 * @param {Array} values The values to exclude.
4266 * @param {Function} [iteratee] The iteratee invoked per element.
4267 * @param {Function} [comparator] The comparator invoked per element.
4268 * @returns {Array} Returns the new array of filtered values.
4269 */
4270 function baseDifference(array, values, iteratee, comparator) {
4271 var index = -1,
4272 includes = arrayIncludes,
4273 isCommon = true,
4274 length = array.length,
4275 result = [],
4276 valuesLength = values.length;
4277
4278 if (!length) {
4279 return result;
4280 }
4281 if (iteratee) {
4282 values = arrayMap(values, baseUnary(iteratee));
4283 }
4284 if (comparator) {
4285 includes = arrayIncludesWith;
4286 isCommon = false;
4287 }
4288 else if (values.length >= LARGE_ARRAY_SIZE) {
4289 includes = cacheHas;
4290 isCommon = false;
4291 values = new SetCache(values);
4292 }
4293 outer:
4294 while (++index < length) {
4295 var value = array[index],
4296 computed = iteratee == null ? value : iteratee(value);
4297
4298 value = (comparator || value !== 0) ? value : 0;
4299 if (isCommon && computed === computed) {
4300 var valuesIndex = valuesLength;
4301 while (valuesIndex--) {
4302 if (values[valuesIndex] === computed) {
4303 continue outer;
4304 }
4305 }
4306 result.push(value);
4307 }
4308 else if (!includes(values, computed, comparator)) {
4309 result.push(value);
4310 }
4311 }
4312 return result;
4313 }
4314
4315 /**
4316 * The base implementation of `_.forEach` without support for iteratee shorthands.
4317 *
4318 * @private
4319 * @param {Array|Object} collection The collection to iterate over.
4320 * @param {Function} iteratee The function invoked per iteration.
4321 * @returns {Array|Object} Returns `collection`.
4322 */
4323 var baseEach = createBaseEach(baseForOwn);
4324
4325 /**
4326 * The base implementation of `_.forEachRight` without support for iteratee shorthands.
4327 *
4328 * @private
4329 * @param {Array|Object} collection The collection to iterate over.
4330 * @param {Function} iteratee The function invoked per iteration.
4331 * @returns {Array|Object} Returns `collection`.
4332 */
4333 var baseEachRight = createBaseEach(baseForOwnRight, true);
4334
4335 /**
4336 * The base implementation of `_.every` without support for iteratee shorthands.
4337 *
4338 * @private
4339 * @param {Array|Object} collection The collection to iterate over.
4340 * @param {Function} predicate The function invoked per iteration.
4341 * @returns {boolean} Returns `true` if all elements pass the predicate check,
4342 * else `false`
4343 */
4344 function baseEvery(collection, predicate) {
4345 var result = true;
4346 baseEach(collection, function(value, index, collection) {
4347 result = !!predicate(value, index, collection);
4348 return result;
4349 });
4350 return result;
4351 }
4352
4353 /**
4354 * The base implementation of methods like `_.max` and `_.min` which accepts a
4355 * `comparator` to determine the extremum value.
4356 *
4357 * @private
4358 * @param {Array} array The array to iterate over.
4359 * @param {Function} iteratee The iteratee invoked per iteration.
4360 * @param {Function} comparator The comparator used to compare values.
4361 * @returns {*} Returns the extremum value.
4362 */
4363 function baseExtremum(array, iteratee, comparator) {
4364 var index = -1,
4365 length = array.length;
4366
4367 while (++index < length) {
4368 var value = array[index],
4369 current = iteratee(value);
4370
4371 if (current != null && (computed === undefined
4372 ? (current === current && !isSymbol(current))
4373 : comparator(current, computed)
4374 )) {
4375 var computed = current,
4376 result = value;
4377 }
4378 }
4379 return result;
4380 }
4381
4382 /**
4383 * The base implementation of `_.fill` without an iteratee call guard.
4384 *
4385 * @private
4386 * @param {Array} array The array to fill.
4387 * @param {*} value The value to fill `array` with.
4388 * @param {number} [start=0] The start position.
4389 * @param {number} [end=array.length] The end position.
4390 * @returns {Array} Returns `array`.
4391 */
4392 function baseFill(array, value, start, end) {
4393 var length = array.length;
4394
4395 start = toInteger(start);
4396 if (start < 0) {
4397 start = -start > length ? 0 : (length + start);
4398 }
4399 end = (end === undefined || end > length) ? length : toInteger(end);
4400 if (end < 0) {
4401 end += length;
4402 }
4403 end = start > end ? 0 : toLength(end);
4404 while (start < end) {
4405 array[start++] = value;
4406 }
4407 return array;
4408 }
4409
4410 /**
4411 * The base implementation of `_.filter` without support for iteratee shorthands.
4412 *
4413 * @private
4414 * @param {Array|Object} collection The collection to iterate over.
4415 * @param {Function} predicate The function invoked per iteration.
4416 * @returns {Array} Returns the new filtered array.
4417 */
4418 function baseFilter(collection, predicate) {
4419 var result = [];
4420 baseEach(collection, function(value, index, collection) {
4421 if (predicate(value, index, collection)) {
4422 result.push(value);
4423 }
4424 });
4425 return result;
4426 }
4427
4428 /**
4429 * The base implementation of `_.flatten` with support for restricting flattening.
4430 *
4431 * @private
4432 * @param {Array} array The array to flatten.
4433 * @param {number} depth The maximum recursion depth.
4434 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
4435 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
4436 * @param {Array} [result=[]] The initial result value.
4437 * @returns {Array} Returns the new flattened array.
4438 */
4439 function baseFlatten(array, depth, predicate, isStrict, result) {
4440 var index = -1,
4441 length = array.length;
4442
4443 predicate || (predicate = isFlattenable);
4444 result || (result = []);
4445
4446 while (++index < length) {
4447 var value = array[index];
4448 if (depth > 0 && predicate(value)) {
4449 if (depth > 1) {
4450 // Recursively flatten arrays (susceptible to call stack limits).
4451 baseFlatten(value, depth - 1, predicate, isStrict, result);
4452 } else {
4453 arrayPush(result, value);
4454 }
4455 } else if (!isStrict) {
4456 result[result.length] = value;
4457 }
4458 }
4459 return result;
4460 }
4461
4462 /**
4463 * The base implementation of `baseForOwn` which iterates over `object`
4464 * properties returned by `keysFunc` and invokes `iteratee` for each property.
4465 * Iteratee functions may exit iteration early by explicitly returning `false`.
4466 *
4467 * @private
4468 * @param {Object} object The object to iterate over.
4469 * @param {Function} iteratee The function invoked per iteration.
4470 * @param {Function} keysFunc The function to get the keys of `object`.
4471 * @returns {Object} Returns `object`.
4472 */
4473 var baseFor = createBaseFor();
4474
4475 /**
4476 * This function is like `baseFor` except that it iterates over properties
4477 * in the opposite order.
4478 *
4479 * @private
4480 * @param {Object} object The object to iterate over.
4481 * @param {Function} iteratee The function invoked per iteration.
4482 * @param {Function} keysFunc The function to get the keys of `object`.
4483 * @returns {Object} Returns `object`.
4484 */
4485 var baseForRight = createBaseFor(true);
4486
4487 /**
4488 * The base implementation of `_.forOwn` without support for iteratee shorthands.
4489 *
4490 * @private
4491 * @param {Object} object The object to iterate over.
4492 * @param {Function} iteratee The function invoked per iteration.
4493 * @returns {Object} Returns `object`.
4494 */
4495 function baseForOwn(object, iteratee) {
4496 return object && baseFor(object, iteratee, keys);
4497 }
4498
4499 /**
4500 * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
4501 *
4502 * @private
4503 * @param {Object} object The object to iterate over.
4504 * @param {Function} iteratee The function invoked per iteration.
4505 * @returns {Object} Returns `object`.
4506 */
4507 function baseForOwnRight(object, iteratee) {
4508 return object && baseForRight(object, iteratee, keys);
4509 }
4510
4511 /**
4512 * The base implementation of `_.functions` which creates an array of
4513 * `object` function property names filtered from `props`.
4514 *
4515 * @private
4516 * @param {Object} object The object to inspect.
4517 * @param {Array} props The property names to filter.
4518 * @returns {Array} Returns the function names.
4519 */
4520 function baseFunctions(object, props) {
4521 return arrayFilter(props, function(key) {
4522 return isFunction(object[key]);
4523 });
4524 }
4525
4526 /**
4527 * The base implementation of `_.get` without support for default values.
4528 *
4529 * @private
4530 * @param {Object} object The object to query.
4531 * @param {Array|string} path The path of the property to get.
4532 * @returns {*} Returns the resolved value.
4533 */
4534 function baseGet(object, path) {
4535 path = castPath(path, object);
4536
4537 var index = 0,
4538 length = path.length;
4539
4540 while (object != null && index < length) {
4541 object = object[toKey(path[index++])];
4542 }
4543 return (index && index == length) ? object : undefined;
4544 }
4545
4546 /**
4547 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
4548 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
4549 * symbols of `object`.
4550 *
4551 * @private
4552 * @param {Object} object The object to query.
4553 * @param {Function} keysFunc The function to get the keys of `object`.
4554 * @param {Function} symbolsFunc The function to get the symbols of `object`.
4555 * @returns {Array} Returns the array of property names and symbols.
4556 */
4557 function baseGetAllKeys(object, keysFunc, symbolsFunc) {
4558 var result = keysFunc(object);
4559 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
4560 }
4561
4562 /**
4563 * The base implementation of `getTag` without fallbacks for buggy environments.
4564 *
4565 * @private
4566 * @param {*} value The value to query.
4567 * @returns {string} Returns the `toStringTag`.
4568 */
4569 function baseGetTag(value) {
4570 if (value == null) {
4571 return value === undefined ? undefinedTag : nullTag;
4572 }
4573 return (symToStringTag && symToStringTag in Object(value))
4574 ? getRawTag(value)
4575 : objectToString(value);
4576 }
4577
4578 /**
4579 * The base implementation of `_.gt` which doesn't coerce arguments.
4580 *
4581 * @private
4582 * @param {*} value The value to compare.
4583 * @param {*} other The other value to compare.
4584 * @returns {boolean} Returns `true` if `value` is greater than `other`,
4585 * else `false`.
4586 */
4587 function baseGt(value, other) {
4588 return value > other;
4589 }
4590
4591 /**
4592 * The base implementation of `_.has` without support for deep paths.
4593 *
4594 * @private
4595 * @param {Object} [object] The object to query.
4596 * @param {Array|string} key The key to check.
4597 * @returns {boolean} Returns `true` if `key` exists, else `false`.
4598 */
4599 function baseHas(object, key) {
4600 return object != null && hasOwnProperty.call(object, key);
4601 }
4602
4603 /**
4604 * The base implementation of `_.hasIn` without support for deep paths.
4605 *
4606 * @private
4607 * @param {Object} [object] The object to query.
4608 * @param {Array|string} key The key to check.
4609 * @returns {boolean} Returns `true` if `key` exists, else `false`.
4610 */
4611 function baseHasIn(object, key) {
4612 return object != null && key in Object(object);
4613 }
4614
4615 /**
4616 * The base implementation of `_.inRange` which doesn't coerce arguments.
4617 *
4618 * @private
4619 * @param {number} number The number to check.
4620 * @param {number} start The start of the range.
4621 * @param {number} end The end of the range.
4622 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
4623 */
4624 function baseInRange(number, start, end) {
4625 return number >= nativeMin(start, end) && number < nativeMax(start, end);
4626 }
4627
4628 /**
4629 * The base implementation of methods like `_.intersection`, without support
4630 * for iteratee shorthands, that accepts an array of arrays to inspect.
4631 *
4632 * @private
4633 * @param {Array} arrays The arrays to inspect.
4634 * @param {Function} [iteratee] The iteratee invoked per element.
4635 * @param {Function} [comparator] The comparator invoked per element.
4636 * @returns {Array} Returns the new array of shared values.
4637 */
4638 function baseIntersection(arrays, iteratee, comparator) {
4639 var includes = comparator ? arrayIncludesWith : arrayIncludes,
4640 length = arrays[0].length,
4641 othLength = arrays.length,
4642 othIndex = othLength,
4643 caches = Array(othLength),
4644 maxLength = Infinity,
4645 result = [];
4646
4647 while (othIndex--) {
4648 var array = arrays[othIndex];
4649 if (othIndex && iteratee) {
4650 array = arrayMap(array, baseUnary(iteratee));
4651 }
4652 maxLength = nativeMin(array.length, maxLength);
4653 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
4654 ? new SetCache(othIndex && array)
4655 : undefined;
4656 }
4657 array = arrays[0];
4658
4659 var index = -1,
4660 seen = caches[0];
4661
4662 outer:
4663 while (++index < length && result.length < maxLength) {
4664 var value = array[index],
4665 computed = iteratee ? iteratee(value) : value;
4666
4667 value = (comparator || value !== 0) ? value : 0;
4668 if (!(seen
4669 ? cacheHas(seen, computed)
4670 : includes(result, computed, comparator)
4671 )) {
4672 othIndex = othLength;
4673 while (--othIndex) {
4674 var cache = caches[othIndex];
4675 if (!(cache
4676 ? cacheHas(cache, computed)
4677 : includes(arrays[othIndex], computed, comparator))
4678 ) {
4679 continue outer;
4680 }
4681 }
4682 if (seen) {
4683 seen.push(computed);
4684 }
4685 result.push(value);
4686 }
4687 }
4688 return result;
4689 }
4690
4691 /**
4692 * The base implementation of `_.invert` and `_.invertBy` which inverts
4693 * `object` with values transformed by `iteratee` and set by `setter`.
4694 *
4695 * @private
4696 * @param {Object} object The object to iterate over.
4697 * @param {Function} setter The function to set `accumulator` values.
4698 * @param {Function} iteratee The iteratee to transform values.
4699 * @param {Object} accumulator The initial inverted object.
4700 * @returns {Function} Returns `accumulator`.
4701 */
4702 function baseInverter(object, setter, iteratee, accumulator) {
4703 baseForOwn(object, function(value, key, object) {
4704 setter(accumulator, iteratee(value), key, object);
4705 });
4706 return accumulator;
4707 }
4708
4709 /**
4710 * The base implementation of `_.invoke` without support for individual
4711 * method arguments.
4712 *
4713 * @private
4714 * @param {Object} object The object to query.
4715 * @param {Array|string} path The path of the method to invoke.
4716 * @param {Array} args The arguments to invoke the method with.
4717 * @returns {*} Returns the result of the invoked method.
4718 */
4719 function baseInvoke(object, path, args) {
4720 path = castPath(path, object);
4721 object = parent(object, path);
4722 var func = object == null ? object : object[toKey(last(path))];
4723 return func == null ? undefined : apply(func, object, args);
4724 }
4725
4726 /**
4727 * The base implementation of `_.isArguments`.
4728 *
4729 * @private
4730 * @param {*} value The value to check.
4731 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4732 */
4733 function baseIsArguments(value) {
4734 return isObjectLike(value) && baseGetTag(value) == argsTag;
4735 }
4736
4737 /**
4738 * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
4739 *
4740 * @private
4741 * @param {*} value The value to check.
4742 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
4743 */
4744 function baseIsArrayBuffer(value) {
4745 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
4746 }
4747
4748 /**
4749 * The base implementation of `_.isDate` without Node.js optimizations.
4750 *
4751 * @private
4752 * @param {*} value The value to check.
4753 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
4754 */
4755 function baseIsDate(value) {
4756 return isObjectLike(value) && baseGetTag(value) == dateTag;
4757 }
4758
4759 /**
4760 * The base implementation of `_.isEqual` which supports partial comparisons
4761 * and tracks traversed objects.
4762 *
4763 * @private
4764 * @param {*} value The value to compare.
4765 * @param {*} other The other value to compare.
4766 * @param {boolean} bitmask The bitmask flags.
4767 * 1 - Unordered comparison
4768 * 2 - Partial comparison
4769 * @param {Function} [customizer] The function to customize comparisons.
4770 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
4771 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4772 */
4773 function baseIsEqual(value, other, bitmask, customizer, stack) {
4774 if (value === other) {
4775 return true;
4776 }
4777 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
4778 return value !== value && other !== other;
4779 }
4780 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
4781 }
4782
4783 /**
4784 * A specialized version of `baseIsEqual` for arrays and objects which performs
4785 * deep comparisons and tracks traversed objects enabling objects with circular
4786 * references to be compared.
4787 *
4788 * @private
4789 * @param {Object} object The object to compare.
4790 * @param {Object} other The other object to compare.
4791 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
4792 * @param {Function} customizer The function to customize comparisons.
4793 * @param {Function} equalFunc The function to determine equivalents of values.
4794 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
4795 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4796 */
4797 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
4798 var objIsArr = isArray(object),
4799 othIsArr = isArray(other),
4800 objTag = objIsArr ? arrayTag : getTag(object),
4801 othTag = othIsArr ? arrayTag : getTag(other);
4802
4803 objTag = objTag == argsTag ? objectTag : objTag;
4804 othTag = othTag == argsTag ? objectTag : othTag;
4805
4806 var objIsObj = objTag == objectTag,
4807 othIsObj = othTag == objectTag,
4808 isSameTag = objTag == othTag;
4809
4810 if (isSameTag && isBuffer(object)) {
4811 if (!isBuffer(other)) {
4812 return false;
4813 }
4814 objIsArr = true;
4815 objIsObj = false;
4816 }
4817 if (isSameTag && !objIsObj) {
4818 stack || (stack = new Stack);
4819 return (objIsArr || isTypedArray(object))
4820 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
4821 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
4822 }
4823 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
4824 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
4825 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
4826
4827 if (objIsWrapped || othIsWrapped) {
4828 var objUnwrapped = objIsWrapped ? object.value() : object,
4829 othUnwrapped = othIsWrapped ? other.value() : other;
4830
4831 stack || (stack = new Stack);
4832 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
4833 }
4834 }
4835 if (!isSameTag) {
4836 return false;
4837 }
4838 stack || (stack = new Stack);
4839 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
4840 }
4841
4842 /**
4843 * The base implementation of `_.isMap` without Node.js optimizations.
4844 *
4845 * @private
4846 * @param {*} value The value to check.
4847 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
4848 */
4849 function baseIsMap(value) {
4850 return isObjectLike(value) && getTag(value) == mapTag;
4851 }
4852
4853 /**
4854 * The base implementation of `_.isMatch` without support for iteratee shorthands.
4855 *
4856 * @private
4857 * @param {Object} object The object to inspect.
4858 * @param {Object} source The object of property values to match.
4859 * @param {Array} matchData The property names, values, and compare flags to match.
4860 * @param {Function} [customizer] The function to customize comparisons.
4861 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
4862 */
4863 function baseIsMatch(object, source, matchData, customizer) {
4864 var index = matchData.length,
4865 length = index,
4866 noCustomizer = !customizer;
4867
4868 if (object == null) {
4869 return !length;
4870 }
4871 object = Object(object);
4872 while (index--) {
4873 var data = matchData[index];
4874 if ((noCustomizer && data[2])
4875 ? data[1] !== object[data[0]]
4876 : !(data[0] in object)
4877 ) {
4878 return false;
4879 }
4880 }
4881 while (++index < length) {
4882 data = matchData[index];
4883 var key = data[0],
4884 objValue = object[key],
4885 srcValue = data[1];
4886
4887 if (noCustomizer && data[2]) {
4888 if (objValue === undefined && !(key in object)) {
4889 return false;
4890 }
4891 } else {
4892 var stack = new Stack;
4893 if (customizer) {
4894 var result = customizer(objValue, srcValue, key, object, source, stack);
4895 }
4896 if (!(result === undefined
4897 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
4898 : result
4899 )) {
4900 return false;
4901 }
4902 }
4903 }
4904 return true;
4905 }
4906
4907 /**
4908 * The base implementation of `_.isNative` without bad shim checks.
4909 *
4910 * @private
4911 * @param {*} value The value to check.
4912 * @returns {boolean} Returns `true` if `value` is a native function,
4913 * else `false`.
4914 */
4915 function baseIsNative(value) {
4916 if (!isObject(value) || isMasked(value)) {
4917 return false;
4918 }
4919 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
4920 return pattern.test(toSource(value));
4921 }
4922
4923 /**
4924 * The base implementation of `_.isRegExp` without Node.js optimizations.
4925 *
4926 * @private
4927 * @param {*} value The value to check.
4928 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
4929 */
4930 function baseIsRegExp(value) {
4931 return isObjectLike(value) && baseGetTag(value) == regexpTag;
4932 }
4933
4934 /**
4935 * The base implementation of `_.isSet` without Node.js optimizations.
4936 *
4937 * @private
4938 * @param {*} value The value to check.
4939 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
4940 */
4941 function baseIsSet(value) {
4942 return isObjectLike(value) && getTag(value) == setTag;
4943 }
4944
4945 /**
4946 * The base implementation of `_.isTypedArray` without Node.js optimizations.
4947 *
4948 * @private
4949 * @param {*} value The value to check.
4950 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
4951 */
4952 function baseIsTypedArray(value) {
4953 return isObjectLike(value) &&
4954 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
4955 }
4956
4957 /**
4958 * The base implementation of `_.iteratee`.
4959 *
4960 * @private
4961 * @param {*} [value=_.identity] The value to convert to an iteratee.
4962 * @returns {Function} Returns the iteratee.
4963 */
4964 function baseIteratee(value) {
4965 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
4966 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
4967 if (typeof value == 'function') {
4968 return value;
4969 }
4970 if (value == null) {
4971 return identity;
4972 }
4973 if (typeof value == 'object') {
4974 return isArray(value)
4975 ? baseMatchesProperty(value[0], value[1])
4976 : baseMatches(value);
4977 }
4978 return property(value);
4979 }
4980
4981 /**
4982 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4983 *
4984 * @private
4985 * @param {Object} object The object to query.
4986 * @returns {Array} Returns the array of property names.
4987 */
4988 function baseKeys(object) {
4989 if (!isPrototype(object)) {
4990 return nativeKeys(object);
4991 }
4992 var result = [];
4993 for (var key in Object(object)) {
4994 if (hasOwnProperty.call(object, key) && key != 'constructor') {
4995 result.push(key);
4996 }
4997 }
4998 return result;
4999 }
5000
5001 /**
5002 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
5003 *
5004 * @private
5005 * @param {Object} object The object to query.
5006 * @returns {Array} Returns the array of property names.
5007 */
5008 function baseKeysIn(object) {
5009 if (!isObject(object)) {
5010 return nativeKeysIn(object);
5011 }
5012 var isProto = isPrototype(object),
5013 result = [];
5014
5015 for (var key in object) {
5016 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
5017 result.push(key);
5018 }
5019 }
5020 return result;
5021 }
5022
5023 /**
5024 * The base implementation of `_.lt` which doesn't coerce arguments.
5025 *
5026 * @private
5027 * @param {*} value The value to compare.
5028 * @param {*} other The other value to compare.
5029 * @returns {boolean} Returns `true` if `value` is less than `other`,
5030 * else `false`.
5031 */
5032 function baseLt(value, other) {
5033 return value < other;
5034 }
5035
5036 /**
5037 * The base implementation of `_.map` without support for iteratee shorthands.
5038 *
5039 * @private
5040 * @param {Array|Object} collection The collection to iterate over.
5041 * @param {Function} iteratee The function invoked per iteration.
5042 * @returns {Array} Returns the new mapped array.
5043 */
5044 function baseMap(collection, iteratee) {
5045 var index = -1,
5046 result = isArrayLike(collection) ? Array(collection.length) : [];
5047
5048 baseEach(collection, function(value, key, collection) {
5049 result[++index] = iteratee(value, key, collection);
5050 });
5051 return result;
5052 }
5053
5054 /**
5055 * The base implementation of `_.matches` which doesn't clone `source`.
5056 *
5057 * @private
5058 * @param {Object} source The object of property values to match.
5059 * @returns {Function} Returns the new spec function.
5060 */
5061 function baseMatches(source) {
5062 var matchData = getMatchData(source);
5063 if (matchData.length == 1 && matchData[0][2]) {
5064 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
5065 }
5066 return function(object) {
5067 return object === source || baseIsMatch(object, source, matchData);
5068 };
5069 }
5070
5071 /**
5072 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
5073 *
5074 * @private
5075 * @param {string} path The path of the property to get.
5076 * @param {*} srcValue The value to match.
5077 * @returns {Function} Returns the new spec function.
5078 */
5079 function baseMatchesProperty(path, srcValue) {
5080 if (isKey(path) && isStrictComparable(srcValue)) {
5081 return matchesStrictComparable(toKey(path), srcValue);
5082 }
5083 return function(object) {
5084 var objValue = get(object, path);
5085 return (objValue === undefined && objValue === srcValue)
5086 ? hasIn(object, path)
5087 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
5088 };
5089 }
5090
5091 /**
5092 * The base implementation of `_.merge` without support for multiple sources.
5093 *
5094 * @private
5095 * @param {Object} object The destination object.
5096 * @param {Object} source The source object.
5097 * @param {number} srcIndex The index of `source`.
5098 * @param {Function} [customizer] The function to customize merged values.
5099 * @param {Object} [stack] Tracks traversed source values and their merged
5100 * counterparts.
5101 */
5102 function baseMerge(object, source, srcIndex, customizer, stack) {
5103 if (object === source) {
5104 return;
5105 }
5106 baseFor(source, function(srcValue, key) {
5107 if (isObject(srcValue)) {
5108 stack || (stack = new Stack);
5109 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
5110 }
5111 else {
5112 var newValue = customizer
5113 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
5114 : undefined;
5115
5116 if (newValue === undefined) {
5117 newValue = srcValue;
5118 }
5119 assignMergeValue(object, key, newValue);
5120 }
5121 }, keysIn);
5122 }
5123
5124 /**
5125 * A specialized version of `baseMerge` for arrays and objects which performs
5126 * deep merges and tracks traversed objects enabling objects with circular
5127 * references to be merged.
5128 *
5129 * @private
5130 * @param {Object} object The destination object.
5131 * @param {Object} source The source object.
5132 * @param {string} key The key of the value to merge.
5133 * @param {number} srcIndex The index of `source`.
5134 * @param {Function} mergeFunc The function to merge values.
5135 * @param {Function} [customizer] The function to customize assigned values.
5136 * @param {Object} [stack] Tracks traversed source values and their merged
5137 * counterparts.
5138 */
5139 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
5140 var objValue = safeGet(object, key),
5141 srcValue = safeGet(source, key),
5142 stacked = stack.get(srcValue);
5143
5144 if (stacked) {
5145 assignMergeValue(object, key, stacked);
5146 return;
5147 }
5148 var newValue = customizer
5149 ? customizer(objValue, srcValue, (key + ''), object, source, stack)
5150 : undefined;
5151
5152 var isCommon = newValue === undefined;
5153
5154 if (isCommon) {
5155 var isArr = isArray(srcValue),
5156 isBuff = !isArr && isBuffer(srcValue),
5157 isTyped = !isArr && !isBuff && isTypedArray(srcValue);
5158
5159 newValue = srcValue;
5160 if (isArr || isBuff || isTyped) {
5161 if (isArray(objValue)) {
5162 newValue = objValue;
5163 }
5164 else if (isArrayLikeObject(objValue)) {
5165 newValue = copyArray(objValue);
5166 }
5167 else if (isBuff) {
5168 isCommon = false;
5169 newValue = cloneBuffer(srcValue, true);
5170 }
5171 else if (isTyped) {
5172 isCommon = false;
5173 newValue = cloneTypedArray(srcValue, true);
5174 }
5175 else {
5176 newValue = [];
5177 }
5178 }
5179 else if (isPlainObject(srcValue) || isArguments(srcValue)) {
5180 newValue = objValue;
5181 if (isArguments(objValue)) {
5182 newValue = toPlainObject(objValue);
5183 }
5184 else if (!isObject(objValue) || isFunction(objValue)) {
5185 newValue = initCloneObject(srcValue);
5186 }
5187 }
5188 else {
5189 isCommon = false;
5190 }
5191 }
5192 if (isCommon) {
5193 // Recursively merge objects and arrays (susceptible to call stack limits).
5194 stack.set(srcValue, newValue);
5195 mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
5196 stack['delete'](srcValue);
5197 }
5198 assignMergeValue(object, key, newValue);
5199 }
5200
5201 /**
5202 * The base implementation of `_.nth` which doesn't coerce arguments.
5203 *
5204 * @private
5205 * @param {Array} array The array to query.
5206 * @param {number} n The index of the element to return.
5207 * @returns {*} Returns the nth element of `array`.
5208 */
5209 function baseNth(array, n) {
5210 var length = array.length;
5211 if (!length) {
5212 return;
5213 }
5214 n += n < 0 ? length : 0;
5215 return isIndex(n, length) ? array[n] : undefined;
5216 }
5217
5218 /**
5219 * The base implementation of `_.orderBy` without param guards.
5220 *
5221 * @private
5222 * @param {Array|Object} collection The collection to iterate over.
5223 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
5224 * @param {string[]} orders The sort orders of `iteratees`.
5225 * @returns {Array} Returns the new sorted array.
5226 */
5227 function baseOrderBy(collection, iteratees, orders) {
5228 var index = -1;
5229 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
5230
5231 var result = baseMap(collection, function(value, key, collection) {
5232 var criteria = arrayMap(iteratees, function(iteratee) {
5233 return iteratee(value);
5234 });
5235 return { 'criteria': criteria, 'index': ++index, 'value': value };
5236 });
5237
5238 return baseSortBy(result, function(object, other) {
5239 return compareMultiple(object, other, orders);
5240 });
5241 }
5242
5243 /**
5244 * The base implementation of `_.pick` without support for individual
5245 * property identifiers.
5246 *
5247 * @private
5248 * @param {Object} object The source object.
5249 * @param {string[]} paths The property paths to pick.
5250 * @returns {Object} Returns the new object.
5251 */
5252 function basePick(object, paths) {
5253 return basePickBy(object, paths, function(value, path) {
5254 return hasIn(object, path);
5255 });
5256 }
5257
5258 /**
5259 * The base implementation of `_.pickBy` without support for iteratee shorthands.
5260 *
5261 * @private
5262 * @param {Object} object The source object.
5263 * @param {string[]} paths The property paths to pick.
5264 * @param {Function} predicate The function invoked per property.
5265 * @returns {Object} Returns the new object.
5266 */
5267 function basePickBy(object, paths, predicate) {
5268 var index = -1,
5269 length = paths.length,
5270 result = {};
5271
5272 while (++index < length) {
5273 var path = paths[index],
5274 value = baseGet(object, path);
5275
5276 if (predicate(value, path)) {
5277 baseSet(result, castPath(path, object), value);
5278 }
5279 }
5280 return result;
5281 }
5282
5283 /**
5284 * A specialized version of `baseProperty` which supports deep paths.
5285 *
5286 * @private
5287 * @param {Array|string} path The path of the property to get.
5288 * @returns {Function} Returns the new accessor function.
5289 */
5290 function basePropertyDeep(path) {
5291 return function(object) {
5292 return baseGet(object, path);
5293 };
5294 }
5295
5296 /**
5297 * The base implementation of `_.pullAllBy` without support for iteratee
5298 * shorthands.
5299 *
5300 * @private
5301 * @param {Array} array The array to modify.
5302 * @param {Array} values The values to remove.
5303 * @param {Function} [iteratee] The iteratee invoked per element.
5304 * @param {Function} [comparator] The comparator invoked per element.
5305 * @returns {Array} Returns `array`.
5306 */
5307 function basePullAll(array, values, iteratee, comparator) {
5308 var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
5309 index = -1,
5310 length = values.length,
5311 seen = array;
5312
5313 if (array === values) {
5314 values = copyArray(values);
5315 }
5316 if (iteratee) {
5317 seen = arrayMap(array, baseUnary(iteratee));
5318 }
5319 while (++index < length) {
5320 var fromIndex = 0,
5321 value = values[index],
5322 computed = iteratee ? iteratee(value) : value;
5323
5324 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
5325 if (seen !== array) {
5326 splice.call(seen, fromIndex, 1);
5327 }
5328 splice.call(array, fromIndex, 1);
5329 }
5330 }
5331 return array;
5332 }
5333
5334 /**
5335 * The base implementation of `_.pullAt` without support for individual
5336 * indexes or capturing the removed elements.
5337 *
5338 * @private
5339 * @param {Array} array The array to modify.
5340 * @param {number[]} indexes The indexes of elements to remove.
5341 * @returns {Array} Returns `array`.
5342 */
5343 function basePullAt(array, indexes) {
5344 var length = array ? indexes.length : 0,
5345 lastIndex = length - 1;
5346
5347 while (length--) {
5348 var index = indexes[length];
5349 if (length == lastIndex || index !== previous) {
5350 var previous = index;
5351 if (isIndex(index)) {
5352 splice.call(array, index, 1);
5353 } else {
5354 baseUnset(array, index);
5355 }
5356 }
5357 }
5358 return array;
5359 }
5360
5361 /**
5362 * The base implementation of `_.random` without support for returning
5363 * floating-point numbers.
5364 *
5365 * @private
5366 * @param {number} lower The lower bound.
5367 * @param {number} upper The upper bound.
5368 * @returns {number} Returns the random number.
5369 */
5370 function baseRandom(lower, upper) {
5371 return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
5372 }
5373
5374 /**
5375 * The base implementation of `_.range` and `_.rangeRight` which doesn't
5376 * coerce arguments.
5377 *
5378 * @private
5379 * @param {number} start The start of the range.
5380 * @param {number} end The end of the range.
5381 * @param {number} step The value to increment or decrement by.
5382 * @param {boolean} [fromRight] Specify iterating from right to left.
5383 * @returns {Array} Returns the range of numbers.
5384 */
5385 function baseRange(start, end, step, fromRight) {
5386 var index = -1,
5387 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
5388 result = Array(length);
5389
5390 while (length--) {
5391 result[fromRight ? length : ++index] = start;
5392 start += step;
5393 }
5394 return result;
5395 }
5396
5397 /**
5398 * The base implementation of `_.repeat` which doesn't coerce arguments.
5399 *
5400 * @private
5401 * @param {string} string The string to repeat.
5402 * @param {number} n The number of times to repeat the string.
5403 * @returns {string} Returns the repeated string.
5404 */
5405 function baseRepeat(string, n) {
5406 var result = '';
5407 if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
5408 return result;
5409 }
5410 // Leverage the exponentiation by squaring algorithm for a faster repeat.
5411 // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
5412 do {
5413 if (n % 2) {
5414 result += string;
5415 }
5416 n = nativeFloor(n / 2);
5417 if (n) {
5418 string += string;
5419 }
5420 } while (n);
5421
5422 return result;
5423 }
5424
5425 /**
5426 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
5427 *
5428 * @private
5429 * @param {Function} func The function to apply a rest parameter to.
5430 * @param {number} [start=func.length-1] The start position of the rest parameter.
5431 * @returns {Function} Returns the new function.
5432 */
5433 function baseRest(func, start) {
5434 return setToString(overRest(func, start, identity), func + '');
5435 }
5436
5437 /**
5438 * The base implementation of `_.sample`.
5439 *
5440 * @private
5441 * @param {Array|Object} collection The collection to sample.
5442 * @returns {*} Returns the random element.
5443 */
5444 function baseSample(collection) {
5445 return arraySample(values(collection));
5446 }
5447
5448 /**
5449 * The base implementation of `_.sampleSize` without param guards.
5450 *
5451 * @private
5452 * @param {Array|Object} collection The collection to sample.
5453 * @param {number} n The number of elements to sample.
5454 * @returns {Array} Returns the random elements.
5455 */
5456 function baseSampleSize(collection, n) {
5457 var array = values(collection);
5458 return shuffleSelf(array, baseClamp(n, 0, array.length));
5459 }
5460
5461 /**
5462 * The base implementation of `_.set`.
5463 *
5464 * @private
5465 * @param {Object} object The object to modify.
5466 * @param {Array|string} path The path of the property to set.
5467 * @param {*} value The value to set.
5468 * @param {Function} [customizer] The function to customize path creation.
5469 * @returns {Object} Returns `object`.
5470 */
5471 function baseSet(object, path, value, customizer) {
5472 if (!isObject(object)) {
5473 return object;
5474 }
5475 path = castPath(path, object);
5476
5477 var index = -1,
5478 length = path.length,
5479 lastIndex = length - 1,
5480 nested = object;
5481
5482 while (nested != null && ++index < length) {
5483 var key = toKey(path[index]),
5484 newValue = value;
5485
5486 if (index != lastIndex) {
5487 var objValue = nested[key];
5488 newValue = customizer ? customizer(objValue, key, nested) : undefined;
5489 if (newValue === undefined) {
5490 newValue = isObject(objValue)
5491 ? objValue
5492 : (isIndex(path[index + 1]) ? [] : {});
5493 }
5494 }
5495 assignValue(nested, key, newValue);
5496 nested = nested[key];
5497 }
5498 return object;
5499 }
5500
5501 /**
5502 * The base implementation of `setData` without support for hot loop shorting.
5503 *
5504 * @private
5505 * @param {Function} func The function to associate metadata with.
5506 * @param {*} data The metadata.
5507 * @returns {Function} Returns `func`.
5508 */
5509 var baseSetData = !metaMap ? identity : function(func, data) {
5510 metaMap.set(func, data);
5511 return func;
5512 };
5513
5514 /**
5515 * The base implementation of `setToString` without support for hot loop shorting.
5516 *
5517 * @private
5518 * @param {Function} func The function to modify.
5519 * @param {Function} string The `toString` result.
5520 * @returns {Function} Returns `func`.
5521 */
5522 var baseSetToString = !defineProperty ? identity : function(func, string) {
5523 return defineProperty(func, 'toString', {
5524 'configurable': true,
5525 'enumerable': false,
5526 'value': constant(string),
5527 'writable': true
5528 });
5529 };
5530
5531 /**
5532 * The base implementation of `_.shuffle`.
5533 *
5534 * @private
5535 * @param {Array|Object} collection The collection to shuffle.
5536 * @returns {Array} Returns the new shuffled array.
5537 */
5538 function baseShuffle(collection) {
5539 return shuffleSelf(values(collection));
5540 }
5541
5542 /**
5543 * The base implementation of `_.slice` without an iteratee call guard.
5544 *
5545 * @private
5546 * @param {Array} array The array to slice.
5547 * @param {number} [start=0] The start position.
5548 * @param {number} [end=array.length] The end position.
5549 * @returns {Array} Returns the slice of `array`.
5550 */
5551 function baseSlice(array, start, end) {
5552 var index = -1,
5553 length = array.length;
5554
5555 if (start < 0) {
5556 start = -start > length ? 0 : (length + start);
5557 }
5558 end = end > length ? length : end;
5559 if (end < 0) {
5560 end += length;
5561 }
5562 length = start > end ? 0 : ((end - start) >>> 0);
5563 start >>>= 0;
5564
5565 var result = Array(length);
5566 while (++index < length) {
5567 result[index] = array[index + start];
5568 }
5569 return result;
5570 }
5571
5572 /**
5573 * The base implementation of `_.some` without support for iteratee shorthands.
5574 *
5575 * @private
5576 * @param {Array|Object} collection The collection to iterate over.
5577 * @param {Function} predicate The function invoked per iteration.
5578 * @returns {boolean} Returns `true` if any element passes the predicate check,
5579 * else `false`.
5580 */
5581 function baseSome(collection, predicate) {
5582 var result;
5583
5584 baseEach(collection, function(value, index, collection) {
5585 result = predicate(value, index, collection);
5586 return !result;
5587 });
5588 return !!result;
5589 }
5590
5591 /**
5592 * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
5593 * performs a binary search of `array` to determine the index at which `value`
5594 * should be inserted into `array` in order to maintain its sort order.
5595 *
5596 * @private
5597 * @param {Array} array The sorted array to inspect.
5598 * @param {*} value The value to evaluate.
5599 * @param {boolean} [retHighest] Specify returning the highest qualified index.
5600 * @returns {number} Returns the index at which `value` should be inserted
5601 * into `array`.
5602 */
5603 function baseSortedIndex(array, value, retHighest) {
5604 var low = 0,
5605 high = array == null ? low : array.length;
5606
5607 if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
5608 while (low < high) {
5609 var mid = (low + high) >>> 1,
5610 computed = array[mid];
5611
5612 if (computed !== null && !isSymbol(computed) &&
5613 (retHighest ? (computed <= value) : (computed < value))) {
5614 low = mid + 1;
5615 } else {
5616 high = mid;
5617 }
5618 }
5619 return high;
5620 }
5621 return baseSortedIndexBy(array, value, identity, retHighest);
5622 }
5623
5624 /**
5625 * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
5626 * which invokes `iteratee` for `value` and each element of `array` to compute
5627 * their sort ranking. The iteratee is invoked with one argument; (value).
5628 *
5629 * @private
5630 * @param {Array} array The sorted array to inspect.
5631 * @param {*} value The value to evaluate.
5632 * @param {Function} iteratee The iteratee invoked per element.
5633 * @param {boolean} [retHighest] Specify returning the highest qualified index.
5634 * @returns {number} Returns the index at which `value` should be inserted
5635 * into `array`.
5636 */
5637 function baseSortedIndexBy(array, value, iteratee, retHighest) {
5638 value = iteratee(value);
5639
5640 var low = 0,
5641 high = array == null ? 0 : array.length,
5642 valIsNaN = value !== value,
5643 valIsNull = value === null,
5644 valIsSymbol = isSymbol(value),
5645 valIsUndefined = value === undefined;
5646
5647 while (low < high) {
5648 var mid = nativeFloor((low + high) / 2),
5649 computed = iteratee(array[mid]),
5650 othIsDefined = computed !== undefined,
5651 othIsNull = computed === null,
5652 othIsReflexive = computed === computed,
5653 othIsSymbol = isSymbol(computed);
5654
5655 if (valIsNaN) {
5656 var setLow = retHighest || othIsReflexive;
5657 } else if (valIsUndefined) {
5658 setLow = othIsReflexive && (retHighest || othIsDefined);
5659 } else if (valIsNull) {
5660 setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
5661 } else if (valIsSymbol) {
5662 setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
5663 } else if (othIsNull || othIsSymbol) {
5664 setLow = false;
5665 } else {
5666 setLow = retHighest ? (computed <= value) : (computed < value);
5667 }
5668 if (setLow) {
5669 low = mid + 1;
5670 } else {
5671 high = mid;
5672 }
5673 }
5674 return nativeMin(high, MAX_ARRAY_INDEX);
5675 }
5676
5677 /**
5678 * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
5679 * support for iteratee shorthands.
5680 *
5681 * @private
5682 * @param {Array} array The array to inspect.
5683 * @param {Function} [iteratee] The iteratee invoked per element.
5684 * @returns {Array} Returns the new duplicate free array.
5685 */
5686 function baseSortedUniq(array, iteratee) {
5687 var index = -1,
5688 length = array.length,
5689 resIndex = 0,
5690 result = [];
5691
5692 while (++index < length) {
5693 var value = array[index],
5694 computed = iteratee ? iteratee(value) : value;
5695
5696 if (!index || !eq(computed, seen)) {
5697 var seen = computed;
5698 result[resIndex++] = value === 0 ? 0 : value;
5699 }
5700 }
5701 return result;
5702 }
5703
5704 /**
5705 * The base implementation of `_.toNumber` which doesn't ensure correct
5706 * conversions of binary, hexadecimal, or octal string values.
5707 *
5708 * @private
5709 * @param {*} value The value to process.
5710 * @returns {number} Returns the number.
5711 */
5712 function baseToNumber(value) {
5713 if (typeof value == 'number') {
5714 return value;
5715 }
5716 if (isSymbol(value)) {
5717 return NAN;
5718 }
5719 return +value;
5720 }
5721
5722 /**
5723 * The base implementation of `_.toString` which doesn't convert nullish
5724 * values to empty strings.
5725 *
5726 * @private
5727 * @param {*} value The value to process.
5728 * @returns {string} Returns the string.
5729 */
5730 function baseToString(value) {
5731 // Exit early for strings to avoid a performance hit in some environments.
5732 if (typeof value == 'string') {
5733 return value;
5734 }
5735 if (isArray(value)) {
5736 // Recursively convert values (susceptible to call stack limits).
5737 return arrayMap(value, baseToString) + '';
5738 }
5739 if (isSymbol(value)) {
5740 return symbolToString ? symbolToString.call(value) : '';
5741 }
5742 var result = (value + '');
5743 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
5744 }
5745
5746 /**
5747 * The base implementation of `_.uniqBy` without support for iteratee shorthands.
5748 *
5749 * @private
5750 * @param {Array} array The array to inspect.
5751 * @param {Function} [iteratee] The iteratee invoked per element.
5752 * @param {Function} [comparator] The comparator invoked per element.
5753 * @returns {Array} Returns the new duplicate free array.
5754 */
5755 function baseUniq(array, iteratee, comparator) {
5756 var index = -1,
5757 includes = arrayIncludes,
5758 length = array.length,
5759 isCommon = true,
5760 result = [],
5761 seen = result;
5762
5763 if (comparator) {
5764 isCommon = false;
5765 includes = arrayIncludesWith;
5766 }
5767 else if (length >= LARGE_ARRAY_SIZE) {
5768 var set = iteratee ? null : createSet(array);
5769 if (set) {
5770 return setToArray(set);
5771 }
5772 isCommon = false;
5773 includes = cacheHas;
5774 seen = new SetCache;
5775 }
5776 else {
5777 seen = iteratee ? [] : result;
5778 }
5779 outer:
5780 while (++index < length) {
5781 var value = array[index],
5782 computed = iteratee ? iteratee(value) : value;
5783
5784 value = (comparator || value !== 0) ? value : 0;
5785 if (isCommon && computed === computed) {
5786 var seenIndex = seen.length;
5787 while (seenIndex--) {
5788 if (seen[seenIndex] === computed) {
5789 continue outer;
5790 }
5791 }
5792 if (iteratee) {
5793 seen.push(computed);
5794 }
5795 result.push(value);
5796 }
5797 else if (!includes(seen, computed, comparator)) {
5798 if (seen !== result) {
5799 seen.push(computed);
5800 }
5801 result.push(value);
5802 }
5803 }
5804 return result;
5805 }
5806
5807 /**
5808 * The base implementation of `_.unset`.
5809 *
5810 * @private
5811 * @param {Object} object The object to modify.
5812 * @param {Array|string} path The property path to unset.
5813 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
5814 */
5815 function baseUnset(object, path) {
5816 path = castPath(path, object);
5817 object = parent(object, path);
5818 return object == null || delete object[toKey(last(path))];
5819 }
5820
5821 /**
5822 * The base implementation of `_.update`.
5823 *
5824 * @private
5825 * @param {Object} object The object to modify.
5826 * @param {Array|string} path The path of the property to update.
5827 * @param {Function} updater The function to produce the updated value.
5828 * @param {Function} [customizer] The function to customize path creation.
5829 * @returns {Object} Returns `object`.
5830 */
5831 function baseUpdate(object, path, updater, customizer) {
5832 return baseSet(object, path, updater(baseGet(object, path)), customizer);
5833 }
5834
5835 /**
5836 * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
5837 * without support for iteratee shorthands.
5838 *
5839 * @private
5840 * @param {Array} array The array to query.
5841 * @param {Function} predicate The function invoked per iteration.
5842 * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
5843 * @param {boolean} [fromRight] Specify iterating from right to left.
5844 * @returns {Array} Returns the slice of `array`.
5845 */
5846 function baseWhile(array, predicate, isDrop, fromRight) {
5847 var length = array.length,
5848 index = fromRight ? length : -1;
5849
5850 while ((fromRight ? index-- : ++index < length) &&
5851 predicate(array[index], index, array)) {}
5852
5853 return isDrop
5854 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
5855 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
5856 }
5857
5858 /**
5859 * The base implementation of `wrapperValue` which returns the result of
5860 * performing a sequence of actions on the unwrapped `value`, where each
5861 * successive action is supplied the return value of the previous.
5862 *
5863 * @private
5864 * @param {*} value The unwrapped value.
5865 * @param {Array} actions Actions to perform to resolve the unwrapped value.
5866 * @returns {*} Returns the resolved value.
5867 */
5868 function baseWrapperValue(value, actions) {
5869 var result = value;
5870 if (result instanceof LazyWrapper) {
5871 result = result.value();
5872 }
5873 return arrayReduce(actions, function(result, action) {
5874 return action.func.apply(action.thisArg, arrayPush([result], action.args));
5875 }, result);
5876 }
5877
5878 /**
5879 * The base implementation of methods like `_.xor`, without support for
5880 * iteratee shorthands, that accepts an array of arrays to inspect.
5881 *
5882 * @private
5883 * @param {Array} arrays The arrays to inspect.
5884 * @param {Function} [iteratee] The iteratee invoked per element.
5885 * @param {Function} [comparator] The comparator invoked per element.
5886 * @returns {Array} Returns the new array of values.
5887 */
5888 function baseXor(arrays, iteratee, comparator) {
5889 var length = arrays.length;
5890 if (length < 2) {
5891 return length ? baseUniq(arrays[0]) : [];
5892 }
5893 var index = -1,
5894 result = Array(length);
5895
5896 while (++index < length) {
5897 var array = arrays[index],
5898 othIndex = -1;
5899
5900 while (++othIndex < length) {
5901 if (othIndex != index) {
5902 result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
5903 }
5904 }
5905 }
5906 return baseUniq(baseFlatten(result, 1), iteratee, comparator);
5907 }
5908
5909 /**
5910 * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
5911 *
5912 * @private
5913 * @param {Array} props The property identifiers.
5914 * @param {Array} values The property values.
5915 * @param {Function} assignFunc The function to assign values.
5916 * @returns {Object} Returns the new object.
5917 */
5918 function baseZipObject(props, values, assignFunc) {
5919 var index = -1,
5920 length = props.length,
5921 valsLength = values.length,
5922 result = {};
5923
5924 while (++index < length) {
5925 var value = index < valsLength ? values[index] : undefined;
5926 assignFunc(result, props[index], value);
5927 }
5928 return result;
5929 }
5930
5931 /**
5932 * Casts `value` to an empty array if it's not an array like object.
5933 *
5934 * @private
5935 * @param {*} value The value to inspect.
5936 * @returns {Array|Object} Returns the cast array-like object.
5937 */
5938 function castArrayLikeObject(value) {
5939 return isArrayLikeObject(value) ? value : [];
5940 }
5941
5942 /**
5943 * Casts `value` to `identity` if it's not a function.
5944 *
5945 * @private
5946 * @param {*} value The value to inspect.
5947 * @returns {Function} Returns cast function.
5948 */
5949 function castFunction(value) {
5950 return typeof value == 'function' ? value : identity;
5951 }
5952
5953 /**
5954 * Casts `value` to a path array if it's not one.
5955 *
5956 * @private
5957 * @param {*} value The value to inspect.
5958 * @param {Object} [object] The object to query keys on.
5959 * @returns {Array} Returns the cast property path array.
5960 */
5961 function castPath(value, object) {
5962 if (isArray(value)) {
5963 return value;
5964 }
5965 return isKey(value, object) ? [value] : stringToPath(toString(value));
5966 }
5967
5968 /**
5969 * A `baseRest` alias which can be replaced with `identity` by module
5970 * replacement plugins.
5971 *
5972 * @private
5973 * @type {Function}
5974 * @param {Function} func The function to apply a rest parameter to.
5975 * @returns {Function} Returns the new function.
5976 */
5977 var castRest = baseRest;
5978
5979 /**
5980 * Casts `array` to a slice if it's needed.
5981 *
5982 * @private
5983 * @param {Array} array The array to inspect.
5984 * @param {number} start The start position.
5985 * @param {number} [end=array.length] The end position.
5986 * @returns {Array} Returns the cast slice.
5987 */
5988 function castSlice(array, start, end) {
5989 var length = array.length;
5990 end = end === undefined ? length : end;
5991 return (!start && end >= length) ? array : baseSlice(array, start, end);
5992 }
5993
5994 /**
5995 * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
5996 *
5997 * @private
5998 * @param {number|Object} id The timer id or timeout object of the timer to clear.
5999 */
6000 var clearTimeout = ctxClearTimeout || function(id) {
6001 return root.clearTimeout(id);
6002 };
6003
6004 /**
6005 * Creates a clone of `buffer`.
6006 *
6007 * @private
6008 * @param {Buffer} buffer The buffer to clone.
6009 * @param {boolean} [isDeep] Specify a deep clone.
6010 * @returns {Buffer} Returns the cloned buffer.
6011 */
6012 function cloneBuffer(buffer, isDeep) {
6013 if (isDeep) {
6014 return buffer.slice();
6015 }
6016 var length = buffer.length,
6017 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
6018
6019 buffer.copy(result);
6020 return result;
6021 }
6022
6023 /**
6024 * Creates a clone of `arrayBuffer`.
6025 *
6026 * @private
6027 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
6028 * @returns {ArrayBuffer} Returns the cloned array buffer.
6029 */
6030 function cloneArrayBuffer(arrayBuffer) {
6031 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
6032 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
6033 return result;
6034 }
6035
6036 /**
6037 * Creates a clone of `dataView`.
6038 *
6039 * @private
6040 * @param {Object} dataView The data view to clone.
6041 * @param {boolean} [isDeep] Specify a deep clone.
6042 * @returns {Object} Returns the cloned data view.
6043 */
6044 function cloneDataView(dataView, isDeep) {
6045 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
6046 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
6047 }
6048
6049 /**
6050 * Creates a clone of `regexp`.
6051 *
6052 * @private
6053 * @param {Object} regexp The regexp to clone.
6054 * @returns {Object} Returns the cloned regexp.
6055 */
6056 function cloneRegExp(regexp) {
6057 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
6058 result.lastIndex = regexp.lastIndex;
6059 return result;
6060 }
6061
6062 /**
6063 * Creates a clone of the `symbol` object.
6064 *
6065 * @private
6066 * @param {Object} symbol The symbol object to clone.
6067 * @returns {Object} Returns the cloned symbol object.
6068 */
6069 function cloneSymbol(symbol) {
6070 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
6071 }
6072
6073 /**
6074 * Creates a clone of `typedArray`.
6075 *
6076 * @private
6077 * @param {Object} typedArray The typed array to clone.
6078 * @param {boolean} [isDeep] Specify a deep clone.
6079 * @returns {Object} Returns the cloned typed array.
6080 */
6081 function cloneTypedArray(typedArray, isDeep) {
6082 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
6083 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
6084 }
6085
6086 /**
6087 * Compares values to sort them in ascending order.
6088 *
6089 * @private
6090 * @param {*} value The value to compare.
6091 * @param {*} other The other value to compare.
6092 * @returns {number} Returns the sort order indicator for `value`.
6093 */
6094 function compareAscending(value, other) {
6095 if (value !== other) {
6096 var valIsDefined = value !== undefined,
6097 valIsNull = value === null,
6098 valIsReflexive = value === value,
6099 valIsSymbol = isSymbol(value);
6100
6101 var othIsDefined = other !== undefined,
6102 othIsNull = other === null,
6103 othIsReflexive = other === other,
6104 othIsSymbol = isSymbol(other);
6105
6106 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
6107 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
6108 (valIsNull && othIsDefined && othIsReflexive) ||
6109 (!valIsDefined && othIsReflexive) ||
6110 !valIsReflexive) {
6111 return 1;
6112 }
6113 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
6114 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
6115 (othIsNull && valIsDefined && valIsReflexive) ||
6116 (!othIsDefined && valIsReflexive) ||
6117 !othIsReflexive) {
6118 return -1;
6119 }
6120 }
6121 return 0;
6122 }
6123
6124 /**
6125 * Used by `_.orderBy` to compare multiple properties of a value to another
6126 * and stable sort them.
6127 *
6128 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
6129 * specify an order of "desc" for descending or "asc" for ascending sort order
6130 * of corresponding values.
6131 *
6132 * @private
6133 * @param {Object} object The object to compare.
6134 * @param {Object} other The other object to compare.
6135 * @param {boolean[]|string[]} orders The order to sort by for each property.
6136 * @returns {number} Returns the sort order indicator for `object`.
6137 */
6138 function compareMultiple(object, other, orders) {
6139 var index = -1,
6140 objCriteria = object.criteria,
6141 othCriteria = other.criteria,
6142 length = objCriteria.length,
6143 ordersLength = orders.length;
6144
6145 while (++index < length) {
6146 var result = compareAscending(objCriteria[index], othCriteria[index]);
6147 if (result) {
6148 if (index >= ordersLength) {
6149 return result;
6150 }
6151 var order = orders[index];
6152 return result * (order == 'desc' ? -1 : 1);
6153 }
6154 }
6155 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
6156 // that causes it, under certain circumstances, to provide the same value for
6157 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
6158 // for more details.
6159 //
6160 // This also ensures a stable sort in V8 and other engines.
6161 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
6162 return object.index - other.index;
6163 }
6164
6165 /**
6166 * Creates an array that is the composition of partially applied arguments,
6167 * placeholders, and provided arguments into a single array of arguments.
6168 *
6169 * @private
6170 * @param {Array} args The provided arguments.
6171 * @param {Array} partials The arguments to prepend to those provided.
6172 * @param {Array} holders The `partials` placeholder indexes.
6173 * @params {boolean} [isCurried] Specify composing for a curried function.
6174 * @returns {Array} Returns the new array of composed arguments.
6175 */
6176 function composeArgs(args, partials, holders, isCurried) {
6177 var argsIndex = -1,
6178 argsLength = args.length,
6179 holdersLength = holders.length,
6180 leftIndex = -1,
6181 leftLength = partials.length,
6182 rangeLength = nativeMax(argsLength - holdersLength, 0),
6183 result = Array(leftLength + rangeLength),
6184 isUncurried = !isCurried;
6185
6186 while (++leftIndex < leftLength) {
6187 result[leftIndex] = partials[leftIndex];
6188 }
6189 while (++argsIndex < holdersLength) {
6190 if (isUncurried || argsIndex < argsLength) {
6191 result[holders[argsIndex]] = args[argsIndex];
6192 }
6193 }
6194 while (rangeLength--) {
6195 result[leftIndex++] = args[argsIndex++];
6196 }
6197 return result;
6198 }
6199
6200 /**
6201 * This function is like `composeArgs` except that the arguments composition
6202 * is tailored for `_.partialRight`.
6203 *
6204 * @private
6205 * @param {Array} args The provided arguments.
6206 * @param {Array} partials The arguments to append to those provided.
6207 * @param {Array} holders The `partials` placeholder indexes.
6208 * @params {boolean} [isCurried] Specify composing for a curried function.
6209 * @returns {Array} Returns the new array of composed arguments.
6210 */
6211 function composeArgsRight(args, partials, holders, isCurried) {
6212 var argsIndex = -1,
6213 argsLength = args.length,
6214 holdersIndex = -1,
6215 holdersLength = holders.length,
6216 rightIndex = -1,
6217 rightLength = partials.length,
6218 rangeLength = nativeMax(argsLength - holdersLength, 0),
6219 result = Array(rangeLength + rightLength),
6220 isUncurried = !isCurried;
6221
6222 while (++argsIndex < rangeLength) {
6223 result[argsIndex] = args[argsIndex];
6224 }
6225 var offset = argsIndex;
6226 while (++rightIndex < rightLength) {
6227 result[offset + rightIndex] = partials[rightIndex];
6228 }
6229 while (++holdersIndex < holdersLength) {
6230 if (isUncurried || argsIndex < argsLength) {
6231 result[offset + holders[holdersIndex]] = args[argsIndex++];
6232 }
6233 }
6234 return result;
6235 }
6236
6237 /**
6238 * Copies the values of `source` to `array`.
6239 *
6240 * @private
6241 * @param {Array} source The array to copy values from.
6242 * @param {Array} [array=[]] The array to copy values to.
6243 * @returns {Array} Returns `array`.
6244 */
6245 function copyArray(source, array) {
6246 var index = -1,
6247 length = source.length;
6248
6249 array || (array = Array(length));
6250 while (++index < length) {
6251 array[index] = source[index];
6252 }
6253 return array;
6254 }
6255
6256 /**
6257 * Copies properties of `source` to `object`.
6258 *
6259 * @private
6260 * @param {Object} source The object to copy properties from.
6261 * @param {Array} props The property identifiers to copy.
6262 * @param {Object} [object={}] The object to copy properties to.
6263 * @param {Function} [customizer] The function to customize copied values.
6264 * @returns {Object} Returns `object`.
6265 */
6266 function copyObject(source, props, object, customizer) {
6267 var isNew = !object;
6268 object || (object = {});
6269
6270 var index = -1,
6271 length = props.length;
6272
6273 while (++index < length) {
6274 var key = props[index];
6275
6276 var newValue = customizer
6277 ? customizer(object[key], source[key], key, object, source)
6278 : undefined;
6279
6280 if (newValue === undefined) {
6281 newValue = source[key];
6282 }
6283 if (isNew) {
6284 baseAssignValue(object, key, newValue);
6285 } else {
6286 assignValue(object, key, newValue);
6287 }
6288 }
6289 return object;
6290 }
6291
6292 /**
6293 * Copies own symbols of `source` to `object`.
6294 *
6295 * @private
6296 * @param {Object} source The object to copy symbols from.
6297 * @param {Object} [object={}] The object to copy symbols to.
6298 * @returns {Object} Returns `object`.
6299 */
6300 function copySymbols(source, object) {
6301 return copyObject(source, getSymbols(source), object);
6302 }
6303
6304 /**
6305 * Copies own and inherited symbols of `source` to `object`.
6306 *
6307 * @private
6308 * @param {Object} source The object to copy symbols from.
6309 * @param {Object} [object={}] The object to copy symbols to.
6310 * @returns {Object} Returns `object`.
6311 */
6312 function copySymbolsIn(source, object) {
6313 return copyObject(source, getSymbolsIn(source), object);
6314 }
6315
6316 /**
6317 * Creates a function like `_.groupBy`.
6318 *
6319 * @private
6320 * @param {Function} setter The function to set accumulator values.
6321 * @param {Function} [initializer] The accumulator object initializer.
6322 * @returns {Function} Returns the new aggregator function.
6323 */
6324 function createAggregator(setter, initializer) {
6325 return function(collection, iteratee) {
6326 var func = isArray(collection) ? arrayAggregator : baseAggregator,
6327 accumulator = initializer ? initializer() : {};
6328
6329 return func(collection, setter, getIteratee(iteratee, 2), accumulator);
6330 };
6331 }
6332
6333 /**
6334 * Creates a function like `_.assign`.
6335 *
6336 * @private
6337 * @param {Function} assigner The function to assign values.
6338 * @returns {Function} Returns the new assigner function.
6339 */
6340 function createAssigner(assigner) {
6341 return baseRest(function(object, sources) {
6342 var index = -1,
6343 length = sources.length,
6344 customizer = length > 1 ? sources[length - 1] : undefined,
6345 guard = length > 2 ? sources[2] : undefined;
6346
6347 customizer = (assigner.length > 3 && typeof customizer == 'function')
6348 ? (length--, customizer)
6349 : undefined;
6350
6351 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
6352 customizer = length < 3 ? undefined : customizer;
6353 length = 1;
6354 }
6355 object = Object(object);
6356 while (++index < length) {
6357 var source = sources[index];
6358 if (source) {
6359 assigner(object, source, index, customizer);
6360 }
6361 }
6362 return object;
6363 });
6364 }
6365
6366 /**
6367 * Creates a `baseEach` or `baseEachRight` function.
6368 *
6369 * @private
6370 * @param {Function} eachFunc The function to iterate over a collection.
6371 * @param {boolean} [fromRight] Specify iterating from right to left.
6372 * @returns {Function} Returns the new base function.
6373 */
6374 function createBaseEach(eachFunc, fromRight) {
6375 return function(collection, iteratee) {
6376 if (collection == null) {
6377 return collection;
6378 }
6379 if (!isArrayLike(collection)) {
6380 return eachFunc(collection, iteratee);
6381 }
6382 var length = collection.length,
6383 index = fromRight ? length : -1,
6384 iterable = Object(collection);
6385
6386 while ((fromRight ? index-- : ++index < length)) {
6387 if (iteratee(iterable[index], index, iterable) === false) {
6388 break;
6389 }
6390 }
6391 return collection;
6392 };
6393 }
6394
6395 /**
6396 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
6397 *
6398 * @private
6399 * @param {boolean} [fromRight] Specify iterating from right to left.
6400 * @returns {Function} Returns the new base function.
6401 */
6402 function createBaseFor(fromRight) {
6403 return function(object, iteratee, keysFunc) {
6404 var index = -1,
6405 iterable = Object(object),
6406 props = keysFunc(object),
6407 length = props.length;
6408
6409 while (length--) {
6410 var key = props[fromRight ? length : ++index];
6411 if (iteratee(iterable[key], key, iterable) === false) {
6412 break;
6413 }
6414 }
6415 return object;
6416 };
6417 }
6418
6419 /**
6420 * Creates a function that wraps `func` to invoke it with the optional `this`
6421 * binding of `thisArg`.
6422 *
6423 * @private
6424 * @param {Function} func The function to wrap.
6425 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6426 * @param {*} [thisArg] The `this` binding of `func`.
6427 * @returns {Function} Returns the new wrapped function.
6428 */
6429 function createBind(func, bitmask, thisArg) {
6430 var isBind = bitmask & WRAP_BIND_FLAG,
6431 Ctor = createCtor(func);
6432
6433 function wrapper() {
6434 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6435 return fn.apply(isBind ? thisArg : this, arguments);
6436 }
6437 return wrapper;
6438 }
6439
6440 /**
6441 * Creates a function like `_.lowerFirst`.
6442 *
6443 * @private
6444 * @param {string} methodName The name of the `String` case method to use.
6445 * @returns {Function} Returns the new case function.
6446 */
6447 function createCaseFirst(methodName) {
6448 return function(string) {
6449 string = toString(string);
6450
6451 var strSymbols = hasUnicode(string)
6452 ? stringToArray(string)
6453 : undefined;
6454
6455 var chr = strSymbols
6456 ? strSymbols[0]
6457 : string.charAt(0);
6458
6459 var trailing = strSymbols
6460 ? castSlice(strSymbols, 1).join('')
6461 : string.slice(1);
6462
6463 return chr[methodName]() + trailing;
6464 };
6465 }
6466
6467 /**
6468 * Creates a function like `_.camelCase`.
6469 *
6470 * @private
6471 * @param {Function} callback The function to combine each word.
6472 * @returns {Function} Returns the new compounder function.
6473 */
6474 function createCompounder(callback) {
6475 return function(string) {
6476 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
6477 };
6478 }
6479
6480 /**
6481 * Creates a function that produces an instance of `Ctor` regardless of
6482 * whether it was invoked as part of a `new` expression or by `call` or `apply`.
6483 *
6484 * @private
6485 * @param {Function} Ctor The constructor to wrap.
6486 * @returns {Function} Returns the new wrapped function.
6487 */
6488 function createCtor(Ctor) {
6489 return function() {
6490 // Use a `switch` statement to work with class constructors. See
6491 // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
6492 // for more details.
6493 var args = arguments;
6494 switch (args.length) {
6495 case 0: return new Ctor;
6496 case 1: return new Ctor(args[0]);
6497 case 2: return new Ctor(args[0], args[1]);
6498 case 3: return new Ctor(args[0], args[1], args[2]);
6499 case 4: return new Ctor(args[0], args[1], args[2], args[3]);
6500 case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
6501 case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
6502 case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
6503 }
6504 var thisBinding = baseCreate(Ctor.prototype),
6505 result = Ctor.apply(thisBinding, args);
6506
6507 // Mimic the constructor's `return` behavior.
6508 // See https://es5.github.io/#x13.2.2 for more details.
6509 return isObject(result) ? result : thisBinding;
6510 };
6511 }
6512
6513 /**
6514 * Creates a function that wraps `func` to enable currying.
6515 *
6516 * @private
6517 * @param {Function} func The function to wrap.
6518 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6519 * @param {number} arity The arity of `func`.
6520 * @returns {Function} Returns the new wrapped function.
6521 */
6522 function createCurry(func, bitmask, arity) {
6523 var Ctor = createCtor(func);
6524
6525 function wrapper() {
6526 var length = arguments.length,
6527 args = Array(length),
6528 index = length,
6529 placeholder = getHolder(wrapper);
6530
6531 while (index--) {
6532 args[index] = arguments[index];
6533 }
6534 var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
6535 ? []
6536 : replaceHolders(args, placeholder);
6537
6538 length -= holders.length;
6539 if (length < arity) {
6540 return createRecurry(
6541 func, bitmask, createHybrid, wrapper.placeholder, undefined,
6542 args, holders, undefined, undefined, arity - length);
6543 }
6544 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6545 return apply(fn, this, args);
6546 }
6547 return wrapper;
6548 }
6549
6550 /**
6551 * Creates a `_.find` or `_.findLast` function.
6552 *
6553 * @private
6554 * @param {Function} findIndexFunc The function to find the collection index.
6555 * @returns {Function} Returns the new find function.
6556 */
6557 function createFind(findIndexFunc) {
6558 return function(collection, predicate, fromIndex) {
6559 var iterable = Object(collection);
6560 if (!isArrayLike(collection)) {
6561 var iteratee = getIteratee(predicate, 3);
6562 collection = keys(collection);
6563 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
6564 }
6565 var index = findIndexFunc(collection, predicate, fromIndex);
6566 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
6567 };
6568 }
6569
6570 /**
6571 * Creates a `_.flow` or `_.flowRight` function.
6572 *
6573 * @private
6574 * @param {boolean} [fromRight] Specify iterating from right to left.
6575 * @returns {Function} Returns the new flow function.
6576 */
6577 function createFlow(fromRight) {
6578 return flatRest(function(funcs) {
6579 var length = funcs.length,
6580 index = length,
6581 prereq = LodashWrapper.prototype.thru;
6582
6583 if (fromRight) {
6584 funcs.reverse();
6585 }
6586 while (index--) {
6587 var func = funcs[index];
6588 if (typeof func != 'function') {
6589 throw new TypeError(FUNC_ERROR_TEXT);
6590 }
6591 if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
6592 var wrapper = new LodashWrapper([], true);
6593 }
6594 }
6595 index = wrapper ? index : length;
6596 while (++index < length) {
6597 func = funcs[index];
6598
6599 var funcName = getFuncName(func),
6600 data = funcName == 'wrapper' ? getData(func) : undefined;
6601
6602 if (data && isLaziable(data[0]) &&
6603 data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
6604 !data[4].length && data[9] == 1
6605 ) {
6606 wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
6607 } else {
6608 wrapper = (func.length == 1 && isLaziable(func))
6609 ? wrapper[funcName]()
6610 : wrapper.thru(func);
6611 }
6612 }
6613 return function() {
6614 var args = arguments,
6615 value = args[0];
6616
6617 if (wrapper && args.length == 1 && isArray(value)) {
6618 return wrapper.plant(value).value();
6619 }
6620 var index = 0,
6621 result = length ? funcs[index].apply(this, args) : value;
6622
6623 while (++index < length) {
6624 result = funcs[index].call(this, result);
6625 }
6626 return result;
6627 };
6628 });
6629 }
6630
6631 /**
6632 * Creates a function that wraps `func` to invoke it with optional `this`
6633 * binding of `thisArg`, partial application, and currying.
6634 *
6635 * @private
6636 * @param {Function|string} func The function or method name to wrap.
6637 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6638 * @param {*} [thisArg] The `this` binding of `func`.
6639 * @param {Array} [partials] The arguments to prepend to those provided to
6640 * the new function.
6641 * @param {Array} [holders] The `partials` placeholder indexes.
6642 * @param {Array} [partialsRight] The arguments to append to those provided
6643 * to the new function.
6644 * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
6645 * @param {Array} [argPos] The argument positions of the new function.
6646 * @param {number} [ary] The arity cap of `func`.
6647 * @param {number} [arity] The arity of `func`.
6648 * @returns {Function} Returns the new wrapped function.
6649 */
6650 function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
6651 var isAry = bitmask & WRAP_ARY_FLAG,
6652 isBind = bitmask & WRAP_BIND_FLAG,
6653 isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
6654 isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
6655 isFlip = bitmask & WRAP_FLIP_FLAG,
6656 Ctor = isBindKey ? undefined : createCtor(func);
6657
6658 function wrapper() {
6659 var length = arguments.length,
6660 args = Array(length),
6661 index = length;
6662
6663 while (index--) {
6664 args[index] = arguments[index];
6665 }
6666 if (isCurried) {
6667 var placeholder = getHolder(wrapper),
6668 holdersCount = countHolders(args, placeholder);
6669 }
6670 if (partials) {
6671 args = composeArgs(args, partials, holders, isCurried);
6672 }
6673 if (partialsRight) {
6674 args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
6675 }
6676 length -= holdersCount;
6677 if (isCurried && length < arity) {
6678 var newHolders = replaceHolders(args, placeholder);
6679 return createRecurry(
6680 func, bitmask, createHybrid, wrapper.placeholder, thisArg,
6681 args, newHolders, argPos, ary, arity - length
6682 );
6683 }
6684 var thisBinding = isBind ? thisArg : this,
6685 fn = isBindKey ? thisBinding[func] : func;
6686
6687 length = args.length;
6688 if (argPos) {
6689 args = reorder(args, argPos);
6690 } else if (isFlip && length > 1) {
6691 args.reverse();
6692 }
6693 if (isAry && ary < length) {
6694 args.length = ary;
6695 }
6696 if (this && this !== root && this instanceof wrapper) {
6697 fn = Ctor || createCtor(fn);
6698 }
6699 return fn.apply(thisBinding, args);
6700 }
6701 return wrapper;
6702 }
6703
6704 /**
6705 * Creates a function like `_.invertBy`.
6706 *
6707 * @private
6708 * @param {Function} setter The function to set accumulator values.
6709 * @param {Function} toIteratee The function to resolve iteratees.
6710 * @returns {Function} Returns the new inverter function.
6711 */
6712 function createInverter(setter, toIteratee) {
6713 return function(object, iteratee) {
6714 return baseInverter(object, setter, toIteratee(iteratee), {});
6715 };
6716 }
6717
6718 /**
6719 * Creates a function that performs a mathematical operation on two values.
6720 *
6721 * @private
6722 * @param {Function} operator The function to perform the operation.
6723 * @param {number} [defaultValue] The value used for `undefined` arguments.
6724 * @returns {Function} Returns the new mathematical operation function.
6725 */
6726 function createMathOperation(operator, defaultValue) {
6727 return function(value, other) {
6728 var result;
6729 if (value === undefined && other === undefined) {
6730 return defaultValue;
6731 }
6732 if (value !== undefined) {
6733 result = value;
6734 }
6735 if (other !== undefined) {
6736 if (result === undefined) {
6737 return other;
6738 }
6739 if (typeof value == 'string' || typeof other == 'string') {
6740 value = baseToString(value);
6741 other = baseToString(other);
6742 } else {
6743 value = baseToNumber(value);
6744 other = baseToNumber(other);
6745 }
6746 result = operator(value, other);
6747 }
6748 return result;
6749 };
6750 }
6751
6752 /**
6753 * Creates a function like `_.over`.
6754 *
6755 * @private
6756 * @param {Function} arrayFunc The function to iterate over iteratees.
6757 * @returns {Function} Returns the new over function.
6758 */
6759 function createOver(arrayFunc) {
6760 return flatRest(function(iteratees) {
6761 iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
6762 return baseRest(function(args) {
6763 var thisArg = this;
6764 return arrayFunc(iteratees, function(iteratee) {
6765 return apply(iteratee, thisArg, args);
6766 });
6767 });
6768 });
6769 }
6770
6771 /**
6772 * Creates the padding for `string` based on `length`. The `chars` string
6773 * is truncated if the number of characters exceeds `length`.
6774 *
6775 * @private
6776 * @param {number} length The padding length.
6777 * @param {string} [chars=' '] The string used as padding.
6778 * @returns {string} Returns the padding for `string`.
6779 */
6780 function createPadding(length, chars) {
6781 chars = chars === undefined ? ' ' : baseToString(chars);
6782
6783 var charsLength = chars.length;
6784 if (charsLength < 2) {
6785 return charsLength ? baseRepeat(chars, length) : chars;
6786 }
6787 var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
6788 return hasUnicode(chars)
6789 ? castSlice(stringToArray(result), 0, length).join('')
6790 : result.slice(0, length);
6791 }
6792
6793 /**
6794 * Creates a function that wraps `func` to invoke it with the `this` binding
6795 * of `thisArg` and `partials` prepended to the arguments it receives.
6796 *
6797 * @private
6798 * @param {Function} func The function to wrap.
6799 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6800 * @param {*} thisArg The `this` binding of `func`.
6801 * @param {Array} partials The arguments to prepend to those provided to
6802 * the new function.
6803 * @returns {Function} Returns the new wrapped function.
6804 */
6805 function createPartial(func, bitmask, thisArg, partials) {
6806 var isBind = bitmask & WRAP_BIND_FLAG,
6807 Ctor = createCtor(func);
6808
6809 function wrapper() {
6810 var argsIndex = -1,
6811 argsLength = arguments.length,
6812 leftIndex = -1,
6813 leftLength = partials.length,
6814 args = Array(leftLength + argsLength),
6815 fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6816
6817 while (++leftIndex < leftLength) {
6818 args[leftIndex] = partials[leftIndex];
6819 }
6820 while (argsLength--) {
6821 args[leftIndex++] = arguments[++argsIndex];
6822 }
6823 return apply(fn, isBind ? thisArg : this, args);
6824 }
6825 return wrapper;
6826 }
6827
6828 /**
6829 * Creates a `_.range` or `_.rangeRight` function.
6830 *
6831 * @private
6832 * @param {boolean} [fromRight] Specify iterating from right to left.
6833 * @returns {Function} Returns the new range function.
6834 */
6835 function createRange(fromRight) {
6836 return function(start, end, step) {
6837 if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
6838 end = step = undefined;
6839 }
6840 // Ensure the sign of `-0` is preserved.
6841 start = toFinite(start);
6842 if (end === undefined) {
6843 end = start;
6844 start = 0;
6845 } else {
6846 end = toFinite(end);
6847 }
6848 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
6849 return baseRange(start, end, step, fromRight);
6850 };
6851 }
6852
6853 /**
6854 * Creates a function that performs a relational operation on two values.
6855 *
6856 * @private
6857 * @param {Function} operator The function to perform the operation.
6858 * @returns {Function} Returns the new relational operation function.
6859 */
6860 function createRelationalOperation(operator) {
6861 return function(value, other) {
6862 if (!(typeof value == 'string' && typeof other == 'string')) {
6863 value = toNumber(value);
6864 other = toNumber(other);
6865 }
6866 return operator(value, other);
6867 };
6868 }
6869
6870 /**
6871 * Creates a function that wraps `func` to continue currying.
6872 *
6873 * @private
6874 * @param {Function} func The function to wrap.
6875 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6876 * @param {Function} wrapFunc The function to create the `func` wrapper.
6877 * @param {*} placeholder The placeholder value.
6878 * @param {*} [thisArg] The `this` binding of `func`.
6879 * @param {Array} [partials] The arguments to prepend to those provided to
6880 * the new function.
6881 * @param {Array} [holders] The `partials` placeholder indexes.
6882 * @param {Array} [argPos] The argument positions of the new function.
6883 * @param {number} [ary] The arity cap of `func`.
6884 * @param {number} [arity] The arity of `func`.
6885 * @returns {Function} Returns the new wrapped function.
6886 */
6887 function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
6888 var isCurry = bitmask & WRAP_CURRY_FLAG,
6889 newHolders = isCurry ? holders : undefined,
6890 newHoldersRight = isCurry ? undefined : holders,
6891 newPartials = isCurry ? partials : undefined,
6892 newPartialsRight = isCurry ? undefined : partials;
6893
6894 bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
6895 bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
6896
6897 if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
6898 bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
6899 }
6900 var newData = [
6901 func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
6902 newHoldersRight, argPos, ary, arity
6903 ];
6904
6905 var result = wrapFunc.apply(undefined, newData);
6906 if (isLaziable(func)) {
6907 setData(result, newData);
6908 }
6909 result.placeholder = placeholder;
6910 return setWrapToString(result, func, bitmask);
6911 }
6912
6913 /**
6914 * Creates a function like `_.round`.
6915 *
6916 * @private
6917 * @param {string} methodName The name of the `Math` method to use when rounding.
6918 * @returns {Function} Returns the new round function.
6919 */
6920 function createRound(methodName) {
6921 var func = Math[methodName];
6922 return function(number, precision) {
6923 number = toNumber(number);
6924 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
6925 if (precision) {
6926 // Shift with exponential notation to avoid floating-point issues.
6927 // See [MDN](https://mdn.io/round#Examples) for more details.
6928 var pair = (toString(number) + 'e').split('e'),
6929 value = func(pair[0] + 'e' + (+pair[1] + precision));
6930
6931 pair = (toString(value) + 'e').split('e');
6932 return +(pair[0] + 'e' + (+pair[1] - precision));
6933 }
6934 return func(number);
6935 };
6936 }
6937
6938 /**
6939 * Creates a set object of `values`.
6940 *
6941 * @private
6942 * @param {Array} values The values to add to the set.
6943 * @returns {Object} Returns the new set.
6944 */
6945 var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
6946 return new Set(values);
6947 };
6948
6949 /**
6950 * Creates a `_.toPairs` or `_.toPairsIn` function.
6951 *
6952 * @private
6953 * @param {Function} keysFunc The function to get the keys of a given object.
6954 * @returns {Function} Returns the new pairs function.
6955 */
6956 function createToPairs(keysFunc) {
6957 return function(object) {
6958 var tag = getTag(object);
6959 if (tag == mapTag) {
6960 return mapToArray(object);
6961 }
6962 if (tag == setTag) {
6963 return setToPairs(object);
6964 }
6965 return baseToPairs(object, keysFunc(object));
6966 };
6967 }
6968
6969 /**
6970 * Creates a function that either curries or invokes `func` with optional
6971 * `this` binding and partially applied arguments.
6972 *
6973 * @private
6974 * @param {Function|string} func The function or method name to wrap.
6975 * @param {number} bitmask The bitmask flags.
6976 * 1 - `_.bind`
6977 * 2 - `_.bindKey`
6978 * 4 - `_.curry` or `_.curryRight` of a bound function
6979 * 8 - `_.curry`
6980 * 16 - `_.curryRight`
6981 * 32 - `_.partial`
6982 * 64 - `_.partialRight`
6983 * 128 - `_.rearg`
6984 * 256 - `_.ary`
6985 * 512 - `_.flip`
6986 * @param {*} [thisArg] The `this` binding of `func`.
6987 * @param {Array} [partials] The arguments to be partially applied.
6988 * @param {Array} [holders] The `partials` placeholder indexes.
6989 * @param {Array} [argPos] The argument positions of the new function.
6990 * @param {number} [ary] The arity cap of `func`.
6991 * @param {number} [arity] The arity of `func`.
6992 * @returns {Function} Returns the new wrapped function.
6993 */
6994 function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
6995 var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
6996 if (!isBindKey && typeof func != 'function') {
6997 throw new TypeError(FUNC_ERROR_TEXT);
6998 }
6999 var length = partials ? partials.length : 0;
7000 if (!length) {
7001 bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
7002 partials = holders = undefined;
7003 }
7004 ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
7005 arity = arity === undefined ? arity : toInteger(arity);
7006 length -= holders ? holders.length : 0;
7007
7008 if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
7009 var partialsRight = partials,
7010 holdersRight = holders;
7011
7012 partials = holders = undefined;
7013 }
7014 var data = isBindKey ? undefined : getData(func);
7015
7016 var newData = [
7017 func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
7018 argPos, ary, arity
7019 ];
7020
7021 if (data) {
7022 mergeData(newData, data);
7023 }
7024 func = newData[0];
7025 bitmask = newData[1];
7026 thisArg = newData[2];
7027 partials = newData[3];
7028 holders = newData[4];
7029 arity = newData[9] = newData[9] === undefined
7030 ? (isBindKey ? 0 : func.length)
7031 : nativeMax(newData[9] - length, 0);
7032
7033 if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
7034 bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
7035 }
7036 if (!bitmask || bitmask == WRAP_BIND_FLAG) {
7037 var result = createBind(func, bitmask, thisArg);
7038 } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
7039 result = createCurry(func, bitmask, arity);
7040 } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
7041 result = createPartial(func, bitmask, thisArg, partials);
7042 } else {
7043 result = createHybrid.apply(undefined, newData);
7044 }
7045 var setter = data ? baseSetData : setData;
7046 return setWrapToString(setter(result, newData), func, bitmask);
7047 }
7048
7049 /**
7050 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
7051 * of source objects to the destination object for all destination properties
7052 * that resolve to `undefined`.
7053 *
7054 * @private
7055 * @param {*} objValue The destination value.
7056 * @param {*} srcValue The source value.
7057 * @param {string} key The key of the property to assign.
7058 * @param {Object} object The parent object of `objValue`.
7059 * @returns {*} Returns the value to assign.
7060 */
7061 function customDefaultsAssignIn(objValue, srcValue, key, object) {
7062 if (objValue === undefined ||
7063 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
7064 return srcValue;
7065 }
7066 return objValue;
7067 }
7068
7069 /**
7070 * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
7071 * objects into destination objects that are passed thru.
7072 *
7073 * @private
7074 * @param {*} objValue The destination value.
7075 * @param {*} srcValue The source value.
7076 * @param {string} key The key of the property to merge.
7077 * @param {Object} object The parent object of `objValue`.
7078 * @param {Object} source The parent object of `srcValue`.
7079 * @param {Object} [stack] Tracks traversed source values and their merged
7080 * counterparts.
7081 * @returns {*} Returns the value to assign.
7082 */
7083 function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
7084 if (isObject(objValue) && isObject(srcValue)) {
7085 // Recursively merge objects and arrays (susceptible to call stack limits).
7086 stack.set(srcValue, objValue);
7087 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
7088 stack['delete'](srcValue);
7089 }
7090 return objValue;
7091 }
7092
7093 /**
7094 * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
7095 * objects.
7096 *
7097 * @private
7098 * @param {*} value The value to inspect.
7099 * @param {string} key The key of the property to inspect.
7100 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
7101 */
7102 function customOmitClone(value) {
7103 return isPlainObject(value) ? undefined : value;
7104 }
7105
7106 /**
7107 * A specialized version of `baseIsEqualDeep` for arrays with support for
7108 * partial deep comparisons.
7109 *
7110 * @private
7111 * @param {Array} array The array to compare.
7112 * @param {Array} other The other array to compare.
7113 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7114 * @param {Function} customizer The function to customize comparisons.
7115 * @param {Function} equalFunc The function to determine equivalents of values.
7116 * @param {Object} stack Tracks traversed `array` and `other` objects.
7117 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
7118 */
7119 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
7120 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7121 arrLength = array.length,
7122 othLength = other.length;
7123
7124 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
7125 return false;
7126 }
7127 // Assume cyclic values are equal.
7128 var stacked = stack.get(array);
7129 if (stacked && stack.get(other)) {
7130 return stacked == other;
7131 }
7132 var index = -1,
7133 result = true,
7134 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
7135
7136 stack.set(array, other);
7137 stack.set(other, array);
7138
7139 // Ignore non-index properties.
7140 while (++index < arrLength) {
7141 var arrValue = array[index],
7142 othValue = other[index];
7143
7144 if (customizer) {
7145 var compared = isPartial
7146 ? customizer(othValue, arrValue, index, other, array, stack)
7147 : customizer(arrValue, othValue, index, array, other, stack);
7148 }
7149 if (compared !== undefined) {
7150 if (compared) {
7151 continue;
7152 }
7153 result = false;
7154 break;
7155 }
7156 // Recursively compare arrays (susceptible to call stack limits).
7157 if (seen) {
7158 if (!arraySome(other, function(othValue, othIndex) {
7159 if (!cacheHas(seen, othIndex) &&
7160 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
7161 return seen.push(othIndex);
7162 }
7163 })) {
7164 result = false;
7165 break;
7166 }
7167 } else if (!(
7168 arrValue === othValue ||
7169 equalFunc(arrValue, othValue, bitmask, customizer, stack)
7170 )) {
7171 result = false;
7172 break;
7173 }
7174 }
7175 stack['delete'](array);
7176 stack['delete'](other);
7177 return result;
7178 }
7179
7180 /**
7181 * A specialized version of `baseIsEqualDeep` for comparing objects of
7182 * the same `toStringTag`.
7183 *
7184 * **Note:** This function only supports comparing values with tags of
7185 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
7186 *
7187 * @private
7188 * @param {Object} object The object to compare.
7189 * @param {Object} other The other object to compare.
7190 * @param {string} tag The `toStringTag` of the objects to compare.
7191 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7192 * @param {Function} customizer The function to customize comparisons.
7193 * @param {Function} equalFunc The function to determine equivalents of values.
7194 * @param {Object} stack Tracks traversed `object` and `other` objects.
7195 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7196 */
7197 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
7198 switch (tag) {
7199 case dataViewTag:
7200 if ((object.byteLength != other.byteLength) ||
7201 (object.byteOffset != other.byteOffset)) {
7202 return false;
7203 }
7204 object = object.buffer;
7205 other = other.buffer;
7206
7207 case arrayBufferTag:
7208 if ((object.byteLength != other.byteLength) ||
7209 !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
7210 return false;
7211 }
7212 return true;
7213
7214 case boolTag:
7215 case dateTag:
7216 case numberTag:
7217 // Coerce booleans to `1` or `0` and dates to milliseconds.
7218 // Invalid dates are coerced to `NaN`.
7219 return eq(+object, +other);
7220
7221 case errorTag:
7222 return object.name == other.name && object.message == other.message;
7223
7224 case regexpTag:
7225 case stringTag:
7226 // Coerce regexes to strings and treat strings, primitives and objects,
7227 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
7228 // for more details.
7229 return object == (other + '');
7230
7231 case mapTag:
7232 var convert = mapToArray;
7233
7234 case setTag:
7235 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
7236 convert || (convert = setToArray);
7237
7238 if (object.size != other.size && !isPartial) {
7239 return false;
7240 }
7241 // Assume cyclic values are equal.
7242 var stacked = stack.get(object);
7243 if (stacked) {
7244 return stacked == other;
7245 }
7246 bitmask |= COMPARE_UNORDERED_FLAG;
7247
7248 // Recursively compare objects (susceptible to call stack limits).
7249 stack.set(object, other);
7250 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
7251 stack['delete'](object);
7252 return result;
7253
7254 case symbolTag:
7255 if (symbolValueOf) {
7256 return symbolValueOf.call(object) == symbolValueOf.call(other);
7257 }
7258 }
7259 return false;
7260 }
7261
7262 /**
7263 * A specialized version of `baseIsEqualDeep` for objects with support for
7264 * partial deep comparisons.
7265 *
7266 * @private
7267 * @param {Object} object The object to compare.
7268 * @param {Object} other The other object to compare.
7269 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7270 * @param {Function} customizer The function to customize comparisons.
7271 * @param {Function} equalFunc The function to determine equivalents of values.
7272 * @param {Object} stack Tracks traversed `object` and `other` objects.
7273 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7274 */
7275 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
7276 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7277 objProps = getAllKeys(object),
7278 objLength = objProps.length,
7279 othProps = getAllKeys(other),
7280 othLength = othProps.length;
7281
7282 if (objLength != othLength && !isPartial) {
7283 return false;
7284 }
7285 var index = objLength;
7286 while (index--) {
7287 var key = objProps[index];
7288 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
7289 return false;
7290 }
7291 }
7292 // Assume cyclic values are equal.
7293 var stacked = stack.get(object);
7294 if (stacked && stack.get(other)) {
7295 return stacked == other;
7296 }
7297 var result = true;
7298 stack.set(object, other);
7299 stack.set(other, object);
7300
7301 var skipCtor = isPartial;
7302 while (++index < objLength) {
7303 key = objProps[index];
7304 var objValue = object[key],
7305 othValue = other[key];
7306
7307 if (customizer) {
7308 var compared = isPartial
7309 ? customizer(othValue, objValue, key, other, object, stack)
7310 : customizer(objValue, othValue, key, object, other, stack);
7311 }
7312 // Recursively compare objects (susceptible to call stack limits).
7313 if (!(compared === undefined
7314 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
7315 : compared
7316 )) {
7317 result = false;
7318 break;
7319 }
7320 skipCtor || (skipCtor = key == 'constructor');
7321 }
7322 if (result && !skipCtor) {
7323 var objCtor = object.constructor,
7324 othCtor = other.constructor;
7325
7326 // Non `Object` object instances with different constructors are not equal.
7327 if (objCtor != othCtor &&
7328 ('constructor' in object && 'constructor' in other) &&
7329 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
7330 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
7331 result = false;
7332 }
7333 }
7334 stack['delete'](object);
7335 stack['delete'](other);
7336 return result;
7337 }
7338
7339 /**
7340 * A specialized version of `baseRest` which flattens the rest array.
7341 *
7342 * @private
7343 * @param {Function} func The function to apply a rest parameter to.
7344 * @returns {Function} Returns the new function.
7345 */
7346 function flatRest(func) {
7347 return setToString(overRest(func, undefined, flatten), func + '');
7348 }
7349
7350 /**
7351 * Creates an array of own enumerable property names and symbols of `object`.
7352 *
7353 * @private
7354 * @param {Object} object The object to query.
7355 * @returns {Array} Returns the array of property names and symbols.
7356 */
7357 function getAllKeys(object) {
7358 return baseGetAllKeys(object, keys, getSymbols);
7359 }
7360
7361 /**
7362 * Creates an array of own and inherited enumerable property names and
7363 * symbols of `object`.
7364 *
7365 * @private
7366 * @param {Object} object The object to query.
7367 * @returns {Array} Returns the array of property names and symbols.
7368 */
7369 function getAllKeysIn(object) {
7370 return baseGetAllKeys(object, keysIn, getSymbolsIn);
7371 }
7372
7373 /**
7374 * Gets metadata for `func`.
7375 *
7376 * @private
7377 * @param {Function} func The function to query.
7378 * @returns {*} Returns the metadata for `func`.
7379 */
7380 var getData = !metaMap ? noop : function(func) {
7381 return metaMap.get(func);
7382 };
7383
7384 /**
7385 * Gets the name of `func`.
7386 *
7387 * @private
7388 * @param {Function} func The function to query.
7389 * @returns {string} Returns the function name.
7390 */
7391 function getFuncName(func) {
7392 var result = (func.name + ''),
7393 array = realNames[result],
7394 length = hasOwnProperty.call(realNames, result) ? array.length : 0;
7395
7396 while (length--) {
7397 var data = array[length],
7398 otherFunc = data.func;
7399 if (otherFunc == null || otherFunc == func) {
7400 return data.name;
7401 }
7402 }
7403 return result;
7404 }
7405
7406 /**
7407 * Gets the argument placeholder value for `func`.
7408 *
7409 * @private
7410 * @param {Function} func The function to inspect.
7411 * @returns {*} Returns the placeholder value.
7412 */
7413 function getHolder(func) {
7414 var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
7415 return object.placeholder;
7416 }
7417
7418 /**
7419 * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
7420 * this function returns the custom method, otherwise it returns `baseIteratee`.
7421 * If arguments are provided, the chosen function is invoked with them and
7422 * its result is returned.
7423 *
7424 * @private
7425 * @param {*} [value] The value to convert to an iteratee.
7426 * @param {number} [arity] The arity of the created iteratee.
7427 * @returns {Function} Returns the chosen function or its result.
7428 */
7429 function getIteratee() {
7430 var result = lodash.iteratee || iteratee;
7431 result = result === iteratee ? baseIteratee : result;
7432 return arguments.length ? result(arguments[0], arguments[1]) : result;
7433 }
7434
7435 /**
7436 * Gets the data for `map`.
7437 *
7438 * @private
7439 * @param {Object} map The map to query.
7440 * @param {string} key The reference key.
7441 * @returns {*} Returns the map data.
7442 */
7443 function getMapData(map, key) {
7444 var data = map.__data__;
7445 return isKeyable(key)
7446 ? data[typeof key == 'string' ? 'string' : 'hash']
7447 : data.map;
7448 }
7449
7450 /**
7451 * Gets the property names, values, and compare flags of `object`.
7452 *
7453 * @private
7454 * @param {Object} object The object to query.
7455 * @returns {Array} Returns the match data of `object`.
7456 */
7457 function getMatchData(object) {
7458 var result = keys(object),
7459 length = result.length;
7460
7461 while (length--) {
7462 var key = result[length],
7463 value = object[key];
7464
7465 result[length] = [key, value, isStrictComparable(value)];
7466 }
7467 return result;
7468 }
7469
7470 /**
7471 * Gets the native function at `key` of `object`.
7472 *
7473 * @private
7474 * @param {Object} object The object to query.
7475 * @param {string} key The key of the method to get.
7476 * @returns {*} Returns the function if it's native, else `undefined`.
7477 */
7478 function getNative(object, key) {
7479 var value = getValue(object, key);
7480 return baseIsNative(value) ? value : undefined;
7481 }
7482
7483 /**
7484 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
7485 *
7486 * @private
7487 * @param {*} value The value to query.
7488 * @returns {string} Returns the raw `toStringTag`.
7489 */
7490 function getRawTag(value) {
7491 var isOwn = hasOwnProperty.call(value, symToStringTag),
7492 tag = value[symToStringTag];
7493
7494 try {
7495 value[symToStringTag] = undefined;
7496 } catch (e) {}
7497
7498 var result = nativeObjectToString.call(value);
7499 {
7500 if (isOwn) {
7501 value[symToStringTag] = tag;
7502 } else {
7503 delete value[symToStringTag];
7504 }
7505 }
7506 return result;
7507 }
7508
7509 /**
7510 * Creates an array of the own enumerable symbols of `object`.
7511 *
7512 * @private
7513 * @param {Object} object The object to query.
7514 * @returns {Array} Returns the array of symbols.
7515 */
7516 var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
7517 if (object == null) {
7518 return [];
7519 }
7520 object = Object(object);
7521 return arrayFilter(nativeGetSymbols(object), function(symbol) {
7522 return propertyIsEnumerable.call(object, symbol);
7523 });
7524 };
7525
7526 /**
7527 * Creates an array of the own and inherited enumerable symbols of `object`.
7528 *
7529 * @private
7530 * @param {Object} object The object to query.
7531 * @returns {Array} Returns the array of symbols.
7532 */
7533 var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
7534 var result = [];
7535 while (object) {
7536 arrayPush(result, getSymbols(object));
7537 object = getPrototype(object);
7538 }
7539 return result;
7540 };
7541
7542 /**
7543 * Gets the `toStringTag` of `value`.
7544 *
7545 * @private
7546 * @param {*} value The value to query.
7547 * @returns {string} Returns the `toStringTag`.
7548 */
7549 var getTag = baseGetTag;
7550
7551 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
7552 if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
7553 (Map && getTag(new Map) != mapTag) ||
7554 (Promise && getTag(Promise.resolve()) != promiseTag) ||
7555 (Set && getTag(new Set) != setTag) ||
7556 (WeakMap && getTag(new WeakMap) != weakMapTag)) {
7557 getTag = function(value) {
7558 var result = baseGetTag(value),
7559 Ctor = result == objectTag ? value.constructor : undefined,
7560 ctorString = Ctor ? toSource(Ctor) : '';
7561
7562 if (ctorString) {
7563 switch (ctorString) {
7564 case dataViewCtorString: return dataViewTag;
7565 case mapCtorString: return mapTag;
7566 case promiseCtorString: return promiseTag;
7567 case setCtorString: return setTag;
7568 case weakMapCtorString: return weakMapTag;
7569 }
7570 }
7571 return result;
7572 };
7573 }
7574
7575 /**
7576 * Gets the view, applying any `transforms` to the `start` and `end` positions.
7577 *
7578 * @private
7579 * @param {number} start The start of the view.
7580 * @param {number} end The end of the view.
7581 * @param {Array} transforms The transformations to apply to the view.
7582 * @returns {Object} Returns an object containing the `start` and `end`
7583 * positions of the view.
7584 */
7585 function getView(start, end, transforms) {
7586 var index = -1,
7587 length = transforms.length;
7588
7589 while (++index < length) {
7590 var data = transforms[index],
7591 size = data.size;
7592
7593 switch (data.type) {
7594 case 'drop': start += size; break;
7595 case 'dropRight': end -= size; break;
7596 case 'take': end = nativeMin(end, start + size); break;
7597 case 'takeRight': start = nativeMax(start, end - size); break;
7598 }
7599 }
7600 return { 'start': start, 'end': end };
7601 }
7602
7603 /**
7604 * Extracts wrapper details from the `source` body comment.
7605 *
7606 * @private
7607 * @param {string} source The source to inspect.
7608 * @returns {Array} Returns the wrapper details.
7609 */
7610 function getWrapDetails(source) {
7611 var match = source.match(reWrapDetails);
7612 return match ? match[1].split(reSplitDetails) : [];
7613 }
7614
7615 /**
7616 * Checks if `path` exists on `object`.
7617 *
7618 * @private
7619 * @param {Object} object The object to query.
7620 * @param {Array|string} path The path to check.
7621 * @param {Function} hasFunc The function to check properties.
7622 * @returns {boolean} Returns `true` if `path` exists, else `false`.
7623 */
7624 function hasPath(object, path, hasFunc) {
7625 path = castPath(path, object);
7626
7627 var index = -1,
7628 length = path.length,
7629 result = false;
7630
7631 while (++index < length) {
7632 var key = toKey(path[index]);
7633 if (!(result = object != null && hasFunc(object, key))) {
7634 break;
7635 }
7636 object = object[key];
7637 }
7638 if (result || ++index != length) {
7639 return result;
7640 }
7641 length = object == null ? 0 : object.length;
7642 return !!length && isLength(length) && isIndex(key, length) &&
7643 (isArray(object) || isArguments(object));
7644 }
7645
7646 /**
7647 * Initializes an array clone.
7648 *
7649 * @private
7650 * @param {Array} array The array to clone.
7651 * @returns {Array} Returns the initialized clone.
7652 */
7653 function initCloneArray(array) {
7654 var length = array.length,
7655 result = new array.constructor(length);
7656
7657 // Add properties assigned by `RegExp#exec`.
7658 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
7659 result.index = array.index;
7660 result.input = array.input;
7661 }
7662 return result;
7663 }
7664
7665 /**
7666 * Initializes an object clone.
7667 *
7668 * @private
7669 * @param {Object} object The object to clone.
7670 * @returns {Object} Returns the initialized clone.
7671 */
7672 function initCloneObject(object) {
7673 return (typeof object.constructor == 'function' && !isPrototype(object))
7674 ? baseCreate(getPrototype(object))
7675 : {};
7676 }
7677
7678 /**
7679 * Initializes an object clone based on its `toStringTag`.
7680 *
7681 * **Note:** This function only supports cloning values with tags of
7682 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
7683 *
7684 * @private
7685 * @param {Object} object The object to clone.
7686 * @param {string} tag The `toStringTag` of the object to clone.
7687 * @param {boolean} [isDeep] Specify a deep clone.
7688 * @returns {Object} Returns the initialized clone.
7689 */
7690 function initCloneByTag(object, tag, isDeep) {
7691 var Ctor = object.constructor;
7692 switch (tag) {
7693 case arrayBufferTag:
7694 return cloneArrayBuffer(object);
7695
7696 case boolTag:
7697 case dateTag:
7698 return new Ctor(+object);
7699
7700 case dataViewTag:
7701 return cloneDataView(object, isDeep);
7702
7703 case float32Tag: case float64Tag:
7704 case int8Tag: case int16Tag: case int32Tag:
7705 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
7706 return cloneTypedArray(object, isDeep);
7707
7708 case mapTag:
7709 return new Ctor;
7710
7711 case numberTag:
7712 case stringTag:
7713 return new Ctor(object);
7714
7715 case regexpTag:
7716 return cloneRegExp(object);
7717
7718 case setTag:
7719 return new Ctor;
7720
7721 case symbolTag:
7722 return cloneSymbol(object);
7723 }
7724 }
7725
7726 /**
7727 * Inserts wrapper `details` in a comment at the top of the `source` body.
7728 *
7729 * @private
7730 * @param {string} source The source to modify.
7731 * @returns {Array} details The details to insert.
7732 * @returns {string} Returns the modified source.
7733 */
7734 function insertWrapDetails(source, details) {
7735 var length = details.length;
7736 if (!length) {
7737 return source;
7738 }
7739 var lastIndex = length - 1;
7740 details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
7741 details = details.join(length > 2 ? ', ' : ' ');
7742 return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
7743 }
7744
7745 /**
7746 * Checks if `value` is a flattenable `arguments` object or array.
7747 *
7748 * @private
7749 * @param {*} value The value to check.
7750 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
7751 */
7752 function isFlattenable(value) {
7753 return isArray(value) || isArguments(value) ||
7754 !!(spreadableSymbol && value && value[spreadableSymbol]);
7755 }
7756
7757 /**
7758 * Checks if `value` is a valid array-like index.
7759 *
7760 * @private
7761 * @param {*} value The value to check.
7762 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
7763 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
7764 */
7765 function isIndex(value, length) {
7766 var type = typeof value;
7767 length = length == null ? MAX_SAFE_INTEGER : length;
7768
7769 return !!length &&
7770 (type == 'number' ||
7771 (type != 'symbol' && reIsUint.test(value))) &&
7772 (value > -1 && value % 1 == 0 && value < length);
7773 }
7774
7775 /**
7776 * Checks if the given arguments are from an iteratee call.
7777 *
7778 * @private
7779 * @param {*} value The potential iteratee value argument.
7780 * @param {*} index The potential iteratee index or key argument.
7781 * @param {*} object The potential iteratee object argument.
7782 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
7783 * else `false`.
7784 */
7785 function isIterateeCall(value, index, object) {
7786 if (!isObject(object)) {
7787 return false;
7788 }
7789 var type = typeof index;
7790 if (type == 'number'
7791 ? (isArrayLike(object) && isIndex(index, object.length))
7792 : (type == 'string' && index in object)
7793 ) {
7794 return eq(object[index], value);
7795 }
7796 return false;
7797 }
7798
7799 /**
7800 * Checks if `value` is a property name and not a property path.
7801 *
7802 * @private
7803 * @param {*} value The value to check.
7804 * @param {Object} [object] The object to query keys on.
7805 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
7806 */
7807 function isKey(value, object) {
7808 if (isArray(value)) {
7809 return false;
7810 }
7811 var type = typeof value;
7812 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
7813 value == null || isSymbol(value)) {
7814 return true;
7815 }
7816 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
7817 (object != null && value in Object(object));
7818 }
7819
7820 /**
7821 * Checks if `value` is suitable for use as unique object key.
7822 *
7823 * @private
7824 * @param {*} value The value to check.
7825 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
7826 */
7827 function isKeyable(value) {
7828 var type = typeof value;
7829 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
7830 ? (value !== '__proto__')
7831 : (value === null);
7832 }
7833
7834 /**
7835 * Checks if `func` has a lazy counterpart.
7836 *
7837 * @private
7838 * @param {Function} func The function to check.
7839 * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
7840 * else `false`.
7841 */
7842 function isLaziable(func) {
7843 var funcName = getFuncName(func),
7844 other = lodash[funcName];
7845
7846 if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
7847 return false;
7848 }
7849 if (func === other) {
7850 return true;
7851 }
7852 var data = getData(other);
7853 return !!data && func === data[0];
7854 }
7855
7856 /**
7857 * Checks if `func` has its source masked.
7858 *
7859 * @private
7860 * @param {Function} func The function to check.
7861 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
7862 */
7863 function isMasked(func) {
7864 return !!maskSrcKey && (maskSrcKey in func);
7865 }
7866
7867 /**
7868 * Checks if `func` is capable of being masked.
7869 *
7870 * @private
7871 * @param {*} value The value to check.
7872 * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
7873 */
7874 var isMaskable = coreJsData ? isFunction : stubFalse;
7875
7876 /**
7877 * Checks if `value` is likely a prototype object.
7878 *
7879 * @private
7880 * @param {*} value The value to check.
7881 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
7882 */
7883 function isPrototype(value) {
7884 var Ctor = value && value.constructor,
7885 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
7886
7887 return value === proto;
7888 }
7889
7890 /**
7891 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
7892 *
7893 * @private
7894 * @param {*} value The value to check.
7895 * @returns {boolean} Returns `true` if `value` if suitable for strict
7896 * equality comparisons, else `false`.
7897 */
7898 function isStrictComparable(value) {
7899 return value === value && !isObject(value);
7900 }
7901
7902 /**
7903 * A specialized version of `matchesProperty` for source values suitable
7904 * for strict equality comparisons, i.e. `===`.
7905 *
7906 * @private
7907 * @param {string} key The key of the property to get.
7908 * @param {*} srcValue The value to match.
7909 * @returns {Function} Returns the new spec function.
7910 */
7911 function matchesStrictComparable(key, srcValue) {
7912 return function(object) {
7913 if (object == null) {
7914 return false;
7915 }
7916 return object[key] === srcValue &&
7917 (srcValue !== undefined || (key in Object(object)));
7918 };
7919 }
7920
7921 /**
7922 * A specialized version of `_.memoize` which clears the memoized function's
7923 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
7924 *
7925 * @private
7926 * @param {Function} func The function to have its output memoized.
7927 * @returns {Function} Returns the new memoized function.
7928 */
7929 function memoizeCapped(func) {
7930 var result = memoize(func, function(key) {
7931 if (cache.size === MAX_MEMOIZE_SIZE) {
7932 cache.clear();
7933 }
7934 return key;
7935 });
7936
7937 var cache = result.cache;
7938 return result;
7939 }
7940
7941 /**
7942 * Merges the function metadata of `source` into `data`.
7943 *
7944 * Merging metadata reduces the number of wrappers used to invoke a function.
7945 * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
7946 * may be applied regardless of execution order. Methods like `_.ary` and
7947 * `_.rearg` modify function arguments, making the order in which they are
7948 * executed important, preventing the merging of metadata. However, we make
7949 * an exception for a safe combined case where curried functions have `_.ary`
7950 * and or `_.rearg` applied.
7951 *
7952 * @private
7953 * @param {Array} data The destination metadata.
7954 * @param {Array} source The source metadata.
7955 * @returns {Array} Returns `data`.
7956 */
7957 function mergeData(data, source) {
7958 var bitmask = data[1],
7959 srcBitmask = source[1],
7960 newBitmask = bitmask | srcBitmask,
7961 isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
7962
7963 var isCombo =
7964 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
7965 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
7966 ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
7967
7968 // Exit early if metadata can't be merged.
7969 if (!(isCommon || isCombo)) {
7970 return data;
7971 }
7972 // Use source `thisArg` if available.
7973 if (srcBitmask & WRAP_BIND_FLAG) {
7974 data[2] = source[2];
7975 // Set when currying a bound function.
7976 newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
7977 }
7978 // Compose partial arguments.
7979 var value = source[3];
7980 if (value) {
7981 var partials = data[3];
7982 data[3] = partials ? composeArgs(partials, value, source[4]) : value;
7983 data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
7984 }
7985 // Compose partial right arguments.
7986 value = source[5];
7987 if (value) {
7988 partials = data[5];
7989 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
7990 data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
7991 }
7992 // Use source `argPos` if available.
7993 value = source[7];
7994 if (value) {
7995 data[7] = value;
7996 }
7997 // Use source `ary` if it's smaller.
7998 if (srcBitmask & WRAP_ARY_FLAG) {
7999 data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
8000 }
8001 // Use source `arity` if one is not provided.
8002 if (data[9] == null) {
8003 data[9] = source[9];
8004 }
8005 // Use source `func` and merge bitmasks.
8006 data[0] = source[0];
8007 data[1] = newBitmask;
8008
8009 return data;
8010 }
8011
8012 /**
8013 * This function is like
8014 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
8015 * except that it includes inherited enumerable properties.
8016 *
8017 * @private
8018 * @param {Object} object The object to query.
8019 * @returns {Array} Returns the array of property names.
8020 */
8021 function nativeKeysIn(object) {
8022 var result = [];
8023 if (object != null) {
8024 for (var key in Object(object)) {
8025 result.push(key);
8026 }
8027 }
8028 return result;
8029 }
8030
8031 /**
8032 * Converts `value` to a string using `Object.prototype.toString`.
8033 *
8034 * @private
8035 * @param {*} value The value to convert.
8036 * @returns {string} Returns the converted string.
8037 */
8038 function objectToString(value) {
8039 return nativeObjectToString.call(value);
8040 }
8041
8042 /**
8043 * A specialized version of `baseRest` which transforms the rest array.
8044 *
8045 * @private
8046 * @param {Function} func The function to apply a rest parameter to.
8047 * @param {number} [start=func.length-1] The start position of the rest parameter.
8048 * @param {Function} transform The rest array transform.
8049 * @returns {Function} Returns the new function.
8050 */
8051 function overRest(func, start, transform) {
8052 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
8053 return function() {
8054 var args = arguments,
8055 index = -1,
8056 length = nativeMax(args.length - start, 0),
8057 array = Array(length);
8058
8059 while (++index < length) {
8060 array[index] = args[start + index];
8061 }
8062 index = -1;
8063 var otherArgs = Array(start + 1);
8064 while (++index < start) {
8065 otherArgs[index] = args[index];
8066 }
8067 otherArgs[start] = transform(array);
8068 return apply(func, this, otherArgs);
8069 };
8070 }
8071
8072 /**
8073 * Gets the parent value at `path` of `object`.
8074 *
8075 * @private
8076 * @param {Object} object The object to query.
8077 * @param {Array} path The path to get the parent value of.
8078 * @returns {*} Returns the parent value.
8079 */
8080 function parent(object, path) {
8081 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
8082 }
8083
8084 /**
8085 * Reorder `array` according to the specified indexes where the element at
8086 * the first index is assigned as the first element, the element at
8087 * the second index is assigned as the second element, and so on.
8088 *
8089 * @private
8090 * @param {Array} array The array to reorder.
8091 * @param {Array} indexes The arranged array indexes.
8092 * @returns {Array} Returns `array`.
8093 */
8094 function reorder(array, indexes) {
8095 var arrLength = array.length,
8096 length = nativeMin(indexes.length, arrLength),
8097 oldArray = copyArray(array);
8098
8099 while (length--) {
8100 var index = indexes[length];
8101 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
8102 }
8103 return array;
8104 }
8105
8106 /**
8107 * Gets the value at `key`, unless `key` is "__proto__".
8108 *
8109 * @private
8110 * @param {Object} object The object to query.
8111 * @param {string} key The key of the property to get.
8112 * @returns {*} Returns the property value.
8113 */
8114 function safeGet(object, key) {
8115 if (key == '__proto__') {
8116 return;
8117 }
8118
8119 return object[key];
8120 }
8121
8122 /**
8123 * Sets metadata for `func`.
8124 *
8125 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
8126 * period of time, it will trip its breaker and transition to an identity
8127 * function to avoid garbage collection pauses in V8. See
8128 * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
8129 * for more details.
8130 *
8131 * @private
8132 * @param {Function} func The function to associate metadata with.
8133 * @param {*} data The metadata.
8134 * @returns {Function} Returns `func`.
8135 */
8136 var setData = shortOut(baseSetData);
8137
8138 /**
8139 * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
8140 *
8141 * @private
8142 * @param {Function} func The function to delay.
8143 * @param {number} wait The number of milliseconds to delay invocation.
8144 * @returns {number|Object} Returns the timer id or timeout object.
8145 */
8146 var setTimeout = ctxSetTimeout || function(func, wait) {
8147 return root.setTimeout(func, wait);
8148 };
8149
8150 /**
8151 * Sets the `toString` method of `func` to return `string`.
8152 *
8153 * @private
8154 * @param {Function} func The function to modify.
8155 * @param {Function} string The `toString` result.
8156 * @returns {Function} Returns `func`.
8157 */
8158 var setToString = shortOut(baseSetToString);
8159
8160 /**
8161 * Sets the `toString` method of `wrapper` to mimic the source of `reference`
8162 * with wrapper details in a comment at the top of the source body.
8163 *
8164 * @private
8165 * @param {Function} wrapper The function to modify.
8166 * @param {Function} reference The reference function.
8167 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8168 * @returns {Function} Returns `wrapper`.
8169 */
8170 function setWrapToString(wrapper, reference, bitmask) {
8171 var source = (reference + '');
8172 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
8173 }
8174
8175 /**
8176 * Creates a function that'll short out and invoke `identity` instead
8177 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
8178 * milliseconds.
8179 *
8180 * @private
8181 * @param {Function} func The function to restrict.
8182 * @returns {Function} Returns the new shortable function.
8183 */
8184 function shortOut(func) {
8185 var count = 0,
8186 lastCalled = 0;
8187
8188 return function() {
8189 var stamp = nativeNow(),
8190 remaining = HOT_SPAN - (stamp - lastCalled);
8191
8192 lastCalled = stamp;
8193 if (remaining > 0) {
8194 if (++count >= HOT_COUNT) {
8195 return arguments[0];
8196 }
8197 } else {
8198 count = 0;
8199 }
8200 return func.apply(undefined, arguments);
8201 };
8202 }
8203
8204 /**
8205 * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
8206 *
8207 * @private
8208 * @param {Array} array The array to shuffle.
8209 * @param {number} [size=array.length] The size of `array`.
8210 * @returns {Array} Returns `array`.
8211 */
8212 function shuffleSelf(array, size) {
8213 var index = -1,
8214 length = array.length,
8215 lastIndex = length - 1;
8216
8217 size = size === undefined ? length : size;
8218 while (++index < size) {
8219 var rand = baseRandom(index, lastIndex),
8220 value = array[rand];
8221
8222 array[rand] = array[index];
8223 array[index] = value;
8224 }
8225 array.length = size;
8226 return array;
8227 }
8228
8229 /**
8230 * Converts `string` to a property path array.
8231 *
8232 * @private
8233 * @param {string} string The string to convert.
8234 * @returns {Array} Returns the property path array.
8235 */
8236 var stringToPath = memoizeCapped(function(string) {
8237 var result = [];
8238 if (string.charCodeAt(0) === 46 /* . */) {
8239 result.push('');
8240 }
8241 string.replace(rePropName, function(match, number, quote, subString) {
8242 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8243 });
8244 return result;
8245 });
8246
8247 /**
8248 * Converts `value` to a string key if it's not a string or symbol.
8249 *
8250 * @private
8251 * @param {*} value The value to inspect.
8252 * @returns {string|symbol} Returns the key.
8253 */
8254 function toKey(value) {
8255 if (typeof value == 'string' || isSymbol(value)) {
8256 return value;
8257 }
8258 var result = (value + '');
8259 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8260 }
8261
8262 /**
8263 * Converts `func` to its source code.
8264 *
8265 * @private
8266 * @param {Function} func The function to convert.
8267 * @returns {string} Returns the source code.
8268 */
8269 function toSource(func) {
8270 if (func != null) {
8271 try {
8272 return funcToString.call(func);
8273 } catch (e) {}
8274 try {
8275 return (func + '');
8276 } catch (e) {}
8277 }
8278 return '';
8279 }
8280
8281 /**
8282 * Updates wrapper `details` based on `bitmask` flags.
8283 *
8284 * @private
8285 * @returns {Array} details The details to modify.
8286 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8287 * @returns {Array} Returns `details`.
8288 */
8289 function updateWrapDetails(details, bitmask) {
8290 arrayEach(wrapFlags, function(pair) {
8291 var value = '_.' + pair[0];
8292 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
8293 details.push(value);
8294 }
8295 });
8296 return details.sort();
8297 }
8298
8299 /**
8300 * Creates a clone of `wrapper`.
8301 *
8302 * @private
8303 * @param {Object} wrapper The wrapper to clone.
8304 * @returns {Object} Returns the cloned wrapper.
8305 */
8306 function wrapperClone(wrapper) {
8307 if (wrapper instanceof LazyWrapper) {
8308 return wrapper.clone();
8309 }
8310 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
8311 result.__actions__ = copyArray(wrapper.__actions__);
8312 result.__index__ = wrapper.__index__;
8313 result.__values__ = wrapper.__values__;
8314 return result;
8315 }
8316
8317 /*------------------------------------------------------------------------*/
8318
8319 /**
8320 * Creates an array of elements split into groups the length of `size`.
8321 * If `array` can't be split evenly, the final chunk will be the remaining
8322 * elements.
8323 *
8324 * @static
8325 * @memberOf _
8326 * @since 3.0.0
8327 * @category Array
8328 * @param {Array} array The array to process.
8329 * @param {number} [size=1] The length of each chunk
8330 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8331 * @returns {Array} Returns the new array of chunks.
8332 * @example
8333 *
8334 * _.chunk(['a', 'b', 'c', 'd'], 2);
8335 * // => [['a', 'b'], ['c', 'd']]
8336 *
8337 * _.chunk(['a', 'b', 'c', 'd'], 3);
8338 * // => [['a', 'b', 'c'], ['d']]
8339 */
8340 function chunk(array, size, guard) {
8341 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
8342 size = 1;
8343 } else {
8344 size = nativeMax(toInteger(size), 0);
8345 }
8346 var length = array == null ? 0 : array.length;
8347 if (!length || size < 1) {
8348 return [];
8349 }
8350 var index = 0,
8351 resIndex = 0,
8352 result = Array(nativeCeil(length / size));
8353
8354 while (index < length) {
8355 result[resIndex++] = baseSlice(array, index, (index += size));
8356 }
8357 return result;
8358 }
8359
8360 /**
8361 * Creates an array with all falsey values removed. The values `false`, `null`,
8362 * `0`, `""`, `undefined`, and `NaN` are falsey.
8363 *
8364 * @static
8365 * @memberOf _
8366 * @since 0.1.0
8367 * @category Array
8368 * @param {Array} array The array to compact.
8369 * @returns {Array} Returns the new array of filtered values.
8370 * @example
8371 *
8372 * _.compact([0, 1, false, 2, '', 3]);
8373 * // => [1, 2, 3]
8374 */
8375 function compact(array) {
8376 var index = -1,
8377 length = array == null ? 0 : array.length,
8378 resIndex = 0,
8379 result = [];
8380
8381 while (++index < length) {
8382 var value = array[index];
8383 if (value) {
8384 result[resIndex++] = value;
8385 }
8386 }
8387 return result;
8388 }
8389
8390 /**
8391 * Creates a new array concatenating `array` with any additional arrays
8392 * and/or values.
8393 *
8394 * @static
8395 * @memberOf _
8396 * @since 4.0.0
8397 * @category Array
8398 * @param {Array} array The array to concatenate.
8399 * @param {...*} [values] The values to concatenate.
8400 * @returns {Array} Returns the new concatenated array.
8401 * @example
8402 *
8403 * var array = [1];
8404 * var other = _.concat(array, 2, [3], [[4]]);
8405 *
8406 * console.log(other);
8407 * // => [1, 2, 3, [4]]
8408 *
8409 * console.log(array);
8410 * // => [1]
8411 */
8412 function concat() {
8413 var length = arguments.length;
8414 if (!length) {
8415 return [];
8416 }
8417 var args = Array(length - 1),
8418 array = arguments[0],
8419 index = length;
8420
8421 while (index--) {
8422 args[index - 1] = arguments[index];
8423 }
8424 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
8425 }
8426
8427 /**
8428 * Creates an array of `array` values not included in the other given arrays
8429 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8430 * for equality comparisons. The order and references of result values are
8431 * determined by the first array.
8432 *
8433 * **Note:** Unlike `_.pullAll`, this method returns a new array.
8434 *
8435 * @static
8436 * @memberOf _
8437 * @since 0.1.0
8438 * @category Array
8439 * @param {Array} array The array to inspect.
8440 * @param {...Array} [values] The values to exclude.
8441 * @returns {Array} Returns the new array of filtered values.
8442 * @see _.without, _.xor
8443 * @example
8444 *
8445 * _.difference([2, 1], [2, 3]);
8446 * // => [1]
8447 */
8448 var difference = baseRest(function(array, values) {
8449 return isArrayLikeObject(array)
8450 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
8451 : [];
8452 });
8453
8454 /**
8455 * This method is like `_.difference` except that it accepts `iteratee` which
8456 * is invoked for each element of `array` and `values` to generate the criterion
8457 * by which they're compared. The order and references of result values are
8458 * determined by the first array. The iteratee is invoked with one argument:
8459 * (value).
8460 *
8461 * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
8462 *
8463 * @static
8464 * @memberOf _
8465 * @since 4.0.0
8466 * @category Array
8467 * @param {Array} array The array to inspect.
8468 * @param {...Array} [values] The values to exclude.
8469 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
8470 * @returns {Array} Returns the new array of filtered values.
8471 * @example
8472 *
8473 * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
8474 * // => [1.2]
8475 *
8476 * // The `_.property` iteratee shorthand.
8477 * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
8478 * // => [{ 'x': 2 }]
8479 */
8480 var differenceBy = baseRest(function(array, values) {
8481 var iteratee = last(values);
8482 if (isArrayLikeObject(iteratee)) {
8483 iteratee = undefined;
8484 }
8485 return isArrayLikeObject(array)
8486 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
8487 : [];
8488 });
8489
8490 /**
8491 * This method is like `_.difference` except that it accepts `comparator`
8492 * which is invoked to compare elements of `array` to `values`. The order and
8493 * references of result values are determined by the first array. The comparator
8494 * is invoked with two arguments: (arrVal, othVal).
8495 *
8496 * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
8497 *
8498 * @static
8499 * @memberOf _
8500 * @since 4.0.0
8501 * @category Array
8502 * @param {Array} array The array to inspect.
8503 * @param {...Array} [values] The values to exclude.
8504 * @param {Function} [comparator] The comparator invoked per element.
8505 * @returns {Array} Returns the new array of filtered values.
8506 * @example
8507 *
8508 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
8509 *
8510 * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
8511 * // => [{ 'x': 2, 'y': 1 }]
8512 */
8513 var differenceWith = baseRest(function(array, values) {
8514 var comparator = last(values);
8515 if (isArrayLikeObject(comparator)) {
8516 comparator = undefined;
8517 }
8518 return isArrayLikeObject(array)
8519 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
8520 : [];
8521 });
8522
8523 /**
8524 * Creates a slice of `array` with `n` elements dropped from the beginning.
8525 *
8526 * @static
8527 * @memberOf _
8528 * @since 0.5.0
8529 * @category Array
8530 * @param {Array} array The array to query.
8531 * @param {number} [n=1] The number of elements to drop.
8532 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8533 * @returns {Array} Returns the slice of `array`.
8534 * @example
8535 *
8536 * _.drop([1, 2, 3]);
8537 * // => [2, 3]
8538 *
8539 * _.drop([1, 2, 3], 2);
8540 * // => [3]
8541 *
8542 * _.drop([1, 2, 3], 5);
8543 * // => []
8544 *
8545 * _.drop([1, 2, 3], 0);
8546 * // => [1, 2, 3]
8547 */
8548 function drop(array, n, guard) {
8549 var length = array == null ? 0 : array.length;
8550 if (!length) {
8551 return [];
8552 }
8553 n = (guard || n === undefined) ? 1 : toInteger(n);
8554 return baseSlice(array, n < 0 ? 0 : n, length);
8555 }
8556
8557 /**
8558 * Creates a slice of `array` with `n` elements dropped from the end.
8559 *
8560 * @static
8561 * @memberOf _
8562 * @since 3.0.0
8563 * @category Array
8564 * @param {Array} array The array to query.
8565 * @param {number} [n=1] The number of elements to drop.
8566 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8567 * @returns {Array} Returns the slice of `array`.
8568 * @example
8569 *
8570 * _.dropRight([1, 2, 3]);
8571 * // => [1, 2]
8572 *
8573 * _.dropRight([1, 2, 3], 2);
8574 * // => [1]
8575 *
8576 * _.dropRight([1, 2, 3], 5);
8577 * // => []
8578 *
8579 * _.dropRight([1, 2, 3], 0);
8580 * // => [1, 2, 3]
8581 */
8582 function dropRight(array, n, guard) {
8583 var length = array == null ? 0 : array.length;
8584 if (!length) {
8585 return [];
8586 }
8587 n = (guard || n === undefined) ? 1 : toInteger(n);
8588 n = length - n;
8589 return baseSlice(array, 0, n < 0 ? 0 : n);
8590 }
8591
8592 /**
8593 * Creates a slice of `array` excluding elements dropped from the end.
8594 * Elements are dropped until `predicate` returns falsey. The predicate is
8595 * invoked with three arguments: (value, index, array).
8596 *
8597 * @static
8598 * @memberOf _
8599 * @since 3.0.0
8600 * @category Array
8601 * @param {Array} array The array to query.
8602 * @param {Function} [predicate=_.identity] The function invoked per iteration.
8603 * @returns {Array} Returns the slice of `array`.
8604 * @example
8605 *
8606 * var users = [
8607 * { 'user': 'barney', 'active': true },
8608 * { 'user': 'fred', 'active': false },
8609 * { 'user': 'pebbles', 'active': false }
8610 * ];
8611 *
8612 * _.dropRightWhile(users, function(o) { return !o.active; });
8613 * // => objects for ['barney']
8614 *
8615 * // The `_.matches` iteratee shorthand.
8616 * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
8617 * // => objects for ['barney', 'fred']
8618 *
8619 * // The `_.matchesProperty` iteratee shorthand.
8620 * _.dropRightWhile(users, ['active', false]);
8621 * // => objects for ['barney']
8622 *
8623 * // The `_.property` iteratee shorthand.
8624 * _.dropRightWhile(users, 'active');
8625 * // => objects for ['barney', 'fred', 'pebbles']
8626 */
8627 function dropRightWhile(array, predicate) {
8628 return (array && array.length)
8629 ? baseWhile(array, getIteratee(predicate, 3), true, true)
8630 : [];
8631 }
8632
8633 /**
8634 * Creates a slice of `array` excluding elements dropped from the beginning.
8635 * Elements are dropped until `predicate` returns falsey. The predicate is
8636 * invoked with three arguments: (value, index, array).
8637 *
8638 * @static
8639 * @memberOf _
8640 * @since 3.0.0
8641 * @category Array
8642 * @param {Array} array The array to query.
8643 * @param {Function} [predicate=_.identity] The function invoked per iteration.
8644 * @returns {Array} Returns the slice of `array`.
8645 * @example
8646 *
8647 * var users = [
8648 * { 'user': 'barney', 'active': false },
8649 * { 'user': 'fred', 'active': false },
8650 * { 'user': 'pebbles', 'active': true }
8651 * ];
8652 *
8653 * _.dropWhile(users, function(o) { return !o.active; });
8654 * // => objects for ['pebbles']
8655 *
8656 * // The `_.matches` iteratee shorthand.
8657 * _.dropWhile(users, { 'user': 'barney', 'active': false });
8658 * // => objects for ['fred', 'pebbles']
8659 *
8660 * // The `_.matchesProperty` iteratee shorthand.
8661 * _.dropWhile(users, ['active', false]);
8662 * // => objects for ['pebbles']
8663 *
8664 * // The `_.property` iteratee shorthand.
8665 * _.dropWhile(users, 'active');
8666 * // => objects for ['barney', 'fred', 'pebbles']
8667 */
8668 function dropWhile(array, predicate) {
8669 return (array && array.length)
8670 ? baseWhile(array, getIteratee(predicate, 3), true)
8671 : [];
8672 }
8673
8674 /**
8675 * Fills elements of `array` with `value` from `start` up to, but not
8676 * including, `end`.
8677 *
8678 * **Note:** This method mutates `array`.
8679 *
8680 * @static
8681 * @memberOf _
8682 * @since 3.2.0
8683 * @category Array
8684 * @param {Array} array The array to fill.
8685 * @param {*} value The value to fill `array` with.
8686 * @param {number} [start=0] The start position.
8687 * @param {number} [end=array.length] The end position.
8688 * @returns {Array} Returns `array`.
8689 * @example
8690 *
8691 * var array = [1, 2, 3];
8692 *
8693 * _.fill(array, 'a');
8694 * console.log(array);
8695 * // => ['a', 'a', 'a']
8696 *
8697 * _.fill(Array(3), 2);
8698 * // => [2, 2, 2]
8699 *
8700 * _.fill([4, 6, 8, 10], '*', 1, 3);
8701 * // => [4, '*', '*', 10]
8702 */
8703 function fill(array, value, start, end) {
8704 var length = array == null ? 0 : array.length;
8705 if (!length) {
8706 return [];
8707 }
8708 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
8709 start = 0;
8710 end = length;
8711 }
8712 return baseFill(array, value, start, end);
8713 }
8714
8715 /**
8716 * This method is like `_.find` except that it returns the index of the first
8717 * element `predicate` returns truthy for instead of the element itself.
8718 *
8719 * @static
8720 * @memberOf _
8721 * @since 1.1.0
8722 * @category Array
8723 * @param {Array} array The array to inspect.
8724 * @param {Function} [predicate=_.identity] The function invoked per iteration.
8725 * @param {number} [fromIndex=0] The index to search from.
8726 * @returns {number} Returns the index of the found element, else `-1`.
8727 * @example
8728 *
8729 * var users = [
8730 * { 'user': 'barney', 'active': false },
8731 * { 'user': 'fred', 'active': false },
8732 * { 'user': 'pebbles', 'active': true }
8733 * ];
8734 *
8735 * _.findIndex(users, function(o) { return o.user == 'barney'; });
8736 * // => 0
8737 *
8738 * // The `_.matches` iteratee shorthand.
8739 * _.findIndex(users, { 'user': 'fred', 'active': false });
8740 * // => 1
8741 *
8742 * // The `_.matchesProperty` iteratee shorthand.
8743 * _.findIndex(users, ['active', false]);
8744 * // => 0
8745 *
8746 * // The `_.property` iteratee shorthand.
8747 * _.findIndex(users, 'active');
8748 * // => 2
8749 */
8750 function findIndex(array, predicate, fromIndex) {
8751 var length = array == null ? 0 : array.length;
8752 if (!length) {
8753 return -1;
8754 }
8755 var index = fromIndex == null ? 0 : toInteger(fromIndex);
8756 if (index < 0) {
8757 index = nativeMax(length + index, 0);
8758 }
8759 return baseFindIndex(array, getIteratee(predicate, 3), index);
8760 }
8761
8762 /**
8763 * This method is like `_.findIndex` except that it iterates over elements
8764 * of `collection` from right to left.
8765 *
8766 * @static
8767 * @memberOf _
8768 * @since 2.0.0
8769 * @category Array
8770 * @param {Array} array The array to inspect.
8771 * @param {Function} [predicate=_.identity] The function invoked per iteration.
8772 * @param {number} [fromIndex=array.length-1] The index to search from.
8773 * @returns {number} Returns the index of the found element, else `-1`.
8774 * @example
8775 *
8776 * var users = [
8777 * { 'user': 'barney', 'active': true },
8778 * { 'user': 'fred', 'active': false },
8779 * { 'user': 'pebbles', 'active': false }
8780 * ];
8781 *
8782 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
8783 * // => 2
8784 *
8785 * // The `_.matches` iteratee shorthand.
8786 * _.findLastIndex(users, { 'user': 'barney', 'active': true });
8787 * // => 0
8788 *
8789 * // The `_.matchesProperty` iteratee shorthand.
8790 * _.findLastIndex(users, ['active', false]);
8791 * // => 2
8792 *
8793 * // The `_.property` iteratee shorthand.
8794 * _.findLastIndex(users, 'active');
8795 * // => 0
8796 */
8797 function findLastIndex(array, predicate, fromIndex) {
8798 var length = array == null ? 0 : array.length;
8799 if (!length) {
8800 return -1;
8801 }
8802 var index = length - 1;
8803 if (fromIndex !== undefined) {
8804 index = toInteger(fromIndex);
8805 index = fromIndex < 0
8806 ? nativeMax(length + index, 0)
8807 : nativeMin(index, length - 1);
8808 }
8809 return baseFindIndex(array, getIteratee(predicate, 3), index, true);
8810 }
8811
8812 /**
8813 * Flattens `array` a single level deep.
8814 *
8815 * @static
8816 * @memberOf _
8817 * @since 0.1.0
8818 * @category Array
8819 * @param {Array} array The array to flatten.
8820 * @returns {Array} Returns the new flattened array.
8821 * @example
8822 *
8823 * _.flatten([1, [2, [3, [4]], 5]]);
8824 * // => [1, 2, [3, [4]], 5]
8825 */
8826 function flatten(array) {
8827 var length = array == null ? 0 : array.length;
8828 return length ? baseFlatten(array, 1) : [];
8829 }
8830
8831 /**
8832 * Recursively flattens `array`.
8833 *
8834 * @static
8835 * @memberOf _
8836 * @since 3.0.0
8837 * @category Array
8838 * @param {Array} array The array to flatten.
8839 * @returns {Array} Returns the new flattened array.
8840 * @example
8841 *
8842 * _.flattenDeep([1, [2, [3, [4]], 5]]);
8843 * // => [1, 2, 3, 4, 5]
8844 */
8845 function flattenDeep(array) {
8846 var length = array == null ? 0 : array.length;
8847 return length ? baseFlatten(array, INFINITY) : [];
8848 }
8849
8850 /**
8851 * Recursively flatten `array` up to `depth` times.
8852 *
8853 * @static
8854 * @memberOf _
8855 * @since 4.4.0
8856 * @category Array
8857 * @param {Array} array The array to flatten.
8858 * @param {number} [depth=1] The maximum recursion depth.
8859 * @returns {Array} Returns the new flattened array.
8860 * @example
8861 *
8862 * var array = [1, [2, [3, [4]], 5]];
8863 *
8864 * _.flattenDepth(array, 1);
8865 * // => [1, 2, [3, [4]], 5]
8866 *
8867 * _.flattenDepth(array, 2);
8868 * // => [1, 2, 3, [4], 5]
8869 */
8870 function flattenDepth(array, depth) {
8871 var length = array == null ? 0 : array.length;
8872 if (!length) {
8873 return [];
8874 }
8875 depth = depth === undefined ? 1 : toInteger(depth);
8876 return baseFlatten(array, depth);
8877 }
8878
8879 /**
8880 * The inverse of `_.toPairs`; this method returns an object composed
8881 * from key-value `pairs`.
8882 *
8883 * @static
8884 * @memberOf _
8885 * @since 4.0.0
8886 * @category Array
8887 * @param {Array} pairs The key-value pairs.
8888 * @returns {Object} Returns the new object.
8889 * @example
8890 *
8891 * _.fromPairs([['a', 1], ['b', 2]]);
8892 * // => { 'a': 1, 'b': 2 }
8893 */
8894 function fromPairs(pairs) {
8895 var index = -1,
8896 length = pairs == null ? 0 : pairs.length,
8897 result = {};
8898
8899 while (++index < length) {
8900 var pair = pairs[index];
8901 result[pair[0]] = pair[1];
8902 }
8903 return result;
8904 }
8905
8906 /**
8907 * Gets the first element of `array`.
8908 *
8909 * @static
8910 * @memberOf _
8911 * @since 0.1.0
8912 * @alias first
8913 * @category Array
8914 * @param {Array} array The array to query.
8915 * @returns {*} Returns the first element of `array`.
8916 * @example
8917 *
8918 * _.head([1, 2, 3]);
8919 * // => 1
8920 *
8921 * _.head([]);
8922 * // => undefined
8923 */
8924 function head(array) {
8925 return (array && array.length) ? array[0] : undefined;
8926 }
8927
8928 /**
8929 * Gets the index at which the first occurrence of `value` is found in `array`
8930 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8931 * for equality comparisons. If `fromIndex` is negative, it's used as the
8932 * offset from the end of `array`.
8933 *
8934 * @static
8935 * @memberOf _
8936 * @since 0.1.0
8937 * @category Array
8938 * @param {Array} array The array to inspect.
8939 * @param {*} value The value to search for.
8940 * @param {number} [fromIndex=0] The index to search from.
8941 * @returns {number} Returns the index of the matched value, else `-1`.
8942 * @example
8943 *
8944 * _.indexOf([1, 2, 1, 2], 2);
8945 * // => 1
8946 *
8947 * // Search from the `fromIndex`.
8948 * _.indexOf([1, 2, 1, 2], 2, 2);
8949 * // => 3
8950 */
8951 function indexOf(array, value, fromIndex) {
8952 var length = array == null ? 0 : array.length;
8953 if (!length) {
8954 return -1;
8955 }
8956 var index = fromIndex == null ? 0 : toInteger(fromIndex);
8957 if (index < 0) {
8958 index = nativeMax(length + index, 0);
8959 }
8960 return baseIndexOf(array, value, index);
8961 }
8962
8963 /**
8964 * Gets all but the last element of `array`.
8965 *
8966 * @static
8967 * @memberOf _
8968 * @since 0.1.0
8969 * @category Array
8970 * @param {Array} array The array to query.
8971 * @returns {Array} Returns the slice of `array`.
8972 * @example
8973 *
8974 * _.initial([1, 2, 3]);
8975 * // => [1, 2]
8976 */
8977 function initial(array) {
8978 var length = array == null ? 0 : array.length;
8979 return length ? baseSlice(array, 0, -1) : [];
8980 }
8981
8982 /**
8983 * Creates an array of unique values that are included in all given arrays
8984 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8985 * for equality comparisons. The order and references of result values are
8986 * determined by the first array.
8987 *
8988 * @static
8989 * @memberOf _
8990 * @since 0.1.0
8991 * @category Array
8992 * @param {...Array} [arrays] The arrays to inspect.
8993 * @returns {Array} Returns the new array of intersecting values.
8994 * @example
8995 *
8996 * _.intersection([2, 1], [2, 3]);
8997 * // => [2]
8998 */
8999 var intersection = baseRest(function(arrays) {
9000 var mapped = arrayMap(arrays, castArrayLikeObject);
9001 return (mapped.length && mapped[0] === arrays[0])
9002 ? baseIntersection(mapped)
9003 : [];
9004 });
9005
9006 /**
9007 * This method is like `_.intersection` except that it accepts `iteratee`
9008 * which is invoked for each element of each `arrays` to generate the criterion
9009 * by which they're compared. The order and references of result values are
9010 * determined by the first array. The iteratee is invoked with one argument:
9011 * (value).
9012 *
9013 * @static
9014 * @memberOf _
9015 * @since 4.0.0
9016 * @category Array
9017 * @param {...Array} [arrays] The arrays to inspect.
9018 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9019 * @returns {Array} Returns the new array of intersecting values.
9020 * @example
9021 *
9022 * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
9023 * // => [2.1]
9024 *
9025 * // The `_.property` iteratee shorthand.
9026 * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9027 * // => [{ 'x': 1 }]
9028 */
9029 var intersectionBy = baseRest(function(arrays) {
9030 var iteratee = last(arrays),
9031 mapped = arrayMap(arrays, castArrayLikeObject);
9032
9033 if (iteratee === last(mapped)) {
9034 iteratee = undefined;
9035 } else {
9036 mapped.pop();
9037 }
9038 return (mapped.length && mapped[0] === arrays[0])
9039 ? baseIntersection(mapped, getIteratee(iteratee, 2))
9040 : [];
9041 });
9042
9043 /**
9044 * This method is like `_.intersection` except that it accepts `comparator`
9045 * which is invoked to compare elements of `arrays`. The order and references
9046 * of result values are determined by the first array. The comparator is
9047 * invoked with two arguments: (arrVal, othVal).
9048 *
9049 * @static
9050 * @memberOf _
9051 * @since 4.0.0
9052 * @category Array
9053 * @param {...Array} [arrays] The arrays to inspect.
9054 * @param {Function} [comparator] The comparator invoked per element.
9055 * @returns {Array} Returns the new array of intersecting values.
9056 * @example
9057 *
9058 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9059 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9060 *
9061 * _.intersectionWith(objects, others, _.isEqual);
9062 * // => [{ 'x': 1, 'y': 2 }]
9063 */
9064 var intersectionWith = baseRest(function(arrays) {
9065 var comparator = last(arrays),
9066 mapped = arrayMap(arrays, castArrayLikeObject);
9067
9068 comparator = typeof comparator == 'function' ? comparator : undefined;
9069 if (comparator) {
9070 mapped.pop();
9071 }
9072 return (mapped.length && mapped[0] === arrays[0])
9073 ? baseIntersection(mapped, undefined, comparator)
9074 : [];
9075 });
9076
9077 /**
9078 * Converts all elements in `array` into a string separated by `separator`.
9079 *
9080 * @static
9081 * @memberOf _
9082 * @since 4.0.0
9083 * @category Array
9084 * @param {Array} array The array to convert.
9085 * @param {string} [separator=','] The element separator.
9086 * @returns {string} Returns the joined string.
9087 * @example
9088 *
9089 * _.join(['a', 'b', 'c'], '~');
9090 * // => 'a~b~c'
9091 */
9092 function join(array, separator) {
9093 return array == null ? '' : nativeJoin.call(array, separator);
9094 }
9095
9096 /**
9097 * Gets the last element of `array`.
9098 *
9099 * @static
9100 * @memberOf _
9101 * @since 0.1.0
9102 * @category Array
9103 * @param {Array} array The array to query.
9104 * @returns {*} Returns the last element of `array`.
9105 * @example
9106 *
9107 * _.last([1, 2, 3]);
9108 * // => 3
9109 */
9110 function last(array) {
9111 var length = array == null ? 0 : array.length;
9112 return length ? array[length - 1] : undefined;
9113 }
9114
9115 /**
9116 * This method is like `_.indexOf` except that it iterates over elements of
9117 * `array` from right to left.
9118 *
9119 * @static
9120 * @memberOf _
9121 * @since 0.1.0
9122 * @category Array
9123 * @param {Array} array The array to inspect.
9124 * @param {*} value The value to search for.
9125 * @param {number} [fromIndex=array.length-1] The index to search from.
9126 * @returns {number} Returns the index of the matched value, else `-1`.
9127 * @example
9128 *
9129 * _.lastIndexOf([1, 2, 1, 2], 2);
9130 * // => 3
9131 *
9132 * // Search from the `fromIndex`.
9133 * _.lastIndexOf([1, 2, 1, 2], 2, 2);
9134 * // => 1
9135 */
9136 function lastIndexOf(array, value, fromIndex) {
9137 var length = array == null ? 0 : array.length;
9138 if (!length) {
9139 return -1;
9140 }
9141 var index = length;
9142 if (fromIndex !== undefined) {
9143 index = toInteger(fromIndex);
9144 index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
9145 }
9146 return value === value
9147 ? strictLastIndexOf(array, value, index)
9148 : baseFindIndex(array, baseIsNaN, index, true);
9149 }
9150
9151 /**
9152 * Gets the element at index `n` of `array`. If `n` is negative, the nth
9153 * element from the end is returned.
9154 *
9155 * @static
9156 * @memberOf _
9157 * @since 4.11.0
9158 * @category Array
9159 * @param {Array} array The array to query.
9160 * @param {number} [n=0] The index of the element to return.
9161 * @returns {*} Returns the nth element of `array`.
9162 * @example
9163 *
9164 * var array = ['a', 'b', 'c', 'd'];
9165 *
9166 * _.nth(array, 1);
9167 * // => 'b'
9168 *
9169 * _.nth(array, -2);
9170 * // => 'c';
9171 */
9172 function nth(array, n) {
9173 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
9174 }
9175
9176 /**
9177 * Removes all given values from `array` using
9178 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9179 * for equality comparisons.
9180 *
9181 * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
9182 * to remove elements from an array by predicate.
9183 *
9184 * @static
9185 * @memberOf _
9186 * @since 2.0.0
9187 * @category Array
9188 * @param {Array} array The array to modify.
9189 * @param {...*} [values] The values to remove.
9190 * @returns {Array} Returns `array`.
9191 * @example
9192 *
9193 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9194 *
9195 * _.pull(array, 'a', 'c');
9196 * console.log(array);
9197 * // => ['b', 'b']
9198 */
9199 var pull = baseRest(pullAll);
9200
9201 /**
9202 * This method is like `_.pull` except that it accepts an array of values to remove.
9203 *
9204 * **Note:** Unlike `_.difference`, this method mutates `array`.
9205 *
9206 * @static
9207 * @memberOf _
9208 * @since 4.0.0
9209 * @category Array
9210 * @param {Array} array The array to modify.
9211 * @param {Array} values The values to remove.
9212 * @returns {Array} Returns `array`.
9213 * @example
9214 *
9215 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9216 *
9217 * _.pullAll(array, ['a', 'c']);
9218 * console.log(array);
9219 * // => ['b', 'b']
9220 */
9221 function pullAll(array, values) {
9222 return (array && array.length && values && values.length)
9223 ? basePullAll(array, values)
9224 : array;
9225 }
9226
9227 /**
9228 * This method is like `_.pullAll` except that it accepts `iteratee` which is
9229 * invoked for each element of `array` and `values` to generate the criterion
9230 * by which they're compared. The iteratee is invoked with one argument: (value).
9231 *
9232 * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
9233 *
9234 * @static
9235 * @memberOf _
9236 * @since 4.0.0
9237 * @category Array
9238 * @param {Array} array The array to modify.
9239 * @param {Array} values The values to remove.
9240 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9241 * @returns {Array} Returns `array`.
9242 * @example
9243 *
9244 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
9245 *
9246 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
9247 * console.log(array);
9248 * // => [{ 'x': 2 }]
9249 */
9250 function pullAllBy(array, values, iteratee) {
9251 return (array && array.length && values && values.length)
9252 ? basePullAll(array, values, getIteratee(iteratee, 2))
9253 : array;
9254 }
9255
9256 /**
9257 * This method is like `_.pullAll` except that it accepts `comparator` which
9258 * is invoked to compare elements of `array` to `values`. The comparator is
9259 * invoked with two arguments: (arrVal, othVal).
9260 *
9261 * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
9262 *
9263 * @static
9264 * @memberOf _
9265 * @since 4.6.0
9266 * @category Array
9267 * @param {Array} array The array to modify.
9268 * @param {Array} values The values to remove.
9269 * @param {Function} [comparator] The comparator invoked per element.
9270 * @returns {Array} Returns `array`.
9271 * @example
9272 *
9273 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
9274 *
9275 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
9276 * console.log(array);
9277 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
9278 */
9279 function pullAllWith(array, values, comparator) {
9280 return (array && array.length && values && values.length)
9281 ? basePullAll(array, values, undefined, comparator)
9282 : array;
9283 }
9284
9285 /**
9286 * Removes elements from `array` corresponding to `indexes` and returns an
9287 * array of removed elements.
9288 *
9289 * **Note:** Unlike `_.at`, this method mutates `array`.
9290 *
9291 * @static
9292 * @memberOf _
9293 * @since 3.0.0
9294 * @category Array
9295 * @param {Array} array The array to modify.
9296 * @param {...(number|number[])} [indexes] The indexes of elements to remove.
9297 * @returns {Array} Returns the new array of removed elements.
9298 * @example
9299 *
9300 * var array = ['a', 'b', 'c', 'd'];
9301 * var pulled = _.pullAt(array, [1, 3]);
9302 *
9303 * console.log(array);
9304 * // => ['a', 'c']
9305 *
9306 * console.log(pulled);
9307 * // => ['b', 'd']
9308 */
9309 var pullAt = flatRest(function(array, indexes) {
9310 var length = array == null ? 0 : array.length,
9311 result = baseAt(array, indexes);
9312
9313 basePullAt(array, arrayMap(indexes, function(index) {
9314 return isIndex(index, length) ? +index : index;
9315 }).sort(compareAscending));
9316
9317 return result;
9318 });
9319
9320 /**
9321 * Removes all elements from `array` that `predicate` returns truthy for
9322 * and returns an array of the removed elements. The predicate is invoked
9323 * with three arguments: (value, index, array).
9324 *
9325 * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
9326 * to pull elements from an array by value.
9327 *
9328 * @static
9329 * @memberOf _
9330 * @since 2.0.0
9331 * @category Array
9332 * @param {Array} array The array to modify.
9333 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9334 * @returns {Array} Returns the new array of removed elements.
9335 * @example
9336 *
9337 * var array = [1, 2, 3, 4];
9338 * var evens = _.remove(array, function(n) {
9339 * return n % 2 == 0;
9340 * });
9341 *
9342 * console.log(array);
9343 * // => [1, 3]
9344 *
9345 * console.log(evens);
9346 * // => [2, 4]
9347 */
9348 function remove(array, predicate) {
9349 var result = [];
9350 if (!(array && array.length)) {
9351 return result;
9352 }
9353 var index = -1,
9354 indexes = [],
9355 length = array.length;
9356
9357 predicate = getIteratee(predicate, 3);
9358 while (++index < length) {
9359 var value = array[index];
9360 if (predicate(value, index, array)) {
9361 result.push(value);
9362 indexes.push(index);
9363 }
9364 }
9365 basePullAt(array, indexes);
9366 return result;
9367 }
9368
9369 /**
9370 * Reverses `array` so that the first element becomes the last, the second
9371 * element becomes the second to last, and so on.
9372 *
9373 * **Note:** This method mutates `array` and is based on
9374 * [`Array#reverse`](https://mdn.io/Array/reverse).
9375 *
9376 * @static
9377 * @memberOf _
9378 * @since 4.0.0
9379 * @category Array
9380 * @param {Array} array The array to modify.
9381 * @returns {Array} Returns `array`.
9382 * @example
9383 *
9384 * var array = [1, 2, 3];
9385 *
9386 * _.reverse(array);
9387 * // => [3, 2, 1]
9388 *
9389 * console.log(array);
9390 * // => [3, 2, 1]
9391 */
9392 function reverse(array) {
9393 return array == null ? array : nativeReverse.call(array);
9394 }
9395
9396 /**
9397 * Creates a slice of `array` from `start` up to, but not including, `end`.
9398 *
9399 * **Note:** This method is used instead of
9400 * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
9401 * returned.
9402 *
9403 * @static
9404 * @memberOf _
9405 * @since 3.0.0
9406 * @category Array
9407 * @param {Array} array The array to slice.
9408 * @param {number} [start=0] The start position.
9409 * @param {number} [end=array.length] The end position.
9410 * @returns {Array} Returns the slice of `array`.
9411 */
9412 function slice(array, start, end) {
9413 var length = array == null ? 0 : array.length;
9414 if (!length) {
9415 return [];
9416 }
9417 if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
9418 start = 0;
9419 end = length;
9420 }
9421 else {
9422 start = start == null ? 0 : toInteger(start);
9423 end = end === undefined ? length : toInteger(end);
9424 }
9425 return baseSlice(array, start, end);
9426 }
9427
9428 /**
9429 * Uses a binary search to determine the lowest index at which `value`
9430 * should be inserted into `array` in order to maintain its sort order.
9431 *
9432 * @static
9433 * @memberOf _
9434 * @since 0.1.0
9435 * @category Array
9436 * @param {Array} array The sorted array to inspect.
9437 * @param {*} value The value to evaluate.
9438 * @returns {number} Returns the index at which `value` should be inserted
9439 * into `array`.
9440 * @example
9441 *
9442 * _.sortedIndex([30, 50], 40);
9443 * // => 1
9444 */
9445 function sortedIndex(array, value) {
9446 return baseSortedIndex(array, value);
9447 }
9448
9449 /**
9450 * This method is like `_.sortedIndex` except that it accepts `iteratee`
9451 * which is invoked for `value` and each element of `array` to compute their
9452 * sort ranking. The iteratee is invoked with one argument: (value).
9453 *
9454 * @static
9455 * @memberOf _
9456 * @since 4.0.0
9457 * @category Array
9458 * @param {Array} array The sorted array to inspect.
9459 * @param {*} value The value to evaluate.
9460 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9461 * @returns {number} Returns the index at which `value` should be inserted
9462 * into `array`.
9463 * @example
9464 *
9465 * var objects = [{ 'x': 4 }, { 'x': 5 }];
9466 *
9467 * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
9468 * // => 0
9469 *
9470 * // The `_.property` iteratee shorthand.
9471 * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
9472 * // => 0
9473 */
9474 function sortedIndexBy(array, value, iteratee) {
9475 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
9476 }
9477
9478 /**
9479 * This method is like `_.indexOf` except that it performs a binary
9480 * search on a sorted `array`.
9481 *
9482 * @static
9483 * @memberOf _
9484 * @since 4.0.0
9485 * @category Array
9486 * @param {Array} array The array to inspect.
9487 * @param {*} value The value to search for.
9488 * @returns {number} Returns the index of the matched value, else `-1`.
9489 * @example
9490 *
9491 * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
9492 * // => 1
9493 */
9494 function sortedIndexOf(array, value) {
9495 var length = array == null ? 0 : array.length;
9496 if (length) {
9497 var index = baseSortedIndex(array, value);
9498 if (index < length && eq(array[index], value)) {
9499 return index;
9500 }
9501 }
9502 return -1;
9503 }
9504
9505 /**
9506 * This method is like `_.sortedIndex` except that it returns the highest
9507 * index at which `value` should be inserted into `array` in order to
9508 * maintain its sort order.
9509 *
9510 * @static
9511 * @memberOf _
9512 * @since 3.0.0
9513 * @category Array
9514 * @param {Array} array The sorted array to inspect.
9515 * @param {*} value The value to evaluate.
9516 * @returns {number} Returns the index at which `value` should be inserted
9517 * into `array`.
9518 * @example
9519 *
9520 * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
9521 * // => 4
9522 */
9523 function sortedLastIndex(array, value) {
9524 return baseSortedIndex(array, value, true);
9525 }
9526
9527 /**
9528 * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
9529 * which is invoked for `value` and each element of `array` to compute their
9530 * sort ranking. The iteratee is invoked with one argument: (value).
9531 *
9532 * @static
9533 * @memberOf _
9534 * @since 4.0.0
9535 * @category Array
9536 * @param {Array} array The sorted array to inspect.
9537 * @param {*} value The value to evaluate.
9538 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9539 * @returns {number} Returns the index at which `value` should be inserted
9540 * into `array`.
9541 * @example
9542 *
9543 * var objects = [{ 'x': 4 }, { 'x': 5 }];
9544 *
9545 * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
9546 * // => 1
9547 *
9548 * // The `_.property` iteratee shorthand.
9549 * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
9550 * // => 1
9551 */
9552 function sortedLastIndexBy(array, value, iteratee) {
9553 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
9554 }
9555
9556 /**
9557 * This method is like `_.lastIndexOf` except that it performs a binary
9558 * search on a sorted `array`.
9559 *
9560 * @static
9561 * @memberOf _
9562 * @since 4.0.0
9563 * @category Array
9564 * @param {Array} array The array to inspect.
9565 * @param {*} value The value to search for.
9566 * @returns {number} Returns the index of the matched value, else `-1`.
9567 * @example
9568 *
9569 * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
9570 * // => 3
9571 */
9572 function sortedLastIndexOf(array, value) {
9573 var length = array == null ? 0 : array.length;
9574 if (length) {
9575 var index = baseSortedIndex(array, value, true) - 1;
9576 if (eq(array[index], value)) {
9577 return index;
9578 }
9579 }
9580 return -1;
9581 }
9582
9583 /**
9584 * This method is like `_.uniq` except that it's designed and optimized
9585 * for sorted arrays.
9586 *
9587 * @static
9588 * @memberOf _
9589 * @since 4.0.0
9590 * @category Array
9591 * @param {Array} array The array to inspect.
9592 * @returns {Array} Returns the new duplicate free array.
9593 * @example
9594 *
9595 * _.sortedUniq([1, 1, 2]);
9596 * // => [1, 2]
9597 */
9598 function sortedUniq(array) {
9599 return (array && array.length)
9600 ? baseSortedUniq(array)
9601 : [];
9602 }
9603
9604 /**
9605 * This method is like `_.uniqBy` except that it's designed and optimized
9606 * for sorted arrays.
9607 *
9608 * @static
9609 * @memberOf _
9610 * @since 4.0.0
9611 * @category Array
9612 * @param {Array} array The array to inspect.
9613 * @param {Function} [iteratee] The iteratee invoked per element.
9614 * @returns {Array} Returns the new duplicate free array.
9615 * @example
9616 *
9617 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
9618 * // => [1.1, 2.3]
9619 */
9620 function sortedUniqBy(array, iteratee) {
9621 return (array && array.length)
9622 ? baseSortedUniq(array, getIteratee(iteratee, 2))
9623 : [];
9624 }
9625
9626 /**
9627 * Gets all but the first element of `array`.
9628 *
9629 * @static
9630 * @memberOf _
9631 * @since 4.0.0
9632 * @category Array
9633 * @param {Array} array The array to query.
9634 * @returns {Array} Returns the slice of `array`.
9635 * @example
9636 *
9637 * _.tail([1, 2, 3]);
9638 * // => [2, 3]
9639 */
9640 function tail(array) {
9641 var length = array == null ? 0 : array.length;
9642 return length ? baseSlice(array, 1, length) : [];
9643 }
9644
9645 /**
9646 * Creates a slice of `array` with `n` elements taken from the beginning.
9647 *
9648 * @static
9649 * @memberOf _
9650 * @since 0.1.0
9651 * @category Array
9652 * @param {Array} array The array to query.
9653 * @param {number} [n=1] The number of elements to take.
9654 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9655 * @returns {Array} Returns the slice of `array`.
9656 * @example
9657 *
9658 * _.take([1, 2, 3]);
9659 * // => [1]
9660 *
9661 * _.take([1, 2, 3], 2);
9662 * // => [1, 2]
9663 *
9664 * _.take([1, 2, 3], 5);
9665 * // => [1, 2, 3]
9666 *
9667 * _.take([1, 2, 3], 0);
9668 * // => []
9669 */
9670 function take(array, n, guard) {
9671 if (!(array && array.length)) {
9672 return [];
9673 }
9674 n = (guard || n === undefined) ? 1 : toInteger(n);
9675 return baseSlice(array, 0, n < 0 ? 0 : n);
9676 }
9677
9678 /**
9679 * Creates a slice of `array` with `n` elements taken from the end.
9680 *
9681 * @static
9682 * @memberOf _
9683 * @since 3.0.0
9684 * @category Array
9685 * @param {Array} array The array to query.
9686 * @param {number} [n=1] The number of elements to take.
9687 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9688 * @returns {Array} Returns the slice of `array`.
9689 * @example
9690 *
9691 * _.takeRight([1, 2, 3]);
9692 * // => [3]
9693 *
9694 * _.takeRight([1, 2, 3], 2);
9695 * // => [2, 3]
9696 *
9697 * _.takeRight([1, 2, 3], 5);
9698 * // => [1, 2, 3]
9699 *
9700 * _.takeRight([1, 2, 3], 0);
9701 * // => []
9702 */
9703 function takeRight(array, n, guard) {
9704 var length = array == null ? 0 : array.length;
9705 if (!length) {
9706 return [];
9707 }
9708 n = (guard || n === undefined) ? 1 : toInteger(n);
9709 n = length - n;
9710 return baseSlice(array, n < 0 ? 0 : n, length);
9711 }
9712
9713 /**
9714 * Creates a slice of `array` with elements taken from the end. Elements are
9715 * taken until `predicate` returns falsey. The predicate is invoked with
9716 * three arguments: (value, index, array).
9717 *
9718 * @static
9719 * @memberOf _
9720 * @since 3.0.0
9721 * @category Array
9722 * @param {Array} array The array to query.
9723 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9724 * @returns {Array} Returns the slice of `array`.
9725 * @example
9726 *
9727 * var users = [
9728 * { 'user': 'barney', 'active': true },
9729 * { 'user': 'fred', 'active': false },
9730 * { 'user': 'pebbles', 'active': false }
9731 * ];
9732 *
9733 * _.takeRightWhile(users, function(o) { return !o.active; });
9734 * // => objects for ['fred', 'pebbles']
9735 *
9736 * // The `_.matches` iteratee shorthand.
9737 * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
9738 * // => objects for ['pebbles']
9739 *
9740 * // The `_.matchesProperty` iteratee shorthand.
9741 * _.takeRightWhile(users, ['active', false]);
9742 * // => objects for ['fred', 'pebbles']
9743 *
9744 * // The `_.property` iteratee shorthand.
9745 * _.takeRightWhile(users, 'active');
9746 * // => []
9747 */
9748 function takeRightWhile(array, predicate) {
9749 return (array && array.length)
9750 ? baseWhile(array, getIteratee(predicate, 3), false, true)
9751 : [];
9752 }
9753
9754 /**
9755 * Creates a slice of `array` with elements taken from the beginning. Elements
9756 * are taken until `predicate` returns falsey. The predicate is invoked with
9757 * three arguments: (value, index, array).
9758 *
9759 * @static
9760 * @memberOf _
9761 * @since 3.0.0
9762 * @category Array
9763 * @param {Array} array The array to query.
9764 * @param {Function} [predicate=_.identity] The function invoked per iteration.
9765 * @returns {Array} Returns the slice of `array`.
9766 * @example
9767 *
9768 * var users = [
9769 * { 'user': 'barney', 'active': false },
9770 * { 'user': 'fred', 'active': false },
9771 * { 'user': 'pebbles', 'active': true }
9772 * ];
9773 *
9774 * _.takeWhile(users, function(o) { return !o.active; });
9775 * // => objects for ['barney', 'fred']
9776 *
9777 * // The `_.matches` iteratee shorthand.
9778 * _.takeWhile(users, { 'user': 'barney', 'active': false });
9779 * // => objects for ['barney']
9780 *
9781 * // The `_.matchesProperty` iteratee shorthand.
9782 * _.takeWhile(users, ['active', false]);
9783 * // => objects for ['barney', 'fred']
9784 *
9785 * // The `_.property` iteratee shorthand.
9786 * _.takeWhile(users, 'active');
9787 * // => []
9788 */
9789 function takeWhile(array, predicate) {
9790 return (array && array.length)
9791 ? baseWhile(array, getIteratee(predicate, 3))
9792 : [];
9793 }
9794
9795 /**
9796 * Creates an array of unique values, in order, from all given arrays using
9797 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9798 * for equality comparisons.
9799 *
9800 * @static
9801 * @memberOf _
9802 * @since 0.1.0
9803 * @category Array
9804 * @param {...Array} [arrays] The arrays to inspect.
9805 * @returns {Array} Returns the new array of combined values.
9806 * @example
9807 *
9808 * _.union([2], [1, 2]);
9809 * // => [2, 1]
9810 */
9811 var union = baseRest(function(arrays) {
9812 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
9813 });
9814
9815 /**
9816 * This method is like `_.union` except that it accepts `iteratee` which is
9817 * invoked for each element of each `arrays` to generate the criterion by
9818 * which uniqueness is computed. Result values are chosen from the first
9819 * array in which the value occurs. The iteratee is invoked with one argument:
9820 * (value).
9821 *
9822 * @static
9823 * @memberOf _
9824 * @since 4.0.0
9825 * @category Array
9826 * @param {...Array} [arrays] The arrays to inspect.
9827 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9828 * @returns {Array} Returns the new array of combined values.
9829 * @example
9830 *
9831 * _.unionBy([2.1], [1.2, 2.3], Math.floor);
9832 * // => [2.1, 1.2]
9833 *
9834 * // The `_.property` iteratee shorthand.
9835 * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9836 * // => [{ 'x': 1 }, { 'x': 2 }]
9837 */
9838 var unionBy = baseRest(function(arrays) {
9839 var iteratee = last(arrays);
9840 if (isArrayLikeObject(iteratee)) {
9841 iteratee = undefined;
9842 }
9843 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
9844 });
9845
9846 /**
9847 * This method is like `_.union` except that it accepts `comparator` which
9848 * is invoked to compare elements of `arrays`. Result values are chosen from
9849 * the first array in which the value occurs. The comparator is invoked
9850 * with two arguments: (arrVal, othVal).
9851 *
9852 * @static
9853 * @memberOf _
9854 * @since 4.0.0
9855 * @category Array
9856 * @param {...Array} [arrays] The arrays to inspect.
9857 * @param {Function} [comparator] The comparator invoked per element.
9858 * @returns {Array} Returns the new array of combined values.
9859 * @example
9860 *
9861 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9862 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9863 *
9864 * _.unionWith(objects, others, _.isEqual);
9865 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
9866 */
9867 var unionWith = baseRest(function(arrays) {
9868 var comparator = last(arrays);
9869 comparator = typeof comparator == 'function' ? comparator : undefined;
9870 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
9871 });
9872
9873 /**
9874 * Creates a duplicate-free version of an array, using
9875 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9876 * for equality comparisons, in which only the first occurrence of each element
9877 * is kept. The order of result values is determined by the order they occur
9878 * in the array.
9879 *
9880 * @static
9881 * @memberOf _
9882 * @since 0.1.0
9883 * @category Array
9884 * @param {Array} array The array to inspect.
9885 * @returns {Array} Returns the new duplicate free array.
9886 * @example
9887 *
9888 * _.uniq([2, 1, 2]);
9889 * // => [2, 1]
9890 */
9891 function uniq(array) {
9892 return (array && array.length) ? baseUniq(array) : [];
9893 }
9894
9895 /**
9896 * This method is like `_.uniq` except that it accepts `iteratee` which is
9897 * invoked for each element in `array` to generate the criterion by which
9898 * uniqueness is computed. The order of result values is determined by the
9899 * order they occur in the array. The iteratee is invoked with one argument:
9900 * (value).
9901 *
9902 * @static
9903 * @memberOf _
9904 * @since 4.0.0
9905 * @category Array
9906 * @param {Array} array The array to inspect.
9907 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9908 * @returns {Array} Returns the new duplicate free array.
9909 * @example
9910 *
9911 * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
9912 * // => [2.1, 1.2]
9913 *
9914 * // The `_.property` iteratee shorthand.
9915 * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
9916 * // => [{ 'x': 1 }, { 'x': 2 }]
9917 */
9918 function uniqBy(array, iteratee) {
9919 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
9920 }
9921
9922 /**
9923 * This method is like `_.uniq` except that it accepts `comparator` which
9924 * is invoked to compare elements of `array`. The order of result values is
9925 * determined by the order they occur in the array.The comparator is invoked
9926 * with two arguments: (arrVal, othVal).
9927 *
9928 * @static
9929 * @memberOf _
9930 * @since 4.0.0
9931 * @category Array
9932 * @param {Array} array The array to inspect.
9933 * @param {Function} [comparator] The comparator invoked per element.
9934 * @returns {Array} Returns the new duplicate free array.
9935 * @example
9936 *
9937 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
9938 *
9939 * _.uniqWith(objects, _.isEqual);
9940 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
9941 */
9942 function uniqWith(array, comparator) {
9943 comparator = typeof comparator == 'function' ? comparator : undefined;
9944 return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
9945 }
9946
9947 /**
9948 * This method is like `_.zip` except that it accepts an array of grouped
9949 * elements and creates an array regrouping the elements to their pre-zip
9950 * configuration.
9951 *
9952 * @static
9953 * @memberOf _
9954 * @since 1.2.0
9955 * @category Array
9956 * @param {Array} array The array of grouped elements to process.
9957 * @returns {Array} Returns the new array of regrouped elements.
9958 * @example
9959 *
9960 * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
9961 * // => [['a', 1, true], ['b', 2, false]]
9962 *
9963 * _.unzip(zipped);
9964 * // => [['a', 'b'], [1, 2], [true, false]]
9965 */
9966 function unzip(array) {
9967 if (!(array && array.length)) {
9968 return [];
9969 }
9970 var length = 0;
9971 array = arrayFilter(array, function(group) {
9972 if (isArrayLikeObject(group)) {
9973 length = nativeMax(group.length, length);
9974 return true;
9975 }
9976 });
9977 return baseTimes(length, function(index) {
9978 return arrayMap(array, baseProperty(index));
9979 });
9980 }
9981
9982 /**
9983 * This method is like `_.unzip` except that it accepts `iteratee` to specify
9984 * how regrouped values should be combined. The iteratee is invoked with the
9985 * elements of each group: (...group).
9986 *
9987 * @static
9988 * @memberOf _
9989 * @since 3.8.0
9990 * @category Array
9991 * @param {Array} array The array of grouped elements to process.
9992 * @param {Function} [iteratee=_.identity] The function to combine
9993 * regrouped values.
9994 * @returns {Array} Returns the new array of regrouped elements.
9995 * @example
9996 *
9997 * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
9998 * // => [[1, 10, 100], [2, 20, 200]]
9999 *
10000 * _.unzipWith(zipped, _.add);
10001 * // => [3, 30, 300]
10002 */
10003 function unzipWith(array, iteratee) {
10004 if (!(array && array.length)) {
10005 return [];
10006 }
10007 var result = unzip(array);
10008 if (iteratee == null) {
10009 return result;
10010 }
10011 return arrayMap(result, function(group) {
10012 return apply(iteratee, undefined, group);
10013 });
10014 }
10015
10016 /**
10017 * Creates an array excluding all given values using
10018 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10019 * for equality comparisons.
10020 *
10021 * **Note:** Unlike `_.pull`, this method returns a new array.
10022 *
10023 * @static
10024 * @memberOf _
10025 * @since 0.1.0
10026 * @category Array
10027 * @param {Array} array The array to inspect.
10028 * @param {...*} [values] The values to exclude.
10029 * @returns {Array} Returns the new array of filtered values.
10030 * @see _.difference, _.xor
10031 * @example
10032 *
10033 * _.without([2, 1, 2, 3], 1, 2);
10034 * // => [3]
10035 */
10036 var without = baseRest(function(array, values) {
10037 return isArrayLikeObject(array)
10038 ? baseDifference(array, values)
10039 : [];
10040 });
10041
10042 /**
10043 * Creates an array of unique values that is the
10044 * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
10045 * of the given arrays. The order of result values is determined by the order
10046 * they occur in the arrays.
10047 *
10048 * @static
10049 * @memberOf _
10050 * @since 2.4.0
10051 * @category Array
10052 * @param {...Array} [arrays] The arrays to inspect.
10053 * @returns {Array} Returns the new array of filtered values.
10054 * @see _.difference, _.without
10055 * @example
10056 *
10057 * _.xor([2, 1], [2, 3]);
10058 * // => [1, 3]
10059 */
10060 var xor = baseRest(function(arrays) {
10061 return baseXor(arrayFilter(arrays, isArrayLikeObject));
10062 });
10063
10064 /**
10065 * This method is like `_.xor` except that it accepts `iteratee` which is
10066 * invoked for each element of each `arrays` to generate the criterion by
10067 * which by which they're compared. The order of result values is determined
10068 * by the order they occur in the arrays. The iteratee is invoked with one
10069 * argument: (value).
10070 *
10071 * @static
10072 * @memberOf _
10073 * @since 4.0.0
10074 * @category Array
10075 * @param {...Array} [arrays] The arrays to inspect.
10076 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10077 * @returns {Array} Returns the new array of filtered values.
10078 * @example
10079 *
10080 * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
10081 * // => [1.2, 3.4]
10082 *
10083 * // The `_.property` iteratee shorthand.
10084 * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
10085 * // => [{ 'x': 2 }]
10086 */
10087 var xorBy = baseRest(function(arrays) {
10088 var iteratee = last(arrays);
10089 if (isArrayLikeObject(iteratee)) {
10090 iteratee = undefined;
10091 }
10092 return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
10093 });
10094
10095 /**
10096 * This method is like `_.xor` except that it accepts `comparator` which is
10097 * invoked to compare elements of `arrays`. The order of result values is
10098 * determined by the order they occur in the arrays. The comparator is invoked
10099 * with two arguments: (arrVal, othVal).
10100 *
10101 * @static
10102 * @memberOf _
10103 * @since 4.0.0
10104 * @category Array
10105 * @param {...Array} [arrays] The arrays to inspect.
10106 * @param {Function} [comparator] The comparator invoked per element.
10107 * @returns {Array} Returns the new array of filtered values.
10108 * @example
10109 *
10110 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
10111 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
10112 *
10113 * _.xorWith(objects, others, _.isEqual);
10114 * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
10115 */
10116 var xorWith = baseRest(function(arrays) {
10117 var comparator = last(arrays);
10118 comparator = typeof comparator == 'function' ? comparator : undefined;
10119 return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
10120 });
10121
10122 /**
10123 * Creates an array of grouped elements, the first of which contains the
10124 * first elements of the given arrays, the second of which contains the
10125 * second elements of the given arrays, and so on.
10126 *
10127 * @static
10128 * @memberOf _
10129 * @since 0.1.0
10130 * @category Array
10131 * @param {...Array} [arrays] The arrays to process.
10132 * @returns {Array} Returns the new array of grouped elements.
10133 * @example
10134 *
10135 * _.zip(['a', 'b'], [1, 2], [true, false]);
10136 * // => [['a', 1, true], ['b', 2, false]]
10137 */
10138 var zip = baseRest(unzip);
10139
10140 /**
10141 * This method is like `_.fromPairs` except that it accepts two arrays,
10142 * one of property identifiers and one of corresponding values.
10143 *
10144 * @static
10145 * @memberOf _
10146 * @since 0.4.0
10147 * @category Array
10148 * @param {Array} [props=[]] The property identifiers.
10149 * @param {Array} [values=[]] The property values.
10150 * @returns {Object} Returns the new object.
10151 * @example
10152 *
10153 * _.zipObject(['a', 'b'], [1, 2]);
10154 * // => { 'a': 1, 'b': 2 }
10155 */
10156 function zipObject(props, values) {
10157 return baseZipObject(props || [], values || [], assignValue);
10158 }
10159
10160 /**
10161 * This method is like `_.zipObject` except that it supports property paths.
10162 *
10163 * @static
10164 * @memberOf _
10165 * @since 4.1.0
10166 * @category Array
10167 * @param {Array} [props=[]] The property identifiers.
10168 * @param {Array} [values=[]] The property values.
10169 * @returns {Object} Returns the new object.
10170 * @example
10171 *
10172 * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
10173 * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
10174 */
10175 function zipObjectDeep(props, values) {
10176 return baseZipObject(props || [], values || [], baseSet);
10177 }
10178
10179 /**
10180 * This method is like `_.zip` except that it accepts `iteratee` to specify
10181 * how grouped values should be combined. The iteratee is invoked with the
10182 * elements of each group: (...group).
10183 *
10184 * @static
10185 * @memberOf _
10186 * @since 3.8.0
10187 * @category Array
10188 * @param {...Array} [arrays] The arrays to process.
10189 * @param {Function} [iteratee=_.identity] The function to combine
10190 * grouped values.
10191 * @returns {Array} Returns the new array of grouped elements.
10192 * @example
10193 *
10194 * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
10195 * return a + b + c;
10196 * });
10197 * // => [111, 222]
10198 */
10199 var zipWith = baseRest(function(arrays) {
10200 var length = arrays.length,
10201 iteratee = length > 1 ? arrays[length - 1] : undefined;
10202
10203 iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
10204 return unzipWith(arrays, iteratee);
10205 });
10206
10207 /*------------------------------------------------------------------------*/
10208
10209 /**
10210 * Creates a `lodash` wrapper instance that wraps `value` with explicit method
10211 * chain sequences enabled. The result of such sequences must be unwrapped
10212 * with `_#value`.
10213 *
10214 * @static
10215 * @memberOf _
10216 * @since 1.3.0
10217 * @category Seq
10218 * @param {*} value The value to wrap.
10219 * @returns {Object} Returns the new `lodash` wrapper instance.
10220 * @example
10221 *
10222 * var users = [
10223 * { 'user': 'barney', 'age': 36 },
10224 * { 'user': 'fred', 'age': 40 },
10225 * { 'user': 'pebbles', 'age': 1 }
10226 * ];
10227 *
10228 * var youngest = _
10229 * .chain(users)
10230 * .sortBy('age')
10231 * .map(function(o) {
10232 * return o.user + ' is ' + o.age;
10233 * })
10234 * .head()
10235 * .value();
10236 * // => 'pebbles is 1'
10237 */
10238 function chain(value) {
10239 var result = lodash(value);
10240 result.__chain__ = true;
10241 return result;
10242 }
10243
10244 /**
10245 * This method invokes `interceptor` and returns `value`. The interceptor
10246 * is invoked with one argument; (value). The purpose of this method is to
10247 * "tap into" a method chain sequence in order to modify intermediate results.
10248 *
10249 * @static
10250 * @memberOf _
10251 * @since 0.1.0
10252 * @category Seq
10253 * @param {*} value The value to provide to `interceptor`.
10254 * @param {Function} interceptor The function to invoke.
10255 * @returns {*} Returns `value`.
10256 * @example
10257 *
10258 * _([1, 2, 3])
10259 * .tap(function(array) {
10260 * // Mutate input array.
10261 * array.pop();
10262 * })
10263 * .reverse()
10264 * .value();
10265 * // => [2, 1]
10266 */
10267 function tap(value, interceptor) {
10268 interceptor(value);
10269 return value;
10270 }
10271
10272 /**
10273 * This method is like `_.tap` except that it returns the result of `interceptor`.
10274 * The purpose of this method is to "pass thru" values replacing intermediate
10275 * results in a method chain sequence.
10276 *
10277 * @static
10278 * @memberOf _
10279 * @since 3.0.0
10280 * @category Seq
10281 * @param {*} value The value to provide to `interceptor`.
10282 * @param {Function} interceptor The function to invoke.
10283 * @returns {*} Returns the result of `interceptor`.
10284 * @example
10285 *
10286 * _(' abc ')
10287 * .chain()
10288 * .trim()
10289 * .thru(function(value) {
10290 * return [value];
10291 * })
10292 * .value();
10293 * // => ['abc']
10294 */
10295 function thru(value, interceptor) {
10296 return interceptor(value);
10297 }
10298
10299 /**
10300 * This method is the wrapper version of `_.at`.
10301 *
10302 * @name at
10303 * @memberOf _
10304 * @since 1.0.0
10305 * @category Seq
10306 * @param {...(string|string[])} [paths] The property paths to pick.
10307 * @returns {Object} Returns the new `lodash` wrapper instance.
10308 * @example
10309 *
10310 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
10311 *
10312 * _(object).at(['a[0].b.c', 'a[1]']).value();
10313 * // => [3, 4]
10314 */
10315 var wrapperAt = flatRest(function(paths) {
10316 var length = paths.length,
10317 start = length ? paths[0] : 0,
10318 value = this.__wrapped__,
10319 interceptor = function(object) { return baseAt(object, paths); };
10320
10321 if (length > 1 || this.__actions__.length ||
10322 !(value instanceof LazyWrapper) || !isIndex(start)) {
10323 return this.thru(interceptor);
10324 }
10325 value = value.slice(start, +start + (length ? 1 : 0));
10326 value.__actions__.push({
10327 'func': thru,
10328 'args': [interceptor],
10329 'thisArg': undefined
10330 });
10331 return new LodashWrapper(value, this.__chain__).thru(function(array) {
10332 if (length && !array.length) {
10333 array.push(undefined);
10334 }
10335 return array;
10336 });
10337 });
10338
10339 /**
10340 * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
10341 *
10342 * @name chain
10343 * @memberOf _
10344 * @since 0.1.0
10345 * @category Seq
10346 * @returns {Object} Returns the new `lodash` wrapper instance.
10347 * @example
10348 *
10349 * var users = [
10350 * { 'user': 'barney', 'age': 36 },
10351 * { 'user': 'fred', 'age': 40 }
10352 * ];
10353 *
10354 * // A sequence without explicit chaining.
10355 * _(users).head();
10356 * // => { 'user': 'barney', 'age': 36 }
10357 *
10358 * // A sequence with explicit chaining.
10359 * _(users)
10360 * .chain()
10361 * .head()
10362 * .pick('user')
10363 * .value();
10364 * // => { 'user': 'barney' }
10365 */
10366 function wrapperChain() {
10367 return chain(this);
10368 }
10369
10370 /**
10371 * Executes the chain sequence and returns the wrapped result.
10372 *
10373 * @name commit
10374 * @memberOf _
10375 * @since 3.2.0
10376 * @category Seq
10377 * @returns {Object} Returns the new `lodash` wrapper instance.
10378 * @example
10379 *
10380 * var array = [1, 2];
10381 * var wrapped = _(array).push(3);
10382 *
10383 * console.log(array);
10384 * // => [1, 2]
10385 *
10386 * wrapped = wrapped.commit();
10387 * console.log(array);
10388 * // => [1, 2, 3]
10389 *
10390 * wrapped.last();
10391 * // => 3
10392 *
10393 * console.log(array);
10394 * // => [1, 2, 3]
10395 */
10396 function wrapperCommit() {
10397 return new LodashWrapper(this.value(), this.__chain__);
10398 }
10399
10400 /**
10401 * Gets the next value on a wrapped object following the
10402 * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
10403 *
10404 * @name next
10405 * @memberOf _
10406 * @since 4.0.0
10407 * @category Seq
10408 * @returns {Object} Returns the next iterator value.
10409 * @example
10410 *
10411 * var wrapped = _([1, 2]);
10412 *
10413 * wrapped.next();
10414 * // => { 'done': false, 'value': 1 }
10415 *
10416 * wrapped.next();
10417 * // => { 'done': false, 'value': 2 }
10418 *
10419 * wrapped.next();
10420 * // => { 'done': true, 'value': undefined }
10421 */
10422 function wrapperNext() {
10423 if (this.__values__ === undefined) {
10424 this.__values__ = toArray(this.value());
10425 }
10426 var done = this.__index__ >= this.__values__.length,
10427 value = done ? undefined : this.__values__[this.__index__++];
10428
10429 return { 'done': done, 'value': value };
10430 }
10431
10432 /**
10433 * Enables the wrapper to be iterable.
10434 *
10435 * @name Symbol.iterator
10436 * @memberOf _
10437 * @since 4.0.0
10438 * @category Seq
10439 * @returns {Object} Returns the wrapper object.
10440 * @example
10441 *
10442 * var wrapped = _([1, 2]);
10443 *
10444 * wrapped[Symbol.iterator]() === wrapped;
10445 * // => true
10446 *
10447 * Array.from(wrapped);
10448 * // => [1, 2]
10449 */
10450 function wrapperToIterator() {
10451 return this;
10452 }
10453
10454 /**
10455 * Creates a clone of the chain sequence planting `value` as the wrapped value.
10456 *
10457 * @name plant
10458 * @memberOf _
10459 * @since 3.2.0
10460 * @category Seq
10461 * @param {*} value The value to plant.
10462 * @returns {Object} Returns the new `lodash` wrapper instance.
10463 * @example
10464 *
10465 * function square(n) {
10466 * return n * n;
10467 * }
10468 *
10469 * var wrapped = _([1, 2]).map(square);
10470 * var other = wrapped.plant([3, 4]);
10471 *
10472 * other.value();
10473 * // => [9, 16]
10474 *
10475 * wrapped.value();
10476 * // => [1, 4]
10477 */
10478 function wrapperPlant(value) {
10479 var result,
10480 parent = this;
10481
10482 while (parent instanceof baseLodash) {
10483 var clone = wrapperClone(parent);
10484 clone.__index__ = 0;
10485 clone.__values__ = undefined;
10486 if (result) {
10487 previous.__wrapped__ = clone;
10488 } else {
10489 result = clone;
10490 }
10491 var previous = clone;
10492 parent = parent.__wrapped__;
10493 }
10494 previous.__wrapped__ = value;
10495 return result;
10496 }
10497
10498 /**
10499 * This method is the wrapper version of `_.reverse`.
10500 *
10501 * **Note:** This method mutates the wrapped array.
10502 *
10503 * @name reverse
10504 * @memberOf _
10505 * @since 0.1.0
10506 * @category Seq
10507 * @returns {Object} Returns the new `lodash` wrapper instance.
10508 * @example
10509 *
10510 * var array = [1, 2, 3];
10511 *
10512 * _(array).reverse().value()
10513 * // => [3, 2, 1]
10514 *
10515 * console.log(array);
10516 * // => [3, 2, 1]
10517 */
10518 function wrapperReverse() {
10519 var value = this.__wrapped__;
10520 if (value instanceof LazyWrapper) {
10521 var wrapped = value;
10522 if (this.__actions__.length) {
10523 wrapped = new LazyWrapper(this);
10524 }
10525 wrapped = wrapped.reverse();
10526 wrapped.__actions__.push({
10527 'func': thru,
10528 'args': [reverse],
10529 'thisArg': undefined
10530 });
10531 return new LodashWrapper(wrapped, this.__chain__);
10532 }
10533 return this.thru(reverse);
10534 }
10535
10536 /**
10537 * Executes the chain sequence to resolve the unwrapped value.
10538 *
10539 * @name value
10540 * @memberOf _
10541 * @since 0.1.0
10542 * @alias toJSON, valueOf
10543 * @category Seq
10544 * @returns {*} Returns the resolved unwrapped value.
10545 * @example
10546 *
10547 * _([1, 2, 3]).value();
10548 * // => [1, 2, 3]
10549 */
10550 function wrapperValue() {
10551 return baseWrapperValue(this.__wrapped__, this.__actions__);
10552 }
10553
10554 /*------------------------------------------------------------------------*/
10555
10556 /**
10557 * Creates an object composed of keys generated from the results of running
10558 * each element of `collection` thru `iteratee`. The corresponding value of
10559 * each key is the number of times the key was returned by `iteratee`. The
10560 * iteratee is invoked with one argument: (value).
10561 *
10562 * @static
10563 * @memberOf _
10564 * @since 0.5.0
10565 * @category Collection
10566 * @param {Array|Object} collection The collection to iterate over.
10567 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10568 * @returns {Object} Returns the composed aggregate object.
10569 * @example
10570 *
10571 * _.countBy([6.1, 4.2, 6.3], Math.floor);
10572 * // => { '4': 1, '6': 2 }
10573 *
10574 * // The `_.property` iteratee shorthand.
10575 * _.countBy(['one', 'two', 'three'], 'length');
10576 * // => { '3': 2, '5': 1 }
10577 */
10578 var countBy = createAggregator(function(result, value, key) {
10579 if (hasOwnProperty.call(result, key)) {
10580 ++result[key];
10581 } else {
10582 baseAssignValue(result, key, 1);
10583 }
10584 });
10585
10586 /**
10587 * Checks if `predicate` returns truthy for **all** elements of `collection`.
10588 * Iteration is stopped once `predicate` returns falsey. The predicate is
10589 * invoked with three arguments: (value, index|key, collection).
10590 *
10591 * **Note:** This method returns `true` for
10592 * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
10593 * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
10594 * elements of empty collections.
10595 *
10596 * @static
10597 * @memberOf _
10598 * @since 0.1.0
10599 * @category Collection
10600 * @param {Array|Object} collection The collection to iterate over.
10601 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10602 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
10603 * @returns {boolean} Returns `true` if all elements pass the predicate check,
10604 * else `false`.
10605 * @example
10606 *
10607 * _.every([true, 1, null, 'yes'], Boolean);
10608 * // => false
10609 *
10610 * var users = [
10611 * { 'user': 'barney', 'age': 36, 'active': false },
10612 * { 'user': 'fred', 'age': 40, 'active': false }
10613 * ];
10614 *
10615 * // The `_.matches` iteratee shorthand.
10616 * _.every(users, { 'user': 'barney', 'active': false });
10617 * // => false
10618 *
10619 * // The `_.matchesProperty` iteratee shorthand.
10620 * _.every(users, ['active', false]);
10621 * // => true
10622 *
10623 * // The `_.property` iteratee shorthand.
10624 * _.every(users, 'active');
10625 * // => false
10626 */
10627 function every(collection, predicate, guard) {
10628 var func = isArray(collection) ? arrayEvery : baseEvery;
10629 if (guard && isIterateeCall(collection, predicate, guard)) {
10630 predicate = undefined;
10631 }
10632 return func(collection, getIteratee(predicate, 3));
10633 }
10634
10635 /**
10636 * Iterates over elements of `collection`, returning an array of all elements
10637 * `predicate` returns truthy for. The predicate is invoked with three
10638 * arguments: (value, index|key, collection).
10639 *
10640 * **Note:** Unlike `_.remove`, this method returns a new array.
10641 *
10642 * @static
10643 * @memberOf _
10644 * @since 0.1.0
10645 * @category Collection
10646 * @param {Array|Object} collection The collection to iterate over.
10647 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10648 * @returns {Array} Returns the new filtered array.
10649 * @see _.reject
10650 * @example
10651 *
10652 * var users = [
10653 * { 'user': 'barney', 'age': 36, 'active': true },
10654 * { 'user': 'fred', 'age': 40, 'active': false }
10655 * ];
10656 *
10657 * _.filter(users, function(o) { return !o.active; });
10658 * // => objects for ['fred']
10659 *
10660 * // The `_.matches` iteratee shorthand.
10661 * _.filter(users, { 'age': 36, 'active': true });
10662 * // => objects for ['barney']
10663 *
10664 * // The `_.matchesProperty` iteratee shorthand.
10665 * _.filter(users, ['active', false]);
10666 * // => objects for ['fred']
10667 *
10668 * // The `_.property` iteratee shorthand.
10669 * _.filter(users, 'active');
10670 * // => objects for ['barney']
10671 */
10672 function filter(collection, predicate) {
10673 var func = isArray(collection) ? arrayFilter : baseFilter;
10674 return func(collection, getIteratee(predicate, 3));
10675 }
10676
10677 /**
10678 * Iterates over elements of `collection`, returning the first element
10679 * `predicate` returns truthy for. The predicate is invoked with three
10680 * arguments: (value, index|key, collection).
10681 *
10682 * @static
10683 * @memberOf _
10684 * @since 0.1.0
10685 * @category Collection
10686 * @param {Array|Object} collection The collection to inspect.
10687 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10688 * @param {number} [fromIndex=0] The index to search from.
10689 * @returns {*} Returns the matched element, else `undefined`.
10690 * @example
10691 *
10692 * var users = [
10693 * { 'user': 'barney', 'age': 36, 'active': true },
10694 * { 'user': 'fred', 'age': 40, 'active': false },
10695 * { 'user': 'pebbles', 'age': 1, 'active': true }
10696 * ];
10697 *
10698 * _.find(users, function(o) { return o.age < 40; });
10699 * // => object for 'barney'
10700 *
10701 * // The `_.matches` iteratee shorthand.
10702 * _.find(users, { 'age': 1, 'active': true });
10703 * // => object for 'pebbles'
10704 *
10705 * // The `_.matchesProperty` iteratee shorthand.
10706 * _.find(users, ['active', false]);
10707 * // => object for 'fred'
10708 *
10709 * // The `_.property` iteratee shorthand.
10710 * _.find(users, 'active');
10711 * // => object for 'barney'
10712 */
10713 var find = createFind(findIndex);
10714
10715 /**
10716 * This method is like `_.find` except that it iterates over elements of
10717 * `collection` from right to left.
10718 *
10719 * @static
10720 * @memberOf _
10721 * @since 2.0.0
10722 * @category Collection
10723 * @param {Array|Object} collection The collection to inspect.
10724 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10725 * @param {number} [fromIndex=collection.length-1] The index to search from.
10726 * @returns {*} Returns the matched element, else `undefined`.
10727 * @example
10728 *
10729 * _.findLast([1, 2, 3, 4], function(n) {
10730 * return n % 2 == 1;
10731 * });
10732 * // => 3
10733 */
10734 var findLast = createFind(findLastIndex);
10735
10736 /**
10737 * Creates a flattened array of values by running each element in `collection`
10738 * thru `iteratee` and flattening the mapped results. The iteratee is invoked
10739 * with three arguments: (value, index|key, collection).
10740 *
10741 * @static
10742 * @memberOf _
10743 * @since 4.0.0
10744 * @category Collection
10745 * @param {Array|Object} collection The collection to iterate over.
10746 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10747 * @returns {Array} Returns the new flattened array.
10748 * @example
10749 *
10750 * function duplicate(n) {
10751 * return [n, n];
10752 * }
10753 *
10754 * _.flatMap([1, 2], duplicate);
10755 * // => [1, 1, 2, 2]
10756 */
10757 function flatMap(collection, iteratee) {
10758 return baseFlatten(map(collection, iteratee), 1);
10759 }
10760
10761 /**
10762 * This method is like `_.flatMap` except that it recursively flattens the
10763 * mapped results.
10764 *
10765 * @static
10766 * @memberOf _
10767 * @since 4.7.0
10768 * @category Collection
10769 * @param {Array|Object} collection The collection to iterate over.
10770 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10771 * @returns {Array} Returns the new flattened array.
10772 * @example
10773 *
10774 * function duplicate(n) {
10775 * return [[[n, n]]];
10776 * }
10777 *
10778 * _.flatMapDeep([1, 2], duplicate);
10779 * // => [1, 1, 2, 2]
10780 */
10781 function flatMapDeep(collection, iteratee) {
10782 return baseFlatten(map(collection, iteratee), INFINITY);
10783 }
10784
10785 /**
10786 * This method is like `_.flatMap` except that it recursively flattens the
10787 * mapped results up to `depth` times.
10788 *
10789 * @static
10790 * @memberOf _
10791 * @since 4.7.0
10792 * @category Collection
10793 * @param {Array|Object} collection The collection to iterate over.
10794 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10795 * @param {number} [depth=1] The maximum recursion depth.
10796 * @returns {Array} Returns the new flattened array.
10797 * @example
10798 *
10799 * function duplicate(n) {
10800 * return [[[n, n]]];
10801 * }
10802 *
10803 * _.flatMapDepth([1, 2], duplicate, 2);
10804 * // => [[1, 1], [2, 2]]
10805 */
10806 function flatMapDepth(collection, iteratee, depth) {
10807 depth = depth === undefined ? 1 : toInteger(depth);
10808 return baseFlatten(map(collection, iteratee), depth);
10809 }
10810
10811 /**
10812 * Iterates over elements of `collection` and invokes `iteratee` for each element.
10813 * The iteratee is invoked with three arguments: (value, index|key, collection).
10814 * Iteratee functions may exit iteration early by explicitly returning `false`.
10815 *
10816 * **Note:** As with other "Collections" methods, objects with a "length"
10817 * property are iterated like arrays. To avoid this behavior use `_.forIn`
10818 * or `_.forOwn` for object iteration.
10819 *
10820 * @static
10821 * @memberOf _
10822 * @since 0.1.0
10823 * @alias each
10824 * @category Collection
10825 * @param {Array|Object} collection The collection to iterate over.
10826 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10827 * @returns {Array|Object} Returns `collection`.
10828 * @see _.forEachRight
10829 * @example
10830 *
10831 * _.forEach([1, 2], function(value) {
10832 * console.log(value);
10833 * });
10834 * // => Logs `1` then `2`.
10835 *
10836 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
10837 * console.log(key);
10838 * });
10839 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
10840 */
10841 function forEach(collection, iteratee) {
10842 var func = isArray(collection) ? arrayEach : baseEach;
10843 return func(collection, getIteratee(iteratee, 3));
10844 }
10845
10846 /**
10847 * This method is like `_.forEach` except that it iterates over elements of
10848 * `collection` from right to left.
10849 *
10850 * @static
10851 * @memberOf _
10852 * @since 2.0.0
10853 * @alias eachRight
10854 * @category Collection
10855 * @param {Array|Object} collection The collection to iterate over.
10856 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10857 * @returns {Array|Object} Returns `collection`.
10858 * @see _.forEach
10859 * @example
10860 *
10861 * _.forEachRight([1, 2], function(value) {
10862 * console.log(value);
10863 * });
10864 * // => Logs `2` then `1`.
10865 */
10866 function forEachRight(collection, iteratee) {
10867 var func = isArray(collection) ? arrayEachRight : baseEachRight;
10868 return func(collection, getIteratee(iteratee, 3));
10869 }
10870
10871 /**
10872 * Creates an object composed of keys generated from the results of running
10873 * each element of `collection` thru `iteratee`. The order of grouped values
10874 * is determined by the order they occur in `collection`. The corresponding
10875 * value of each key is an array of elements responsible for generating the
10876 * key. The iteratee is invoked with one argument: (value).
10877 *
10878 * @static
10879 * @memberOf _
10880 * @since 0.1.0
10881 * @category Collection
10882 * @param {Array|Object} collection The collection to iterate over.
10883 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10884 * @returns {Object} Returns the composed aggregate object.
10885 * @example
10886 *
10887 * _.groupBy([6.1, 4.2, 6.3], Math.floor);
10888 * // => { '4': [4.2], '6': [6.1, 6.3] }
10889 *
10890 * // The `_.property` iteratee shorthand.
10891 * _.groupBy(['one', 'two', 'three'], 'length');
10892 * // => { '3': ['one', 'two'], '5': ['three'] }
10893 */
10894 var groupBy = createAggregator(function(result, value, key) {
10895 if (hasOwnProperty.call(result, key)) {
10896 result[key].push(value);
10897 } else {
10898 baseAssignValue(result, key, [value]);
10899 }
10900 });
10901
10902 /**
10903 * Checks if `value` is in `collection`. If `collection` is a string, it's
10904 * checked for a substring of `value`, otherwise
10905 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10906 * is used for equality comparisons. If `fromIndex` is negative, it's used as
10907 * the offset from the end of `collection`.
10908 *
10909 * @static
10910 * @memberOf _
10911 * @since 0.1.0
10912 * @category Collection
10913 * @param {Array|Object|string} collection The collection to inspect.
10914 * @param {*} value The value to search for.
10915 * @param {number} [fromIndex=0] The index to search from.
10916 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
10917 * @returns {boolean} Returns `true` if `value` is found, else `false`.
10918 * @example
10919 *
10920 * _.includes([1, 2, 3], 1);
10921 * // => true
10922 *
10923 * _.includes([1, 2, 3], 1, 2);
10924 * // => false
10925 *
10926 * _.includes({ 'a': 1, 'b': 2 }, 1);
10927 * // => true
10928 *
10929 * _.includes('abcd', 'bc');
10930 * // => true
10931 */
10932 function includes(collection, value, fromIndex, guard) {
10933 collection = isArrayLike(collection) ? collection : values(collection);
10934 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
10935
10936 var length = collection.length;
10937 if (fromIndex < 0) {
10938 fromIndex = nativeMax(length + fromIndex, 0);
10939 }
10940 return isString(collection)
10941 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
10942 : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
10943 }
10944
10945 /**
10946 * Invokes the method at `path` of each element in `collection`, returning
10947 * an array of the results of each invoked method. Any additional arguments
10948 * are provided to each invoked method. If `path` is a function, it's invoked
10949 * for, and `this` bound to, each element in `collection`.
10950 *
10951 * @static
10952 * @memberOf _
10953 * @since 4.0.0
10954 * @category Collection
10955 * @param {Array|Object} collection The collection to iterate over.
10956 * @param {Array|Function|string} path The path of the method to invoke or
10957 * the function invoked per iteration.
10958 * @param {...*} [args] The arguments to invoke each method with.
10959 * @returns {Array} Returns the array of results.
10960 * @example
10961 *
10962 * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
10963 * // => [[1, 5, 7], [1, 2, 3]]
10964 *
10965 * _.invokeMap([123, 456], String.prototype.split, '');
10966 * // => [['1', '2', '3'], ['4', '5', '6']]
10967 */
10968 var invokeMap = baseRest(function(collection, path, args) {
10969 var index = -1,
10970 isFunc = typeof path == 'function',
10971 result = isArrayLike(collection) ? Array(collection.length) : [];
10972
10973 baseEach(collection, function(value) {
10974 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
10975 });
10976 return result;
10977 });
10978
10979 /**
10980 * Creates an object composed of keys generated from the results of running
10981 * each element of `collection` thru `iteratee`. The corresponding value of
10982 * each key is the last element responsible for generating the key. The
10983 * iteratee is invoked with one argument: (value).
10984 *
10985 * @static
10986 * @memberOf _
10987 * @since 4.0.0
10988 * @category Collection
10989 * @param {Array|Object} collection The collection to iterate over.
10990 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10991 * @returns {Object} Returns the composed aggregate object.
10992 * @example
10993 *
10994 * var array = [
10995 * { 'dir': 'left', 'code': 97 },
10996 * { 'dir': 'right', 'code': 100 }
10997 * ];
10998 *
10999 * _.keyBy(array, function(o) {
11000 * return String.fromCharCode(o.code);
11001 * });
11002 * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
11003 *
11004 * _.keyBy(array, 'dir');
11005 * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
11006 */
11007 var keyBy = createAggregator(function(result, value, key) {
11008 baseAssignValue(result, key, value);
11009 });
11010
11011 /**
11012 * Creates an array of values by running each element in `collection` thru
11013 * `iteratee`. The iteratee is invoked with three arguments:
11014 * (value, index|key, collection).
11015 *
11016 * Many lodash methods are guarded to work as iteratees for methods like
11017 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
11018 *
11019 * The guarded methods are:
11020 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
11021 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
11022 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
11023 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
11024 *
11025 * @static
11026 * @memberOf _
11027 * @since 0.1.0
11028 * @category Collection
11029 * @param {Array|Object} collection The collection to iterate over.
11030 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11031 * @returns {Array} Returns the new mapped array.
11032 * @example
11033 *
11034 * function square(n) {
11035 * return n * n;
11036 * }
11037 *
11038 * _.map([4, 8], square);
11039 * // => [16, 64]
11040 *
11041 * _.map({ 'a': 4, 'b': 8 }, square);
11042 * // => [16, 64] (iteration order is not guaranteed)
11043 *
11044 * var users = [
11045 * { 'user': 'barney' },
11046 * { 'user': 'fred' }
11047 * ];
11048 *
11049 * // The `_.property` iteratee shorthand.
11050 * _.map(users, 'user');
11051 * // => ['barney', 'fred']
11052 */
11053 function map(collection, iteratee) {
11054 var func = isArray(collection) ? arrayMap : baseMap;
11055 return func(collection, getIteratee(iteratee, 3));
11056 }
11057
11058 /**
11059 * This method is like `_.sortBy` except that it allows specifying the sort
11060 * orders of the iteratees to sort by. If `orders` is unspecified, all values
11061 * are sorted in ascending order. Otherwise, specify an order of "desc" for
11062 * descending or "asc" for ascending sort order of corresponding values.
11063 *
11064 * @static
11065 * @memberOf _
11066 * @since 4.0.0
11067 * @category Collection
11068 * @param {Array|Object} collection The collection to iterate over.
11069 * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
11070 * The iteratees to sort by.
11071 * @param {string[]} [orders] The sort orders of `iteratees`.
11072 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
11073 * @returns {Array} Returns the new sorted array.
11074 * @example
11075 *
11076 * var users = [
11077 * { 'user': 'fred', 'age': 48 },
11078 * { 'user': 'barney', 'age': 34 },
11079 * { 'user': 'fred', 'age': 40 },
11080 * { 'user': 'barney', 'age': 36 }
11081 * ];
11082 *
11083 * // Sort by `user` in ascending order and by `age` in descending order.
11084 * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
11085 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11086 */
11087 function orderBy(collection, iteratees, orders, guard) {
11088 if (collection == null) {
11089 return [];
11090 }
11091 if (!isArray(iteratees)) {
11092 iteratees = iteratees == null ? [] : [iteratees];
11093 }
11094 orders = guard ? undefined : orders;
11095 if (!isArray(orders)) {
11096 orders = orders == null ? [] : [orders];
11097 }
11098 return baseOrderBy(collection, iteratees, orders);
11099 }
11100
11101 /**
11102 * Creates an array of elements split into two groups, the first of which
11103 * contains elements `predicate` returns truthy for, the second of which
11104 * contains elements `predicate` returns falsey for. The predicate is
11105 * invoked with one argument: (value).
11106 *
11107 * @static
11108 * @memberOf _
11109 * @since 3.0.0
11110 * @category Collection
11111 * @param {Array|Object} collection The collection to iterate over.
11112 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11113 * @returns {Array} Returns the array of grouped elements.
11114 * @example
11115 *
11116 * var users = [
11117 * { 'user': 'barney', 'age': 36, 'active': false },
11118 * { 'user': 'fred', 'age': 40, 'active': true },
11119 * { 'user': 'pebbles', 'age': 1, 'active': false }
11120 * ];
11121 *
11122 * _.partition(users, function(o) { return o.active; });
11123 * // => objects for [['fred'], ['barney', 'pebbles']]
11124 *
11125 * // The `_.matches` iteratee shorthand.
11126 * _.partition(users, { 'age': 1, 'active': false });
11127 * // => objects for [['pebbles'], ['barney', 'fred']]
11128 *
11129 * // The `_.matchesProperty` iteratee shorthand.
11130 * _.partition(users, ['active', false]);
11131 * // => objects for [['barney', 'pebbles'], ['fred']]
11132 *
11133 * // The `_.property` iteratee shorthand.
11134 * _.partition(users, 'active');
11135 * // => objects for [['fred'], ['barney', 'pebbles']]
11136 */
11137 var partition = createAggregator(function(result, value, key) {
11138 result[key ? 0 : 1].push(value);
11139 }, function() { return [[], []]; });
11140
11141 /**
11142 * Reduces `collection` to a value which is the accumulated result of running
11143 * each element in `collection` thru `iteratee`, where each successive
11144 * invocation is supplied the return value of the previous. If `accumulator`
11145 * is not given, the first element of `collection` is used as the initial
11146 * value. The iteratee is invoked with four arguments:
11147 * (accumulator, value, index|key, collection).
11148 *
11149 * Many lodash methods are guarded to work as iteratees for methods like
11150 * `_.reduce`, `_.reduceRight`, and `_.transform`.
11151 *
11152 * The guarded methods are:
11153 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
11154 * and `sortBy`
11155 *
11156 * @static
11157 * @memberOf _
11158 * @since 0.1.0
11159 * @category Collection
11160 * @param {Array|Object} collection The collection to iterate over.
11161 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11162 * @param {*} [accumulator] The initial value.
11163 * @returns {*} Returns the accumulated value.
11164 * @see _.reduceRight
11165 * @example
11166 *
11167 * _.reduce([1, 2], function(sum, n) {
11168 * return sum + n;
11169 * }, 0);
11170 * // => 3
11171 *
11172 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
11173 * (result[value] || (result[value] = [])).push(key);
11174 * return result;
11175 * }, {});
11176 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
11177 */
11178 function reduce(collection, iteratee, accumulator) {
11179 var func = isArray(collection) ? arrayReduce : baseReduce,
11180 initAccum = arguments.length < 3;
11181
11182 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
11183 }
11184
11185 /**
11186 * This method is like `_.reduce` except that it iterates over elements of
11187 * `collection` from right to left.
11188 *
11189 * @static
11190 * @memberOf _
11191 * @since 0.1.0
11192 * @category Collection
11193 * @param {Array|Object} collection The collection to iterate over.
11194 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11195 * @param {*} [accumulator] The initial value.
11196 * @returns {*} Returns the accumulated value.
11197 * @see _.reduce
11198 * @example
11199 *
11200 * var array = [[0, 1], [2, 3], [4, 5]];
11201 *
11202 * _.reduceRight(array, function(flattened, other) {
11203 * return flattened.concat(other);
11204 * }, []);
11205 * // => [4, 5, 2, 3, 0, 1]
11206 */
11207 function reduceRight(collection, iteratee, accumulator) {
11208 var func = isArray(collection) ? arrayReduceRight : baseReduce,
11209 initAccum = arguments.length < 3;
11210
11211 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
11212 }
11213
11214 /**
11215 * The opposite of `_.filter`; this method returns the elements of `collection`
11216 * that `predicate` does **not** return truthy for.
11217 *
11218 * @static
11219 * @memberOf _
11220 * @since 0.1.0
11221 * @category Collection
11222 * @param {Array|Object} collection The collection to iterate over.
11223 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11224 * @returns {Array} Returns the new filtered array.
11225 * @see _.filter
11226 * @example
11227 *
11228 * var users = [
11229 * { 'user': 'barney', 'age': 36, 'active': false },
11230 * { 'user': 'fred', 'age': 40, 'active': true }
11231 * ];
11232 *
11233 * _.reject(users, function(o) { return !o.active; });
11234 * // => objects for ['fred']
11235 *
11236 * // The `_.matches` iteratee shorthand.
11237 * _.reject(users, { 'age': 40, 'active': true });
11238 * // => objects for ['barney']
11239 *
11240 * // The `_.matchesProperty` iteratee shorthand.
11241 * _.reject(users, ['active', false]);
11242 * // => objects for ['fred']
11243 *
11244 * // The `_.property` iteratee shorthand.
11245 * _.reject(users, 'active');
11246 * // => objects for ['barney']
11247 */
11248 function reject(collection, predicate) {
11249 var func = isArray(collection) ? arrayFilter : baseFilter;
11250 return func(collection, negate(getIteratee(predicate, 3)));
11251 }
11252
11253 /**
11254 * Gets a random element from `collection`.
11255 *
11256 * @static
11257 * @memberOf _
11258 * @since 2.0.0
11259 * @category Collection
11260 * @param {Array|Object} collection The collection to sample.
11261 * @returns {*} Returns the random element.
11262 * @example
11263 *
11264 * _.sample([1, 2, 3, 4]);
11265 * // => 2
11266 */
11267 function sample(collection) {
11268 var func = isArray(collection) ? arraySample : baseSample;
11269 return func(collection);
11270 }
11271
11272 /**
11273 * Gets `n` random elements at unique keys from `collection` up to the
11274 * size of `collection`.
11275 *
11276 * @static
11277 * @memberOf _
11278 * @since 4.0.0
11279 * @category Collection
11280 * @param {Array|Object} collection The collection to sample.
11281 * @param {number} [n=1] The number of elements to sample.
11282 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11283 * @returns {Array} Returns the random elements.
11284 * @example
11285 *
11286 * _.sampleSize([1, 2, 3], 2);
11287 * // => [3, 1]
11288 *
11289 * _.sampleSize([1, 2, 3], 4);
11290 * // => [2, 3, 1]
11291 */
11292 function sampleSize(collection, n, guard) {
11293 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
11294 n = 1;
11295 } else {
11296 n = toInteger(n);
11297 }
11298 var func = isArray(collection) ? arraySampleSize : baseSampleSize;
11299 return func(collection, n);
11300 }
11301
11302 /**
11303 * Creates an array of shuffled values, using a version of the
11304 * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
11305 *
11306 * @static
11307 * @memberOf _
11308 * @since 0.1.0
11309 * @category Collection
11310 * @param {Array|Object} collection The collection to shuffle.
11311 * @returns {Array} Returns the new shuffled array.
11312 * @example
11313 *
11314 * _.shuffle([1, 2, 3, 4]);
11315 * // => [4, 1, 3, 2]
11316 */
11317 function shuffle(collection) {
11318 var func = isArray(collection) ? arrayShuffle : baseShuffle;
11319 return func(collection);
11320 }
11321
11322 /**
11323 * Gets the size of `collection` by returning its length for array-like
11324 * values or the number of own enumerable string keyed properties for objects.
11325 *
11326 * @static
11327 * @memberOf _
11328 * @since 0.1.0
11329 * @category Collection
11330 * @param {Array|Object|string} collection The collection to inspect.
11331 * @returns {number} Returns the collection size.
11332 * @example
11333 *
11334 * _.size([1, 2, 3]);
11335 * // => 3
11336 *
11337 * _.size({ 'a': 1, 'b': 2 });
11338 * // => 2
11339 *
11340 * _.size('pebbles');
11341 * // => 7
11342 */
11343 function size(collection) {
11344 if (collection == null) {
11345 return 0;
11346 }
11347 if (isArrayLike(collection)) {
11348 return isString(collection) ? stringSize(collection) : collection.length;
11349 }
11350 var tag = getTag(collection);
11351 if (tag == mapTag || tag == setTag) {
11352 return collection.size;
11353 }
11354 return baseKeys(collection).length;
11355 }
11356
11357 /**
11358 * Checks if `predicate` returns truthy for **any** element of `collection`.
11359 * Iteration is stopped once `predicate` returns truthy. The predicate is
11360 * invoked with three arguments: (value, index|key, collection).
11361 *
11362 * @static
11363 * @memberOf _
11364 * @since 0.1.0
11365 * @category Collection
11366 * @param {Array|Object} collection The collection to iterate over.
11367 * @param {Function} [predicate=_.identity] The function invoked per iteration.
11368 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11369 * @returns {boolean} Returns `true` if any element passes the predicate check,
11370 * else `false`.
11371 * @example
11372 *
11373 * _.some([null, 0, 'yes', false], Boolean);
11374 * // => true
11375 *
11376 * var users = [
11377 * { 'user': 'barney', 'active': true },
11378 * { 'user': 'fred', 'active': false }
11379 * ];
11380 *
11381 * // The `_.matches` iteratee shorthand.
11382 * _.some(users, { 'user': 'barney', 'active': false });
11383 * // => false
11384 *
11385 * // The `_.matchesProperty` iteratee shorthand.
11386 * _.some(users, ['active', false]);
11387 * // => true
11388 *
11389 * // The `_.property` iteratee shorthand.
11390 * _.some(users, 'active');
11391 * // => true
11392 */
11393 function some(collection, predicate, guard) {
11394 var func = isArray(collection) ? arraySome : baseSome;
11395 if (guard && isIterateeCall(collection, predicate, guard)) {
11396 predicate = undefined;
11397 }
11398 return func(collection, getIteratee(predicate, 3));
11399 }
11400
11401 /**
11402 * Creates an array of elements, sorted in ascending order by the results of
11403 * running each element in a collection thru each iteratee. This method
11404 * performs a stable sort, that is, it preserves the original sort order of
11405 * equal elements. The iteratees are invoked with one argument: (value).
11406 *
11407 * @static
11408 * @memberOf _
11409 * @since 0.1.0
11410 * @category Collection
11411 * @param {Array|Object} collection The collection to iterate over.
11412 * @param {...(Function|Function[])} [iteratees=[_.identity]]
11413 * The iteratees to sort by.
11414 * @returns {Array} Returns the new sorted array.
11415 * @example
11416 *
11417 * var users = [
11418 * { 'user': 'fred', 'age': 48 },
11419 * { 'user': 'barney', 'age': 36 },
11420 * { 'user': 'fred', 'age': 40 },
11421 * { 'user': 'barney', 'age': 34 }
11422 * ];
11423 *
11424 * _.sortBy(users, [function(o) { return o.user; }]);
11425 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11426 *
11427 * _.sortBy(users, ['user', 'age']);
11428 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
11429 */
11430 var sortBy = baseRest(function(collection, iteratees) {
11431 if (collection == null) {
11432 return [];
11433 }
11434 var length = iteratees.length;
11435 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
11436 iteratees = [];
11437 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
11438 iteratees = [iteratees[0]];
11439 }
11440 return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
11441 });
11442
11443 /*------------------------------------------------------------------------*/
11444
11445 /**
11446 * Gets the timestamp of the number of milliseconds that have elapsed since
11447 * the Unix epoch (1 January 1970 00:00:00 UTC).
11448 *
11449 * @static
11450 * @memberOf _
11451 * @since 2.4.0
11452 * @category Date
11453 * @returns {number} Returns the timestamp.
11454 * @example
11455 *
11456 * _.defer(function(stamp) {
11457 * console.log(_.now() - stamp);
11458 * }, _.now());
11459 * // => Logs the number of milliseconds it took for the deferred invocation.
11460 */
11461 var now = ctxNow || function() {
11462 return root.Date.now();
11463 };
11464
11465 /*------------------------------------------------------------------------*/
11466
11467 /**
11468 * The opposite of `_.before`; this method creates a function that invokes
11469 * `func` once it's called `n` or more times.
11470 *
11471 * @static
11472 * @memberOf _
11473 * @since 0.1.0
11474 * @category Function
11475 * @param {number} n The number of calls before `func` is invoked.
11476 * @param {Function} func The function to restrict.
11477 * @returns {Function} Returns the new restricted function.
11478 * @example
11479 *
11480 * var saves = ['profile', 'settings'];
11481 *
11482 * var done = _.after(saves.length, function() {
11483 * console.log('done saving!');
11484 * });
11485 *
11486 * _.forEach(saves, function(type) {
11487 * asyncSave({ 'type': type, 'complete': done });
11488 * });
11489 * // => Logs 'done saving!' after the two async saves have completed.
11490 */
11491 function after(n, func) {
11492 if (typeof func != 'function') {
11493 throw new TypeError(FUNC_ERROR_TEXT);
11494 }
11495 n = toInteger(n);
11496 return function() {
11497 if (--n < 1) {
11498 return func.apply(this, arguments);
11499 }
11500 };
11501 }
11502
11503 /**
11504 * Creates a function that invokes `func`, with up to `n` arguments,
11505 * ignoring any additional arguments.
11506 *
11507 * @static
11508 * @memberOf _
11509 * @since 3.0.0
11510 * @category Function
11511 * @param {Function} func The function to cap arguments for.
11512 * @param {number} [n=func.length] The arity cap.
11513 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11514 * @returns {Function} Returns the new capped function.
11515 * @example
11516 *
11517 * _.map(['6', '8', '10'], _.ary(parseInt, 1));
11518 * // => [6, 8, 10]
11519 */
11520 function ary(func, n, guard) {
11521 n = guard ? undefined : n;
11522 n = (func && n == null) ? func.length : n;
11523 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
11524 }
11525
11526 /**
11527 * Creates a function that invokes `func`, with the `this` binding and arguments
11528 * of the created function, while it's called less than `n` times. Subsequent
11529 * calls to the created function return the result of the last `func` invocation.
11530 *
11531 * @static
11532 * @memberOf _
11533 * @since 3.0.0
11534 * @category Function
11535 * @param {number} n The number of calls at which `func` is no longer invoked.
11536 * @param {Function} func The function to restrict.
11537 * @returns {Function} Returns the new restricted function.
11538 * @example
11539 *
11540 * jQuery(element).on('click', _.before(5, addContactToList));
11541 * // => Allows adding up to 4 contacts to the list.
11542 */
11543 function before(n, func) {
11544 var result;
11545 if (typeof func != 'function') {
11546 throw new TypeError(FUNC_ERROR_TEXT);
11547 }
11548 n = toInteger(n);
11549 return function() {
11550 if (--n > 0) {
11551 result = func.apply(this, arguments);
11552 }
11553 if (n <= 1) {
11554 func = undefined;
11555 }
11556 return result;
11557 };
11558 }
11559
11560 /**
11561 * Creates a function that invokes `func` with the `this` binding of `thisArg`
11562 * and `partials` prepended to the arguments it receives.
11563 *
11564 * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
11565 * may be used as a placeholder for partially applied arguments.
11566 *
11567 * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
11568 * property of bound functions.
11569 *
11570 * @static
11571 * @memberOf _
11572 * @since 0.1.0
11573 * @category Function
11574 * @param {Function} func The function to bind.
11575 * @param {*} thisArg The `this` binding of `func`.
11576 * @param {...*} [partials] The arguments to be partially applied.
11577 * @returns {Function} Returns the new bound function.
11578 * @example
11579 *
11580 * function greet(greeting, punctuation) {
11581 * return greeting + ' ' + this.user + punctuation;
11582 * }
11583 *
11584 * var object = { 'user': 'fred' };
11585 *
11586 * var bound = _.bind(greet, object, 'hi');
11587 * bound('!');
11588 * // => 'hi fred!'
11589 *
11590 * // Bound with placeholders.
11591 * var bound = _.bind(greet, object, _, '!');
11592 * bound('hi');
11593 * // => 'hi fred!'
11594 */
11595 var bind = baseRest(function(func, thisArg, partials) {
11596 var bitmask = WRAP_BIND_FLAG;
11597 if (partials.length) {
11598 var holders = replaceHolders(partials, getHolder(bind));
11599 bitmask |= WRAP_PARTIAL_FLAG;
11600 }
11601 return createWrap(func, bitmask, thisArg, partials, holders);
11602 });
11603
11604 /**
11605 * Creates a function that invokes the method at `object[key]` with `partials`
11606 * prepended to the arguments it receives.
11607 *
11608 * This method differs from `_.bind` by allowing bound functions to reference
11609 * methods that may be redefined or don't yet exist. See
11610 * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
11611 * for more details.
11612 *
11613 * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
11614 * builds, may be used as a placeholder for partially applied arguments.
11615 *
11616 * @static
11617 * @memberOf _
11618 * @since 0.10.0
11619 * @category Function
11620 * @param {Object} object The object to invoke the method on.
11621 * @param {string} key The key of the method.
11622 * @param {...*} [partials] The arguments to be partially applied.
11623 * @returns {Function} Returns the new bound function.
11624 * @example
11625 *
11626 * var object = {
11627 * 'user': 'fred',
11628 * 'greet': function(greeting, punctuation) {
11629 * return greeting + ' ' + this.user + punctuation;
11630 * }
11631 * };
11632 *
11633 * var bound = _.bindKey(object, 'greet', 'hi');
11634 * bound('!');
11635 * // => 'hi fred!'
11636 *
11637 * object.greet = function(greeting, punctuation) {
11638 * return greeting + 'ya ' + this.user + punctuation;
11639 * };
11640 *
11641 * bound('!');
11642 * // => 'hiya fred!'
11643 *
11644 * // Bound with placeholders.
11645 * var bound = _.bindKey(object, 'greet', _, '!');
11646 * bound('hi');
11647 * // => 'hiya fred!'
11648 */
11649 var bindKey = baseRest(function(object, key, partials) {
11650 var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
11651 if (partials.length) {
11652 var holders = replaceHolders(partials, getHolder(bindKey));
11653 bitmask |= WRAP_PARTIAL_FLAG;
11654 }
11655 return createWrap(key, bitmask, object, partials, holders);
11656 });
11657
11658 /**
11659 * Creates a function that accepts arguments of `func` and either invokes
11660 * `func` returning its result, if at least `arity` number of arguments have
11661 * been provided, or returns a function that accepts the remaining `func`
11662 * arguments, and so on. The arity of `func` may be specified if `func.length`
11663 * is not sufficient.
11664 *
11665 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
11666 * may be used as a placeholder for provided arguments.
11667 *
11668 * **Note:** This method doesn't set the "length" property of curried functions.
11669 *
11670 * @static
11671 * @memberOf _
11672 * @since 2.0.0
11673 * @category Function
11674 * @param {Function} func The function to curry.
11675 * @param {number} [arity=func.length] The arity of `func`.
11676 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11677 * @returns {Function} Returns the new curried function.
11678 * @example
11679 *
11680 * var abc = function(a, b, c) {
11681 * return [a, b, c];
11682 * };
11683 *
11684 * var curried = _.curry(abc);
11685 *
11686 * curried(1)(2)(3);
11687 * // => [1, 2, 3]
11688 *
11689 * curried(1, 2)(3);
11690 * // => [1, 2, 3]
11691 *
11692 * curried(1, 2, 3);
11693 * // => [1, 2, 3]
11694 *
11695 * // Curried with placeholders.
11696 * curried(1)(_, 3)(2);
11697 * // => [1, 2, 3]
11698 */
11699 function curry(func, arity, guard) {
11700 arity = guard ? undefined : arity;
11701 var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
11702 result.placeholder = curry.placeholder;
11703 return result;
11704 }
11705
11706 /**
11707 * This method is like `_.curry` except that arguments are applied to `func`
11708 * in the manner of `_.partialRight` instead of `_.partial`.
11709 *
11710 * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
11711 * builds, may be used as a placeholder for provided arguments.
11712 *
11713 * **Note:** This method doesn't set the "length" property of curried functions.
11714 *
11715 * @static
11716 * @memberOf _
11717 * @since 3.0.0
11718 * @category Function
11719 * @param {Function} func The function to curry.
11720 * @param {number} [arity=func.length] The arity of `func`.
11721 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11722 * @returns {Function} Returns the new curried function.
11723 * @example
11724 *
11725 * var abc = function(a, b, c) {
11726 * return [a, b, c];
11727 * };
11728 *
11729 * var curried = _.curryRight(abc);
11730 *
11731 * curried(3)(2)(1);
11732 * // => [1, 2, 3]
11733 *
11734 * curried(2, 3)(1);
11735 * // => [1, 2, 3]
11736 *
11737 * curried(1, 2, 3);
11738 * // => [1, 2, 3]
11739 *
11740 * // Curried with placeholders.
11741 * curried(3)(1, _)(2);
11742 * // => [1, 2, 3]
11743 */
11744 function curryRight(func, arity, guard) {
11745 arity = guard ? undefined : arity;
11746 var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
11747 result.placeholder = curryRight.placeholder;
11748 return result;
11749 }
11750
11751 /**
11752 * Creates a debounced function that delays invoking `func` until after `wait`
11753 * milliseconds have elapsed since the last time the debounced function was
11754 * invoked. The debounced function comes with a `cancel` method to cancel
11755 * delayed `func` invocations and a `flush` method to immediately invoke them.
11756 * Provide `options` to indicate whether `func` should be invoked on the
11757 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
11758 * with the last arguments provided to the debounced function. Subsequent
11759 * calls to the debounced function return the result of the last `func`
11760 * invocation.
11761 *
11762 * **Note:** If `leading` and `trailing` options are `true`, `func` is
11763 * invoked on the trailing edge of the timeout only if the debounced function
11764 * is invoked more than once during the `wait` timeout.
11765 *
11766 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
11767 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
11768 *
11769 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
11770 * for details over the differences between `_.debounce` and `_.throttle`.
11771 *
11772 * @static
11773 * @memberOf _
11774 * @since 0.1.0
11775 * @category Function
11776 * @param {Function} func The function to debounce.
11777 * @param {number} [wait=0] The number of milliseconds to delay.
11778 * @param {Object} [options={}] The options object.
11779 * @param {boolean} [options.leading=false]
11780 * Specify invoking on the leading edge of the timeout.
11781 * @param {number} [options.maxWait]
11782 * The maximum time `func` is allowed to be delayed before it's invoked.
11783 * @param {boolean} [options.trailing=true]
11784 * Specify invoking on the trailing edge of the timeout.
11785 * @returns {Function} Returns the new debounced function.
11786 * @example
11787 *
11788 * // Avoid costly calculations while the window size is in flux.
11789 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
11790 *
11791 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
11792 * jQuery(element).on('click', _.debounce(sendMail, 300, {
11793 * 'leading': true,
11794 * 'trailing': false
11795 * }));
11796 *
11797 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
11798 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
11799 * var source = new EventSource('/stream');
11800 * jQuery(source).on('message', debounced);
11801 *
11802 * // Cancel the trailing debounced invocation.
11803 * jQuery(window).on('popstate', debounced.cancel);
11804 */
11805 function debounce(func, wait, options) {
11806 var lastArgs,
11807 lastThis,
11808 maxWait,
11809 result,
11810 timerId,
11811 lastCallTime,
11812 lastInvokeTime = 0,
11813 leading = false,
11814 maxing = false,
11815 trailing = true;
11816
11817 if (typeof func != 'function') {
11818 throw new TypeError(FUNC_ERROR_TEXT);
11819 }
11820 wait = toNumber(wait) || 0;
11821 if (isObject(options)) {
11822 leading = !!options.leading;
11823 maxing = 'maxWait' in options;
11824 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
11825 trailing = 'trailing' in options ? !!options.trailing : trailing;
11826 }
11827
11828 function invokeFunc(time) {
11829 var args = lastArgs,
11830 thisArg = lastThis;
11831
11832 lastArgs = lastThis = undefined;
11833 lastInvokeTime = time;
11834 result = func.apply(thisArg, args);
11835 return result;
11836 }
11837
11838 function leadingEdge(time) {
11839 // Reset any `maxWait` timer.
11840 lastInvokeTime = time;
11841 // Start the timer for the trailing edge.
11842 timerId = setTimeout(timerExpired, wait);
11843 // Invoke the leading edge.
11844 return leading ? invokeFunc(time) : result;
11845 }
11846
11847 function remainingWait(time) {
11848 var timeSinceLastCall = time - lastCallTime,
11849 timeSinceLastInvoke = time - lastInvokeTime,
11850 timeWaiting = wait - timeSinceLastCall;
11851
11852 return maxing
11853 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
11854 : timeWaiting;
11855 }
11856
11857 function shouldInvoke(time) {
11858 var timeSinceLastCall = time - lastCallTime,
11859 timeSinceLastInvoke = time - lastInvokeTime;
11860
11861 // Either this is the first call, activity has stopped and we're at the
11862 // trailing edge, the system time has gone backwards and we're treating
11863 // it as the trailing edge, or we've hit the `maxWait` limit.
11864 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
11865 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
11866 }
11867
11868 function timerExpired() {
11869 var time = now();
11870 if (shouldInvoke(time)) {
11871 return trailingEdge(time);
11872 }
11873 // Restart the timer.
11874 timerId = setTimeout(timerExpired, remainingWait(time));
11875 }
11876
11877 function trailingEdge(time) {
11878 timerId = undefined;
11879
11880 // Only invoke if we have `lastArgs` which means `func` has been
11881 // debounced at least once.
11882 if (trailing && lastArgs) {
11883 return invokeFunc(time);
11884 }
11885 lastArgs = lastThis = undefined;
11886 return result;
11887 }
11888
11889 function cancel() {
11890 if (timerId !== undefined) {
11891 clearTimeout(timerId);
11892 }
11893 lastInvokeTime = 0;
11894 lastArgs = lastCallTime = lastThis = timerId = undefined;
11895 }
11896
11897 function flush() {
11898 return timerId === undefined ? result : trailingEdge(now());
11899 }
11900
11901 function debounced() {
11902 var time = now(),
11903 isInvoking = shouldInvoke(time);
11904
11905 lastArgs = arguments;
11906 lastThis = this;
11907 lastCallTime = time;
11908
11909 if (isInvoking) {
11910 if (timerId === undefined) {
11911 return leadingEdge(lastCallTime);
11912 }
11913 if (maxing) {
11914 // Handle invocations in a tight loop.
11915 timerId = setTimeout(timerExpired, wait);
11916 return invokeFunc(lastCallTime);
11917 }
11918 }
11919 if (timerId === undefined) {
11920 timerId = setTimeout(timerExpired, wait);
11921 }
11922 return result;
11923 }
11924 debounced.cancel = cancel;
11925 debounced.flush = flush;
11926 return debounced;
11927 }
11928
11929 /**
11930 * Defers invoking the `func` until the current call stack has cleared. Any
11931 * additional arguments are provided to `func` when it's invoked.
11932 *
11933 * @static
11934 * @memberOf _
11935 * @since 0.1.0
11936 * @category Function
11937 * @param {Function} func The function to defer.
11938 * @param {...*} [args] The arguments to invoke `func` with.
11939 * @returns {number} Returns the timer id.
11940 * @example
11941 *
11942 * _.defer(function(text) {
11943 * console.log(text);
11944 * }, 'deferred');
11945 * // => Logs 'deferred' after one millisecond.
11946 */
11947 var defer = baseRest(function(func, args) {
11948 return baseDelay(func, 1, args);
11949 });
11950
11951 /**
11952 * Invokes `func` after `wait` milliseconds. Any additional arguments are
11953 * provided to `func` when it's invoked.
11954 *
11955 * @static
11956 * @memberOf _
11957 * @since 0.1.0
11958 * @category Function
11959 * @param {Function} func The function to delay.
11960 * @param {number} wait The number of milliseconds to delay invocation.
11961 * @param {...*} [args] The arguments to invoke `func` with.
11962 * @returns {number} Returns the timer id.
11963 * @example
11964 *
11965 * _.delay(function(text) {
11966 * console.log(text);
11967 * }, 1000, 'later');
11968 * // => Logs 'later' after one second.
11969 */
11970 var delay = baseRest(function(func, wait, args) {
11971 return baseDelay(func, toNumber(wait) || 0, args);
11972 });
11973
11974 /**
11975 * Creates a function that invokes `func` with arguments reversed.
11976 *
11977 * @static
11978 * @memberOf _
11979 * @since 4.0.0
11980 * @category Function
11981 * @param {Function} func The function to flip arguments for.
11982 * @returns {Function} Returns the new flipped function.
11983 * @example
11984 *
11985 * var flipped = _.flip(function() {
11986 * return _.toArray(arguments);
11987 * });
11988 *
11989 * flipped('a', 'b', 'c', 'd');
11990 * // => ['d', 'c', 'b', 'a']
11991 */
11992 function flip(func) {
11993 return createWrap(func, WRAP_FLIP_FLAG);
11994 }
11995
11996 /**
11997 * Creates a function that memoizes the result of `func`. If `resolver` is
11998 * provided, it determines the cache key for storing the result based on the
11999 * arguments provided to the memoized function. By default, the first argument
12000 * provided to the memoized function is used as the map cache key. The `func`
12001 * is invoked with the `this` binding of the memoized function.
12002 *
12003 * **Note:** The cache is exposed as the `cache` property on the memoized
12004 * function. Its creation may be customized by replacing the `_.memoize.Cache`
12005 * constructor with one whose instances implement the
12006 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
12007 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
12008 *
12009 * @static
12010 * @memberOf _
12011 * @since 0.1.0
12012 * @category Function
12013 * @param {Function} func The function to have its output memoized.
12014 * @param {Function} [resolver] The function to resolve the cache key.
12015 * @returns {Function} Returns the new memoized function.
12016 * @example
12017 *
12018 * var object = { 'a': 1, 'b': 2 };
12019 * var other = { 'c': 3, 'd': 4 };
12020 *
12021 * var values = _.memoize(_.values);
12022 * values(object);
12023 * // => [1, 2]
12024 *
12025 * values(other);
12026 * // => [3, 4]
12027 *
12028 * object.a = 2;
12029 * values(object);
12030 * // => [1, 2]
12031 *
12032 * // Modify the result cache.
12033 * values.cache.set(object, ['a', 'b']);
12034 * values(object);
12035 * // => ['a', 'b']
12036 *
12037 * // Replace `_.memoize.Cache`.
12038 * _.memoize.Cache = WeakMap;
12039 */
12040 function memoize(func, resolver) {
12041 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
12042 throw new TypeError(FUNC_ERROR_TEXT);
12043 }
12044 var memoized = function() {
12045 var args = arguments,
12046 key = resolver ? resolver.apply(this, args) : args[0],
12047 cache = memoized.cache;
12048
12049 if (cache.has(key)) {
12050 return cache.get(key);
12051 }
12052 var result = func.apply(this, args);
12053 memoized.cache = cache.set(key, result) || cache;
12054 return result;
12055 };
12056 memoized.cache = new (memoize.Cache || MapCache);
12057 return memoized;
12058 }
12059
12060 // Expose `MapCache`.
12061 memoize.Cache = MapCache;
12062
12063 /**
12064 * Creates a function that negates the result of the predicate `func`. The
12065 * `func` predicate is invoked with the `this` binding and arguments of the
12066 * created function.
12067 *
12068 * @static
12069 * @memberOf _
12070 * @since 3.0.0
12071 * @category Function
12072 * @param {Function} predicate The predicate to negate.
12073 * @returns {Function} Returns the new negated function.
12074 * @example
12075 *
12076 * function isEven(n) {
12077 * return n % 2 == 0;
12078 * }
12079 *
12080 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
12081 * // => [1, 3, 5]
12082 */
12083 function negate(predicate) {
12084 if (typeof predicate != 'function') {
12085 throw new TypeError(FUNC_ERROR_TEXT);
12086 }
12087 return function() {
12088 var args = arguments;
12089 switch (args.length) {
12090 case 0: return !predicate.call(this);
12091 case 1: return !predicate.call(this, args[0]);
12092 case 2: return !predicate.call(this, args[0], args[1]);
12093 case 3: return !predicate.call(this, args[0], args[1], args[2]);
12094 }
12095 return !predicate.apply(this, args);
12096 };
12097 }
12098
12099 /**
12100 * Creates a function that is restricted to invoking `func` once. Repeat calls
12101 * to the function return the value of the first invocation. The `func` is
12102 * invoked with the `this` binding and arguments of the created function.
12103 *
12104 * @static
12105 * @memberOf _
12106 * @since 0.1.0
12107 * @category Function
12108 * @param {Function} func The function to restrict.
12109 * @returns {Function} Returns the new restricted function.
12110 * @example
12111 *
12112 * var initialize = _.once(createApplication);
12113 * initialize();
12114 * initialize();
12115 * // => `createApplication` is invoked once
12116 */
12117 function once(func) {
12118 return before(2, func);
12119 }
12120
12121 /**
12122 * Creates a function that invokes `func` with its arguments transformed.
12123 *
12124 * @static
12125 * @since 4.0.0
12126 * @memberOf _
12127 * @category Function
12128 * @param {Function} func The function to wrap.
12129 * @param {...(Function|Function[])} [transforms=[_.identity]]
12130 * The argument transforms.
12131 * @returns {Function} Returns the new function.
12132 * @example
12133 *
12134 * function doubled(n) {
12135 * return n * 2;
12136 * }
12137 *
12138 * function square(n) {
12139 * return n * n;
12140 * }
12141 *
12142 * var func = _.overArgs(function(x, y) {
12143 * return [x, y];
12144 * }, [square, doubled]);
12145 *
12146 * func(9, 3);
12147 * // => [81, 6]
12148 *
12149 * func(10, 5);
12150 * // => [100, 10]
12151 */
12152 var overArgs = castRest(function(func, transforms) {
12153 transforms = (transforms.length == 1 && isArray(transforms[0]))
12154 ? arrayMap(transforms[0], baseUnary(getIteratee()))
12155 : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
12156
12157 var funcsLength = transforms.length;
12158 return baseRest(function(args) {
12159 var index = -1,
12160 length = nativeMin(args.length, funcsLength);
12161
12162 while (++index < length) {
12163 args[index] = transforms[index].call(this, args[index]);
12164 }
12165 return apply(func, this, args);
12166 });
12167 });
12168
12169 /**
12170 * Creates a function that invokes `func` with `partials` prepended to the
12171 * arguments it receives. This method is like `_.bind` except it does **not**
12172 * alter the `this` binding.
12173 *
12174 * The `_.partial.placeholder` value, which defaults to `_` in monolithic
12175 * builds, may be used as a placeholder for partially applied arguments.
12176 *
12177 * **Note:** This method doesn't set the "length" property of partially
12178 * applied functions.
12179 *
12180 * @static
12181 * @memberOf _
12182 * @since 0.2.0
12183 * @category Function
12184 * @param {Function} func The function to partially apply arguments to.
12185 * @param {...*} [partials] The arguments to be partially applied.
12186 * @returns {Function} Returns the new partially applied function.
12187 * @example
12188 *
12189 * function greet(greeting, name) {
12190 * return greeting + ' ' + name;
12191 * }
12192 *
12193 * var sayHelloTo = _.partial(greet, 'hello');
12194 * sayHelloTo('fred');
12195 * // => 'hello fred'
12196 *
12197 * // Partially applied with placeholders.
12198 * var greetFred = _.partial(greet, _, 'fred');
12199 * greetFred('hi');
12200 * // => 'hi fred'
12201 */
12202 var partial = baseRest(function(func, partials) {
12203 var holders = replaceHolders(partials, getHolder(partial));
12204 return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
12205 });
12206
12207 /**
12208 * This method is like `_.partial` except that partially applied arguments
12209 * are appended to the arguments it receives.
12210 *
12211 * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
12212 * builds, may be used as a placeholder for partially applied arguments.
12213 *
12214 * **Note:** This method doesn't set the "length" property of partially
12215 * applied functions.
12216 *
12217 * @static
12218 * @memberOf _
12219 * @since 1.0.0
12220 * @category Function
12221 * @param {Function} func The function to partially apply arguments to.
12222 * @param {...*} [partials] The arguments to be partially applied.
12223 * @returns {Function} Returns the new partially applied function.
12224 * @example
12225 *
12226 * function greet(greeting, name) {
12227 * return greeting + ' ' + name;
12228 * }
12229 *
12230 * var greetFred = _.partialRight(greet, 'fred');
12231 * greetFred('hi');
12232 * // => 'hi fred'
12233 *
12234 * // Partially applied with placeholders.
12235 * var sayHelloTo = _.partialRight(greet, 'hello', _);
12236 * sayHelloTo('fred');
12237 * // => 'hello fred'
12238 */
12239 var partialRight = baseRest(function(func, partials) {
12240 var holders = replaceHolders(partials, getHolder(partialRight));
12241 return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
12242 });
12243
12244 /**
12245 * Creates a function that invokes `func` with arguments arranged according
12246 * to the specified `indexes` where the argument value at the first index is
12247 * provided as the first argument, the argument value at the second index is
12248 * provided as the second argument, and so on.
12249 *
12250 * @static
12251 * @memberOf _
12252 * @since 3.0.0
12253 * @category Function
12254 * @param {Function} func The function to rearrange arguments for.
12255 * @param {...(number|number[])} indexes The arranged argument indexes.
12256 * @returns {Function} Returns the new function.
12257 * @example
12258 *
12259 * var rearged = _.rearg(function(a, b, c) {
12260 * return [a, b, c];
12261 * }, [2, 0, 1]);
12262 *
12263 * rearged('b', 'c', 'a')
12264 * // => ['a', 'b', 'c']
12265 */
12266 var rearg = flatRest(function(func, indexes) {
12267 return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
12268 });
12269
12270 /**
12271 * Creates a function that invokes `func` with the `this` binding of the
12272 * created function and arguments from `start` and beyond provided as
12273 * an array.
12274 *
12275 * **Note:** This method is based on the
12276 * [rest parameter](https://mdn.io/rest_parameters).
12277 *
12278 * @static
12279 * @memberOf _
12280 * @since 4.0.0
12281 * @category Function
12282 * @param {Function} func The function to apply a rest parameter to.
12283 * @param {number} [start=func.length-1] The start position of the rest parameter.
12284 * @returns {Function} Returns the new function.
12285 * @example
12286 *
12287 * var say = _.rest(function(what, names) {
12288 * return what + ' ' + _.initial(names).join(', ') +
12289 * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
12290 * });
12291 *
12292 * say('hello', 'fred', 'barney', 'pebbles');
12293 * // => 'hello fred, barney, & pebbles'
12294 */
12295 function rest(func, start) {
12296 if (typeof func != 'function') {
12297 throw new TypeError(FUNC_ERROR_TEXT);
12298 }
12299 start = start === undefined ? start : toInteger(start);
12300 return baseRest(func, start);
12301 }
12302
12303 /**
12304 * Creates a function that invokes `func` with the `this` binding of the
12305 * create function and an array of arguments much like
12306 * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
12307 *
12308 * **Note:** This method is based on the
12309 * [spread operator](https://mdn.io/spread_operator).
12310 *
12311 * @static
12312 * @memberOf _
12313 * @since 3.2.0
12314 * @category Function
12315 * @param {Function} func The function to spread arguments over.
12316 * @param {number} [start=0] The start position of the spread.
12317 * @returns {Function} Returns the new function.
12318 * @example
12319 *
12320 * var say = _.spread(function(who, what) {
12321 * return who + ' says ' + what;
12322 * });
12323 *
12324 * say(['fred', 'hello']);
12325 * // => 'fred says hello'
12326 *
12327 * var numbers = Promise.all([
12328 * Promise.resolve(40),
12329 * Promise.resolve(36)
12330 * ]);
12331 *
12332 * numbers.then(_.spread(function(x, y) {
12333 * return x + y;
12334 * }));
12335 * // => a Promise of 76
12336 */
12337 function spread(func, start) {
12338 if (typeof func != 'function') {
12339 throw new TypeError(FUNC_ERROR_TEXT);
12340 }
12341 start = start == null ? 0 : nativeMax(toInteger(start), 0);
12342 return baseRest(function(args) {
12343 var array = args[start],
12344 otherArgs = castSlice(args, 0, start);
12345
12346 if (array) {
12347 arrayPush(otherArgs, array);
12348 }
12349 return apply(func, this, otherArgs);
12350 });
12351 }
12352
12353 /**
12354 * Creates a throttled function that only invokes `func` at most once per
12355 * every `wait` milliseconds. The throttled function comes with a `cancel`
12356 * method to cancel delayed `func` invocations and a `flush` method to
12357 * immediately invoke them. Provide `options` to indicate whether `func`
12358 * should be invoked on the leading and/or trailing edge of the `wait`
12359 * timeout. The `func` is invoked with the last arguments provided to the
12360 * throttled function. Subsequent calls to the throttled function return the
12361 * result of the last `func` invocation.
12362 *
12363 * **Note:** If `leading` and `trailing` options are `true`, `func` is
12364 * invoked on the trailing edge of the timeout only if the throttled function
12365 * is invoked more than once during the `wait` timeout.
12366 *
12367 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
12368 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
12369 *
12370 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
12371 * for details over the differences between `_.throttle` and `_.debounce`.
12372 *
12373 * @static
12374 * @memberOf _
12375 * @since 0.1.0
12376 * @category Function
12377 * @param {Function} func The function to throttle.
12378 * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
12379 * @param {Object} [options={}] The options object.
12380 * @param {boolean} [options.leading=true]
12381 * Specify invoking on the leading edge of the timeout.
12382 * @param {boolean} [options.trailing=true]
12383 * Specify invoking on the trailing edge of the timeout.
12384 * @returns {Function} Returns the new throttled function.
12385 * @example
12386 *
12387 * // Avoid excessively updating the position while scrolling.
12388 * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
12389 *
12390 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
12391 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
12392 * jQuery(element).on('click', throttled);
12393 *
12394 * // Cancel the trailing throttled invocation.
12395 * jQuery(window).on('popstate', throttled.cancel);
12396 */
12397 function throttle(func, wait, options) {
12398 var leading = true,
12399 trailing = true;
12400
12401 if (typeof func != 'function') {
12402 throw new TypeError(FUNC_ERROR_TEXT);
12403 }
12404 if (isObject(options)) {
12405 leading = 'leading' in options ? !!options.leading : leading;
12406 trailing = 'trailing' in options ? !!options.trailing : trailing;
12407 }
12408 return debounce(func, wait, {
12409 'leading': leading,
12410 'maxWait': wait,
12411 'trailing': trailing
12412 });
12413 }
12414
12415 /**
12416 * Creates a function that accepts up to one argument, ignoring any
12417 * additional arguments.
12418 *
12419 * @static
12420 * @memberOf _
12421 * @since 4.0.0
12422 * @category Function
12423 * @param {Function} func The function to cap arguments for.
12424 * @returns {Function} Returns the new capped function.
12425 * @example
12426 *
12427 * _.map(['6', '8', '10'], _.unary(parseInt));
12428 * // => [6, 8, 10]
12429 */
12430 function unary(func) {
12431 return ary(func, 1);
12432 }
12433
12434 /**
12435 * Creates a function that provides `value` to `wrapper` as its first
12436 * argument. Any additional arguments provided to the function are appended
12437 * to those provided to the `wrapper`. The wrapper is invoked with the `this`
12438 * binding of the created function.
12439 *
12440 * @static
12441 * @memberOf _
12442 * @since 0.1.0
12443 * @category Function
12444 * @param {*} value The value to wrap.
12445 * @param {Function} [wrapper=identity] The wrapper function.
12446 * @returns {Function} Returns the new function.
12447 * @example
12448 *
12449 * var p = _.wrap(_.escape, function(func, text) {
12450 * return '<p>' + func(text) + '</p>';
12451 * });
12452 *
12453 * p('fred, barney, & pebbles');
12454 * // => '<p>fred, barney, &amp; pebbles</p>'
12455 */
12456 function wrap(value, wrapper) {
12457 return partial(castFunction(wrapper), value);
12458 }
12459
12460 /*------------------------------------------------------------------------*/
12461
12462 /**
12463 * Casts `value` as an array if it's not one.
12464 *
12465 * @static
12466 * @memberOf _
12467 * @since 4.4.0
12468 * @category Lang
12469 * @param {*} value The value to inspect.
12470 * @returns {Array} Returns the cast array.
12471 * @example
12472 *
12473 * _.castArray(1);
12474 * // => [1]
12475 *
12476 * _.castArray({ 'a': 1 });
12477 * // => [{ 'a': 1 }]
12478 *
12479 * _.castArray('abc');
12480 * // => ['abc']
12481 *
12482 * _.castArray(null);
12483 * // => [null]
12484 *
12485 * _.castArray(undefined);
12486 * // => [undefined]
12487 *
12488 * _.castArray();
12489 * // => []
12490 *
12491 * var array = [1, 2, 3];
12492 * console.log(_.castArray(array) === array);
12493 * // => true
12494 */
12495 function castArray() {
12496 if (!arguments.length) {
12497 return [];
12498 }
12499 var value = arguments[0];
12500 return isArray(value) ? value : [value];
12501 }
12502
12503 /**
12504 * Creates a shallow clone of `value`.
12505 *
12506 * **Note:** This method is loosely based on the
12507 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
12508 * and supports cloning arrays, array buffers, booleans, date objects, maps,
12509 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
12510 * arrays. The own enumerable properties of `arguments` objects are cloned
12511 * as plain objects. An empty object is returned for uncloneable values such
12512 * as error objects, functions, DOM nodes, and WeakMaps.
12513 *
12514 * @static
12515 * @memberOf _
12516 * @since 0.1.0
12517 * @category Lang
12518 * @param {*} value The value to clone.
12519 * @returns {*} Returns the cloned value.
12520 * @see _.cloneDeep
12521 * @example
12522 *
12523 * var objects = [{ 'a': 1 }, { 'b': 2 }];
12524 *
12525 * var shallow = _.clone(objects);
12526 * console.log(shallow[0] === objects[0]);
12527 * // => true
12528 */
12529 function clone(value) {
12530 return baseClone(value, CLONE_SYMBOLS_FLAG);
12531 }
12532
12533 /**
12534 * This method is like `_.clone` except that it accepts `customizer` which
12535 * is invoked to produce the cloned value. If `customizer` returns `undefined`,
12536 * cloning is handled by the method instead. The `customizer` is invoked with
12537 * up to four arguments; (value [, index|key, object, stack]).
12538 *
12539 * @static
12540 * @memberOf _
12541 * @since 4.0.0
12542 * @category Lang
12543 * @param {*} value The value to clone.
12544 * @param {Function} [customizer] The function to customize cloning.
12545 * @returns {*} Returns the cloned value.
12546 * @see _.cloneDeepWith
12547 * @example
12548 *
12549 * function customizer(value) {
12550 * if (_.isElement(value)) {
12551 * return value.cloneNode(false);
12552 * }
12553 * }
12554 *
12555 * var el = _.cloneWith(document.body, customizer);
12556 *
12557 * console.log(el === document.body);
12558 * // => false
12559 * console.log(el.nodeName);
12560 * // => 'BODY'
12561 * console.log(el.childNodes.length);
12562 * // => 0
12563 */
12564 function cloneWith(value, customizer) {
12565 customizer = typeof customizer == 'function' ? customizer : undefined;
12566 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
12567 }
12568
12569 /**
12570 * This method is like `_.clone` except that it recursively clones `value`.
12571 *
12572 * @static
12573 * @memberOf _
12574 * @since 1.0.0
12575 * @category Lang
12576 * @param {*} value The value to recursively clone.
12577 * @returns {*} Returns the deep cloned value.
12578 * @see _.clone
12579 * @example
12580 *
12581 * var objects = [{ 'a': 1 }, { 'b': 2 }];
12582 *
12583 * var deep = _.cloneDeep(objects);
12584 * console.log(deep[0] === objects[0]);
12585 * // => false
12586 */
12587 function cloneDeep(value) {
12588 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
12589 }
12590
12591 /**
12592 * This method is like `_.cloneWith` except that it recursively clones `value`.
12593 *
12594 * @static
12595 * @memberOf _
12596 * @since 4.0.0
12597 * @category Lang
12598 * @param {*} value The value to recursively clone.
12599 * @param {Function} [customizer] The function to customize cloning.
12600 * @returns {*} Returns the deep cloned value.
12601 * @see _.cloneWith
12602 * @example
12603 *
12604 * function customizer(value) {
12605 * if (_.isElement(value)) {
12606 * return value.cloneNode(true);
12607 * }
12608 * }
12609 *
12610 * var el = _.cloneDeepWith(document.body, customizer);
12611 *
12612 * console.log(el === document.body);
12613 * // => false
12614 * console.log(el.nodeName);
12615 * // => 'BODY'
12616 * console.log(el.childNodes.length);
12617 * // => 20
12618 */
12619 function cloneDeepWith(value, customizer) {
12620 customizer = typeof customizer == 'function' ? customizer : undefined;
12621 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
12622 }
12623
12624 /**
12625 * Checks if `object` conforms to `source` by invoking the predicate
12626 * properties of `source` with the corresponding property values of `object`.
12627 *
12628 * **Note:** This method is equivalent to `_.conforms` when `source` is
12629 * partially applied.
12630 *
12631 * @static
12632 * @memberOf _
12633 * @since 4.14.0
12634 * @category Lang
12635 * @param {Object} object The object to inspect.
12636 * @param {Object} source The object of property predicates to conform to.
12637 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
12638 * @example
12639 *
12640 * var object = { 'a': 1, 'b': 2 };
12641 *
12642 * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
12643 * // => true
12644 *
12645 * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
12646 * // => false
12647 */
12648 function conformsTo(object, source) {
12649 return source == null || baseConformsTo(object, source, keys(source));
12650 }
12651
12652 /**
12653 * Performs a
12654 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12655 * comparison between two values to determine if they are equivalent.
12656 *
12657 * @static
12658 * @memberOf _
12659 * @since 4.0.0
12660 * @category Lang
12661 * @param {*} value The value to compare.
12662 * @param {*} other The other value to compare.
12663 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
12664 * @example
12665 *
12666 * var object = { 'a': 1 };
12667 * var other = { 'a': 1 };
12668 *
12669 * _.eq(object, object);
12670 * // => true
12671 *
12672 * _.eq(object, other);
12673 * // => false
12674 *
12675 * _.eq('a', 'a');
12676 * // => true
12677 *
12678 * _.eq('a', Object('a'));
12679 * // => false
12680 *
12681 * _.eq(NaN, NaN);
12682 * // => true
12683 */
12684 function eq(value, other) {
12685 return value === other || (value !== value && other !== other);
12686 }
12687
12688 /**
12689 * Checks if `value` is greater than `other`.
12690 *
12691 * @static
12692 * @memberOf _
12693 * @since 3.9.0
12694 * @category Lang
12695 * @param {*} value The value to compare.
12696 * @param {*} other The other value to compare.
12697 * @returns {boolean} Returns `true` if `value` is greater than `other`,
12698 * else `false`.
12699 * @see _.lt
12700 * @example
12701 *
12702 * _.gt(3, 1);
12703 * // => true
12704 *
12705 * _.gt(3, 3);
12706 * // => false
12707 *
12708 * _.gt(1, 3);
12709 * // => false
12710 */
12711 var gt = createRelationalOperation(baseGt);
12712
12713 /**
12714 * Checks if `value` is greater than or equal to `other`.
12715 *
12716 * @static
12717 * @memberOf _
12718 * @since 3.9.0
12719 * @category Lang
12720 * @param {*} value The value to compare.
12721 * @param {*} other The other value to compare.
12722 * @returns {boolean} Returns `true` if `value` is greater than or equal to
12723 * `other`, else `false`.
12724 * @see _.lte
12725 * @example
12726 *
12727 * _.gte(3, 1);
12728 * // => true
12729 *
12730 * _.gte(3, 3);
12731 * // => true
12732 *
12733 * _.gte(1, 3);
12734 * // => false
12735 */
12736 var gte = createRelationalOperation(function(value, other) {
12737 return value >= other;
12738 });
12739
12740 /**
12741 * Checks if `value` is likely an `arguments` object.
12742 *
12743 * @static
12744 * @memberOf _
12745 * @since 0.1.0
12746 * @category Lang
12747 * @param {*} value The value to check.
12748 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
12749 * else `false`.
12750 * @example
12751 *
12752 * _.isArguments(function() { return arguments; }());
12753 * // => true
12754 *
12755 * _.isArguments([1, 2, 3]);
12756 * // => false
12757 */
12758 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
12759 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
12760 !propertyIsEnumerable.call(value, 'callee');
12761 };
12762
12763 /**
12764 * Checks if `value` is classified as an `Array` object.
12765 *
12766 * @static
12767 * @memberOf _
12768 * @since 0.1.0
12769 * @category Lang
12770 * @param {*} value The value to check.
12771 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
12772 * @example
12773 *
12774 * _.isArray([1, 2, 3]);
12775 * // => true
12776 *
12777 * _.isArray(document.body.children);
12778 * // => false
12779 *
12780 * _.isArray('abc');
12781 * // => false
12782 *
12783 * _.isArray(_.noop);
12784 * // => false
12785 */
12786 var isArray = Array.isArray;
12787
12788 /**
12789 * Checks if `value` is classified as an `ArrayBuffer` object.
12790 *
12791 * @static
12792 * @memberOf _
12793 * @since 4.3.0
12794 * @category Lang
12795 * @param {*} value The value to check.
12796 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
12797 * @example
12798 *
12799 * _.isArrayBuffer(new ArrayBuffer(2));
12800 * // => true
12801 *
12802 * _.isArrayBuffer(new Array(2));
12803 * // => false
12804 */
12805 var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
12806
12807 /**
12808 * Checks if `value` is array-like. A value is considered array-like if it's
12809 * not a function and has a `value.length` that's an integer greater than or
12810 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
12811 *
12812 * @static
12813 * @memberOf _
12814 * @since 4.0.0
12815 * @category Lang
12816 * @param {*} value The value to check.
12817 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
12818 * @example
12819 *
12820 * _.isArrayLike([1, 2, 3]);
12821 * // => true
12822 *
12823 * _.isArrayLike(document.body.children);
12824 * // => true
12825 *
12826 * _.isArrayLike('abc');
12827 * // => true
12828 *
12829 * _.isArrayLike(_.noop);
12830 * // => false
12831 */
12832 function isArrayLike(value) {
12833 return value != null && isLength(value.length) && !isFunction(value);
12834 }
12835
12836 /**
12837 * This method is like `_.isArrayLike` except that it also checks if `value`
12838 * is an object.
12839 *
12840 * @static
12841 * @memberOf _
12842 * @since 4.0.0
12843 * @category Lang
12844 * @param {*} value The value to check.
12845 * @returns {boolean} Returns `true` if `value` is an array-like object,
12846 * else `false`.
12847 * @example
12848 *
12849 * _.isArrayLikeObject([1, 2, 3]);
12850 * // => true
12851 *
12852 * _.isArrayLikeObject(document.body.children);
12853 * // => true
12854 *
12855 * _.isArrayLikeObject('abc');
12856 * // => false
12857 *
12858 * _.isArrayLikeObject(_.noop);
12859 * // => false
12860 */
12861 function isArrayLikeObject(value) {
12862 return isObjectLike(value) && isArrayLike(value);
12863 }
12864
12865 /**
12866 * Checks if `value` is classified as a boolean primitive or object.
12867 *
12868 * @static
12869 * @memberOf _
12870 * @since 0.1.0
12871 * @category Lang
12872 * @param {*} value The value to check.
12873 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
12874 * @example
12875 *
12876 * _.isBoolean(false);
12877 * // => true
12878 *
12879 * _.isBoolean(null);
12880 * // => false
12881 */
12882 function isBoolean(value) {
12883 return value === true || value === false ||
12884 (isObjectLike(value) && baseGetTag(value) == boolTag);
12885 }
12886
12887 /**
12888 * Checks if `value` is a buffer.
12889 *
12890 * @static
12891 * @memberOf _
12892 * @since 4.3.0
12893 * @category Lang
12894 * @param {*} value The value to check.
12895 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
12896 * @example
12897 *
12898 * _.isBuffer(new Buffer(2));
12899 * // => true
12900 *
12901 * _.isBuffer(new Uint8Array(2));
12902 * // => false
12903 */
12904 var isBuffer = nativeIsBuffer || stubFalse;
12905
12906 /**
12907 * Checks if `value` is classified as a `Date` object.
12908 *
12909 * @static
12910 * @memberOf _
12911 * @since 0.1.0
12912 * @category Lang
12913 * @param {*} value The value to check.
12914 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
12915 * @example
12916 *
12917 * _.isDate(new Date);
12918 * // => true
12919 *
12920 * _.isDate('Mon April 23 2012');
12921 * // => false
12922 */
12923 var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
12924
12925 /**
12926 * Checks if `value` is likely a DOM element.
12927 *
12928 * @static
12929 * @memberOf _
12930 * @since 0.1.0
12931 * @category Lang
12932 * @param {*} value The value to check.
12933 * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
12934 * @example
12935 *
12936 * _.isElement(document.body);
12937 * // => true
12938 *
12939 * _.isElement('<body>');
12940 * // => false
12941 */
12942 function isElement(value) {
12943 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
12944 }
12945
12946 /**
12947 * Checks if `value` is an empty object, collection, map, or set.
12948 *
12949 * Objects are considered empty if they have no own enumerable string keyed
12950 * properties.
12951 *
12952 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
12953 * jQuery-like collections are considered empty if they have a `length` of `0`.
12954 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
12955 *
12956 * @static
12957 * @memberOf _
12958 * @since 0.1.0
12959 * @category Lang
12960 * @param {*} value The value to check.
12961 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
12962 * @example
12963 *
12964 * _.isEmpty(null);
12965 * // => true
12966 *
12967 * _.isEmpty(true);
12968 * // => true
12969 *
12970 * _.isEmpty(1);
12971 * // => true
12972 *
12973 * _.isEmpty([1, 2, 3]);
12974 * // => false
12975 *
12976 * _.isEmpty({ 'a': 1 });
12977 * // => false
12978 */
12979 function isEmpty(value) {
12980 if (value == null) {
12981 return true;
12982 }
12983 if (isArrayLike(value) &&
12984 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
12985 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
12986 return !value.length;
12987 }
12988 var tag = getTag(value);
12989 if (tag == mapTag || tag == setTag) {
12990 return !value.size;
12991 }
12992 if (isPrototype(value)) {
12993 return !baseKeys(value).length;
12994 }
12995 for (var key in value) {
12996 if (hasOwnProperty.call(value, key)) {
12997 return false;
12998 }
12999 }
13000 return true;
13001 }
13002
13003 /**
13004 * Performs a deep comparison between two values to determine if they are
13005 * equivalent.
13006 *
13007 * **Note:** This method supports comparing arrays, array buffers, booleans,
13008 * date objects, error objects, maps, numbers, `Object` objects, regexes,
13009 * sets, strings, symbols, and typed arrays. `Object` objects are compared
13010 * by their own, not inherited, enumerable properties. Functions and DOM
13011 * nodes are compared by strict equality, i.e. `===`.
13012 *
13013 * @static
13014 * @memberOf _
13015 * @since 0.1.0
13016 * @category Lang
13017 * @param {*} value The value to compare.
13018 * @param {*} other The other value to compare.
13019 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13020 * @example
13021 *
13022 * var object = { 'a': 1 };
13023 * var other = { 'a': 1 };
13024 *
13025 * _.isEqual(object, other);
13026 * // => true
13027 *
13028 * object === other;
13029 * // => false
13030 */
13031 function isEqual(value, other) {
13032 return baseIsEqual(value, other);
13033 }
13034
13035 /**
13036 * This method is like `_.isEqual` except that it accepts `customizer` which
13037 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13038 * are handled by the method instead. The `customizer` is invoked with up to
13039 * six arguments: (objValue, othValue [, index|key, object, other, stack]).
13040 *
13041 * @static
13042 * @memberOf _
13043 * @since 4.0.0
13044 * @category Lang
13045 * @param {*} value The value to compare.
13046 * @param {*} other The other value to compare.
13047 * @param {Function} [customizer] The function to customize comparisons.
13048 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13049 * @example
13050 *
13051 * function isGreeting(value) {
13052 * return /^h(?:i|ello)$/.test(value);
13053 * }
13054 *
13055 * function customizer(objValue, othValue) {
13056 * if (isGreeting(objValue) && isGreeting(othValue)) {
13057 * return true;
13058 * }
13059 * }
13060 *
13061 * var array = ['hello', 'goodbye'];
13062 * var other = ['hi', 'goodbye'];
13063 *
13064 * _.isEqualWith(array, other, customizer);
13065 * // => true
13066 */
13067 function isEqualWith(value, other, customizer) {
13068 customizer = typeof customizer == 'function' ? customizer : undefined;
13069 var result = customizer ? customizer(value, other) : undefined;
13070 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
13071 }
13072
13073 /**
13074 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
13075 * `SyntaxError`, `TypeError`, or `URIError` object.
13076 *
13077 * @static
13078 * @memberOf _
13079 * @since 3.0.0
13080 * @category Lang
13081 * @param {*} value The value to check.
13082 * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
13083 * @example
13084 *
13085 * _.isError(new Error);
13086 * // => true
13087 *
13088 * _.isError(Error);
13089 * // => false
13090 */
13091 function isError(value) {
13092 if (!isObjectLike(value)) {
13093 return false;
13094 }
13095 var tag = baseGetTag(value);
13096 return tag == errorTag || tag == domExcTag ||
13097 (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
13098 }
13099
13100 /**
13101 * Checks if `value` is a finite primitive number.
13102 *
13103 * **Note:** This method is based on
13104 * [`Number.isFinite`](https://mdn.io/Number/isFinite).
13105 *
13106 * @static
13107 * @memberOf _
13108 * @since 0.1.0
13109 * @category Lang
13110 * @param {*} value The value to check.
13111 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
13112 * @example
13113 *
13114 * _.isFinite(3);
13115 * // => true
13116 *
13117 * _.isFinite(Number.MIN_VALUE);
13118 * // => true
13119 *
13120 * _.isFinite(Infinity);
13121 * // => false
13122 *
13123 * _.isFinite('3');
13124 * // => false
13125 */
13126 function isFinite(value) {
13127 return typeof value == 'number' && nativeIsFinite(value);
13128 }
13129
13130 /**
13131 * Checks if `value` is classified as a `Function` object.
13132 *
13133 * @static
13134 * @memberOf _
13135 * @since 0.1.0
13136 * @category Lang
13137 * @param {*} value The value to check.
13138 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
13139 * @example
13140 *
13141 * _.isFunction(_);
13142 * // => true
13143 *
13144 * _.isFunction(/abc/);
13145 * // => false
13146 */
13147 function isFunction(value) {
13148 if (!isObject(value)) {
13149 return false;
13150 }
13151 // The use of `Object#toString` avoids issues with the `typeof` operator
13152 // in Safari 9 which returns 'object' for typed arrays and other constructors.
13153 var tag = baseGetTag(value);
13154 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
13155 }
13156
13157 /**
13158 * Checks if `value` is an integer.
13159 *
13160 * **Note:** This method is based on
13161 * [`Number.isInteger`](https://mdn.io/Number/isInteger).
13162 *
13163 * @static
13164 * @memberOf _
13165 * @since 4.0.0
13166 * @category Lang
13167 * @param {*} value The value to check.
13168 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
13169 * @example
13170 *
13171 * _.isInteger(3);
13172 * // => true
13173 *
13174 * _.isInteger(Number.MIN_VALUE);
13175 * // => false
13176 *
13177 * _.isInteger(Infinity);
13178 * // => false
13179 *
13180 * _.isInteger('3');
13181 * // => false
13182 */
13183 function isInteger(value) {
13184 return typeof value == 'number' && value == toInteger(value);
13185 }
13186
13187 /**
13188 * Checks if `value` is a valid array-like length.
13189 *
13190 * **Note:** This method is loosely based on
13191 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
13192 *
13193 * @static
13194 * @memberOf _
13195 * @since 4.0.0
13196 * @category Lang
13197 * @param {*} value The value to check.
13198 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
13199 * @example
13200 *
13201 * _.isLength(3);
13202 * // => true
13203 *
13204 * _.isLength(Number.MIN_VALUE);
13205 * // => false
13206 *
13207 * _.isLength(Infinity);
13208 * // => false
13209 *
13210 * _.isLength('3');
13211 * // => false
13212 */
13213 function isLength(value) {
13214 return typeof value == 'number' &&
13215 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
13216 }
13217
13218 /**
13219 * Checks if `value` is the
13220 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
13221 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
13222 *
13223 * @static
13224 * @memberOf _
13225 * @since 0.1.0
13226 * @category Lang
13227 * @param {*} value The value to check.
13228 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
13229 * @example
13230 *
13231 * _.isObject({});
13232 * // => true
13233 *
13234 * _.isObject([1, 2, 3]);
13235 * // => true
13236 *
13237 * _.isObject(_.noop);
13238 * // => true
13239 *
13240 * _.isObject(null);
13241 * // => false
13242 */
13243 function isObject(value) {
13244 var type = typeof value;
13245 return value != null && (type == 'object' || type == 'function');
13246 }
13247
13248 /**
13249 * Checks if `value` is object-like. A value is object-like if it's not `null`
13250 * and has a `typeof` result of "object".
13251 *
13252 * @static
13253 * @memberOf _
13254 * @since 4.0.0
13255 * @category Lang
13256 * @param {*} value The value to check.
13257 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
13258 * @example
13259 *
13260 * _.isObjectLike({});
13261 * // => true
13262 *
13263 * _.isObjectLike([1, 2, 3]);
13264 * // => true
13265 *
13266 * _.isObjectLike(_.noop);
13267 * // => false
13268 *
13269 * _.isObjectLike(null);
13270 * // => false
13271 */
13272 function isObjectLike(value) {
13273 return value != null && typeof value == 'object';
13274 }
13275
13276 /**
13277 * Checks if `value` is classified as a `Map` object.
13278 *
13279 * @static
13280 * @memberOf _
13281 * @since 4.3.0
13282 * @category Lang
13283 * @param {*} value The value to check.
13284 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
13285 * @example
13286 *
13287 * _.isMap(new Map);
13288 * // => true
13289 *
13290 * _.isMap(new WeakMap);
13291 * // => false
13292 */
13293 var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
13294
13295 /**
13296 * Performs a partial deep comparison between `object` and `source` to
13297 * determine if `object` contains equivalent property values.
13298 *
13299 * **Note:** This method is equivalent to `_.matches` when `source` is
13300 * partially applied.
13301 *
13302 * Partial comparisons will match empty array and empty object `source`
13303 * values against any array or object value, respectively. See `_.isEqual`
13304 * for a list of supported value comparisons.
13305 *
13306 * @static
13307 * @memberOf _
13308 * @since 3.0.0
13309 * @category Lang
13310 * @param {Object} object The object to inspect.
13311 * @param {Object} source The object of property values to match.
13312 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13313 * @example
13314 *
13315 * var object = { 'a': 1, 'b': 2 };
13316 *
13317 * _.isMatch(object, { 'b': 2 });
13318 * // => true
13319 *
13320 * _.isMatch(object, { 'b': 1 });
13321 * // => false
13322 */
13323 function isMatch(object, source) {
13324 return object === source || baseIsMatch(object, source, getMatchData(source));
13325 }
13326
13327 /**
13328 * This method is like `_.isMatch` except that it accepts `customizer` which
13329 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13330 * are handled by the method instead. The `customizer` is invoked with five
13331 * arguments: (objValue, srcValue, index|key, object, source).
13332 *
13333 * @static
13334 * @memberOf _
13335 * @since 4.0.0
13336 * @category Lang
13337 * @param {Object} object The object to inspect.
13338 * @param {Object} source The object of property values to match.
13339 * @param {Function} [customizer] The function to customize comparisons.
13340 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13341 * @example
13342 *
13343 * function isGreeting(value) {
13344 * return /^h(?:i|ello)$/.test(value);
13345 * }
13346 *
13347 * function customizer(objValue, srcValue) {
13348 * if (isGreeting(objValue) && isGreeting(srcValue)) {
13349 * return true;
13350 * }
13351 * }
13352 *
13353 * var object = { 'greeting': 'hello' };
13354 * var source = { 'greeting': 'hi' };
13355 *
13356 * _.isMatchWith(object, source, customizer);
13357 * // => true
13358 */
13359 function isMatchWith(object, source, customizer) {
13360 customizer = typeof customizer == 'function' ? customizer : undefined;
13361 return baseIsMatch(object, source, getMatchData(source), customizer);
13362 }
13363
13364 /**
13365 * Checks if `value` is `NaN`.
13366 *
13367 * **Note:** This method is based on
13368 * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
13369 * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
13370 * `undefined` and other non-number values.
13371 *
13372 * @static
13373 * @memberOf _
13374 * @since 0.1.0
13375 * @category Lang
13376 * @param {*} value The value to check.
13377 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
13378 * @example
13379 *
13380 * _.isNaN(NaN);
13381 * // => true
13382 *
13383 * _.isNaN(new Number(NaN));
13384 * // => true
13385 *
13386 * isNaN(undefined);
13387 * // => true
13388 *
13389 * _.isNaN(undefined);
13390 * // => false
13391 */
13392 function isNaN(value) {
13393 // An `NaN` primitive is the only value that is not equal to itself.
13394 // Perform the `toStringTag` check first to avoid errors with some
13395 // ActiveX objects in IE.
13396 return isNumber(value) && value != +value;
13397 }
13398
13399 /**
13400 * Checks if `value` is a pristine native function.
13401 *
13402 * **Note:** This method can't reliably detect native functions in the presence
13403 * of the core-js package because core-js circumvents this kind of detection.
13404 * Despite multiple requests, the core-js maintainer has made it clear: any
13405 * attempt to fix the detection will be obstructed. As a result, we're left
13406 * with little choice but to throw an error. Unfortunately, this also affects
13407 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
13408 * which rely on core-js.
13409 *
13410 * @static
13411 * @memberOf _
13412 * @since 3.0.0
13413 * @category Lang
13414 * @param {*} value The value to check.
13415 * @returns {boolean} Returns `true` if `value` is a native function,
13416 * else `false`.
13417 * @example
13418 *
13419 * _.isNative(Array.prototype.push);
13420 * // => true
13421 *
13422 * _.isNative(_);
13423 * // => false
13424 */
13425 function isNative(value) {
13426 if (isMaskable(value)) {
13427 throw new Error(CORE_ERROR_TEXT);
13428 }
13429 return baseIsNative(value);
13430 }
13431
13432 /**
13433 * Checks if `value` is `null`.
13434 *
13435 * @static
13436 * @memberOf _
13437 * @since 0.1.0
13438 * @category Lang
13439 * @param {*} value The value to check.
13440 * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
13441 * @example
13442 *
13443 * _.isNull(null);
13444 * // => true
13445 *
13446 * _.isNull(void 0);
13447 * // => false
13448 */
13449 function isNull(value) {
13450 return value === null;
13451 }
13452
13453 /**
13454 * Checks if `value` is `null` or `undefined`.
13455 *
13456 * @static
13457 * @memberOf _
13458 * @since 4.0.0
13459 * @category Lang
13460 * @param {*} value The value to check.
13461 * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
13462 * @example
13463 *
13464 * _.isNil(null);
13465 * // => true
13466 *
13467 * _.isNil(void 0);
13468 * // => true
13469 *
13470 * _.isNil(NaN);
13471 * // => false
13472 */
13473 function isNil(value) {
13474 return value == null;
13475 }
13476
13477 /**
13478 * Checks if `value` is classified as a `Number` primitive or object.
13479 *
13480 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
13481 * classified as numbers, use the `_.isFinite` method.
13482 *
13483 * @static
13484 * @memberOf _
13485 * @since 0.1.0
13486 * @category Lang
13487 * @param {*} value The value to check.
13488 * @returns {boolean} Returns `true` if `value` is a number, else `false`.
13489 * @example
13490 *
13491 * _.isNumber(3);
13492 * // => true
13493 *
13494 * _.isNumber(Number.MIN_VALUE);
13495 * // => true
13496 *
13497 * _.isNumber(Infinity);
13498 * // => true
13499 *
13500 * _.isNumber('3');
13501 * // => false
13502 */
13503 function isNumber(value) {
13504 return typeof value == 'number' ||
13505 (isObjectLike(value) && baseGetTag(value) == numberTag);
13506 }
13507
13508 /**
13509 * Checks if `value` is a plain object, that is, an object created by the
13510 * `Object` constructor or one with a `[[Prototype]]` of `null`.
13511 *
13512 * @static
13513 * @memberOf _
13514 * @since 0.8.0
13515 * @category Lang
13516 * @param {*} value The value to check.
13517 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
13518 * @example
13519 *
13520 * function Foo() {
13521 * this.a = 1;
13522 * }
13523 *
13524 * _.isPlainObject(new Foo);
13525 * // => false
13526 *
13527 * _.isPlainObject([1, 2, 3]);
13528 * // => false
13529 *
13530 * _.isPlainObject({ 'x': 0, 'y': 0 });
13531 * // => true
13532 *
13533 * _.isPlainObject(Object.create(null));
13534 * // => true
13535 */
13536 function isPlainObject(value) {
13537 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
13538 return false;
13539 }
13540 var proto = getPrototype(value);
13541 if (proto === null) {
13542 return true;
13543 }
13544 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
13545 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
13546 funcToString.call(Ctor) == objectCtorString;
13547 }
13548
13549 /**
13550 * Checks if `value` is classified as a `RegExp` object.
13551 *
13552 * @static
13553 * @memberOf _
13554 * @since 0.1.0
13555 * @category Lang
13556 * @param {*} value The value to check.
13557 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
13558 * @example
13559 *
13560 * _.isRegExp(/abc/);
13561 * // => true
13562 *
13563 * _.isRegExp('/abc/');
13564 * // => false
13565 */
13566 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
13567
13568 /**
13569 * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
13570 * double precision number which isn't the result of a rounded unsafe integer.
13571 *
13572 * **Note:** This method is based on
13573 * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
13574 *
13575 * @static
13576 * @memberOf _
13577 * @since 4.0.0
13578 * @category Lang
13579 * @param {*} value The value to check.
13580 * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
13581 * @example
13582 *
13583 * _.isSafeInteger(3);
13584 * // => true
13585 *
13586 * _.isSafeInteger(Number.MIN_VALUE);
13587 * // => false
13588 *
13589 * _.isSafeInteger(Infinity);
13590 * // => false
13591 *
13592 * _.isSafeInteger('3');
13593 * // => false
13594 */
13595 function isSafeInteger(value) {
13596 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
13597 }
13598
13599 /**
13600 * Checks if `value` is classified as a `Set` object.
13601 *
13602 * @static
13603 * @memberOf _
13604 * @since 4.3.0
13605 * @category Lang
13606 * @param {*} value The value to check.
13607 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
13608 * @example
13609 *
13610 * _.isSet(new Set);
13611 * // => true
13612 *
13613 * _.isSet(new WeakSet);
13614 * // => false
13615 */
13616 var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
13617
13618 /**
13619 * Checks if `value` is classified as a `String` primitive or object.
13620 *
13621 * @static
13622 * @since 0.1.0
13623 * @memberOf _
13624 * @category Lang
13625 * @param {*} value The value to check.
13626 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
13627 * @example
13628 *
13629 * _.isString('abc');
13630 * // => true
13631 *
13632 * _.isString(1);
13633 * // => false
13634 */
13635 function isString(value) {
13636 return typeof value == 'string' ||
13637 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
13638 }
13639
13640 /**
13641 * Checks if `value` is classified as a `Symbol` primitive or object.
13642 *
13643 * @static
13644 * @memberOf _
13645 * @since 4.0.0
13646 * @category Lang
13647 * @param {*} value The value to check.
13648 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
13649 * @example
13650 *
13651 * _.isSymbol(Symbol.iterator);
13652 * // => true
13653 *
13654 * _.isSymbol('abc');
13655 * // => false
13656 */
13657 function isSymbol(value) {
13658 return typeof value == 'symbol' ||
13659 (isObjectLike(value) && baseGetTag(value) == symbolTag);
13660 }
13661
13662 /**
13663 * Checks if `value` is classified as a typed array.
13664 *
13665 * @static
13666 * @memberOf _
13667 * @since 3.0.0
13668 * @category Lang
13669 * @param {*} value The value to check.
13670 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
13671 * @example
13672 *
13673 * _.isTypedArray(new Uint8Array);
13674 * // => true
13675 *
13676 * _.isTypedArray([]);
13677 * // => false
13678 */
13679 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
13680
13681 /**
13682 * Checks if `value` is `undefined`.
13683 *
13684 * @static
13685 * @since 0.1.0
13686 * @memberOf _
13687 * @category Lang
13688 * @param {*} value The value to check.
13689 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
13690 * @example
13691 *
13692 * _.isUndefined(void 0);
13693 * // => true
13694 *
13695 * _.isUndefined(null);
13696 * // => false
13697 */
13698 function isUndefined(value) {
13699 return value === undefined;
13700 }
13701
13702 /**
13703 * Checks if `value` is classified as a `WeakMap` object.
13704 *
13705 * @static
13706 * @memberOf _
13707 * @since 4.3.0
13708 * @category Lang
13709 * @param {*} value The value to check.
13710 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
13711 * @example
13712 *
13713 * _.isWeakMap(new WeakMap);
13714 * // => true
13715 *
13716 * _.isWeakMap(new Map);
13717 * // => false
13718 */
13719 function isWeakMap(value) {
13720 return isObjectLike(value) && getTag(value) == weakMapTag;
13721 }
13722
13723 /**
13724 * Checks if `value` is classified as a `WeakSet` object.
13725 *
13726 * @static
13727 * @memberOf _
13728 * @since 4.3.0
13729 * @category Lang
13730 * @param {*} value The value to check.
13731 * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
13732 * @example
13733 *
13734 * _.isWeakSet(new WeakSet);
13735 * // => true
13736 *
13737 * _.isWeakSet(new Set);
13738 * // => false
13739 */
13740 function isWeakSet(value) {
13741 return isObjectLike(value) && baseGetTag(value) == weakSetTag;
13742 }
13743
13744 /**
13745 * Checks if `value` is less than `other`.
13746 *
13747 * @static
13748 * @memberOf _
13749 * @since 3.9.0
13750 * @category Lang
13751 * @param {*} value The value to compare.
13752 * @param {*} other The other value to compare.
13753 * @returns {boolean} Returns `true` if `value` is less than `other`,
13754 * else `false`.
13755 * @see _.gt
13756 * @example
13757 *
13758 * _.lt(1, 3);
13759 * // => true
13760 *
13761 * _.lt(3, 3);
13762 * // => false
13763 *
13764 * _.lt(3, 1);
13765 * // => false
13766 */
13767 var lt = createRelationalOperation(baseLt);
13768
13769 /**
13770 * Checks if `value` is less than or equal to `other`.
13771 *
13772 * @static
13773 * @memberOf _
13774 * @since 3.9.0
13775 * @category Lang
13776 * @param {*} value The value to compare.
13777 * @param {*} other The other value to compare.
13778 * @returns {boolean} Returns `true` if `value` is less than or equal to
13779 * `other`, else `false`.
13780 * @see _.gte
13781 * @example
13782 *
13783 * _.lte(1, 3);
13784 * // => true
13785 *
13786 * _.lte(3, 3);
13787 * // => true
13788 *
13789 * _.lte(3, 1);
13790 * // => false
13791 */
13792 var lte = createRelationalOperation(function(value, other) {
13793 return value <= other;
13794 });
13795
13796 /**
13797 * Converts `value` to an array.
13798 *
13799 * @static
13800 * @since 0.1.0
13801 * @memberOf _
13802 * @category Lang
13803 * @param {*} value The value to convert.
13804 * @returns {Array} Returns the converted array.
13805 * @example
13806 *
13807 * _.toArray({ 'a': 1, 'b': 2 });
13808 * // => [1, 2]
13809 *
13810 * _.toArray('abc');
13811 * // => ['a', 'b', 'c']
13812 *
13813 * _.toArray(1);
13814 * // => []
13815 *
13816 * _.toArray(null);
13817 * // => []
13818 */
13819 function toArray(value) {
13820 if (!value) {
13821 return [];
13822 }
13823 if (isArrayLike(value)) {
13824 return isString(value) ? stringToArray(value) : copyArray(value);
13825 }
13826 if (symIterator && value[symIterator]) {
13827 return iteratorToArray(value[symIterator]());
13828 }
13829 var tag = getTag(value),
13830 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
13831
13832 return func(value);
13833 }
13834
13835 /**
13836 * Converts `value` to a finite number.
13837 *
13838 * @static
13839 * @memberOf _
13840 * @since 4.12.0
13841 * @category Lang
13842 * @param {*} value The value to convert.
13843 * @returns {number} Returns the converted number.
13844 * @example
13845 *
13846 * _.toFinite(3.2);
13847 * // => 3.2
13848 *
13849 * _.toFinite(Number.MIN_VALUE);
13850 * // => 5e-324
13851 *
13852 * _.toFinite(Infinity);
13853 * // => 1.7976931348623157e+308
13854 *
13855 * _.toFinite('3.2');
13856 * // => 3.2
13857 */
13858 function toFinite(value) {
13859 if (!value) {
13860 return value === 0 ? value : 0;
13861 }
13862 value = toNumber(value);
13863 if (value === INFINITY || value === -INFINITY) {
13864 var sign = (value < 0 ? -1 : 1);
13865 return sign * MAX_INTEGER;
13866 }
13867 return value === value ? value : 0;
13868 }
13869
13870 /**
13871 * Converts `value` to an integer.
13872 *
13873 * **Note:** This method is loosely based on
13874 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
13875 *
13876 * @static
13877 * @memberOf _
13878 * @since 4.0.0
13879 * @category Lang
13880 * @param {*} value The value to convert.
13881 * @returns {number} Returns the converted integer.
13882 * @example
13883 *
13884 * _.toInteger(3.2);
13885 * // => 3
13886 *
13887 * _.toInteger(Number.MIN_VALUE);
13888 * // => 0
13889 *
13890 * _.toInteger(Infinity);
13891 * // => 1.7976931348623157e+308
13892 *
13893 * _.toInteger('3.2');
13894 * // => 3
13895 */
13896 function toInteger(value) {
13897 var result = toFinite(value),
13898 remainder = result % 1;
13899
13900 return result === result ? (remainder ? result - remainder : result) : 0;
13901 }
13902
13903 /**
13904 * Converts `value` to an integer suitable for use as the length of an
13905 * array-like object.
13906 *
13907 * **Note:** This method is based on
13908 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
13909 *
13910 * @static
13911 * @memberOf _
13912 * @since 4.0.0
13913 * @category Lang
13914 * @param {*} value The value to convert.
13915 * @returns {number} Returns the converted integer.
13916 * @example
13917 *
13918 * _.toLength(3.2);
13919 * // => 3
13920 *
13921 * _.toLength(Number.MIN_VALUE);
13922 * // => 0
13923 *
13924 * _.toLength(Infinity);
13925 * // => 4294967295
13926 *
13927 * _.toLength('3.2');
13928 * // => 3
13929 */
13930 function toLength(value) {
13931 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
13932 }
13933
13934 /**
13935 * Converts `value` to a number.
13936 *
13937 * @static
13938 * @memberOf _
13939 * @since 4.0.0
13940 * @category Lang
13941 * @param {*} value The value to process.
13942 * @returns {number} Returns the number.
13943 * @example
13944 *
13945 * _.toNumber(3.2);
13946 * // => 3.2
13947 *
13948 * _.toNumber(Number.MIN_VALUE);
13949 * // => 5e-324
13950 *
13951 * _.toNumber(Infinity);
13952 * // => Infinity
13953 *
13954 * _.toNumber('3.2');
13955 * // => 3.2
13956 */
13957 function toNumber(value) {
13958 if (typeof value == 'number') {
13959 return value;
13960 }
13961 if (isSymbol(value)) {
13962 return NAN;
13963 }
13964 if (isObject(value)) {
13965 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
13966 value = isObject(other) ? (other + '') : other;
13967 }
13968 if (typeof value != 'string') {
13969 return value === 0 ? value : +value;
13970 }
13971 value = value.replace(reTrim, '');
13972 var isBinary = reIsBinary.test(value);
13973 return (isBinary || reIsOctal.test(value))
13974 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
13975 : (reIsBadHex.test(value) ? NAN : +value);
13976 }
13977
13978 /**
13979 * Converts `value` to a plain object flattening inherited enumerable string
13980 * keyed properties of `value` to own properties of the plain object.
13981 *
13982 * @static
13983 * @memberOf _
13984 * @since 3.0.0
13985 * @category Lang
13986 * @param {*} value The value to convert.
13987 * @returns {Object} Returns the converted plain object.
13988 * @example
13989 *
13990 * function Foo() {
13991 * this.b = 2;
13992 * }
13993 *
13994 * Foo.prototype.c = 3;
13995 *
13996 * _.assign({ 'a': 1 }, new Foo);
13997 * // => { 'a': 1, 'b': 2 }
13998 *
13999 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
14000 * // => { 'a': 1, 'b': 2, 'c': 3 }
14001 */
14002 function toPlainObject(value) {
14003 return copyObject(value, keysIn(value));
14004 }
14005
14006 /**
14007 * Converts `value` to a safe integer. A safe integer can be compared and
14008 * represented correctly.
14009 *
14010 * @static
14011 * @memberOf _
14012 * @since 4.0.0
14013 * @category Lang
14014 * @param {*} value The value to convert.
14015 * @returns {number} Returns the converted integer.
14016 * @example
14017 *
14018 * _.toSafeInteger(3.2);
14019 * // => 3
14020 *
14021 * _.toSafeInteger(Number.MIN_VALUE);
14022 * // => 0
14023 *
14024 * _.toSafeInteger(Infinity);
14025 * // => 9007199254740991
14026 *
14027 * _.toSafeInteger('3.2');
14028 * // => 3
14029 */
14030 function toSafeInteger(value) {
14031 return value
14032 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
14033 : (value === 0 ? value : 0);
14034 }
14035
14036 /**
14037 * Converts `value` to a string. An empty string is returned for `null`
14038 * and `undefined` values. The sign of `-0` is preserved.
14039 *
14040 * @static
14041 * @memberOf _
14042 * @since 4.0.0
14043 * @category Lang
14044 * @param {*} value The value to convert.
14045 * @returns {string} Returns the converted string.
14046 * @example
14047 *
14048 * _.toString(null);
14049 * // => ''
14050 *
14051 * _.toString(-0);
14052 * // => '-0'
14053 *
14054 * _.toString([1, 2, 3]);
14055 * // => '1,2,3'
14056 */
14057 function toString(value) {
14058 return value == null ? '' : baseToString(value);
14059 }
14060
14061 /*------------------------------------------------------------------------*/
14062
14063 /**
14064 * Assigns own enumerable string keyed properties of source objects to the
14065 * destination object. Source objects are applied from left to right.
14066 * Subsequent sources overwrite property assignments of previous sources.
14067 *
14068 * **Note:** This method mutates `object` and is loosely based on
14069 * [`Object.assign`](https://mdn.io/Object/assign).
14070 *
14071 * @static
14072 * @memberOf _
14073 * @since 0.10.0
14074 * @category Object
14075 * @param {Object} object The destination object.
14076 * @param {...Object} [sources] The source objects.
14077 * @returns {Object} Returns `object`.
14078 * @see _.assignIn
14079 * @example
14080 *
14081 * function Foo() {
14082 * this.a = 1;
14083 * }
14084 *
14085 * function Bar() {
14086 * this.c = 3;
14087 * }
14088 *
14089 * Foo.prototype.b = 2;
14090 * Bar.prototype.d = 4;
14091 *
14092 * _.assign({ 'a': 0 }, new Foo, new Bar);
14093 * // => { 'a': 1, 'c': 3 }
14094 */
14095 var assign = createAssigner(function(object, source) {
14096 if (isPrototype(source) || isArrayLike(source)) {
14097 copyObject(source, keys(source), object);
14098 return;
14099 }
14100 for (var key in source) {
14101 if (hasOwnProperty.call(source, key)) {
14102 assignValue(object, key, source[key]);
14103 }
14104 }
14105 });
14106
14107 /**
14108 * This method is like `_.assign` except that it iterates over own and
14109 * inherited source properties.
14110 *
14111 * **Note:** This method mutates `object`.
14112 *
14113 * @static
14114 * @memberOf _
14115 * @since 4.0.0
14116 * @alias extend
14117 * @category Object
14118 * @param {Object} object The destination object.
14119 * @param {...Object} [sources] The source objects.
14120 * @returns {Object} Returns `object`.
14121 * @see _.assign
14122 * @example
14123 *
14124 * function Foo() {
14125 * this.a = 1;
14126 * }
14127 *
14128 * function Bar() {
14129 * this.c = 3;
14130 * }
14131 *
14132 * Foo.prototype.b = 2;
14133 * Bar.prototype.d = 4;
14134 *
14135 * _.assignIn({ 'a': 0 }, new Foo, new Bar);
14136 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
14137 */
14138 var assignIn = createAssigner(function(object, source) {
14139 copyObject(source, keysIn(source), object);
14140 });
14141
14142 /**
14143 * This method is like `_.assignIn` except that it accepts `customizer`
14144 * which is invoked to produce the assigned values. If `customizer` returns
14145 * `undefined`, assignment is handled by the method instead. The `customizer`
14146 * is invoked with five arguments: (objValue, srcValue, key, object, source).
14147 *
14148 * **Note:** This method mutates `object`.
14149 *
14150 * @static
14151 * @memberOf _
14152 * @since 4.0.0
14153 * @alias extendWith
14154 * @category Object
14155 * @param {Object} object The destination object.
14156 * @param {...Object} sources The source objects.
14157 * @param {Function} [customizer] The function to customize assigned values.
14158 * @returns {Object} Returns `object`.
14159 * @see _.assignWith
14160 * @example
14161 *
14162 * function customizer(objValue, srcValue) {
14163 * return _.isUndefined(objValue) ? srcValue : objValue;
14164 * }
14165 *
14166 * var defaults = _.partialRight(_.assignInWith, customizer);
14167 *
14168 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14169 * // => { 'a': 1, 'b': 2 }
14170 */
14171 var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
14172 copyObject(source, keysIn(source), object, customizer);
14173 });
14174
14175 /**
14176 * This method is like `_.assign` except that it accepts `customizer`
14177 * which is invoked to produce the assigned values. If `customizer` returns
14178 * `undefined`, assignment is handled by the method instead. The `customizer`
14179 * is invoked with five arguments: (objValue, srcValue, key, object, source).
14180 *
14181 * **Note:** This method mutates `object`.
14182 *
14183 * @static
14184 * @memberOf _
14185 * @since 4.0.0
14186 * @category Object
14187 * @param {Object} object The destination object.
14188 * @param {...Object} sources The source objects.
14189 * @param {Function} [customizer] The function to customize assigned values.
14190 * @returns {Object} Returns `object`.
14191 * @see _.assignInWith
14192 * @example
14193 *
14194 * function customizer(objValue, srcValue) {
14195 * return _.isUndefined(objValue) ? srcValue : objValue;
14196 * }
14197 *
14198 * var defaults = _.partialRight(_.assignWith, customizer);
14199 *
14200 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14201 * // => { 'a': 1, 'b': 2 }
14202 */
14203 var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
14204 copyObject(source, keys(source), object, customizer);
14205 });
14206
14207 /**
14208 * Creates an array of values corresponding to `paths` of `object`.
14209 *
14210 * @static
14211 * @memberOf _
14212 * @since 1.0.0
14213 * @category Object
14214 * @param {Object} object The object to iterate over.
14215 * @param {...(string|string[])} [paths] The property paths to pick.
14216 * @returns {Array} Returns the picked values.
14217 * @example
14218 *
14219 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
14220 *
14221 * _.at(object, ['a[0].b.c', 'a[1]']);
14222 * // => [3, 4]
14223 */
14224 var at = flatRest(baseAt);
14225
14226 /**
14227 * Creates an object that inherits from the `prototype` object. If a
14228 * `properties` object is given, its own enumerable string keyed properties
14229 * are assigned to the created object.
14230 *
14231 * @static
14232 * @memberOf _
14233 * @since 2.3.0
14234 * @category Object
14235 * @param {Object} prototype The object to inherit from.
14236 * @param {Object} [properties] The properties to assign to the object.
14237 * @returns {Object} Returns the new object.
14238 * @example
14239 *
14240 * function Shape() {
14241 * this.x = 0;
14242 * this.y = 0;
14243 * }
14244 *
14245 * function Circle() {
14246 * Shape.call(this);
14247 * }
14248 *
14249 * Circle.prototype = _.create(Shape.prototype, {
14250 * 'constructor': Circle
14251 * });
14252 *
14253 * var circle = new Circle;
14254 * circle instanceof Circle;
14255 * // => true
14256 *
14257 * circle instanceof Shape;
14258 * // => true
14259 */
14260 function create(prototype, properties) {
14261 var result = baseCreate(prototype);
14262 return properties == null ? result : baseAssign(result, properties);
14263 }
14264
14265 /**
14266 * Assigns own and inherited enumerable string keyed properties of source
14267 * objects to the destination object for all destination properties that
14268 * resolve to `undefined`. Source objects are applied from left to right.
14269 * Once a property is set, additional values of the same property are ignored.
14270 *
14271 * **Note:** This method mutates `object`.
14272 *
14273 * @static
14274 * @since 0.1.0
14275 * @memberOf _
14276 * @category Object
14277 * @param {Object} object The destination object.
14278 * @param {...Object} [sources] The source objects.
14279 * @returns {Object} Returns `object`.
14280 * @see _.defaultsDeep
14281 * @example
14282 *
14283 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
14284 * // => { 'a': 1, 'b': 2 }
14285 */
14286 var defaults = baseRest(function(object, sources) {
14287 object = Object(object);
14288
14289 var index = -1;
14290 var length = sources.length;
14291 var guard = length > 2 ? sources[2] : undefined;
14292
14293 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
14294 length = 1;
14295 }
14296
14297 while (++index < length) {
14298 var source = sources[index];
14299 var props = keysIn(source);
14300 var propsIndex = -1;
14301 var propsLength = props.length;
14302
14303 while (++propsIndex < propsLength) {
14304 var key = props[propsIndex];
14305 var value = object[key];
14306
14307 if (value === undefined ||
14308 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
14309 object[key] = source[key];
14310 }
14311 }
14312 }
14313
14314 return object;
14315 });
14316
14317 /**
14318 * This method is like `_.defaults` except that it recursively assigns
14319 * default properties.
14320 *
14321 * **Note:** This method mutates `object`.
14322 *
14323 * @static
14324 * @memberOf _
14325 * @since 3.10.0
14326 * @category Object
14327 * @param {Object} object The destination object.
14328 * @param {...Object} [sources] The source objects.
14329 * @returns {Object} Returns `object`.
14330 * @see _.defaults
14331 * @example
14332 *
14333 * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
14334 * // => { 'a': { 'b': 2, 'c': 3 } }
14335 */
14336 var defaultsDeep = baseRest(function(args) {
14337 args.push(undefined, customDefaultsMerge);
14338 return apply(mergeWith, undefined, args);
14339 });
14340
14341 /**
14342 * This method is like `_.find` except that it returns the key of the first
14343 * element `predicate` returns truthy for instead of the element itself.
14344 *
14345 * @static
14346 * @memberOf _
14347 * @since 1.1.0
14348 * @category Object
14349 * @param {Object} object The object to inspect.
14350 * @param {Function} [predicate=_.identity] The function invoked per iteration.
14351 * @returns {string|undefined} Returns the key of the matched element,
14352 * else `undefined`.
14353 * @example
14354 *
14355 * var users = {
14356 * 'barney': { 'age': 36, 'active': true },
14357 * 'fred': { 'age': 40, 'active': false },
14358 * 'pebbles': { 'age': 1, 'active': true }
14359 * };
14360 *
14361 * _.findKey(users, function(o) { return o.age < 40; });
14362 * // => 'barney' (iteration order is not guaranteed)
14363 *
14364 * // The `_.matches` iteratee shorthand.
14365 * _.findKey(users, { 'age': 1, 'active': true });
14366 * // => 'pebbles'
14367 *
14368 * // The `_.matchesProperty` iteratee shorthand.
14369 * _.findKey(users, ['active', false]);
14370 * // => 'fred'
14371 *
14372 * // The `_.property` iteratee shorthand.
14373 * _.findKey(users, 'active');
14374 * // => 'barney'
14375 */
14376 function findKey(object, predicate) {
14377 return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
14378 }
14379
14380 /**
14381 * This method is like `_.findKey` except that it iterates over elements of
14382 * a collection in the opposite order.
14383 *
14384 * @static
14385 * @memberOf _
14386 * @since 2.0.0
14387 * @category Object
14388 * @param {Object} object The object to inspect.
14389 * @param {Function} [predicate=_.identity] The function invoked per iteration.
14390 * @returns {string|undefined} Returns the key of the matched element,
14391 * else `undefined`.
14392 * @example
14393 *
14394 * var users = {
14395 * 'barney': { 'age': 36, 'active': true },
14396 * 'fred': { 'age': 40, 'active': false },
14397 * 'pebbles': { 'age': 1, 'active': true }
14398 * };
14399 *
14400 * _.findLastKey(users, function(o) { return o.age < 40; });
14401 * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
14402 *
14403 * // The `_.matches` iteratee shorthand.
14404 * _.findLastKey(users, { 'age': 36, 'active': true });
14405 * // => 'barney'
14406 *
14407 * // The `_.matchesProperty` iteratee shorthand.
14408 * _.findLastKey(users, ['active', false]);
14409 * // => 'fred'
14410 *
14411 * // The `_.property` iteratee shorthand.
14412 * _.findLastKey(users, 'active');
14413 * // => 'pebbles'
14414 */
14415 function findLastKey(object, predicate) {
14416 return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
14417 }
14418
14419 /**
14420 * Iterates over own and inherited enumerable string keyed properties of an
14421 * object and invokes `iteratee` for each property. The iteratee is invoked
14422 * with three arguments: (value, key, object). Iteratee functions may exit
14423 * iteration early by explicitly returning `false`.
14424 *
14425 * @static
14426 * @memberOf _
14427 * @since 0.3.0
14428 * @category Object
14429 * @param {Object} object The object to iterate over.
14430 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14431 * @returns {Object} Returns `object`.
14432 * @see _.forInRight
14433 * @example
14434 *
14435 * function Foo() {
14436 * this.a = 1;
14437 * this.b = 2;
14438 * }
14439 *
14440 * Foo.prototype.c = 3;
14441 *
14442 * _.forIn(new Foo, function(value, key) {
14443 * console.log(key);
14444 * });
14445 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
14446 */
14447 function forIn(object, iteratee) {
14448 return object == null
14449 ? object
14450 : baseFor(object, getIteratee(iteratee, 3), keysIn);
14451 }
14452
14453 /**
14454 * This method is like `_.forIn` except that it iterates over properties of
14455 * `object` in the opposite order.
14456 *
14457 * @static
14458 * @memberOf _
14459 * @since 2.0.0
14460 * @category Object
14461 * @param {Object} object The object to iterate over.
14462 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14463 * @returns {Object} Returns `object`.
14464 * @see _.forIn
14465 * @example
14466 *
14467 * function Foo() {
14468 * this.a = 1;
14469 * this.b = 2;
14470 * }
14471 *
14472 * Foo.prototype.c = 3;
14473 *
14474 * _.forInRight(new Foo, function(value, key) {
14475 * console.log(key);
14476 * });
14477 * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
14478 */
14479 function forInRight(object, iteratee) {
14480 return object == null
14481 ? object
14482 : baseForRight(object, getIteratee(iteratee, 3), keysIn);
14483 }
14484
14485 /**
14486 * Iterates over own enumerable string keyed properties of an object and
14487 * invokes `iteratee` for each property. The iteratee is invoked with three
14488 * arguments: (value, key, object). Iteratee functions may exit iteration
14489 * early by explicitly returning `false`.
14490 *
14491 * @static
14492 * @memberOf _
14493 * @since 0.3.0
14494 * @category Object
14495 * @param {Object} object The object to iterate over.
14496 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14497 * @returns {Object} Returns `object`.
14498 * @see _.forOwnRight
14499 * @example
14500 *
14501 * function Foo() {
14502 * this.a = 1;
14503 * this.b = 2;
14504 * }
14505 *
14506 * Foo.prototype.c = 3;
14507 *
14508 * _.forOwn(new Foo, function(value, key) {
14509 * console.log(key);
14510 * });
14511 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
14512 */
14513 function forOwn(object, iteratee) {
14514 return object && baseForOwn(object, getIteratee(iteratee, 3));
14515 }
14516
14517 /**
14518 * This method is like `_.forOwn` except that it iterates over properties of
14519 * `object` in the opposite order.
14520 *
14521 * @static
14522 * @memberOf _
14523 * @since 2.0.0
14524 * @category Object
14525 * @param {Object} object The object to iterate over.
14526 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14527 * @returns {Object} Returns `object`.
14528 * @see _.forOwn
14529 * @example
14530 *
14531 * function Foo() {
14532 * this.a = 1;
14533 * this.b = 2;
14534 * }
14535 *
14536 * Foo.prototype.c = 3;
14537 *
14538 * _.forOwnRight(new Foo, function(value, key) {
14539 * console.log(key);
14540 * });
14541 * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
14542 */
14543 function forOwnRight(object, iteratee) {
14544 return object && baseForOwnRight(object, getIteratee(iteratee, 3));
14545 }
14546
14547 /**
14548 * Creates an array of function property names from own enumerable properties
14549 * of `object`.
14550 *
14551 * @static
14552 * @since 0.1.0
14553 * @memberOf _
14554 * @category Object
14555 * @param {Object} object The object to inspect.
14556 * @returns {Array} Returns the function names.
14557 * @see _.functionsIn
14558 * @example
14559 *
14560 * function Foo() {
14561 * this.a = _.constant('a');
14562 * this.b = _.constant('b');
14563 * }
14564 *
14565 * Foo.prototype.c = _.constant('c');
14566 *
14567 * _.functions(new Foo);
14568 * // => ['a', 'b']
14569 */
14570 function functions(object) {
14571 return object == null ? [] : baseFunctions(object, keys(object));
14572 }
14573
14574 /**
14575 * Creates an array of function property names from own and inherited
14576 * enumerable properties of `object`.
14577 *
14578 * @static
14579 * @memberOf _
14580 * @since 4.0.0
14581 * @category Object
14582 * @param {Object} object The object to inspect.
14583 * @returns {Array} Returns the function names.
14584 * @see _.functions
14585 * @example
14586 *
14587 * function Foo() {
14588 * this.a = _.constant('a');
14589 * this.b = _.constant('b');
14590 * }
14591 *
14592 * Foo.prototype.c = _.constant('c');
14593 *
14594 * _.functionsIn(new Foo);
14595 * // => ['a', 'b', 'c']
14596 */
14597 function functionsIn(object) {
14598 return object == null ? [] : baseFunctions(object, keysIn(object));
14599 }
14600
14601 /**
14602 * Gets the value at `path` of `object`. If the resolved value is
14603 * `undefined`, the `defaultValue` is returned in its place.
14604 *
14605 * @static
14606 * @memberOf _
14607 * @since 3.7.0
14608 * @category Object
14609 * @param {Object} object The object to query.
14610 * @param {Array|string} path The path of the property to get.
14611 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
14612 * @returns {*} Returns the resolved value.
14613 * @example
14614 *
14615 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
14616 *
14617 * _.get(object, 'a[0].b.c');
14618 * // => 3
14619 *
14620 * _.get(object, ['a', '0', 'b', 'c']);
14621 * // => 3
14622 *
14623 * _.get(object, 'a.b.c', 'default');
14624 * // => 'default'
14625 */
14626 function get(object, path, defaultValue) {
14627 var result = object == null ? undefined : baseGet(object, path);
14628 return result === undefined ? defaultValue : result;
14629 }
14630
14631 /**
14632 * Checks if `path` is a direct property of `object`.
14633 *
14634 * @static
14635 * @since 0.1.0
14636 * @memberOf _
14637 * @category Object
14638 * @param {Object} object The object to query.
14639 * @param {Array|string} path The path to check.
14640 * @returns {boolean} Returns `true` if `path` exists, else `false`.
14641 * @example
14642 *
14643 * var object = { 'a': { 'b': 2 } };
14644 * var other = _.create({ 'a': _.create({ 'b': 2 }) });
14645 *
14646 * _.has(object, 'a');
14647 * // => true
14648 *
14649 * _.has(object, 'a.b');
14650 * // => true
14651 *
14652 * _.has(object, ['a', 'b']);
14653 * // => true
14654 *
14655 * _.has(other, 'a');
14656 * // => false
14657 */
14658 function has(object, path) {
14659 return object != null && hasPath(object, path, baseHas);
14660 }
14661
14662 /**
14663 * Checks if `path` is a direct or inherited property of `object`.
14664 *
14665 * @static
14666 * @memberOf _
14667 * @since 4.0.0
14668 * @category Object
14669 * @param {Object} object The object to query.
14670 * @param {Array|string} path The path to check.
14671 * @returns {boolean} Returns `true` if `path` exists, else `false`.
14672 * @example
14673 *
14674 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
14675 *
14676 * _.hasIn(object, 'a');
14677 * // => true
14678 *
14679 * _.hasIn(object, 'a.b');
14680 * // => true
14681 *
14682 * _.hasIn(object, ['a', 'b']);
14683 * // => true
14684 *
14685 * _.hasIn(object, 'b');
14686 * // => false
14687 */
14688 function hasIn(object, path) {
14689 return object != null && hasPath(object, path, baseHasIn);
14690 }
14691
14692 /**
14693 * Creates an object composed of the inverted keys and values of `object`.
14694 * If `object` contains duplicate values, subsequent values overwrite
14695 * property assignments of previous values.
14696 *
14697 * @static
14698 * @memberOf _
14699 * @since 0.7.0
14700 * @category Object
14701 * @param {Object} object The object to invert.
14702 * @returns {Object} Returns the new inverted object.
14703 * @example
14704 *
14705 * var object = { 'a': 1, 'b': 2, 'c': 1 };
14706 *
14707 * _.invert(object);
14708 * // => { '1': 'c', '2': 'b' }
14709 */
14710 var invert = createInverter(function(result, value, key) {
14711 if (value != null &&
14712 typeof value.toString != 'function') {
14713 value = nativeObjectToString.call(value);
14714 }
14715
14716 result[value] = key;
14717 }, constant(identity));
14718
14719 /**
14720 * This method is like `_.invert` except that the inverted object is generated
14721 * from the results of running each element of `object` thru `iteratee`. The
14722 * corresponding inverted value of each inverted key is an array of keys
14723 * responsible for generating the inverted value. The iteratee is invoked
14724 * with one argument: (value).
14725 *
14726 * @static
14727 * @memberOf _
14728 * @since 4.1.0
14729 * @category Object
14730 * @param {Object} object The object to invert.
14731 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
14732 * @returns {Object} Returns the new inverted object.
14733 * @example
14734 *
14735 * var object = { 'a': 1, 'b': 2, 'c': 1 };
14736 *
14737 * _.invertBy(object);
14738 * // => { '1': ['a', 'c'], '2': ['b'] }
14739 *
14740 * _.invertBy(object, function(value) {
14741 * return 'group' + value;
14742 * });
14743 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
14744 */
14745 var invertBy = createInverter(function(result, value, key) {
14746 if (value != null &&
14747 typeof value.toString != 'function') {
14748 value = nativeObjectToString.call(value);
14749 }
14750
14751 if (hasOwnProperty.call(result, value)) {
14752 result[value].push(key);
14753 } else {
14754 result[value] = [key];
14755 }
14756 }, getIteratee);
14757
14758 /**
14759 * Invokes the method at `path` of `object`.
14760 *
14761 * @static
14762 * @memberOf _
14763 * @since 4.0.0
14764 * @category Object
14765 * @param {Object} object The object to query.
14766 * @param {Array|string} path The path of the method to invoke.
14767 * @param {...*} [args] The arguments to invoke the method with.
14768 * @returns {*} Returns the result of the invoked method.
14769 * @example
14770 *
14771 * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
14772 *
14773 * _.invoke(object, 'a[0].b.c.slice', 1, 3);
14774 * // => [2, 3]
14775 */
14776 var invoke = baseRest(baseInvoke);
14777
14778 /**
14779 * Creates an array of the own enumerable property names of `object`.
14780 *
14781 * **Note:** Non-object values are coerced to objects. See the
14782 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
14783 * for more details.
14784 *
14785 * @static
14786 * @since 0.1.0
14787 * @memberOf _
14788 * @category Object
14789 * @param {Object} object The object to query.
14790 * @returns {Array} Returns the array of property names.
14791 * @example
14792 *
14793 * function Foo() {
14794 * this.a = 1;
14795 * this.b = 2;
14796 * }
14797 *
14798 * Foo.prototype.c = 3;
14799 *
14800 * _.keys(new Foo);
14801 * // => ['a', 'b'] (iteration order is not guaranteed)
14802 *
14803 * _.keys('hi');
14804 * // => ['0', '1']
14805 */
14806 function keys(object) {
14807 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
14808 }
14809
14810 /**
14811 * Creates an array of the own and inherited enumerable property names of `object`.
14812 *
14813 * **Note:** Non-object values are coerced to objects.
14814 *
14815 * @static
14816 * @memberOf _
14817 * @since 3.0.0
14818 * @category Object
14819 * @param {Object} object The object to query.
14820 * @returns {Array} Returns the array of property names.
14821 * @example
14822 *
14823 * function Foo() {
14824 * this.a = 1;
14825 * this.b = 2;
14826 * }
14827 *
14828 * Foo.prototype.c = 3;
14829 *
14830 * _.keysIn(new Foo);
14831 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
14832 */
14833 function keysIn(object) {
14834 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
14835 }
14836
14837 /**
14838 * The opposite of `_.mapValues`; this method creates an object with the
14839 * same values as `object` and keys generated by running each own enumerable
14840 * string keyed property of `object` thru `iteratee`. The iteratee is invoked
14841 * with three arguments: (value, key, object).
14842 *
14843 * @static
14844 * @memberOf _
14845 * @since 3.8.0
14846 * @category Object
14847 * @param {Object} object The object to iterate over.
14848 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14849 * @returns {Object} Returns the new mapped object.
14850 * @see _.mapValues
14851 * @example
14852 *
14853 * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
14854 * return key + value;
14855 * });
14856 * // => { 'a1': 1, 'b2': 2 }
14857 */
14858 function mapKeys(object, iteratee) {
14859 var result = {};
14860 iteratee = getIteratee(iteratee, 3);
14861
14862 baseForOwn(object, function(value, key, object) {
14863 baseAssignValue(result, iteratee(value, key, object), value);
14864 });
14865 return result;
14866 }
14867
14868 /**
14869 * Creates an object with the same keys as `object` and values generated
14870 * by running each own enumerable string keyed property of `object` thru
14871 * `iteratee`. The iteratee is invoked with three arguments:
14872 * (value, key, object).
14873 *
14874 * @static
14875 * @memberOf _
14876 * @since 2.4.0
14877 * @category Object
14878 * @param {Object} object The object to iterate over.
14879 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14880 * @returns {Object} Returns the new mapped object.
14881 * @see _.mapKeys
14882 * @example
14883 *
14884 * var users = {
14885 * 'fred': { 'user': 'fred', 'age': 40 },
14886 * 'pebbles': { 'user': 'pebbles', 'age': 1 }
14887 * };
14888 *
14889 * _.mapValues(users, function(o) { return o.age; });
14890 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
14891 *
14892 * // The `_.property` iteratee shorthand.
14893 * _.mapValues(users, 'age');
14894 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
14895 */
14896 function mapValues(object, iteratee) {
14897 var result = {};
14898 iteratee = getIteratee(iteratee, 3);
14899
14900 baseForOwn(object, function(value, key, object) {
14901 baseAssignValue(result, key, iteratee(value, key, object));
14902 });
14903 return result;
14904 }
14905
14906 /**
14907 * This method is like `_.assign` except that it recursively merges own and
14908 * inherited enumerable string keyed properties of source objects into the
14909 * destination object. Source properties that resolve to `undefined` are
14910 * skipped if a destination value exists. Array and plain object properties
14911 * are merged recursively. Other objects and value types are overridden by
14912 * assignment. Source objects are applied from left to right. Subsequent
14913 * sources overwrite property assignments of previous sources.
14914 *
14915 * **Note:** This method mutates `object`.
14916 *
14917 * @static
14918 * @memberOf _
14919 * @since 0.5.0
14920 * @category Object
14921 * @param {Object} object The destination object.
14922 * @param {...Object} [sources] The source objects.
14923 * @returns {Object} Returns `object`.
14924 * @example
14925 *
14926 * var object = {
14927 * 'a': [{ 'b': 2 }, { 'd': 4 }]
14928 * };
14929 *
14930 * var other = {
14931 * 'a': [{ 'c': 3 }, { 'e': 5 }]
14932 * };
14933 *
14934 * _.merge(object, other);
14935 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
14936 */
14937 var merge = createAssigner(function(object, source, srcIndex) {
14938 baseMerge(object, source, srcIndex);
14939 });
14940
14941 /**
14942 * This method is like `_.merge` except that it accepts `customizer` which
14943 * is invoked to produce the merged values of the destination and source
14944 * properties. If `customizer` returns `undefined`, merging is handled by the
14945 * method instead. The `customizer` is invoked with six arguments:
14946 * (objValue, srcValue, key, object, source, stack).
14947 *
14948 * **Note:** This method mutates `object`.
14949 *
14950 * @static
14951 * @memberOf _
14952 * @since 4.0.0
14953 * @category Object
14954 * @param {Object} object The destination object.
14955 * @param {...Object} sources The source objects.
14956 * @param {Function} customizer The function to customize assigned values.
14957 * @returns {Object} Returns `object`.
14958 * @example
14959 *
14960 * function customizer(objValue, srcValue) {
14961 * if (_.isArray(objValue)) {
14962 * return objValue.concat(srcValue);
14963 * }
14964 * }
14965 *
14966 * var object = { 'a': [1], 'b': [2] };
14967 * var other = { 'a': [3], 'b': [4] };
14968 *
14969 * _.mergeWith(object, other, customizer);
14970 * // => { 'a': [1, 3], 'b': [2, 4] }
14971 */
14972 var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
14973 baseMerge(object, source, srcIndex, customizer);
14974 });
14975
14976 /**
14977 * The opposite of `_.pick`; this method creates an object composed of the
14978 * own and inherited enumerable property paths of `object` that are not omitted.
14979 *
14980 * **Note:** This method is considerably slower than `_.pick`.
14981 *
14982 * @static
14983 * @since 0.1.0
14984 * @memberOf _
14985 * @category Object
14986 * @param {Object} object The source object.
14987 * @param {...(string|string[])} [paths] The property paths to omit.
14988 * @returns {Object} Returns the new object.
14989 * @example
14990 *
14991 * var object = { 'a': 1, 'b': '2', 'c': 3 };
14992 *
14993 * _.omit(object, ['a', 'c']);
14994 * // => { 'b': '2' }
14995 */
14996 var omit = flatRest(function(object, paths) {
14997 var result = {};
14998 if (object == null) {
14999 return result;
15000 }
15001 var isDeep = false;
15002 paths = arrayMap(paths, function(path) {
15003 path = castPath(path, object);
15004 isDeep || (isDeep = path.length > 1);
15005 return path;
15006 });
15007 copyObject(object, getAllKeysIn(object), result);
15008 if (isDeep) {
15009 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
15010 }
15011 var length = paths.length;
15012 while (length--) {
15013 baseUnset(result, paths[length]);
15014 }
15015 return result;
15016 });
15017
15018 /**
15019 * The opposite of `_.pickBy`; this method creates an object composed of
15020 * the own and inherited enumerable string keyed properties of `object` that
15021 * `predicate` doesn't return truthy for. The predicate is invoked with two
15022 * arguments: (value, key).
15023 *
15024 * @static
15025 * @memberOf _
15026 * @since 4.0.0
15027 * @category Object
15028 * @param {Object} object The source object.
15029 * @param {Function} [predicate=_.identity] The function invoked per property.
15030 * @returns {Object} Returns the new object.
15031 * @example
15032 *
15033 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15034 *
15035 * _.omitBy(object, _.isNumber);
15036 * // => { 'b': '2' }
15037 */
15038 function omitBy(object, predicate) {
15039 return pickBy(object, negate(getIteratee(predicate)));
15040 }
15041
15042 /**
15043 * Creates an object composed of the picked `object` properties.
15044 *
15045 * @static
15046 * @since 0.1.0
15047 * @memberOf _
15048 * @category Object
15049 * @param {Object} object The source object.
15050 * @param {...(string|string[])} [paths] The property paths to pick.
15051 * @returns {Object} Returns the new object.
15052 * @example
15053 *
15054 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15055 *
15056 * _.pick(object, ['a', 'c']);
15057 * // => { 'a': 1, 'c': 3 }
15058 */
15059 var pick = flatRest(function(object, paths) {
15060 return object == null ? {} : basePick(object, paths);
15061 });
15062
15063 /**
15064 * Creates an object composed of the `object` properties `predicate` returns
15065 * truthy for. The predicate is invoked with two arguments: (value, key).
15066 *
15067 * @static
15068 * @memberOf _
15069 * @since 4.0.0
15070 * @category Object
15071 * @param {Object} object The source object.
15072 * @param {Function} [predicate=_.identity] The function invoked per property.
15073 * @returns {Object} Returns the new object.
15074 * @example
15075 *
15076 * var object = { 'a': 1, 'b': '2', 'c': 3 };
15077 *
15078 * _.pickBy(object, _.isNumber);
15079 * // => { 'a': 1, 'c': 3 }
15080 */
15081 function pickBy(object, predicate) {
15082 if (object == null) {
15083 return {};
15084 }
15085 var props = arrayMap(getAllKeysIn(object), function(prop) {
15086 return [prop];
15087 });
15088 predicate = getIteratee(predicate);
15089 return basePickBy(object, props, function(value, path) {
15090 return predicate(value, path[0]);
15091 });
15092 }
15093
15094 /**
15095 * This method is like `_.get` except that if the resolved value is a
15096 * function it's invoked with the `this` binding of its parent object and
15097 * its result is returned.
15098 *
15099 * @static
15100 * @since 0.1.0
15101 * @memberOf _
15102 * @category Object
15103 * @param {Object} object The object to query.
15104 * @param {Array|string} path The path of the property to resolve.
15105 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
15106 * @returns {*} Returns the resolved value.
15107 * @example
15108 *
15109 * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
15110 *
15111 * _.result(object, 'a[0].b.c1');
15112 * // => 3
15113 *
15114 * _.result(object, 'a[0].b.c2');
15115 * // => 4
15116 *
15117 * _.result(object, 'a[0].b.c3', 'default');
15118 * // => 'default'
15119 *
15120 * _.result(object, 'a[0].b.c3', _.constant('default'));
15121 * // => 'default'
15122 */
15123 function result(object, path, defaultValue) {
15124 path = castPath(path, object);
15125
15126 var index = -1,
15127 length = path.length;
15128
15129 // Ensure the loop is entered when path is empty.
15130 if (!length) {
15131 length = 1;
15132 object = undefined;
15133 }
15134 while (++index < length) {
15135 var value = object == null ? undefined : object[toKey(path[index])];
15136 if (value === undefined) {
15137 index = length;
15138 value = defaultValue;
15139 }
15140 object = isFunction(value) ? value.call(object) : value;
15141 }
15142 return object;
15143 }
15144
15145 /**
15146 * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
15147 * it's created. Arrays are created for missing index properties while objects
15148 * are created for all other missing properties. Use `_.setWith` to customize
15149 * `path` creation.
15150 *
15151 * **Note:** This method mutates `object`.
15152 *
15153 * @static
15154 * @memberOf _
15155 * @since 3.7.0
15156 * @category Object
15157 * @param {Object} object The object to modify.
15158 * @param {Array|string} path The path of the property to set.
15159 * @param {*} value The value to set.
15160 * @returns {Object} Returns `object`.
15161 * @example
15162 *
15163 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
15164 *
15165 * _.set(object, 'a[0].b.c', 4);
15166 * console.log(object.a[0].b.c);
15167 * // => 4
15168 *
15169 * _.set(object, ['x', '0', 'y', 'z'], 5);
15170 * console.log(object.x[0].y.z);
15171 * // => 5
15172 */
15173 function set(object, path, value) {
15174 return object == null ? object : baseSet(object, path, value);
15175 }
15176
15177 /**
15178 * This method is like `_.set` except that it accepts `customizer` which is
15179 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
15180 * path creation is handled by the method instead. The `customizer` is invoked
15181 * with three arguments: (nsValue, key, nsObject).
15182 *
15183 * **Note:** This method mutates `object`.
15184 *
15185 * @static
15186 * @memberOf _
15187 * @since 4.0.0
15188 * @category Object
15189 * @param {Object} object The object to modify.
15190 * @param {Array|string} path The path of the property to set.
15191 * @param {*} value The value to set.
15192 * @param {Function} [customizer] The function to customize assigned values.
15193 * @returns {Object} Returns `object`.
15194 * @example
15195 *
15196 * var object = {};
15197 *
15198 * _.setWith(object, '[0][1]', 'a', Object);
15199 * // => { '0': { '1': 'a' } }
15200 */
15201 function setWith(object, path, value, customizer) {
15202 customizer = typeof customizer == 'function' ? customizer : undefined;
15203 return object == null ? object : baseSet(object, path, value, customizer);
15204 }
15205
15206 /**
15207 * Creates an array of own enumerable string keyed-value pairs for `object`
15208 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
15209 * entries are returned.
15210 *
15211 * @static
15212 * @memberOf _
15213 * @since 4.0.0
15214 * @alias entries
15215 * @category Object
15216 * @param {Object} object The object to query.
15217 * @returns {Array} Returns the key-value pairs.
15218 * @example
15219 *
15220 * function Foo() {
15221 * this.a = 1;
15222 * this.b = 2;
15223 * }
15224 *
15225 * Foo.prototype.c = 3;
15226 *
15227 * _.toPairs(new Foo);
15228 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
15229 */
15230 var toPairs = createToPairs(keys);
15231
15232 /**
15233 * Creates an array of own and inherited enumerable string keyed-value pairs
15234 * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
15235 * or set, its entries are returned.
15236 *
15237 * @static
15238 * @memberOf _
15239 * @since 4.0.0
15240 * @alias entriesIn
15241 * @category Object
15242 * @param {Object} object The object to query.
15243 * @returns {Array} Returns the key-value pairs.
15244 * @example
15245 *
15246 * function Foo() {
15247 * this.a = 1;
15248 * this.b = 2;
15249 * }
15250 *
15251 * Foo.prototype.c = 3;
15252 *
15253 * _.toPairsIn(new Foo);
15254 * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
15255 */
15256 var toPairsIn = createToPairs(keysIn);
15257
15258 /**
15259 * An alternative to `_.reduce`; this method transforms `object` to a new
15260 * `accumulator` object which is the result of running each of its own
15261 * enumerable string keyed properties thru `iteratee`, with each invocation
15262 * potentially mutating the `accumulator` object. If `accumulator` is not
15263 * provided, a new object with the same `[[Prototype]]` will be used. The
15264 * iteratee is invoked with four arguments: (accumulator, value, key, object).
15265 * Iteratee functions may exit iteration early by explicitly returning `false`.
15266 *
15267 * @static
15268 * @memberOf _
15269 * @since 1.3.0
15270 * @category Object
15271 * @param {Object} object The object to iterate over.
15272 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15273 * @param {*} [accumulator] The custom accumulator value.
15274 * @returns {*} Returns the accumulated value.
15275 * @example
15276 *
15277 * _.transform([2, 3, 4], function(result, n) {
15278 * result.push(n *= n);
15279 * return n % 2 == 0;
15280 * }, []);
15281 * // => [4, 9]
15282 *
15283 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
15284 * (result[value] || (result[value] = [])).push(key);
15285 * }, {});
15286 * // => { '1': ['a', 'c'], '2': ['b'] }
15287 */
15288 function transform(object, iteratee, accumulator) {
15289 var isArr = isArray(object),
15290 isArrLike = isArr || isBuffer(object) || isTypedArray(object);
15291
15292 iteratee = getIteratee(iteratee, 4);
15293 if (accumulator == null) {
15294 var Ctor = object && object.constructor;
15295 if (isArrLike) {
15296 accumulator = isArr ? new Ctor : [];
15297 }
15298 else if (isObject(object)) {
15299 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
15300 }
15301 else {
15302 accumulator = {};
15303 }
15304 }
15305 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
15306 return iteratee(accumulator, value, index, object);
15307 });
15308 return accumulator;
15309 }
15310
15311 /**
15312 * Removes the property at `path` of `object`.
15313 *
15314 * **Note:** This method mutates `object`.
15315 *
15316 * @static
15317 * @memberOf _
15318 * @since 4.0.0
15319 * @category Object
15320 * @param {Object} object The object to modify.
15321 * @param {Array|string} path The path of the property to unset.
15322 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
15323 * @example
15324 *
15325 * var object = { 'a': [{ 'b': { 'c': 7 } }] };
15326 * _.unset(object, 'a[0].b.c');
15327 * // => true
15328 *
15329 * console.log(object);
15330 * // => { 'a': [{ 'b': {} }] };
15331 *
15332 * _.unset(object, ['a', '0', 'b', 'c']);
15333 * // => true
15334 *
15335 * console.log(object);
15336 * // => { 'a': [{ 'b': {} }] };
15337 */
15338 function unset(object, path) {
15339 return object == null ? true : baseUnset(object, path);
15340 }
15341
15342 /**
15343 * This method is like `_.set` except that accepts `updater` to produce the
15344 * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
15345 * is invoked with one argument: (value).
15346 *
15347 * **Note:** This method mutates `object`.
15348 *
15349 * @static
15350 * @memberOf _
15351 * @since 4.6.0
15352 * @category Object
15353 * @param {Object} object The object to modify.
15354 * @param {Array|string} path The path of the property to set.
15355 * @param {Function} updater The function to produce the updated value.
15356 * @returns {Object} Returns `object`.
15357 * @example
15358 *
15359 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
15360 *
15361 * _.update(object, 'a[0].b.c', function(n) { return n * n; });
15362 * console.log(object.a[0].b.c);
15363 * // => 9
15364 *
15365 * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
15366 * console.log(object.x[0].y.z);
15367 * // => 0
15368 */
15369 function update(object, path, updater) {
15370 return object == null ? object : baseUpdate(object, path, castFunction(updater));
15371 }
15372
15373 /**
15374 * This method is like `_.update` except that it accepts `customizer` which is
15375 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
15376 * path creation is handled by the method instead. The `customizer` is invoked
15377 * with three arguments: (nsValue, key, nsObject).
15378 *
15379 * **Note:** This method mutates `object`.
15380 *
15381 * @static
15382 * @memberOf _
15383 * @since 4.6.0
15384 * @category Object
15385 * @param {Object} object The object to modify.
15386 * @param {Array|string} path The path of the property to set.
15387 * @param {Function} updater The function to produce the updated value.
15388 * @param {Function} [customizer] The function to customize assigned values.
15389 * @returns {Object} Returns `object`.
15390 * @example
15391 *
15392 * var object = {};
15393 *
15394 * _.updateWith(object, '[0][1]', _.constant('a'), Object);
15395 * // => { '0': { '1': 'a' } }
15396 */
15397 function updateWith(object, path, updater, customizer) {
15398 customizer = typeof customizer == 'function' ? customizer : undefined;
15399 return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
15400 }
15401
15402 /**
15403 * Creates an array of the own enumerable string keyed property values of `object`.
15404 *
15405 * **Note:** Non-object values are coerced to objects.
15406 *
15407 * @static
15408 * @since 0.1.0
15409 * @memberOf _
15410 * @category Object
15411 * @param {Object} object The object to query.
15412 * @returns {Array} Returns the array of property values.
15413 * @example
15414 *
15415 * function Foo() {
15416 * this.a = 1;
15417 * this.b = 2;
15418 * }
15419 *
15420 * Foo.prototype.c = 3;
15421 *
15422 * _.values(new Foo);
15423 * // => [1, 2] (iteration order is not guaranteed)
15424 *
15425 * _.values('hi');
15426 * // => ['h', 'i']
15427 */
15428 function values(object) {
15429 return object == null ? [] : baseValues(object, keys(object));
15430 }
15431
15432 /**
15433 * Creates an array of the own and inherited enumerable string keyed property
15434 * values of `object`.
15435 *
15436 * **Note:** Non-object values are coerced to objects.
15437 *
15438 * @static
15439 * @memberOf _
15440 * @since 3.0.0
15441 * @category Object
15442 * @param {Object} object The object to query.
15443 * @returns {Array} Returns the array of property values.
15444 * @example
15445 *
15446 * function Foo() {
15447 * this.a = 1;
15448 * this.b = 2;
15449 * }
15450 *
15451 * Foo.prototype.c = 3;
15452 *
15453 * _.valuesIn(new Foo);
15454 * // => [1, 2, 3] (iteration order is not guaranteed)
15455 */
15456 function valuesIn(object) {
15457 return object == null ? [] : baseValues(object, keysIn(object));
15458 }
15459
15460 /*------------------------------------------------------------------------*/
15461
15462 /**
15463 * Clamps `number` within the inclusive `lower` and `upper` bounds.
15464 *
15465 * @static
15466 * @memberOf _
15467 * @since 4.0.0
15468 * @category Number
15469 * @param {number} number The number to clamp.
15470 * @param {number} [lower] The lower bound.
15471 * @param {number} upper The upper bound.
15472 * @returns {number} Returns the clamped number.
15473 * @example
15474 *
15475 * _.clamp(-10, -5, 5);
15476 * // => -5
15477 *
15478 * _.clamp(10, -5, 5);
15479 * // => 5
15480 */
15481 function clamp(number, lower, upper) {
15482 if (upper === undefined) {
15483 upper = lower;
15484 lower = undefined;
15485 }
15486 if (upper !== undefined) {
15487 upper = toNumber(upper);
15488 upper = upper === upper ? upper : 0;
15489 }
15490 if (lower !== undefined) {
15491 lower = toNumber(lower);
15492 lower = lower === lower ? lower : 0;
15493 }
15494 return baseClamp(toNumber(number), lower, upper);
15495 }
15496
15497 /**
15498 * Checks if `n` is between `start` and up to, but not including, `end`. If
15499 * `end` is not specified, it's set to `start` with `start` then set to `0`.
15500 * If `start` is greater than `end` the params are swapped to support
15501 * negative ranges.
15502 *
15503 * @static
15504 * @memberOf _
15505 * @since 3.3.0
15506 * @category Number
15507 * @param {number} number The number to check.
15508 * @param {number} [start=0] The start of the range.
15509 * @param {number} end The end of the range.
15510 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
15511 * @see _.range, _.rangeRight
15512 * @example
15513 *
15514 * _.inRange(3, 2, 4);
15515 * // => true
15516 *
15517 * _.inRange(4, 8);
15518 * // => true
15519 *
15520 * _.inRange(4, 2);
15521 * // => false
15522 *
15523 * _.inRange(2, 2);
15524 * // => false
15525 *
15526 * _.inRange(1.2, 2);
15527 * // => true
15528 *
15529 * _.inRange(5.2, 4);
15530 * // => false
15531 *
15532 * _.inRange(-3, -2, -6);
15533 * // => true
15534 */
15535 function inRange(number, start, end) {
15536 start = toFinite(start);
15537 if (end === undefined) {
15538 end = start;
15539 start = 0;
15540 } else {
15541 end = toFinite(end);
15542 }
15543 number = toNumber(number);
15544 return baseInRange(number, start, end);
15545 }
15546
15547 /**
15548 * Produces a random number between the inclusive `lower` and `upper` bounds.
15549 * If only one argument is provided a number between `0` and the given number
15550 * is returned. If `floating` is `true`, or either `lower` or `upper` are
15551 * floats, a floating-point number is returned instead of an integer.
15552 *
15553 * **Note:** JavaScript follows the IEEE-754 standard for resolving
15554 * floating-point values which can produce unexpected results.
15555 *
15556 * @static
15557 * @memberOf _
15558 * @since 0.7.0
15559 * @category Number
15560 * @param {number} [lower=0] The lower bound.
15561 * @param {number} [upper=1] The upper bound.
15562 * @param {boolean} [floating] Specify returning a floating-point number.
15563 * @returns {number} Returns the random number.
15564 * @example
15565 *
15566 * _.random(0, 5);
15567 * // => an integer between 0 and 5
15568 *
15569 * _.random(5);
15570 * // => also an integer between 0 and 5
15571 *
15572 * _.random(5, true);
15573 * // => a floating-point number between 0 and 5
15574 *
15575 * _.random(1.2, 5.2);
15576 * // => a floating-point number between 1.2 and 5.2
15577 */
15578 function random(lower, upper, floating) {
15579 if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
15580 upper = floating = undefined;
15581 }
15582 if (floating === undefined) {
15583 if (typeof upper == 'boolean') {
15584 floating = upper;
15585 upper = undefined;
15586 }
15587 else if (typeof lower == 'boolean') {
15588 floating = lower;
15589 lower = undefined;
15590 }
15591 }
15592 if (lower === undefined && upper === undefined) {
15593 lower = 0;
15594 upper = 1;
15595 }
15596 else {
15597 lower = toFinite(lower);
15598 if (upper === undefined) {
15599 upper = lower;
15600 lower = 0;
15601 } else {
15602 upper = toFinite(upper);
15603 }
15604 }
15605 if (lower > upper) {
15606 var temp = lower;
15607 lower = upper;
15608 upper = temp;
15609 }
15610 if (floating || lower % 1 || upper % 1) {
15611 var rand = nativeRandom();
15612 return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
15613 }
15614 return baseRandom(lower, upper);
15615 }
15616
15617 /*------------------------------------------------------------------------*/
15618
15619 /**
15620 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
15621 *
15622 * @static
15623 * @memberOf _
15624 * @since 3.0.0
15625 * @category String
15626 * @param {string} [string=''] The string to convert.
15627 * @returns {string} Returns the camel cased string.
15628 * @example
15629 *
15630 * _.camelCase('Foo Bar');
15631 * // => 'fooBar'
15632 *
15633 * _.camelCase('--foo-bar--');
15634 * // => 'fooBar'
15635 *
15636 * _.camelCase('__FOO_BAR__');
15637 * // => 'fooBar'
15638 */
15639 var camelCase = createCompounder(function(result, word, index) {
15640 word = word.toLowerCase();
15641 return result + (index ? capitalize(word) : word);
15642 });
15643
15644 /**
15645 * Converts the first character of `string` to upper case and the remaining
15646 * to lower case.
15647 *
15648 * @static
15649 * @memberOf _
15650 * @since 3.0.0
15651 * @category String
15652 * @param {string} [string=''] The string to capitalize.
15653 * @returns {string} Returns the capitalized string.
15654 * @example
15655 *
15656 * _.capitalize('FRED');
15657 * // => 'Fred'
15658 */
15659 function capitalize(string) {
15660 return upperFirst(toString(string).toLowerCase());
15661 }
15662
15663 /**
15664 * Deburrs `string` by converting
15665 * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
15666 * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
15667 * letters to basic Latin letters and removing
15668 * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
15669 *
15670 * @static
15671 * @memberOf _
15672 * @since 3.0.0
15673 * @category String
15674 * @param {string} [string=''] The string to deburr.
15675 * @returns {string} Returns the deburred string.
15676 * @example
15677 *
15678 * _.deburr('déjà vu');
15679 * // => 'deja vu'
15680 */
15681 function deburr(string) {
15682 string = toString(string);
15683 return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
15684 }
15685
15686 /**
15687 * Checks if `string` ends with the given target string.
15688 *
15689 * @static
15690 * @memberOf _
15691 * @since 3.0.0
15692 * @category String
15693 * @param {string} [string=''] The string to inspect.
15694 * @param {string} [target] The string to search for.
15695 * @param {number} [position=string.length] The position to search up to.
15696 * @returns {boolean} Returns `true` if `string` ends with `target`,
15697 * else `false`.
15698 * @example
15699 *
15700 * _.endsWith('abc', 'c');
15701 * // => true
15702 *
15703 * _.endsWith('abc', 'b');
15704 * // => false
15705 *
15706 * _.endsWith('abc', 'b', 2);
15707 * // => true
15708 */
15709 function endsWith(string, target, position) {
15710 string = toString(string);
15711 target = baseToString(target);
15712
15713 var length = string.length;
15714 position = position === undefined
15715 ? length
15716 : baseClamp(toInteger(position), 0, length);
15717
15718 var end = position;
15719 position -= target.length;
15720 return position >= 0 && string.slice(position, end) == target;
15721 }
15722
15723 /**
15724 * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
15725 * corresponding HTML entities.
15726 *
15727 * **Note:** No other characters are escaped. To escape additional
15728 * characters use a third-party library like [_he_](https://mths.be/he).
15729 *
15730 * Though the ">" character is escaped for symmetry, characters like
15731 * ">" and "/" don't need escaping in HTML and have no special meaning
15732 * unless they're part of a tag or unquoted attribute value. See
15733 * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
15734 * (under "semi-related fun fact") for more details.
15735 *
15736 * When working with HTML you should always
15737 * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
15738 * XSS vectors.
15739 *
15740 * @static
15741 * @since 0.1.0
15742 * @memberOf _
15743 * @category String
15744 * @param {string} [string=''] The string to escape.
15745 * @returns {string} Returns the escaped string.
15746 * @example
15747 *
15748 * _.escape('fred, barney, & pebbles');
15749 * // => 'fred, barney, &amp; pebbles'
15750 */
15751 function escape(string) {
15752 string = toString(string);
15753 return (string && reHasUnescapedHtml.test(string))
15754 ? string.replace(reUnescapedHtml, escapeHtmlChar)
15755 : string;
15756 }
15757
15758 /**
15759 * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
15760 * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
15761 *
15762 * @static
15763 * @memberOf _
15764 * @since 3.0.0
15765 * @category String
15766 * @param {string} [string=''] The string to escape.
15767 * @returns {string} Returns the escaped string.
15768 * @example
15769 *
15770 * _.escapeRegExp('[lodash](https://lodash.com/)');
15771 * // => '\[lodash\]\(https://lodash\.com/\)'
15772 */
15773 function escapeRegExp(string) {
15774 string = toString(string);
15775 return (string && reHasRegExpChar.test(string))
15776 ? string.replace(reRegExpChar, '\\$&')
15777 : string;
15778 }
15779
15780 /**
15781 * Converts `string` to
15782 * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
15783 *
15784 * @static
15785 * @memberOf _
15786 * @since 3.0.0
15787 * @category String
15788 * @param {string} [string=''] The string to convert.
15789 * @returns {string} Returns the kebab cased string.
15790 * @example
15791 *
15792 * _.kebabCase('Foo Bar');
15793 * // => 'foo-bar'
15794 *
15795 * _.kebabCase('fooBar');
15796 * // => 'foo-bar'
15797 *
15798 * _.kebabCase('__FOO_BAR__');
15799 * // => 'foo-bar'
15800 */
15801 var kebabCase = createCompounder(function(result, word, index) {
15802 return result + (index ? '-' : '') + word.toLowerCase();
15803 });
15804
15805 /**
15806 * Converts `string`, as space separated words, to lower case.
15807 *
15808 * @static
15809 * @memberOf _
15810 * @since 4.0.0
15811 * @category String
15812 * @param {string} [string=''] The string to convert.
15813 * @returns {string} Returns the lower cased string.
15814 * @example
15815 *
15816 * _.lowerCase('--Foo-Bar--');
15817 * // => 'foo bar'
15818 *
15819 * _.lowerCase('fooBar');
15820 * // => 'foo bar'
15821 *
15822 * _.lowerCase('__FOO_BAR__');
15823 * // => 'foo bar'
15824 */
15825 var lowerCase = createCompounder(function(result, word, index) {
15826 return result + (index ? ' ' : '') + word.toLowerCase();
15827 });
15828
15829 /**
15830 * Converts the first character of `string` to lower case.
15831 *
15832 * @static
15833 * @memberOf _
15834 * @since 4.0.0
15835 * @category String
15836 * @param {string} [string=''] The string to convert.
15837 * @returns {string} Returns the converted string.
15838 * @example
15839 *
15840 * _.lowerFirst('Fred');
15841 * // => 'fred'
15842 *
15843 * _.lowerFirst('FRED');
15844 * // => 'fRED'
15845 */
15846 var lowerFirst = createCaseFirst('toLowerCase');
15847
15848 /**
15849 * Pads `string` on the left and right sides if it's shorter than `length`.
15850 * Padding characters are truncated if they can't be evenly divided by `length`.
15851 *
15852 * @static
15853 * @memberOf _
15854 * @since 3.0.0
15855 * @category String
15856 * @param {string} [string=''] The string to pad.
15857 * @param {number} [length=0] The padding length.
15858 * @param {string} [chars=' '] The string used as padding.
15859 * @returns {string} Returns the padded string.
15860 * @example
15861 *
15862 * _.pad('abc', 8);
15863 * // => ' abc '
15864 *
15865 * _.pad('abc', 8, '_-');
15866 * // => '_-abc_-_'
15867 *
15868 * _.pad('abc', 3);
15869 * // => 'abc'
15870 */
15871 function pad(string, length, chars) {
15872 string = toString(string);
15873 length = toInteger(length);
15874
15875 var strLength = length ? stringSize(string) : 0;
15876 if (!length || strLength >= length) {
15877 return string;
15878 }
15879 var mid = (length - strLength) / 2;
15880 return (
15881 createPadding(nativeFloor(mid), chars) +
15882 string +
15883 createPadding(nativeCeil(mid), chars)
15884 );
15885 }
15886
15887 /**
15888 * Pads `string` on the right side if it's shorter than `length`. Padding
15889 * characters are truncated if they exceed `length`.
15890 *
15891 * @static
15892 * @memberOf _
15893 * @since 4.0.0
15894 * @category String
15895 * @param {string} [string=''] The string to pad.
15896 * @param {number} [length=0] The padding length.
15897 * @param {string} [chars=' '] The string used as padding.
15898 * @returns {string} Returns the padded string.
15899 * @example
15900 *
15901 * _.padEnd('abc', 6);
15902 * // => 'abc '
15903 *
15904 * _.padEnd('abc', 6, '_-');
15905 * // => 'abc_-_'
15906 *
15907 * _.padEnd('abc', 3);
15908 * // => 'abc'
15909 */
15910 function padEnd(string, length, chars) {
15911 string = toString(string);
15912 length = toInteger(length);
15913
15914 var strLength = length ? stringSize(string) : 0;
15915 return (length && strLength < length)
15916 ? (string + createPadding(length - strLength, chars))
15917 : string;
15918 }
15919
15920 /**
15921 * Pads `string` on the left side if it's shorter than `length`. Padding
15922 * characters are truncated if they exceed `length`.
15923 *
15924 * @static
15925 * @memberOf _
15926 * @since 4.0.0
15927 * @category String
15928 * @param {string} [string=''] The string to pad.
15929 * @param {number} [length=0] The padding length.
15930 * @param {string} [chars=' '] The string used as padding.
15931 * @returns {string} Returns the padded string.
15932 * @example
15933 *
15934 * _.padStart('abc', 6);
15935 * // => ' abc'
15936 *
15937 * _.padStart('abc', 6, '_-');
15938 * // => '_-_abc'
15939 *
15940 * _.padStart('abc', 3);
15941 * // => 'abc'
15942 */
15943 function padStart(string, length, chars) {
15944 string = toString(string);
15945 length = toInteger(length);
15946
15947 var strLength = length ? stringSize(string) : 0;
15948 return (length && strLength < length)
15949 ? (createPadding(length - strLength, chars) + string)
15950 : string;
15951 }
15952
15953 /**
15954 * Converts `string` to an integer of the specified radix. If `radix` is
15955 * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
15956 * hexadecimal, in which case a `radix` of `16` is used.
15957 *
15958 * **Note:** This method aligns with the
15959 * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
15960 *
15961 * @static
15962 * @memberOf _
15963 * @since 1.1.0
15964 * @category String
15965 * @param {string} string The string to convert.
15966 * @param {number} [radix=10] The radix to interpret `value` by.
15967 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
15968 * @returns {number} Returns the converted integer.
15969 * @example
15970 *
15971 * _.parseInt('08');
15972 * // => 8
15973 *
15974 * _.map(['6', '08', '10'], _.parseInt);
15975 * // => [6, 8, 10]
15976 */
15977 function parseInt(string, radix, guard) {
15978 if (guard || radix == null) {
15979 radix = 0;
15980 } else if (radix) {
15981 radix = +radix;
15982 }
15983 return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
15984 }
15985
15986 /**
15987 * Repeats the given string `n` times.
15988 *
15989 * @static
15990 * @memberOf _
15991 * @since 3.0.0
15992 * @category String
15993 * @param {string} [string=''] The string to repeat.
15994 * @param {number} [n=1] The number of times to repeat the string.
15995 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
15996 * @returns {string} Returns the repeated string.
15997 * @example
15998 *
15999 * _.repeat('*', 3);
16000 * // => '***'
16001 *
16002 * _.repeat('abc', 2);
16003 * // => 'abcabc'
16004 *
16005 * _.repeat('abc', 0);
16006 * // => ''
16007 */
16008 function repeat(string, n, guard) {
16009 if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
16010 n = 1;
16011 } else {
16012 n = toInteger(n);
16013 }
16014 return baseRepeat(toString(string), n);
16015 }
16016
16017 /**
16018 * Replaces matches for `pattern` in `string` with `replacement`.
16019 *
16020 * **Note:** This method is based on
16021 * [`String#replace`](https://mdn.io/String/replace).
16022 *
16023 * @static
16024 * @memberOf _
16025 * @since 4.0.0
16026 * @category String
16027 * @param {string} [string=''] The string to modify.
16028 * @param {RegExp|string} pattern The pattern to replace.
16029 * @param {Function|string} replacement The match replacement.
16030 * @returns {string} Returns the modified string.
16031 * @example
16032 *
16033 * _.replace('Hi Fred', 'Fred', 'Barney');
16034 * // => 'Hi Barney'
16035 */
16036 function replace() {
16037 var args = arguments,
16038 string = toString(args[0]);
16039
16040 return args.length < 3 ? string : string.replace(args[1], args[2]);
16041 }
16042
16043 /**
16044 * Converts `string` to
16045 * [snake case](https://en.wikipedia.org/wiki/Snake_case).
16046 *
16047 * @static
16048 * @memberOf _
16049 * @since 3.0.0
16050 * @category String
16051 * @param {string} [string=''] The string to convert.
16052 * @returns {string} Returns the snake cased string.
16053 * @example
16054 *
16055 * _.snakeCase('Foo Bar');
16056 * // => 'foo_bar'
16057 *
16058 * _.snakeCase('fooBar');
16059 * // => 'foo_bar'
16060 *
16061 * _.snakeCase('--FOO-BAR--');
16062 * // => 'foo_bar'
16063 */
16064 var snakeCase = createCompounder(function(result, word, index) {
16065 return result + (index ? '_' : '') + word.toLowerCase();
16066 });
16067
16068 /**
16069 * Splits `string` by `separator`.
16070 *
16071 * **Note:** This method is based on
16072 * [`String#split`](https://mdn.io/String/split).
16073 *
16074 * @static
16075 * @memberOf _
16076 * @since 4.0.0
16077 * @category String
16078 * @param {string} [string=''] The string to split.
16079 * @param {RegExp|string} separator The separator pattern to split by.
16080 * @param {number} [limit] The length to truncate results to.
16081 * @returns {Array} Returns the string segments.
16082 * @example
16083 *
16084 * _.split('a-b-c', '-', 2);
16085 * // => ['a', 'b']
16086 */
16087 function split(string, separator, limit) {
16088 if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
16089 separator = limit = undefined;
16090 }
16091 limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
16092 if (!limit) {
16093 return [];
16094 }
16095 string = toString(string);
16096 if (string && (
16097 typeof separator == 'string' ||
16098 (separator != null && !isRegExp(separator))
16099 )) {
16100 separator = baseToString(separator);
16101 if (!separator && hasUnicode(string)) {
16102 return castSlice(stringToArray(string), 0, limit);
16103 }
16104 }
16105 return string.split(separator, limit);
16106 }
16107
16108 /**
16109 * Converts `string` to
16110 * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
16111 *
16112 * @static
16113 * @memberOf _
16114 * @since 3.1.0
16115 * @category String
16116 * @param {string} [string=''] The string to convert.
16117 * @returns {string} Returns the start cased string.
16118 * @example
16119 *
16120 * _.startCase('--foo-bar--');
16121 * // => 'Foo Bar'
16122 *
16123 * _.startCase('fooBar');
16124 * // => 'Foo Bar'
16125 *
16126 * _.startCase('__FOO_BAR__');
16127 * // => 'FOO BAR'
16128 */
16129 var startCase = createCompounder(function(result, word, index) {
16130 return result + (index ? ' ' : '') + upperFirst(word);
16131 });
16132
16133 /**
16134 * Checks if `string` starts with the given target string.
16135 *
16136 * @static
16137 * @memberOf _
16138 * @since 3.0.0
16139 * @category String
16140 * @param {string} [string=''] The string to inspect.
16141 * @param {string} [target] The string to search for.
16142 * @param {number} [position=0] The position to search from.
16143 * @returns {boolean} Returns `true` if `string` starts with `target`,
16144 * else `false`.
16145 * @example
16146 *
16147 * _.startsWith('abc', 'a');
16148 * // => true
16149 *
16150 * _.startsWith('abc', 'b');
16151 * // => false
16152 *
16153 * _.startsWith('abc', 'b', 1);
16154 * // => true
16155 */
16156 function startsWith(string, target, position) {
16157 string = toString(string);
16158 position = position == null
16159 ? 0
16160 : baseClamp(toInteger(position), 0, string.length);
16161
16162 target = baseToString(target);
16163 return string.slice(position, position + target.length) == target;
16164 }
16165
16166 /**
16167 * Creates a compiled template function that can interpolate data properties
16168 * in "interpolate" delimiters, HTML-escape interpolated data properties in
16169 * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
16170 * properties may be accessed as free variables in the template. If a setting
16171 * object is given, it takes precedence over `_.templateSettings` values.
16172 *
16173 * **Note:** In the development build `_.template` utilizes
16174 * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
16175 * for easier debugging.
16176 *
16177 * For more information on precompiling templates see
16178 * [lodash's custom builds documentation](https://lodash.com/custom-builds).
16179 *
16180 * For more information on Chrome extension sandboxes see
16181 * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
16182 *
16183 * @static
16184 * @since 0.1.0
16185 * @memberOf _
16186 * @category String
16187 * @param {string} [string=''] The template string.
16188 * @param {Object} [options={}] The options object.
16189 * @param {RegExp} [options.escape=_.templateSettings.escape]
16190 * The HTML "escape" delimiter.
16191 * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
16192 * The "evaluate" delimiter.
16193 * @param {Object} [options.imports=_.templateSettings.imports]
16194 * An object to import into the template as free variables.
16195 * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
16196 * The "interpolate" delimiter.
16197 * @param {string} [options.sourceURL='lodash.templateSources[n]']
16198 * The sourceURL of the compiled template.
16199 * @param {string} [options.variable='obj']
16200 * The data object variable name.
16201 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16202 * @returns {Function} Returns the compiled template function.
16203 * @example
16204 *
16205 * // Use the "interpolate" delimiter to create a compiled template.
16206 * var compiled = _.template('hello <%= user %>!');
16207 * compiled({ 'user': 'fred' });
16208 * // => 'hello fred!'
16209 *
16210 * // Use the HTML "escape" delimiter to escape data property values.
16211 * var compiled = _.template('<b><%- value %></b>');
16212 * compiled({ 'value': '<script>' });
16213 * // => '<b>&lt;script&gt;</b>'
16214 *
16215 * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
16216 * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
16217 * compiled({ 'users': ['fred', 'barney'] });
16218 * // => '<li>fred</li><li>barney</li>'
16219 *
16220 * // Use the internal `print` function in "evaluate" delimiters.
16221 * var compiled = _.template('<% print("hello " + user); %>!');
16222 * compiled({ 'user': 'barney' });
16223 * // => 'hello barney!'
16224 *
16225 * // Use the ES template literal delimiter as an "interpolate" delimiter.
16226 * // Disable support by replacing the "interpolate" delimiter.
16227 * var compiled = _.template('hello ${ user }!');
16228 * compiled({ 'user': 'pebbles' });
16229 * // => 'hello pebbles!'
16230 *
16231 * // Use backslashes to treat delimiters as plain text.
16232 * var compiled = _.template('<%= "\\<%- value %\\>" %>');
16233 * compiled({ 'value': 'ignored' });
16234 * // => '<%- value %>'
16235 *
16236 * // Use the `imports` option to import `jQuery` as `jq`.
16237 * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
16238 * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
16239 * compiled({ 'users': ['fred', 'barney'] });
16240 * // => '<li>fred</li><li>barney</li>'
16241 *
16242 * // Use the `sourceURL` option to specify a custom sourceURL for the template.
16243 * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
16244 * compiled(data);
16245 * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
16246 *
16247 * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
16248 * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
16249 * compiled.source;
16250 * // => function(data) {
16251 * // var __t, __p = '';
16252 * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
16253 * // return __p;
16254 * // }
16255 *
16256 * // Use custom template delimiters.
16257 * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
16258 * var compiled = _.template('hello {{ user }}!');
16259 * compiled({ 'user': 'mustache' });
16260 * // => 'hello mustache!'
16261 *
16262 * // Use the `source` property to inline compiled templates for meaningful
16263 * // line numbers in error messages and stack traces.
16264 * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
16265 * var JST = {\
16266 * "main": ' + _.template(mainText).source + '\
16267 * };\
16268 * ');
16269 */
16270 function template(string, options, guard) {
16271 // Based on John Resig's `tmpl` implementation
16272 // (http://ejohn.org/blog/javascript-micro-templating/)
16273 // and Laura Doktorova's doT.js (https://github.com/olado/doT).
16274 var settings = lodash.templateSettings;
16275
16276 if (guard && isIterateeCall(string, options, guard)) {
16277 options = undefined;
16278 }
16279 string = toString(string);
16280 options = assignInWith({}, options, settings, customDefaultsAssignIn);
16281
16282 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
16283 importsKeys = keys(imports),
16284 importsValues = baseValues(imports, importsKeys);
16285
16286 var isEscaping,
16287 isEvaluating,
16288 index = 0,
16289 interpolate = options.interpolate || reNoMatch,
16290 source = "__p += '";
16291
16292 // Compile the regexp to match each delimiter.
16293 var reDelimiters = RegExp(
16294 (options.escape || reNoMatch).source + '|' +
16295 interpolate.source + '|' +
16296 (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
16297 (options.evaluate || reNoMatch).source + '|$'
16298 , 'g');
16299
16300 // Use a sourceURL for easier debugging.
16301 var sourceURL = '//# sourceURL=' +
16302 ('sourceURL' in options
16303 ? options.sourceURL
16304 : ('lodash.templateSources[' + (++templateCounter) + ']')
16305 ) + '\n';
16306
16307 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
16308 interpolateValue || (interpolateValue = esTemplateValue);
16309
16310 // Escape characters that can't be included in string literals.
16311 source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
16312
16313 // Replace delimiters with snippets.
16314 if (escapeValue) {
16315 isEscaping = true;
16316 source += "' +\n__e(" + escapeValue + ") +\n'";
16317 }
16318 if (evaluateValue) {
16319 isEvaluating = true;
16320 source += "';\n" + evaluateValue + ";\n__p += '";
16321 }
16322 if (interpolateValue) {
16323 source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
16324 }
16325 index = offset + match.length;
16326
16327 // The JS engine embedded in Adobe products needs `match` returned in
16328 // order to produce the correct `offset` value.
16329 return match;
16330 });
16331
16332 source += "';\n";
16333
16334 // If `variable` is not specified wrap a with-statement around the generated
16335 // code to add the data object to the top of the scope chain.
16336 var variable = options.variable;
16337 if (!variable) {
16338 source = 'with (obj) {\n' + source + '\n}\n';
16339 }
16340 // Cleanup code by stripping empty strings.
16341 source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
16342 .replace(reEmptyStringMiddle, '$1')
16343 .replace(reEmptyStringTrailing, '$1;');
16344
16345 // Frame code as the function body.
16346 source = 'function(' + (variable || 'obj') + ') {\n' +
16347 (variable
16348 ? ''
16349 : 'obj || (obj = {});\n'
16350 ) +
16351 "var __t, __p = ''" +
16352 (isEscaping
16353 ? ', __e = _.escape'
16354 : ''
16355 ) +
16356 (isEvaluating
16357 ? ', __j = Array.prototype.join;\n' +
16358 "function print() { __p += __j.call(arguments, '') }\n"
16359 : ';\n'
16360 ) +
16361 source +
16362 'return __p\n}';
16363
16364 var result = attempt(function() {
16365 return Function(importsKeys, sourceURL + 'return ' + source)
16366 .apply(undefined, importsValues);
16367 });
16368
16369 // Provide the compiled function's source by its `toString` method or
16370 // the `source` property as a convenience for inlining compiled templates.
16371 result.source = source;
16372 if (isError(result)) {
16373 throw result;
16374 }
16375 return result;
16376 }
16377
16378 /**
16379 * Converts `string`, as a whole, to lower case just like
16380 * [String#toLowerCase](https://mdn.io/toLowerCase).
16381 *
16382 * @static
16383 * @memberOf _
16384 * @since 4.0.0
16385 * @category String
16386 * @param {string} [string=''] The string to convert.
16387 * @returns {string} Returns the lower cased string.
16388 * @example
16389 *
16390 * _.toLower('--Foo-Bar--');
16391 * // => '--foo-bar--'
16392 *
16393 * _.toLower('fooBar');
16394 * // => 'foobar'
16395 *
16396 * _.toLower('__FOO_BAR__');
16397 * // => '__foo_bar__'
16398 */
16399 function toLower(value) {
16400 return toString(value).toLowerCase();
16401 }
16402
16403 /**
16404 * Converts `string`, as a whole, to upper case just like
16405 * [String#toUpperCase](https://mdn.io/toUpperCase).
16406 *
16407 * @static
16408 * @memberOf _
16409 * @since 4.0.0
16410 * @category String
16411 * @param {string} [string=''] The string to convert.
16412 * @returns {string} Returns the upper cased string.
16413 * @example
16414 *
16415 * _.toUpper('--foo-bar--');
16416 * // => '--FOO-BAR--'
16417 *
16418 * _.toUpper('fooBar');
16419 * // => 'FOOBAR'
16420 *
16421 * _.toUpper('__foo_bar__');
16422 * // => '__FOO_BAR__'
16423 */
16424 function toUpper(value) {
16425 return toString(value).toUpperCase();
16426 }
16427
16428 /**
16429 * Removes leading and trailing whitespace or specified characters from `string`.
16430 *
16431 * @static
16432 * @memberOf _
16433 * @since 3.0.0
16434 * @category String
16435 * @param {string} [string=''] The string to trim.
16436 * @param {string} [chars=whitespace] The characters to trim.
16437 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16438 * @returns {string} Returns the trimmed string.
16439 * @example
16440 *
16441 * _.trim(' abc ');
16442 * // => 'abc'
16443 *
16444 * _.trim('-_-abc-_-', '_-');
16445 * // => 'abc'
16446 *
16447 * _.map([' foo ', ' bar '], _.trim);
16448 * // => ['foo', 'bar']
16449 */
16450 function trim(string, chars, guard) {
16451 string = toString(string);
16452 if (string && (guard || chars === undefined)) {
16453 return string.replace(reTrim, '');
16454 }
16455 if (!string || !(chars = baseToString(chars))) {
16456 return string;
16457 }
16458 var strSymbols = stringToArray(string),
16459 chrSymbols = stringToArray(chars),
16460 start = charsStartIndex(strSymbols, chrSymbols),
16461 end = charsEndIndex(strSymbols, chrSymbols) + 1;
16462
16463 return castSlice(strSymbols, start, end).join('');
16464 }
16465
16466 /**
16467 * Removes trailing whitespace or specified characters from `string`.
16468 *
16469 * @static
16470 * @memberOf _
16471 * @since 4.0.0
16472 * @category String
16473 * @param {string} [string=''] The string to trim.
16474 * @param {string} [chars=whitespace] The characters to trim.
16475 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16476 * @returns {string} Returns the trimmed string.
16477 * @example
16478 *
16479 * _.trimEnd(' abc ');
16480 * // => ' abc'
16481 *
16482 * _.trimEnd('-_-abc-_-', '_-');
16483 * // => '-_-abc'
16484 */
16485 function trimEnd(string, chars, guard) {
16486 string = toString(string);
16487 if (string && (guard || chars === undefined)) {
16488 return string.replace(reTrimEnd, '');
16489 }
16490 if (!string || !(chars = baseToString(chars))) {
16491 return string;
16492 }
16493 var strSymbols = stringToArray(string),
16494 end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
16495
16496 return castSlice(strSymbols, 0, end).join('');
16497 }
16498
16499 /**
16500 * Removes leading whitespace or specified characters from `string`.
16501 *
16502 * @static
16503 * @memberOf _
16504 * @since 4.0.0
16505 * @category String
16506 * @param {string} [string=''] The string to trim.
16507 * @param {string} [chars=whitespace] The characters to trim.
16508 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16509 * @returns {string} Returns the trimmed string.
16510 * @example
16511 *
16512 * _.trimStart(' abc ');
16513 * // => 'abc '
16514 *
16515 * _.trimStart('-_-abc-_-', '_-');
16516 * // => 'abc-_-'
16517 */
16518 function trimStart(string, chars, guard) {
16519 string = toString(string);
16520 if (string && (guard || chars === undefined)) {
16521 return string.replace(reTrimStart, '');
16522 }
16523 if (!string || !(chars = baseToString(chars))) {
16524 return string;
16525 }
16526 var strSymbols = stringToArray(string),
16527 start = charsStartIndex(strSymbols, stringToArray(chars));
16528
16529 return castSlice(strSymbols, start).join('');
16530 }
16531
16532 /**
16533 * Truncates `string` if it's longer than the given maximum string length.
16534 * The last characters of the truncated string are replaced with the omission
16535 * string which defaults to "...".
16536 *
16537 * @static
16538 * @memberOf _
16539 * @since 4.0.0
16540 * @category String
16541 * @param {string} [string=''] The string to truncate.
16542 * @param {Object} [options={}] The options object.
16543 * @param {number} [options.length=30] The maximum string length.
16544 * @param {string} [options.omission='...'] The string to indicate text is omitted.
16545 * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
16546 * @returns {string} Returns the truncated string.
16547 * @example
16548 *
16549 * _.truncate('hi-diddly-ho there, neighborino');
16550 * // => 'hi-diddly-ho there, neighbo...'
16551 *
16552 * _.truncate('hi-diddly-ho there, neighborino', {
16553 * 'length': 24,
16554 * 'separator': ' '
16555 * });
16556 * // => 'hi-diddly-ho there,...'
16557 *
16558 * _.truncate('hi-diddly-ho there, neighborino', {
16559 * 'length': 24,
16560 * 'separator': /,? +/
16561 * });
16562 * // => 'hi-diddly-ho there...'
16563 *
16564 * _.truncate('hi-diddly-ho there, neighborino', {
16565 * 'omission': ' [...]'
16566 * });
16567 * // => 'hi-diddly-ho there, neig [...]'
16568 */
16569 function truncate(string, options) {
16570 var length = DEFAULT_TRUNC_LENGTH,
16571 omission = DEFAULT_TRUNC_OMISSION;
16572
16573 if (isObject(options)) {
16574 var separator = 'separator' in options ? options.separator : separator;
16575 length = 'length' in options ? toInteger(options.length) : length;
16576 omission = 'omission' in options ? baseToString(options.omission) : omission;
16577 }
16578 string = toString(string);
16579
16580 var strLength = string.length;
16581 if (hasUnicode(string)) {
16582 var strSymbols = stringToArray(string);
16583 strLength = strSymbols.length;
16584 }
16585 if (length >= strLength) {
16586 return string;
16587 }
16588 var end = length - stringSize(omission);
16589 if (end < 1) {
16590 return omission;
16591 }
16592 var result = strSymbols
16593 ? castSlice(strSymbols, 0, end).join('')
16594 : string.slice(0, end);
16595
16596 if (separator === undefined) {
16597 return result + omission;
16598 }
16599 if (strSymbols) {
16600 end += (result.length - end);
16601 }
16602 if (isRegExp(separator)) {
16603 if (string.slice(end).search(separator)) {
16604 var match,
16605 substring = result;
16606
16607 if (!separator.global) {
16608 separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
16609 }
16610 separator.lastIndex = 0;
16611 while ((match = separator.exec(substring))) {
16612 var newEnd = match.index;
16613 }
16614 result = result.slice(0, newEnd === undefined ? end : newEnd);
16615 }
16616 } else if (string.indexOf(baseToString(separator), end) != end) {
16617 var index = result.lastIndexOf(separator);
16618 if (index > -1) {
16619 result = result.slice(0, index);
16620 }
16621 }
16622 return result + omission;
16623 }
16624
16625 /**
16626 * The inverse of `_.escape`; this method converts the HTML entities
16627 * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
16628 * their corresponding characters.
16629 *
16630 * **Note:** No other HTML entities are unescaped. To unescape additional
16631 * HTML entities use a third-party library like [_he_](https://mths.be/he).
16632 *
16633 * @static
16634 * @memberOf _
16635 * @since 0.6.0
16636 * @category String
16637 * @param {string} [string=''] The string to unescape.
16638 * @returns {string} Returns the unescaped string.
16639 * @example
16640 *
16641 * _.unescape('fred, barney, &amp; pebbles');
16642 * // => 'fred, barney, & pebbles'
16643 */
16644 function unescape(string) {
16645 string = toString(string);
16646 return (string && reHasEscapedHtml.test(string))
16647 ? string.replace(reEscapedHtml, unescapeHtmlChar)
16648 : string;
16649 }
16650
16651 /**
16652 * Converts `string`, as space separated words, to upper case.
16653 *
16654 * @static
16655 * @memberOf _
16656 * @since 4.0.0
16657 * @category String
16658 * @param {string} [string=''] The string to convert.
16659 * @returns {string} Returns the upper cased string.
16660 * @example
16661 *
16662 * _.upperCase('--foo-bar');
16663 * // => 'FOO BAR'
16664 *
16665 * _.upperCase('fooBar');
16666 * // => 'FOO BAR'
16667 *
16668 * _.upperCase('__foo_bar__');
16669 * // => 'FOO BAR'
16670 */
16671 var upperCase = createCompounder(function(result, word, index) {
16672 return result + (index ? ' ' : '') + word.toUpperCase();
16673 });
16674
16675 /**
16676 * Converts the first character of `string` to upper case.
16677 *
16678 * @static
16679 * @memberOf _
16680 * @since 4.0.0
16681 * @category String
16682 * @param {string} [string=''] The string to convert.
16683 * @returns {string} Returns the converted string.
16684 * @example
16685 *
16686 * _.upperFirst('fred');
16687 * // => 'Fred'
16688 *
16689 * _.upperFirst('FRED');
16690 * // => 'FRED'
16691 */
16692 var upperFirst = createCaseFirst('toUpperCase');
16693
16694 /**
16695 * Splits `string` into an array of its words.
16696 *
16697 * @static
16698 * @memberOf _
16699 * @since 3.0.0
16700 * @category String
16701 * @param {string} [string=''] The string to inspect.
16702 * @param {RegExp|string} [pattern] The pattern to match words.
16703 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
16704 * @returns {Array} Returns the words of `string`.
16705 * @example
16706 *
16707 * _.words('fred, barney, & pebbles');
16708 * // => ['fred', 'barney', 'pebbles']
16709 *
16710 * _.words('fred, barney, & pebbles', /[^, ]+/g);
16711 * // => ['fred', 'barney', '&', 'pebbles']
16712 */
16713 function words(string, pattern, guard) {
16714 string = toString(string);
16715 pattern = guard ? undefined : pattern;
16716
16717 if (pattern === undefined) {
16718 return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
16719 }
16720 return string.match(pattern) || [];
16721 }
16722
16723 /*------------------------------------------------------------------------*/
16724
16725 /**
16726 * Attempts to invoke `func`, returning either the result or the caught error
16727 * object. Any additional arguments are provided to `func` when it's invoked.
16728 *
16729 * @static
16730 * @memberOf _
16731 * @since 3.0.0
16732 * @category Util
16733 * @param {Function} func The function to attempt.
16734 * @param {...*} [args] The arguments to invoke `func` with.
16735 * @returns {*} Returns the `func` result or error object.
16736 * @example
16737 *
16738 * // Avoid throwing errors for invalid selectors.
16739 * var elements = _.attempt(function(selector) {
16740 * return document.querySelectorAll(selector);
16741 * }, '>_>');
16742 *
16743 * if (_.isError(elements)) {
16744 * elements = [];
16745 * }
16746 */
16747 var attempt = baseRest(function(func, args) {
16748 try {
16749 return apply(func, undefined, args);
16750 } catch (e) {
16751 return isError(e) ? e : new Error(e);
16752 }
16753 });
16754
16755 /**
16756 * Binds methods of an object to the object itself, overwriting the existing
16757 * method.
16758 *
16759 * **Note:** This method doesn't set the "length" property of bound functions.
16760 *
16761 * @static
16762 * @since 0.1.0
16763 * @memberOf _
16764 * @category Util
16765 * @param {Object} object The object to bind and assign the bound methods to.
16766 * @param {...(string|string[])} methodNames The object method names to bind.
16767 * @returns {Object} Returns `object`.
16768 * @example
16769 *
16770 * var view = {
16771 * 'label': 'docs',
16772 * 'click': function() {
16773 * console.log('clicked ' + this.label);
16774 * }
16775 * };
16776 *
16777 * _.bindAll(view, ['click']);
16778 * jQuery(element).on('click', view.click);
16779 * // => Logs 'clicked docs' when clicked.
16780 */
16781 var bindAll = flatRest(function(object, methodNames) {
16782 arrayEach(methodNames, function(key) {
16783 key = toKey(key);
16784 baseAssignValue(object, key, bind(object[key], object));
16785 });
16786 return object;
16787 });
16788
16789 /**
16790 * Creates a function that iterates over `pairs` and invokes the corresponding
16791 * function of the first predicate to return truthy. The predicate-function
16792 * pairs are invoked with the `this` binding and arguments of the created
16793 * function.
16794 *
16795 * @static
16796 * @memberOf _
16797 * @since 4.0.0
16798 * @category Util
16799 * @param {Array} pairs The predicate-function pairs.
16800 * @returns {Function} Returns the new composite function.
16801 * @example
16802 *
16803 * var func = _.cond([
16804 * [_.matches({ 'a': 1 }), _.constant('matches A')],
16805 * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
16806 * [_.stubTrue, _.constant('no match')]
16807 * ]);
16808 *
16809 * func({ 'a': 1, 'b': 2 });
16810 * // => 'matches A'
16811 *
16812 * func({ 'a': 0, 'b': 1 });
16813 * // => 'matches B'
16814 *
16815 * func({ 'a': '1', 'b': '2' });
16816 * // => 'no match'
16817 */
16818 function cond(pairs) {
16819 var length = pairs == null ? 0 : pairs.length,
16820 toIteratee = getIteratee();
16821
16822 pairs = !length ? [] : arrayMap(pairs, function(pair) {
16823 if (typeof pair[1] != 'function') {
16824 throw new TypeError(FUNC_ERROR_TEXT);
16825 }
16826 return [toIteratee(pair[0]), pair[1]];
16827 });
16828
16829 return baseRest(function(args) {
16830 var index = -1;
16831 while (++index < length) {
16832 var pair = pairs[index];
16833 if (apply(pair[0], this, args)) {
16834 return apply(pair[1], this, args);
16835 }
16836 }
16837 });
16838 }
16839
16840 /**
16841 * Creates a function that invokes the predicate properties of `source` with
16842 * the corresponding property values of a given object, returning `true` if
16843 * all predicates return truthy, else `false`.
16844 *
16845 * **Note:** The created function is equivalent to `_.conformsTo` with
16846 * `source` partially applied.
16847 *
16848 * @static
16849 * @memberOf _
16850 * @since 4.0.0
16851 * @category Util
16852 * @param {Object} source The object of property predicates to conform to.
16853 * @returns {Function} Returns the new spec function.
16854 * @example
16855 *
16856 * var objects = [
16857 * { 'a': 2, 'b': 1 },
16858 * { 'a': 1, 'b': 2 }
16859 * ];
16860 *
16861 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
16862 * // => [{ 'a': 1, 'b': 2 }]
16863 */
16864 function conforms(source) {
16865 return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
16866 }
16867
16868 /**
16869 * Creates a function that returns `value`.
16870 *
16871 * @static
16872 * @memberOf _
16873 * @since 2.4.0
16874 * @category Util
16875 * @param {*} value The value to return from the new function.
16876 * @returns {Function} Returns the new constant function.
16877 * @example
16878 *
16879 * var objects = _.times(2, _.constant({ 'a': 1 }));
16880 *
16881 * console.log(objects);
16882 * // => [{ 'a': 1 }, { 'a': 1 }]
16883 *
16884 * console.log(objects[0] === objects[1]);
16885 * // => true
16886 */
16887 function constant(value) {
16888 return function() {
16889 return value;
16890 };
16891 }
16892
16893 /**
16894 * Checks `value` to determine whether a default value should be returned in
16895 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
16896 * or `undefined`.
16897 *
16898 * @static
16899 * @memberOf _
16900 * @since 4.14.0
16901 * @category Util
16902 * @param {*} value The value to check.
16903 * @param {*} defaultValue The default value.
16904 * @returns {*} Returns the resolved value.
16905 * @example
16906 *
16907 * _.defaultTo(1, 10);
16908 * // => 1
16909 *
16910 * _.defaultTo(undefined, 10);
16911 * // => 10
16912 */
16913 function defaultTo(value, defaultValue) {
16914 return (value == null || value !== value) ? defaultValue : value;
16915 }
16916
16917 /**
16918 * Creates a function that returns the result of invoking the given functions
16919 * with the `this` binding of the created function, where each successive
16920 * invocation is supplied the return value of the previous.
16921 *
16922 * @static
16923 * @memberOf _
16924 * @since 3.0.0
16925 * @category Util
16926 * @param {...(Function|Function[])} [funcs] The functions to invoke.
16927 * @returns {Function} Returns the new composite function.
16928 * @see _.flowRight
16929 * @example
16930 *
16931 * function square(n) {
16932 * return n * n;
16933 * }
16934 *
16935 * var addSquare = _.flow([_.add, square]);
16936 * addSquare(1, 2);
16937 * // => 9
16938 */
16939 var flow = createFlow();
16940
16941 /**
16942 * This method is like `_.flow` except that it creates a function that
16943 * invokes the given functions from right to left.
16944 *
16945 * @static
16946 * @since 3.0.0
16947 * @memberOf _
16948 * @category Util
16949 * @param {...(Function|Function[])} [funcs] The functions to invoke.
16950 * @returns {Function} Returns the new composite function.
16951 * @see _.flow
16952 * @example
16953 *
16954 * function square(n) {
16955 * return n * n;
16956 * }
16957 *
16958 * var addSquare = _.flowRight([square, _.add]);
16959 * addSquare(1, 2);
16960 * // => 9
16961 */
16962 var flowRight = createFlow(true);
16963
16964 /**
16965 * This method returns the first argument it receives.
16966 *
16967 * @static
16968 * @since 0.1.0
16969 * @memberOf _
16970 * @category Util
16971 * @param {*} value Any value.
16972 * @returns {*} Returns `value`.
16973 * @example
16974 *
16975 * var object = { 'a': 1 };
16976 *
16977 * console.log(_.identity(object) === object);
16978 * // => true
16979 */
16980 function identity(value) {
16981 return value;
16982 }
16983
16984 /**
16985 * Creates a function that invokes `func` with the arguments of the created
16986 * function. If `func` is a property name, the created function returns the
16987 * property value for a given element. If `func` is an array or object, the
16988 * created function returns `true` for elements that contain the equivalent
16989 * source properties, otherwise it returns `false`.
16990 *
16991 * @static
16992 * @since 4.0.0
16993 * @memberOf _
16994 * @category Util
16995 * @param {*} [func=_.identity] The value to convert to a callback.
16996 * @returns {Function} Returns the callback.
16997 * @example
16998 *
16999 * var users = [
17000 * { 'user': 'barney', 'age': 36, 'active': true },
17001 * { 'user': 'fred', 'age': 40, 'active': false }
17002 * ];
17003 *
17004 * // The `_.matches` iteratee shorthand.
17005 * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
17006 * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
17007 *
17008 * // The `_.matchesProperty` iteratee shorthand.
17009 * _.filter(users, _.iteratee(['user', 'fred']));
17010 * // => [{ 'user': 'fred', 'age': 40 }]
17011 *
17012 * // The `_.property` iteratee shorthand.
17013 * _.map(users, _.iteratee('user'));
17014 * // => ['barney', 'fred']
17015 *
17016 * // Create custom iteratee shorthands.
17017 * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
17018 * return !_.isRegExp(func) ? iteratee(func) : function(string) {
17019 * return func.test(string);
17020 * };
17021 * });
17022 *
17023 * _.filter(['abc', 'def'], /ef/);
17024 * // => ['def']
17025 */
17026 function iteratee(func) {
17027 return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
17028 }
17029
17030 /**
17031 * Creates a function that performs a partial deep comparison between a given
17032 * object and `source`, returning `true` if the given object has equivalent
17033 * property values, else `false`.
17034 *
17035 * **Note:** The created function is equivalent to `_.isMatch` with `source`
17036 * partially applied.
17037 *
17038 * Partial comparisons will match empty array and empty object `source`
17039 * values against any array or object value, respectively. See `_.isEqual`
17040 * for a list of supported value comparisons.
17041 *
17042 * @static
17043 * @memberOf _
17044 * @since 3.0.0
17045 * @category Util
17046 * @param {Object} source The object of property values to match.
17047 * @returns {Function} Returns the new spec function.
17048 * @example
17049 *
17050 * var objects = [
17051 * { 'a': 1, 'b': 2, 'c': 3 },
17052 * { 'a': 4, 'b': 5, 'c': 6 }
17053 * ];
17054 *
17055 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
17056 * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
17057 */
17058 function matches(source) {
17059 return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
17060 }
17061
17062 /**
17063 * Creates a function that performs a partial deep comparison between the
17064 * value at `path` of a given object to `srcValue`, returning `true` if the
17065 * object value is equivalent, else `false`.
17066 *
17067 * **Note:** Partial comparisons will match empty array and empty object
17068 * `srcValue` values against any array or object value, respectively. See
17069 * `_.isEqual` for a list of supported value comparisons.
17070 *
17071 * @static
17072 * @memberOf _
17073 * @since 3.2.0
17074 * @category Util
17075 * @param {Array|string} path The path of the property to get.
17076 * @param {*} srcValue The value to match.
17077 * @returns {Function} Returns the new spec function.
17078 * @example
17079 *
17080 * var objects = [
17081 * { 'a': 1, 'b': 2, 'c': 3 },
17082 * { 'a': 4, 'b': 5, 'c': 6 }
17083 * ];
17084 *
17085 * _.find(objects, _.matchesProperty('a', 4));
17086 * // => { 'a': 4, 'b': 5, 'c': 6 }
17087 */
17088 function matchesProperty(path, srcValue) {
17089 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
17090 }
17091
17092 /**
17093 * Creates a function that invokes the method at `path` of a given object.
17094 * Any additional arguments are provided to the invoked method.
17095 *
17096 * @static
17097 * @memberOf _
17098 * @since 3.7.0
17099 * @category Util
17100 * @param {Array|string} path The path of the method to invoke.
17101 * @param {...*} [args] The arguments to invoke the method with.
17102 * @returns {Function} Returns the new invoker function.
17103 * @example
17104 *
17105 * var objects = [
17106 * { 'a': { 'b': _.constant(2) } },
17107 * { 'a': { 'b': _.constant(1) } }
17108 * ];
17109 *
17110 * _.map(objects, _.method('a.b'));
17111 * // => [2, 1]
17112 *
17113 * _.map(objects, _.method(['a', 'b']));
17114 * // => [2, 1]
17115 */
17116 var method = baseRest(function(path, args) {
17117 return function(object) {
17118 return baseInvoke(object, path, args);
17119 };
17120 });
17121
17122 /**
17123 * The opposite of `_.method`; this method creates a function that invokes
17124 * the method at a given path of `object`. Any additional arguments are
17125 * provided to the invoked method.
17126 *
17127 * @static
17128 * @memberOf _
17129 * @since 3.7.0
17130 * @category Util
17131 * @param {Object} object The object to query.
17132 * @param {...*} [args] The arguments to invoke the method with.
17133 * @returns {Function} Returns the new invoker function.
17134 * @example
17135 *
17136 * var array = _.times(3, _.constant),
17137 * object = { 'a': array, 'b': array, 'c': array };
17138 *
17139 * _.map(['a[2]', 'c[0]'], _.methodOf(object));
17140 * // => [2, 0]
17141 *
17142 * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
17143 * // => [2, 0]
17144 */
17145 var methodOf = baseRest(function(object, args) {
17146 return function(path) {
17147 return baseInvoke(object, path, args);
17148 };
17149 });
17150
17151 /**
17152 * Adds all own enumerable string keyed function properties of a source
17153 * object to the destination object. If `object` is a function, then methods
17154 * are added to its prototype as well.
17155 *
17156 * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
17157 * avoid conflicts caused by modifying the original.
17158 *
17159 * @static
17160 * @since 0.1.0
17161 * @memberOf _
17162 * @category Util
17163 * @param {Function|Object} [object=lodash] The destination object.
17164 * @param {Object} source The object of functions to add.
17165 * @param {Object} [options={}] The options object.
17166 * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
17167 * @returns {Function|Object} Returns `object`.
17168 * @example
17169 *
17170 * function vowels(string) {
17171 * return _.filter(string, function(v) {
17172 * return /[aeiou]/i.test(v);
17173 * });
17174 * }
17175 *
17176 * _.mixin({ 'vowels': vowels });
17177 * _.vowels('fred');
17178 * // => ['e']
17179 *
17180 * _('fred').vowels().value();
17181 * // => ['e']
17182 *
17183 * _.mixin({ 'vowels': vowels }, { 'chain': false });
17184 * _('fred').vowels();
17185 * // => ['e']
17186 */
17187 function mixin(object, source, options) {
17188 var props = keys(source),
17189 methodNames = baseFunctions(source, props);
17190
17191 if (options == null &&
17192 !(isObject(source) && (methodNames.length || !props.length))) {
17193 options = source;
17194 source = object;
17195 object = this;
17196 methodNames = baseFunctions(source, keys(source));
17197 }
17198 var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
17199 isFunc = isFunction(object);
17200
17201 arrayEach(methodNames, function(methodName) {
17202 var func = source[methodName];
17203 object[methodName] = func;
17204 if (isFunc) {
17205 object.prototype[methodName] = function() {
17206 var chainAll = this.__chain__;
17207 if (chain || chainAll) {
17208 var result = object(this.__wrapped__),
17209 actions = result.__actions__ = copyArray(this.__actions__);
17210
17211 actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
17212 result.__chain__ = chainAll;
17213 return result;
17214 }
17215 return func.apply(object, arrayPush([this.value()], arguments));
17216 };
17217 }
17218 });
17219
17220 return object;
17221 }
17222
17223 /**
17224 * Reverts the `_` variable to its previous value and returns a reference to
17225 * the `lodash` function.
17226 *
17227 * @static
17228 * @since 0.1.0
17229 * @memberOf _
17230 * @category Util
17231 * @returns {Function} Returns the `lodash` function.
17232 * @example
17233 *
17234 * var lodash = _.noConflict();
17235 */
17236 function noConflict() {
17237 if (root._ === this) {
17238 root._ = oldDash;
17239 }
17240 return this;
17241 }
17242
17243 /**
17244 * This method returns `undefined`.
17245 *
17246 * @static
17247 * @memberOf _
17248 * @since 2.3.0
17249 * @category Util
17250 * @example
17251 *
17252 * _.times(2, _.noop);
17253 * // => [undefined, undefined]
17254 */
17255 function noop() {
17256 // No operation performed.
17257 }
17258
17259 /**
17260 * Creates a function that gets the argument at index `n`. If `n` is negative,
17261 * the nth argument from the end is returned.
17262 *
17263 * @static
17264 * @memberOf _
17265 * @since 4.0.0
17266 * @category Util
17267 * @param {number} [n=0] The index of the argument to return.
17268 * @returns {Function} Returns the new pass-thru function.
17269 * @example
17270 *
17271 * var func = _.nthArg(1);
17272 * func('a', 'b', 'c', 'd');
17273 * // => 'b'
17274 *
17275 * var func = _.nthArg(-2);
17276 * func('a', 'b', 'c', 'd');
17277 * // => 'c'
17278 */
17279 function nthArg(n) {
17280 n = toInteger(n);
17281 return baseRest(function(args) {
17282 return baseNth(args, n);
17283 });
17284 }
17285
17286 /**
17287 * Creates a function that invokes `iteratees` with the arguments it receives
17288 * and returns their results.
17289 *
17290 * @static
17291 * @memberOf _
17292 * @since 4.0.0
17293 * @category Util
17294 * @param {...(Function|Function[])} [iteratees=[_.identity]]
17295 * The iteratees to invoke.
17296 * @returns {Function} Returns the new function.
17297 * @example
17298 *
17299 * var func = _.over([Math.max, Math.min]);
17300 *
17301 * func(1, 2, 3, 4);
17302 * // => [4, 1]
17303 */
17304 var over = createOver(arrayMap);
17305
17306 /**
17307 * Creates a function that checks if **all** of the `predicates` return
17308 * truthy when invoked with the arguments it receives.
17309 *
17310 * @static
17311 * @memberOf _
17312 * @since 4.0.0
17313 * @category Util
17314 * @param {...(Function|Function[])} [predicates=[_.identity]]
17315 * The predicates to check.
17316 * @returns {Function} Returns the new function.
17317 * @example
17318 *
17319 * var func = _.overEvery([Boolean, isFinite]);
17320 *
17321 * func('1');
17322 * // => true
17323 *
17324 * func(null);
17325 * // => false
17326 *
17327 * func(NaN);
17328 * // => false
17329 */
17330 var overEvery = createOver(arrayEvery);
17331
17332 /**
17333 * Creates a function that checks if **any** of the `predicates` return
17334 * truthy when invoked with the arguments it receives.
17335 *
17336 * @static
17337 * @memberOf _
17338 * @since 4.0.0
17339 * @category Util
17340 * @param {...(Function|Function[])} [predicates=[_.identity]]
17341 * The predicates to check.
17342 * @returns {Function} Returns the new function.
17343 * @example
17344 *
17345 * var func = _.overSome([Boolean, isFinite]);
17346 *
17347 * func('1');
17348 * // => true
17349 *
17350 * func(null);
17351 * // => true
17352 *
17353 * func(NaN);
17354 * // => false
17355 */
17356 var overSome = createOver(arraySome);
17357
17358 /**
17359 * Creates a function that returns the value at `path` of a given object.
17360 *
17361 * @static
17362 * @memberOf _
17363 * @since 2.4.0
17364 * @category Util
17365 * @param {Array|string} path The path of the property to get.
17366 * @returns {Function} Returns the new accessor function.
17367 * @example
17368 *
17369 * var objects = [
17370 * { 'a': { 'b': 2 } },
17371 * { 'a': { 'b': 1 } }
17372 * ];
17373 *
17374 * _.map(objects, _.property('a.b'));
17375 * // => [2, 1]
17376 *
17377 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
17378 * // => [1, 2]
17379 */
17380 function property(path) {
17381 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
17382 }
17383
17384 /**
17385 * The opposite of `_.property`; this method creates a function that returns
17386 * the value at a given path of `object`.
17387 *
17388 * @static
17389 * @memberOf _
17390 * @since 3.0.0
17391 * @category Util
17392 * @param {Object} object The object to query.
17393 * @returns {Function} Returns the new accessor function.
17394 * @example
17395 *
17396 * var array = [0, 1, 2],
17397 * object = { 'a': array, 'b': array, 'c': array };
17398 *
17399 * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
17400 * // => [2, 0]
17401 *
17402 * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
17403 * // => [2, 0]
17404 */
17405 function propertyOf(object) {
17406 return function(path) {
17407 return object == null ? undefined : baseGet(object, path);
17408 };
17409 }
17410
17411 /**
17412 * Creates an array of numbers (positive and/or negative) progressing from
17413 * `start` up to, but not including, `end`. A step of `-1` is used if a negative
17414 * `start` is specified without an `end` or `step`. If `end` is not specified,
17415 * it's set to `start` with `start` then set to `0`.
17416 *
17417 * **Note:** JavaScript follows the IEEE-754 standard for resolving
17418 * floating-point values which can produce unexpected results.
17419 *
17420 * @static
17421 * @since 0.1.0
17422 * @memberOf _
17423 * @category Util
17424 * @param {number} [start=0] The start of the range.
17425 * @param {number} end The end of the range.
17426 * @param {number} [step=1] The value to increment or decrement by.
17427 * @returns {Array} Returns the range of numbers.
17428 * @see _.inRange, _.rangeRight
17429 * @example
17430 *
17431 * _.range(4);
17432 * // => [0, 1, 2, 3]
17433 *
17434 * _.range(-4);
17435 * // => [0, -1, -2, -3]
17436 *
17437 * _.range(1, 5);
17438 * // => [1, 2, 3, 4]
17439 *
17440 * _.range(0, 20, 5);
17441 * // => [0, 5, 10, 15]
17442 *
17443 * _.range(0, -4, -1);
17444 * // => [0, -1, -2, -3]
17445 *
17446 * _.range(1, 4, 0);
17447 * // => [1, 1, 1]
17448 *
17449 * _.range(0);
17450 * // => []
17451 */
17452 var range = createRange();
17453
17454 /**
17455 * This method is like `_.range` except that it populates values in
17456 * descending order.
17457 *
17458 * @static
17459 * @memberOf _
17460 * @since 4.0.0
17461 * @category Util
17462 * @param {number} [start=0] The start of the range.
17463 * @param {number} end The end of the range.
17464 * @param {number} [step=1] The value to increment or decrement by.
17465 * @returns {Array} Returns the range of numbers.
17466 * @see _.inRange, _.range
17467 * @example
17468 *
17469 * _.rangeRight(4);
17470 * // => [3, 2, 1, 0]
17471 *
17472 * _.rangeRight(-4);
17473 * // => [-3, -2, -1, 0]
17474 *
17475 * _.rangeRight(1, 5);
17476 * // => [4, 3, 2, 1]
17477 *
17478 * _.rangeRight(0, 20, 5);
17479 * // => [15, 10, 5, 0]
17480 *
17481 * _.rangeRight(0, -4, -1);
17482 * // => [-3, -2, -1, 0]
17483 *
17484 * _.rangeRight(1, 4, 0);
17485 * // => [1, 1, 1]
17486 *
17487 * _.rangeRight(0);
17488 * // => []
17489 */
17490 var rangeRight = createRange(true);
17491
17492 /**
17493 * This method returns a new empty array.
17494 *
17495 * @static
17496 * @memberOf _
17497 * @since 4.13.0
17498 * @category Util
17499 * @returns {Array} Returns the new empty array.
17500 * @example
17501 *
17502 * var arrays = _.times(2, _.stubArray);
17503 *
17504 * console.log(arrays);
17505 * // => [[], []]
17506 *
17507 * console.log(arrays[0] === arrays[1]);
17508 * // => false
17509 */
17510 function stubArray() {
17511 return [];
17512 }
17513
17514 /**
17515 * This method returns `false`.
17516 *
17517 * @static
17518 * @memberOf _
17519 * @since 4.13.0
17520 * @category Util
17521 * @returns {boolean} Returns `false`.
17522 * @example
17523 *
17524 * _.times(2, _.stubFalse);
17525 * // => [false, false]
17526 */
17527 function stubFalse() {
17528 return false;
17529 }
17530
17531 /**
17532 * This method returns a new empty object.
17533 *
17534 * @static
17535 * @memberOf _
17536 * @since 4.13.0
17537 * @category Util
17538 * @returns {Object} Returns the new empty object.
17539 * @example
17540 *
17541 * var objects = _.times(2, _.stubObject);
17542 *
17543 * console.log(objects);
17544 * // => [{}, {}]
17545 *
17546 * console.log(objects[0] === objects[1]);
17547 * // => false
17548 */
17549 function stubObject() {
17550 return {};
17551 }
17552
17553 /**
17554 * This method returns an empty string.
17555 *
17556 * @static
17557 * @memberOf _
17558 * @since 4.13.0
17559 * @category Util
17560 * @returns {string} Returns the empty string.
17561 * @example
17562 *
17563 * _.times(2, _.stubString);
17564 * // => ['', '']
17565 */
17566 function stubString() {
17567 return '';
17568 }
17569
17570 /**
17571 * This method returns `true`.
17572 *
17573 * @static
17574 * @memberOf _
17575 * @since 4.13.0
17576 * @category Util
17577 * @returns {boolean} Returns `true`.
17578 * @example
17579 *
17580 * _.times(2, _.stubTrue);
17581 * // => [true, true]
17582 */
17583 function stubTrue() {
17584 return true;
17585 }
17586
17587 /**
17588 * Invokes the iteratee `n` times, returning an array of the results of
17589 * each invocation. The iteratee is invoked with one argument; (index).
17590 *
17591 * @static
17592 * @since 0.1.0
17593 * @memberOf _
17594 * @category Util
17595 * @param {number} n The number of times to invoke `iteratee`.
17596 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17597 * @returns {Array} Returns the array of results.
17598 * @example
17599 *
17600 * _.times(3, String);
17601 * // => ['0', '1', '2']
17602 *
17603 * _.times(4, _.constant(0));
17604 * // => [0, 0, 0, 0]
17605 */
17606 function times(n, iteratee) {
17607 n = toInteger(n);
17608 if (n < 1 || n > MAX_SAFE_INTEGER) {
17609 return [];
17610 }
17611 var index = MAX_ARRAY_LENGTH,
17612 length = nativeMin(n, MAX_ARRAY_LENGTH);
17613
17614 iteratee = getIteratee(iteratee);
17615 n -= MAX_ARRAY_LENGTH;
17616
17617 var result = baseTimes(length, iteratee);
17618 while (++index < n) {
17619 iteratee(index);
17620 }
17621 return result;
17622 }
17623
17624 /**
17625 * Converts `value` to a property path array.
17626 *
17627 * @static
17628 * @memberOf _
17629 * @since 4.0.0
17630 * @category Util
17631 * @param {*} value The value to convert.
17632 * @returns {Array} Returns the new property path array.
17633 * @example
17634 *
17635 * _.toPath('a.b.c');
17636 * // => ['a', 'b', 'c']
17637 *
17638 * _.toPath('a[0].b.c');
17639 * // => ['a', '0', 'b', 'c']
17640 */
17641 function toPath(value) {
17642 if (isArray(value)) {
17643 return arrayMap(value, toKey);
17644 }
17645 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
17646 }
17647
17648 /**
17649 * Generates a unique ID. If `prefix` is given, the ID is appended to it.
17650 *
17651 * @static
17652 * @since 0.1.0
17653 * @memberOf _
17654 * @category Util
17655 * @param {string} [prefix=''] The value to prefix the ID with.
17656 * @returns {string} Returns the unique ID.
17657 * @example
17658 *
17659 * _.uniqueId('contact_');
17660 * // => 'contact_104'
17661 *
17662 * _.uniqueId();
17663 * // => '105'
17664 */
17665 function uniqueId(prefix) {
17666 var id = ++idCounter;
17667 return toString(prefix) + id;
17668 }
17669
17670 /*------------------------------------------------------------------------*/
17671
17672 /**
17673 * Adds two numbers.
17674 *
17675 * @static
17676 * @memberOf _
17677 * @since 3.4.0
17678 * @category Math
17679 * @param {number} augend The first number in an addition.
17680 * @param {number} addend The second number in an addition.
17681 * @returns {number} Returns the total.
17682 * @example
17683 *
17684 * _.add(6, 4);
17685 * // => 10
17686 */
17687 var add = createMathOperation(function(augend, addend) {
17688 return augend + addend;
17689 }, 0);
17690
17691 /**
17692 * Computes `number` rounded up to `precision`.
17693 *
17694 * @static
17695 * @memberOf _
17696 * @since 3.10.0
17697 * @category Math
17698 * @param {number} number The number to round up.
17699 * @param {number} [precision=0] The precision to round up to.
17700 * @returns {number} Returns the rounded up number.
17701 * @example
17702 *
17703 * _.ceil(4.006);
17704 * // => 5
17705 *
17706 * _.ceil(6.004, 2);
17707 * // => 6.01
17708 *
17709 * _.ceil(6040, -2);
17710 * // => 6100
17711 */
17712 var ceil = createRound('ceil');
17713
17714 /**
17715 * Divide two numbers.
17716 *
17717 * @static
17718 * @memberOf _
17719 * @since 4.7.0
17720 * @category Math
17721 * @param {number} dividend The first number in a division.
17722 * @param {number} divisor The second number in a division.
17723 * @returns {number} Returns the quotient.
17724 * @example
17725 *
17726 * _.divide(6, 4);
17727 * // => 1.5
17728 */
17729 var divide = createMathOperation(function(dividend, divisor) {
17730 return dividend / divisor;
17731 }, 1);
17732
17733 /**
17734 * Computes `number` rounded down to `precision`.
17735 *
17736 * @static
17737 * @memberOf _
17738 * @since 3.10.0
17739 * @category Math
17740 * @param {number} number The number to round down.
17741 * @param {number} [precision=0] The precision to round down to.
17742 * @returns {number} Returns the rounded down number.
17743 * @example
17744 *
17745 * _.floor(4.006);
17746 * // => 4
17747 *
17748 * _.floor(0.046, 2);
17749 * // => 0.04
17750 *
17751 * _.floor(4060, -2);
17752 * // => 4000
17753 */
17754 var floor = createRound('floor');
17755
17756 /**
17757 * Computes the maximum value of `array`. If `array` is empty or falsey,
17758 * `undefined` is returned.
17759 *
17760 * @static
17761 * @since 0.1.0
17762 * @memberOf _
17763 * @category Math
17764 * @param {Array} array The array to iterate over.
17765 * @returns {*} Returns the maximum value.
17766 * @example
17767 *
17768 * _.max([4, 2, 8, 6]);
17769 * // => 8
17770 *
17771 * _.max([]);
17772 * // => undefined
17773 */
17774 function max(array) {
17775 return (array && array.length)
17776 ? baseExtremum(array, identity, baseGt)
17777 : undefined;
17778 }
17779
17780 /**
17781 * This method is like `_.max` except that it accepts `iteratee` which is
17782 * invoked for each element in `array` to generate the criterion by which
17783 * the value is ranked. The iteratee is invoked with one argument: (value).
17784 *
17785 * @static
17786 * @memberOf _
17787 * @since 4.0.0
17788 * @category Math
17789 * @param {Array} array The array to iterate over.
17790 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17791 * @returns {*} Returns the maximum value.
17792 * @example
17793 *
17794 * var objects = [{ 'n': 1 }, { 'n': 2 }];
17795 *
17796 * _.maxBy(objects, function(o) { return o.n; });
17797 * // => { 'n': 2 }
17798 *
17799 * // The `_.property` iteratee shorthand.
17800 * _.maxBy(objects, 'n');
17801 * // => { 'n': 2 }
17802 */
17803 function maxBy(array, iteratee) {
17804 return (array && array.length)
17805 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
17806 : undefined;
17807 }
17808
17809 /**
17810 * Computes the mean of the values in `array`.
17811 *
17812 * @static
17813 * @memberOf _
17814 * @since 4.0.0
17815 * @category Math
17816 * @param {Array} array The array to iterate over.
17817 * @returns {number} Returns the mean.
17818 * @example
17819 *
17820 * _.mean([4, 2, 8, 6]);
17821 * // => 5
17822 */
17823 function mean(array) {
17824 return baseMean(array, identity);
17825 }
17826
17827 /**
17828 * This method is like `_.mean` except that it accepts `iteratee` which is
17829 * invoked for each element in `array` to generate the value to be averaged.
17830 * The iteratee is invoked with one argument: (value).
17831 *
17832 * @static
17833 * @memberOf _
17834 * @since 4.7.0
17835 * @category Math
17836 * @param {Array} array The array to iterate over.
17837 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17838 * @returns {number} Returns the mean.
17839 * @example
17840 *
17841 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
17842 *
17843 * _.meanBy(objects, function(o) { return o.n; });
17844 * // => 5
17845 *
17846 * // The `_.property` iteratee shorthand.
17847 * _.meanBy(objects, 'n');
17848 * // => 5
17849 */
17850 function meanBy(array, iteratee) {
17851 return baseMean(array, getIteratee(iteratee, 2));
17852 }
17853
17854 /**
17855 * Computes the minimum value of `array`. If `array` is empty or falsey,
17856 * `undefined` is returned.
17857 *
17858 * @static
17859 * @since 0.1.0
17860 * @memberOf _
17861 * @category Math
17862 * @param {Array} array The array to iterate over.
17863 * @returns {*} Returns the minimum value.
17864 * @example
17865 *
17866 * _.min([4, 2, 8, 6]);
17867 * // => 2
17868 *
17869 * _.min([]);
17870 * // => undefined
17871 */
17872 function min(array) {
17873 return (array && array.length)
17874 ? baseExtremum(array, identity, baseLt)
17875 : undefined;
17876 }
17877
17878 /**
17879 * This method is like `_.min` except that it accepts `iteratee` which is
17880 * invoked for each element in `array` to generate the criterion by which
17881 * the value is ranked. The iteratee is invoked with one argument: (value).
17882 *
17883 * @static
17884 * @memberOf _
17885 * @since 4.0.0
17886 * @category Math
17887 * @param {Array} array The array to iterate over.
17888 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17889 * @returns {*} Returns the minimum value.
17890 * @example
17891 *
17892 * var objects = [{ 'n': 1 }, { 'n': 2 }];
17893 *
17894 * _.minBy(objects, function(o) { return o.n; });
17895 * // => { 'n': 1 }
17896 *
17897 * // The `_.property` iteratee shorthand.
17898 * _.minBy(objects, 'n');
17899 * // => { 'n': 1 }
17900 */
17901 function minBy(array, iteratee) {
17902 return (array && array.length)
17903 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
17904 : undefined;
17905 }
17906
17907 /**
17908 * Multiply two numbers.
17909 *
17910 * @static
17911 * @memberOf _
17912 * @since 4.7.0
17913 * @category Math
17914 * @param {number} multiplier The first number in a multiplication.
17915 * @param {number} multiplicand The second number in a multiplication.
17916 * @returns {number} Returns the product.
17917 * @example
17918 *
17919 * _.multiply(6, 4);
17920 * // => 24
17921 */
17922 var multiply = createMathOperation(function(multiplier, multiplicand) {
17923 return multiplier * multiplicand;
17924 }, 1);
17925
17926 /**
17927 * Computes `number` rounded to `precision`.
17928 *
17929 * @static
17930 * @memberOf _
17931 * @since 3.10.0
17932 * @category Math
17933 * @param {number} number The number to round.
17934 * @param {number} [precision=0] The precision to round to.
17935 * @returns {number} Returns the rounded number.
17936 * @example
17937 *
17938 * _.round(4.006);
17939 * // => 4
17940 *
17941 * _.round(4.006, 2);
17942 * // => 4.01
17943 *
17944 * _.round(4060, -2);
17945 * // => 4100
17946 */
17947 var round = createRound('round');
17948
17949 /**
17950 * Subtract two numbers.
17951 *
17952 * @static
17953 * @memberOf _
17954 * @since 4.0.0
17955 * @category Math
17956 * @param {number} minuend The first number in a subtraction.
17957 * @param {number} subtrahend The second number in a subtraction.
17958 * @returns {number} Returns the difference.
17959 * @example
17960 *
17961 * _.subtract(6, 4);
17962 * // => 2
17963 */
17964 var subtract = createMathOperation(function(minuend, subtrahend) {
17965 return minuend - subtrahend;
17966 }, 0);
17967
17968 /**
17969 * Computes the sum of the values in `array`.
17970 *
17971 * @static
17972 * @memberOf _
17973 * @since 3.4.0
17974 * @category Math
17975 * @param {Array} array The array to iterate over.
17976 * @returns {number} Returns the sum.
17977 * @example
17978 *
17979 * _.sum([4, 2, 8, 6]);
17980 * // => 20
17981 */
17982 function sum(array) {
17983 return (array && array.length)
17984 ? baseSum(array, identity)
17985 : 0;
17986 }
17987
17988 /**
17989 * This method is like `_.sum` except that it accepts `iteratee` which is
17990 * invoked for each element in `array` to generate the value to be summed.
17991 * The iteratee is invoked with one argument: (value).
17992 *
17993 * @static
17994 * @memberOf _
17995 * @since 4.0.0
17996 * @category Math
17997 * @param {Array} array The array to iterate over.
17998 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17999 * @returns {number} Returns the sum.
18000 * @example
18001 *
18002 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
18003 *
18004 * _.sumBy(objects, function(o) { return o.n; });
18005 * // => 20
18006 *
18007 * // The `_.property` iteratee shorthand.
18008 * _.sumBy(objects, 'n');
18009 * // => 20
18010 */
18011 function sumBy(array, iteratee) {
18012 return (array && array.length)
18013 ? baseSum(array, getIteratee(iteratee, 2))
18014 : 0;
18015 }
18016
18017 /*------------------------------------------------------------------------*/
18018
18019 // Add methods that return wrapped values in chain sequences.
18020 lodash.after = after;
18021 lodash.ary = ary;
18022 lodash.assign = assign;
18023 lodash.assignIn = assignIn;
18024 lodash.assignInWith = assignInWith;
18025 lodash.assignWith = assignWith;
18026 lodash.at = at;
18027 lodash.before = before;
18028 lodash.bind = bind;
18029 lodash.bindAll = bindAll;
18030 lodash.bindKey = bindKey;
18031 lodash.castArray = castArray;
18032 lodash.chain = chain;
18033 lodash.chunk = chunk;
18034 lodash.compact = compact;
18035 lodash.concat = concat;
18036 lodash.cond = cond;
18037 lodash.conforms = conforms;
18038 lodash.constant = constant;
18039 lodash.countBy = countBy;
18040 lodash.create = create;
18041 lodash.curry = curry;
18042 lodash.curryRight = curryRight;
18043 lodash.debounce = debounce;
18044 lodash.defaults = defaults;
18045 lodash.defaultsDeep = defaultsDeep;
18046 lodash.defer = defer;
18047 lodash.delay = delay;
18048 lodash.difference = difference;
18049 lodash.differenceBy = differenceBy;
18050 lodash.differenceWith = differenceWith;
18051 lodash.drop = drop;
18052 lodash.dropRight = dropRight;
18053 lodash.dropRightWhile = dropRightWhile;
18054 lodash.dropWhile = dropWhile;
18055 lodash.fill = fill;
18056 lodash.filter = filter;
18057 lodash.flatMap = flatMap;
18058 lodash.flatMapDeep = flatMapDeep;
18059 lodash.flatMapDepth = flatMapDepth;
18060 lodash.flatten = flatten;
18061 lodash.flattenDeep = flattenDeep;
18062 lodash.flattenDepth = flattenDepth;
18063 lodash.flip = flip;
18064 lodash.flow = flow;
18065 lodash.flowRight = flowRight;
18066 lodash.fromPairs = fromPairs;
18067 lodash.functions = functions;
18068 lodash.functionsIn = functionsIn;
18069 lodash.groupBy = groupBy;
18070 lodash.initial = initial;
18071 lodash.intersection = intersection;
18072 lodash.intersectionBy = intersectionBy;
18073 lodash.intersectionWith = intersectionWith;
18074 lodash.invert = invert;
18075 lodash.invertBy = invertBy;
18076 lodash.invokeMap = invokeMap;
18077 lodash.iteratee = iteratee;
18078 lodash.keyBy = keyBy;
18079 lodash.keys = keys;
18080 lodash.keysIn = keysIn;
18081 lodash.map = map;
18082 lodash.mapKeys = mapKeys;
18083 lodash.mapValues = mapValues;
18084 lodash.matches = matches;
18085 lodash.matchesProperty = matchesProperty;
18086 lodash.memoize = memoize;
18087 lodash.merge = merge;
18088 lodash.mergeWith = mergeWith;
18089 lodash.method = method;
18090 lodash.methodOf = methodOf;
18091 lodash.mixin = mixin;
18092 lodash.negate = negate;
18093 lodash.nthArg = nthArg;
18094 lodash.omit = omit;
18095 lodash.omitBy = omitBy;
18096 lodash.once = once;
18097 lodash.orderBy = orderBy;
18098 lodash.over = over;
18099 lodash.overArgs = overArgs;
18100 lodash.overEvery = overEvery;
18101 lodash.overSome = overSome;
18102 lodash.partial = partial;
18103 lodash.partialRight = partialRight;
18104 lodash.partition = partition;
18105 lodash.pick = pick;
18106 lodash.pickBy = pickBy;
18107 lodash.property = property;
18108 lodash.propertyOf = propertyOf;
18109 lodash.pull = pull;
18110 lodash.pullAll = pullAll;
18111 lodash.pullAllBy = pullAllBy;
18112 lodash.pullAllWith = pullAllWith;
18113 lodash.pullAt = pullAt;
18114 lodash.range = range;
18115 lodash.rangeRight = rangeRight;
18116 lodash.rearg = rearg;
18117 lodash.reject = reject;
18118 lodash.remove = remove;
18119 lodash.rest = rest;
18120 lodash.reverse = reverse;
18121 lodash.sampleSize = sampleSize;
18122 lodash.set = set;
18123 lodash.setWith = setWith;
18124 lodash.shuffle = shuffle;
18125 lodash.slice = slice;
18126 lodash.sortBy = sortBy;
18127 lodash.sortedUniq = sortedUniq;
18128 lodash.sortedUniqBy = sortedUniqBy;
18129 lodash.split = split;
18130 lodash.spread = spread;
18131 lodash.tail = tail;
18132 lodash.take = take;
18133 lodash.takeRight = takeRight;
18134 lodash.takeRightWhile = takeRightWhile;
18135 lodash.takeWhile = takeWhile;
18136 lodash.tap = tap;
18137 lodash.throttle = throttle;
18138 lodash.thru = thru;
18139 lodash.toArray = toArray;
18140 lodash.toPairs = toPairs;
18141 lodash.toPairsIn = toPairsIn;
18142 lodash.toPath = toPath;
18143 lodash.toPlainObject = toPlainObject;
18144 lodash.transform = transform;
18145 lodash.unary = unary;
18146 lodash.union = union;
18147 lodash.unionBy = unionBy;
18148 lodash.unionWith = unionWith;
18149 lodash.uniq = uniq;
18150 lodash.uniqBy = uniqBy;
18151 lodash.uniqWith = uniqWith;
18152 lodash.unset = unset;
18153 lodash.unzip = unzip;
18154 lodash.unzipWith = unzipWith;
18155 lodash.update = update;
18156 lodash.updateWith = updateWith;
18157 lodash.values = values;
18158 lodash.valuesIn = valuesIn;
18159 lodash.without = without;
18160 lodash.words = words;
18161 lodash.wrap = wrap;
18162 lodash.xor = xor;
18163 lodash.xorBy = xorBy;
18164 lodash.xorWith = xorWith;
18165 lodash.zip = zip;
18166 lodash.zipObject = zipObject;
18167 lodash.zipObjectDeep = zipObjectDeep;
18168 lodash.zipWith = zipWith;
18169
18170 // Add aliases.
18171 lodash.entries = toPairs;
18172 lodash.entriesIn = toPairsIn;
18173 lodash.extend = assignIn;
18174 lodash.extendWith = assignInWith;
18175
18176 // Add methods to `lodash.prototype`.
18177 mixin(lodash, lodash);
18178
18179 /*------------------------------------------------------------------------*/
18180
18181 // Add methods that return unwrapped values in chain sequences.
18182 lodash.add = add;
18183 lodash.attempt = attempt;
18184 lodash.camelCase = camelCase;
18185 lodash.capitalize = capitalize;
18186 lodash.ceil = ceil;
18187 lodash.clamp = clamp;
18188 lodash.clone = clone;
18189 lodash.cloneDeep = cloneDeep;
18190 lodash.cloneDeepWith = cloneDeepWith;
18191 lodash.cloneWith = cloneWith;
18192 lodash.conformsTo = conformsTo;
18193 lodash.deburr = deburr;
18194 lodash.defaultTo = defaultTo;
18195 lodash.divide = divide;
18196 lodash.endsWith = endsWith;
18197 lodash.eq = eq;
18198 lodash.escape = escape;
18199 lodash.escapeRegExp = escapeRegExp;
18200 lodash.every = every;
18201 lodash.find = find;
18202 lodash.findIndex = findIndex;
18203 lodash.findKey = findKey;
18204 lodash.findLast = findLast;
18205 lodash.findLastIndex = findLastIndex;
18206 lodash.findLastKey = findLastKey;
18207 lodash.floor = floor;
18208 lodash.forEach = forEach;
18209 lodash.forEachRight = forEachRight;
18210 lodash.forIn = forIn;
18211 lodash.forInRight = forInRight;
18212 lodash.forOwn = forOwn;
18213 lodash.forOwnRight = forOwnRight;
18214 lodash.get = get;
18215 lodash.gt = gt;
18216 lodash.gte = gte;
18217 lodash.has = has;
18218 lodash.hasIn = hasIn;
18219 lodash.head = head;
18220 lodash.identity = identity;
18221 lodash.includes = includes;
18222 lodash.indexOf = indexOf;
18223 lodash.inRange = inRange;
18224 lodash.invoke = invoke;
18225 lodash.isArguments = isArguments;
18226 lodash.isArray = isArray;
18227 lodash.isArrayBuffer = isArrayBuffer;
18228 lodash.isArrayLike = isArrayLike;
18229 lodash.isArrayLikeObject = isArrayLikeObject;
18230 lodash.isBoolean = isBoolean;
18231 lodash.isBuffer = isBuffer;
18232 lodash.isDate = isDate;
18233 lodash.isElement = isElement;
18234 lodash.isEmpty = isEmpty;
18235 lodash.isEqual = isEqual;
18236 lodash.isEqualWith = isEqualWith;
18237 lodash.isError = isError;
18238 lodash.isFinite = isFinite;
18239 lodash.isFunction = isFunction;
18240 lodash.isInteger = isInteger;
18241 lodash.isLength = isLength;
18242 lodash.isMap = isMap;
18243 lodash.isMatch = isMatch;
18244 lodash.isMatchWith = isMatchWith;
18245 lodash.isNaN = isNaN;
18246 lodash.isNative = isNative;
18247 lodash.isNil = isNil;
18248 lodash.isNull = isNull;
18249 lodash.isNumber = isNumber;
18250 lodash.isObject = isObject;
18251 lodash.isObjectLike = isObjectLike;
18252 lodash.isPlainObject = isPlainObject;
18253 lodash.isRegExp = isRegExp;
18254 lodash.isSafeInteger = isSafeInteger;
18255 lodash.isSet = isSet;
18256 lodash.isString = isString;
18257 lodash.isSymbol = isSymbol;
18258 lodash.isTypedArray = isTypedArray;
18259 lodash.isUndefined = isUndefined;
18260 lodash.isWeakMap = isWeakMap;
18261 lodash.isWeakSet = isWeakSet;
18262 lodash.join = join;
18263 lodash.kebabCase = kebabCase;
18264 lodash.last = last;
18265 lodash.lastIndexOf = lastIndexOf;
18266 lodash.lowerCase = lowerCase;
18267 lodash.lowerFirst = lowerFirst;
18268 lodash.lt = lt;
18269 lodash.lte = lte;
18270 lodash.max = max;
18271 lodash.maxBy = maxBy;
18272 lodash.mean = mean;
18273 lodash.meanBy = meanBy;
18274 lodash.min = min;
18275 lodash.minBy = minBy;
18276 lodash.stubArray = stubArray;
18277 lodash.stubFalse = stubFalse;
18278 lodash.stubObject = stubObject;
18279 lodash.stubString = stubString;
18280 lodash.stubTrue = stubTrue;
18281 lodash.multiply = multiply;
18282 lodash.nth = nth;
18283 lodash.noConflict = noConflict;
18284 lodash.noop = noop;
18285 lodash.now = now;
18286 lodash.pad = pad;
18287 lodash.padEnd = padEnd;
18288 lodash.padStart = padStart;
18289 lodash.parseInt = parseInt;
18290 lodash.random = random;
18291 lodash.reduce = reduce;
18292 lodash.reduceRight = reduceRight;
18293 lodash.repeat = repeat;
18294 lodash.replace = replace;
18295 lodash.result = result;
18296 lodash.round = round;
18297 lodash.runInContext = runInContext;
18298 lodash.sample = sample;
18299 lodash.size = size;
18300 lodash.snakeCase = snakeCase;
18301 lodash.some = some;
18302 lodash.sortedIndex = sortedIndex;
18303 lodash.sortedIndexBy = sortedIndexBy;
18304 lodash.sortedIndexOf = sortedIndexOf;
18305 lodash.sortedLastIndex = sortedLastIndex;
18306 lodash.sortedLastIndexBy = sortedLastIndexBy;
18307 lodash.sortedLastIndexOf = sortedLastIndexOf;
18308 lodash.startCase = startCase;
18309 lodash.startsWith = startsWith;
18310 lodash.subtract = subtract;
18311 lodash.sum = sum;
18312 lodash.sumBy = sumBy;
18313 lodash.template = template;
18314 lodash.times = times;
18315 lodash.toFinite = toFinite;
18316 lodash.toInteger = toInteger;
18317 lodash.toLength = toLength;
18318 lodash.toLower = toLower;
18319 lodash.toNumber = toNumber;
18320 lodash.toSafeInteger = toSafeInteger;
18321 lodash.toString = toString;
18322 lodash.toUpper = toUpper;
18323 lodash.trim = trim;
18324 lodash.trimEnd = trimEnd;
18325 lodash.trimStart = trimStart;
18326 lodash.truncate = truncate;
18327 lodash.unescape = unescape;
18328 lodash.uniqueId = uniqueId;
18329 lodash.upperCase = upperCase;
18330 lodash.upperFirst = upperFirst;
18331
18332 // Add aliases.
18333 lodash.each = forEach;
18334 lodash.eachRight = forEachRight;
18335 lodash.first = head;
18336
18337 mixin(lodash, (function() {
18338 var source = {};
18339 baseForOwn(lodash, function(func, methodName) {
18340 if (!hasOwnProperty.call(lodash.prototype, methodName)) {
18341 source[methodName] = func;
18342 }
18343 });
18344 return source;
18345 }()), { 'chain': false });
18346
18347 /*------------------------------------------------------------------------*/
18348
18349 /**
18350 * The semantic version number.
18351 *
18352 * @static
18353 * @memberOf _
18354 * @type {string}
18355 */
18356 lodash.VERSION = VERSION;
18357
18358 // Assign default placeholders.
18359 arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
18360 lodash[methodName].placeholder = lodash;
18361 });
18362
18363 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
18364 arrayEach(['drop', 'take'], function(methodName, index) {
18365 LazyWrapper.prototype[methodName] = function(n) {
18366 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
18367
18368 var result = (this.__filtered__ && !index)
18369 ? new LazyWrapper(this)
18370 : this.clone();
18371
18372 if (result.__filtered__) {
18373 result.__takeCount__ = nativeMin(n, result.__takeCount__);
18374 } else {
18375 result.__views__.push({
18376 'size': nativeMin(n, MAX_ARRAY_LENGTH),
18377 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
18378 });
18379 }
18380 return result;
18381 };
18382
18383 LazyWrapper.prototype[methodName + 'Right'] = function(n) {
18384 return this.reverse()[methodName](n).reverse();
18385 };
18386 });
18387
18388 // Add `LazyWrapper` methods that accept an `iteratee` value.
18389 arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
18390 var type = index + 1,
18391 isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
18392
18393 LazyWrapper.prototype[methodName] = function(iteratee) {
18394 var result = this.clone();
18395 result.__iteratees__.push({
18396 'iteratee': getIteratee(iteratee, 3),
18397 'type': type
18398 });
18399 result.__filtered__ = result.__filtered__ || isFilter;
18400 return result;
18401 };
18402 });
18403
18404 // Add `LazyWrapper` methods for `_.head` and `_.last`.
18405 arrayEach(['head', 'last'], function(methodName, index) {
18406 var takeName = 'take' + (index ? 'Right' : '');
18407
18408 LazyWrapper.prototype[methodName] = function() {
18409 return this[takeName](1).value()[0];
18410 };
18411 });
18412
18413 // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
18414 arrayEach(['initial', 'tail'], function(methodName, index) {
18415 var dropName = 'drop' + (index ? '' : 'Right');
18416
18417 LazyWrapper.prototype[methodName] = function() {
18418 return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
18419 };
18420 });
18421
18422 LazyWrapper.prototype.compact = function() {
18423 return this.filter(identity);
18424 };
18425
18426 LazyWrapper.prototype.find = function(predicate) {
18427 return this.filter(predicate).head();
18428 };
18429
18430 LazyWrapper.prototype.findLast = function(predicate) {
18431 return this.reverse().find(predicate);
18432 };
18433
18434 LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
18435 if (typeof path == 'function') {
18436 return new LazyWrapper(this);
18437 }
18438 return this.map(function(value) {
18439 return baseInvoke(value, path, args);
18440 });
18441 });
18442
18443 LazyWrapper.prototype.reject = function(predicate) {
18444 return this.filter(negate(getIteratee(predicate)));
18445 };
18446
18447 LazyWrapper.prototype.slice = function(start, end) {
18448 start = toInteger(start);
18449
18450 var result = this;
18451 if (result.__filtered__ && (start > 0 || end < 0)) {
18452 return new LazyWrapper(result);
18453 }
18454 if (start < 0) {
18455 result = result.takeRight(-start);
18456 } else if (start) {
18457 result = result.drop(start);
18458 }
18459 if (end !== undefined) {
18460 end = toInteger(end);
18461 result = end < 0 ? result.dropRight(-end) : result.take(end - start);
18462 }
18463 return result;
18464 };
18465
18466 LazyWrapper.prototype.takeRightWhile = function(predicate) {
18467 return this.reverse().takeWhile(predicate).reverse();
18468 };
18469
18470 LazyWrapper.prototype.toArray = function() {
18471 return this.take(MAX_ARRAY_LENGTH);
18472 };
18473
18474 // Add `LazyWrapper` methods to `lodash.prototype`.
18475 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
18476 var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
18477 isTaker = /^(?:head|last)$/.test(methodName),
18478 lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
18479 retUnwrapped = isTaker || /^find/.test(methodName);
18480
18481 if (!lodashFunc) {
18482 return;
18483 }
18484 lodash.prototype[methodName] = function() {
18485 var value = this.__wrapped__,
18486 args = isTaker ? [1] : arguments,
18487 isLazy = value instanceof LazyWrapper,
18488 iteratee = args[0],
18489 useLazy = isLazy || isArray(value);
18490
18491 var interceptor = function(value) {
18492 var result = lodashFunc.apply(lodash, arrayPush([value], args));
18493 return (isTaker && chainAll) ? result[0] : result;
18494 };
18495
18496 if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
18497 // Avoid lazy use if the iteratee has a "length" value other than `1`.
18498 isLazy = useLazy = false;
18499 }
18500 var chainAll = this.__chain__,
18501 isHybrid = !!this.__actions__.length,
18502 isUnwrapped = retUnwrapped && !chainAll,
18503 onlyLazy = isLazy && !isHybrid;
18504
18505 if (!retUnwrapped && useLazy) {
18506 value = onlyLazy ? value : new LazyWrapper(this);
18507 var result = func.apply(value, args);
18508 result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
18509 return new LodashWrapper(result, chainAll);
18510 }
18511 if (isUnwrapped && onlyLazy) {
18512 return func.apply(this, args);
18513 }
18514 result = this.thru(interceptor);
18515 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
18516 };
18517 });
18518
18519 // Add `Array` methods to `lodash.prototype`.
18520 arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
18521 var func = arrayProto[methodName],
18522 chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
18523 retUnwrapped = /^(?:pop|shift)$/.test(methodName);
18524
18525 lodash.prototype[methodName] = function() {
18526 var args = arguments;
18527 if (retUnwrapped && !this.__chain__) {
18528 var value = this.value();
18529 return func.apply(isArray(value) ? value : [], args);
18530 }
18531 return this[chainName](function(value) {
18532 return func.apply(isArray(value) ? value : [], args);
18533 });
18534 };
18535 });
18536
18537 // Map minified method names to their real names.
18538 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
18539 var lodashFunc = lodash[methodName];
18540 if (lodashFunc) {
18541 var key = (lodashFunc.name + ''),
18542 names = realNames[key] || (realNames[key] = []);
18543
18544 names.push({ 'name': methodName, 'func': lodashFunc });
18545 }
18546 });
18547
18548 realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
18549 'name': 'wrapper',
18550 'func': undefined
18551 }];
18552
18553 // Add methods to `LazyWrapper`.
18554 LazyWrapper.prototype.clone = lazyClone;
18555 LazyWrapper.prototype.reverse = lazyReverse;
18556 LazyWrapper.prototype.value = lazyValue;
18557
18558 // Add chain sequence methods to the `lodash` wrapper.
18559 lodash.prototype.at = wrapperAt;
18560 lodash.prototype.chain = wrapperChain;
18561 lodash.prototype.commit = wrapperCommit;
18562 lodash.prototype.next = wrapperNext;
18563 lodash.prototype.plant = wrapperPlant;
18564 lodash.prototype.reverse = wrapperReverse;
18565 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
18566
18567 // Add lazy aliases.
18568 lodash.prototype.first = lodash.prototype.head;
18569
18570 if (symIterator) {
18571 lodash.prototype[symIterator] = wrapperToIterator;
18572 }
18573 return lodash;
18574 });
18575
18576 /*--------------------------------------------------------------------------*/
18577
18578 // Export lodash.
18579 var _ = runInContext();
18580
18581 // Some AMD build optimizers, like r.js, check for condition patterns like:
18582 if (typeof undefined == 'function' && typeof undefined.amd == 'object' && undefined.amd) {
18583 // Expose Lodash on the global object to prevent errors when Lodash is
18584 // loaded by a script tag in the presence of an AMD loader.
18585 // See http://requirejs.org/docs/errors.html#mismatch for more details.
18586 // Use `_.noConflict` to remove Lodash from the global object.
18587 root._ = _;
18588
18589 // Define as an anonymous module so, through path mapping, it can be
18590 // referenced as the "underscore" module.
18591 undefined(function() {
18592 return _;
18593 });
18594 }
18595 // Check for `exports` after `define` in case a build optimizer adds it.
18596 else if (freeModule) {
18597 // Export for Node.js.
18598 (freeModule.exports = _)._ = _;
18599 // Export for CommonJS support.
18600 freeExports._ = _;
18601 }
18602 else {
18603 // Export to the global object.
18604 root._ = _;
18605 }
18606}.call(commonjsGlobal));
18607});
18608
18609var slice$3 = lib.prototypes.string.slice;
18610var typeOf$1 = lib.typeOf;
18611var valueToString$4 = lib.valueToString;
18612
18613var iterableToString = function iterableToString(obj) {
18614 var representation = "";
18615
18616 function stringify(item) {
18617 return typeof item === "string"
18618 ? "'" + item + "'"
18619 : valueToString$4(item);
18620 }
18621
18622 function mapToString(map) {
18623 /* eslint-disable-next-line local-rules/no-prototype-methods */
18624 map.forEach(function(value, key) {
18625 representation +=
18626 "[" + stringify(key) + "," + stringify(value) + "],";
18627 });
18628
18629 representation = slice$3(representation, 0, -1);
18630 return representation;
18631 }
18632
18633 function genericIterableToString(iterable) {
18634 /* eslint-disable-next-line local-rules/no-prototype-methods */
18635 iterable.forEach(function(value) {
18636 representation += stringify(value) + ",";
18637 });
18638
18639 representation = slice$3(representation, 0, -1);
18640 return representation;
18641 }
18642
18643 if (typeOf$1(obj) === "map") {
18644 return mapToString(obj);
18645 }
18646
18647 return genericIterableToString(obj);
18648};
18649
18650var arrayProto$3 = lib.prototypes.array;
18651var deepEqual$1 = deepEqual.use(match); // eslint-disable-line no-use-before-define
18652var every$3 = lib.every;
18653var functionName$2 = lib.functionName;
18654var get = lodash.get;
18655
18656var objectProto = lib.prototypes.object;
18657var stringProto = lib.prototypes.string;
18658var typeOf$2 = lib.typeOf;
18659var valueToString$5 = lib.valueToString;
18660
18661var arrayIndexOf = arrayProto$3.indexOf;
18662var arrayEvery = arrayProto$3.every;
18663var join$2 = arrayProto$3.join;
18664var map = arrayProto$3.map;
18665var some = arrayProto$3.some;
18666
18667var hasOwnProperty$3 = objectProto.hasOwnProperty;
18668var isPrototypeOf = objectProto.isPrototypeOf;
18669
18670var stringIndexOf = stringProto.indexOf;
18671
18672function assertType(value, type, name) {
18673 var actual = typeOf$2(value);
18674 if (actual !== type) {
18675 throw new TypeError(
18676 "Expected type of " +
18677 name +
18678 " to be " +
18679 type +
18680 ", but was " +
18681 actual
18682 );
18683 }
18684}
18685
18686function assertMethodExists(value, method, name, methodPath) {
18687 if (value[method] == null) {
18688 throw new TypeError(
18689 "Expected " + name + " to have method " + methodPath
18690 );
18691 }
18692}
18693
18694var matcher = {
18695 toString: function() {
18696 return this.message;
18697 }
18698};
18699
18700function isMatcher(object) {
18701 return isPrototypeOf(matcher, object);
18702}
18703
18704function matchObject(actual, expectation) {
18705 if (actual === null || actual === undefined) {
18706 return false;
18707 }
18708
18709 return arrayEvery(Object.keys(expectation), function(key) {
18710 var exp = expectation[key];
18711 var act = actual[key];
18712
18713 if (isMatcher(exp)) {
18714 if (!exp.test(act)) {
18715 return false;
18716 }
18717 } else if (typeOf$2(exp) === "object") {
18718 if (!matchObject(act, exp)) {
18719 return false;
18720 }
18721 } else if (!deepEqual$1(act, exp)) {
18722 return false;
18723 }
18724
18725 return true;
18726 });
18727}
18728
18729var TYPE_MAP = {
18730 function: function(m, expectation, message) {
18731 m.test = expectation;
18732 m.message = message || "match(" + functionName$2(expectation) + ")";
18733 },
18734 number: function(m, expectation) {
18735 m.test = function(actual) {
18736 // we need type coercion here
18737 return expectation == actual; // eslint-disable-line eqeqeq
18738 };
18739 },
18740 object: function(m, expectation) {
18741 var array = [];
18742
18743 if (typeof expectation.test === "function") {
18744 m.test = function(actual) {
18745 return expectation.test(actual) === true;
18746 };
18747 m.message = "match(" + functionName$2(expectation.test) + ")";
18748 return m;
18749 }
18750
18751 array = map(Object.keys(expectation), function(key) {
18752 return key + ": " + valueToString$5(expectation[key]);
18753 });
18754
18755 m.test = function(actual) {
18756 return matchObject(actual, expectation);
18757 };
18758 m.message = "match(" + join$2(array, ", ") + ")";
18759
18760 return m;
18761 },
18762 regexp: function(m, expectation) {
18763 m.test = function(actual) {
18764 return typeof actual === "string" && expectation.test(actual);
18765 };
18766 },
18767 string: function(m, expectation) {
18768 m.test = function(actual) {
18769 return (
18770 typeof actual === "string" &&
18771 stringIndexOf(actual, expectation) !== -1
18772 );
18773 };
18774 m.message = 'match("' + expectation + '")';
18775 }
18776};
18777
18778function match(expectation, message) {
18779 var m = Object.create(matcher);
18780 var type = typeOf$2(expectation);
18781
18782 if (message !== undefined && typeof message !== "string") {
18783 throw new TypeError("Message should be a string");
18784 }
18785
18786 if (arguments.length > 2) {
18787 throw new TypeError(
18788 "Expected 1 or 2 arguments, received " + arguments.length
18789 );
18790 }
18791
18792 if (type in TYPE_MAP) {
18793 TYPE_MAP[type](m, expectation, message);
18794 } else {
18795 m.test = function(actual) {
18796 return deepEqual$1(actual, expectation);
18797 };
18798 }
18799
18800 if (!m.message) {
18801 m.message = "match(" + valueToString$5(expectation) + ")";
18802 }
18803
18804 return m;
18805}
18806
18807matcher.or = function(m2) {
18808 if (!arguments.length) {
18809 throw new TypeError("Matcher expected");
18810 } else if (!isMatcher(m2)) {
18811 m2 = match(m2);
18812 }
18813 var m1 = this;
18814 var or = Object.create(matcher);
18815 or.test = function(actual) {
18816 return m1.test(actual) || m2.test(actual);
18817 };
18818 or.message = m1.message + ".or(" + m2.message + ")";
18819 return or;
18820};
18821
18822matcher.and = function(m2) {
18823 if (!arguments.length) {
18824 throw new TypeError("Matcher expected");
18825 } else if (!isMatcher(m2)) {
18826 m2 = match(m2);
18827 }
18828 var m1 = this;
18829 var and = Object.create(matcher);
18830 and.test = function(actual) {
18831 return m1.test(actual) && m2.test(actual);
18832 };
18833 and.message = m1.message + ".and(" + m2.message + ")";
18834 return and;
18835};
18836
18837match.isMatcher = isMatcher;
18838
18839match.any = match(function() {
18840 return true;
18841}, "any");
18842
18843match.defined = match(function(actual) {
18844 return actual !== null && actual !== undefined;
18845}, "defined");
18846
18847match.truthy = match(function(actual) {
18848 return !!actual;
18849}, "truthy");
18850
18851match.falsy = match(function(actual) {
18852 return !actual;
18853}, "falsy");
18854
18855match.same = function(expectation) {
18856 return match(function(actual) {
18857 return expectation === actual;
18858 }, "same(" + valueToString$5(expectation) + ")");
18859};
18860
18861match.in = function(arrayOfExpectations) {
18862 if (typeOf$2(arrayOfExpectations) !== "array") {
18863 throw new TypeError("array expected");
18864 }
18865
18866 return match(function(actual) {
18867 return some(arrayOfExpectations, function(expectation) {
18868 return expectation === actual;
18869 });
18870 }, "in(" + valueToString$5(arrayOfExpectations) + ")");
18871};
18872
18873match.typeOf = function(type) {
18874 assertType(type, "string", "type");
18875 return match(function(actual) {
18876 return typeOf$2(actual) === type;
18877 }, 'typeOf("' + type + '")');
18878};
18879
18880match.instanceOf = function(type) {
18881 if (
18882 typeof Symbol === "undefined" ||
18883 typeof Symbol.hasInstance === "undefined"
18884 ) {
18885 assertType(type, "function", "type");
18886 } else {
18887 assertMethodExists(
18888 type,
18889 Symbol.hasInstance,
18890 "type",
18891 "[Symbol.hasInstance]"
18892 );
18893 }
18894 return match(function(actual) {
18895 return actual instanceof type;
18896 }, "instanceOf(" +
18897 (functionName$2(type) || Object.prototype.toString.call(type)) +
18898 ")");
18899};
18900
18901function createPropertyMatcher(propertyTest, messagePrefix) {
18902 return function(property, value) {
18903 assertType(property, "string", "property");
18904 var onlyProperty = arguments.length === 1;
18905 var message = messagePrefix + '("' + property + '"';
18906 if (!onlyProperty) {
18907 message += ", " + valueToString$5(value);
18908 }
18909 message += ")";
18910 return match(function(actual) {
18911 if (
18912 actual === undefined ||
18913 actual === null ||
18914 !propertyTest(actual, property)
18915 ) {
18916 return false;
18917 }
18918 return onlyProperty || deepEqual$1(actual[property], value);
18919 }, message);
18920 };
18921}
18922
18923match.has = createPropertyMatcher(function(actual, property) {
18924 if (typeof actual === "object") {
18925 return property in actual;
18926 }
18927 return actual[property] !== undefined;
18928}, "has");
18929
18930match.hasOwn = createPropertyMatcher(function(actual, property) {
18931 return hasOwnProperty$3(actual, property);
18932}, "hasOwn");
18933
18934match.hasNested = function(property, value) {
18935 assertType(property, "string", "property");
18936 var onlyProperty = arguments.length === 1;
18937 var message = 'hasNested("' + property + '"';
18938 if (!onlyProperty) {
18939 message += ", " + valueToString$5(value);
18940 }
18941 message += ")";
18942 return match(function(actual) {
18943 if (
18944 actual === undefined ||
18945 actual === null ||
18946 get(actual, property) === undefined
18947 ) {
18948 return false;
18949 }
18950 return onlyProperty || deepEqual$1(get(actual, property), value);
18951 }, message);
18952};
18953
18954match.every = function(predicate) {
18955 if (!isMatcher(predicate)) {
18956 throw new TypeError("Matcher expected");
18957 }
18958
18959 return match(function(actual) {
18960 if (typeOf$2(actual) === "object") {
18961 return every$3(Object.keys(actual), function(key) {
18962 return predicate.test(actual[key]);
18963 });
18964 }
18965
18966 return (
18967 !!actual &&
18968 typeOf$2(actual.forEach) === "function" &&
18969 every$3(actual, function(element) {
18970 return predicate.test(element);
18971 })
18972 );
18973 }, "every(" + predicate.message + ")");
18974};
18975
18976match.some = function(predicate) {
18977 if (!isMatcher(predicate)) {
18978 throw new TypeError("Matcher expected");
18979 }
18980
18981 return match(function(actual) {
18982 if (typeOf$2(actual) === "object") {
18983 return !every$3(Object.keys(actual), function(key) {
18984 return !predicate.test(actual[key]);
18985 });
18986 }
18987
18988 return (
18989 !!actual &&
18990 typeOf$2(actual.forEach) === "function" &&
18991 !every$3(actual, function(element) {
18992 return !predicate.test(element);
18993 })
18994 );
18995 }, "some(" + predicate.message + ")");
18996};
18997
18998match.array = match.typeOf("array");
18999
19000match.array.deepEquals = function(expectation) {
19001 return match(function(actual) {
19002 // Comparing lengths is the fastest way to spot a difference before iterating through every item
19003 var sameLength = actual.length === expectation.length;
19004 return (
19005 typeOf$2(actual) === "array" &&
19006 sameLength &&
19007 every$3(actual, function(element, index) {
19008 var expected = expectation[index];
19009 return typeOf$2(expected) === "array" &&
19010 typeOf$2(element) === "array"
19011 ? match.array.deepEquals(expected).test(element)
19012 : deepEqual$1(expected, element);
19013 })
19014 );
19015 }, "deepEquals([" + iterableToString(expectation) + "])");
19016};
19017
19018match.array.startsWith = function(expectation) {
19019 return match(function(actual) {
19020 return (
19021 typeOf$2(actual) === "array" &&
19022 every$3(expectation, function(expectedElement, index) {
19023 return actual[index] === expectedElement;
19024 })
19025 );
19026 }, "startsWith([" + iterableToString(expectation) + "])");
19027};
19028
19029match.array.endsWith = function(expectation) {
19030 return match(function(actual) {
19031 // This indicates the index in which we should start matching
19032 var offset = actual.length - expectation.length;
19033
19034 return (
19035 typeOf$2(actual) === "array" &&
19036 every$3(expectation, function(expectedElement, index) {
19037 return actual[offset + index] === expectedElement;
19038 })
19039 );
19040 }, "endsWith([" + iterableToString(expectation) + "])");
19041};
19042
19043match.array.contains = function(expectation) {
19044 return match(function(actual) {
19045 return (
19046 typeOf$2(actual) === "array" &&
19047 every$3(expectation, function(expectedElement) {
19048 return arrayIndexOf(actual, expectedElement) !== -1;
19049 })
19050 );
19051 }, "contains([" + iterableToString(expectation) + "])");
19052};
19053
19054match.map = match.typeOf("map");
19055
19056match.map.deepEquals = function mapDeepEquals(expectation) {
19057 return match(function(actual) {
19058 // Comparing lengths is the fastest way to spot a difference before iterating through every item
19059 var sameLength = actual.size === expectation.size;
19060 return (
19061 typeOf$2(actual) === "map" &&
19062 sameLength &&
19063 every$3(actual, function(element, key) {
19064 return expectation.has(key) && expectation.get(key) === element;
19065 })
19066 );
19067 }, "deepEquals(Map[" + iterableToString(expectation) + "])");
19068};
19069
19070match.map.contains = function mapContains(expectation) {
19071 return match(function(actual) {
19072 return (
19073 typeOf$2(actual) === "map" &&
19074 every$3(expectation, function(element, key) {
19075 return actual.has(key) && actual.get(key) === element;
19076 })
19077 );
19078 }, "contains(Map[" + iterableToString(expectation) + "])");
19079};
19080
19081match.set = match.typeOf("set");
19082
19083match.set.deepEquals = function setDeepEquals(expectation) {
19084 return match(function(actual) {
19085 // Comparing lengths is the fastest way to spot a difference before iterating through every item
19086 var sameLength = actual.size === expectation.size;
19087 return (
19088 typeOf$2(actual) === "set" &&
19089 sameLength &&
19090 every$3(actual, function(element) {
19091 return expectation.has(element);
19092 })
19093 );
19094 }, "deepEquals(Set[" + iterableToString(expectation) + "])");
19095};
19096
19097match.set.contains = function setContains(expectation) {
19098 return match(function(actual) {
19099 return (
19100 typeOf$2(actual) === "set" &&
19101 every$3(expectation, function(element) {
19102 return actual.has(element);
19103 })
19104 );
19105 }, "contains(Set[" + iterableToString(expectation) + "])");
19106};
19107
19108match.bool = match.typeOf("boolean");
19109match.number = match.typeOf("number");
19110match.string = match.typeOf("string");
19111match.object = match.typeOf("object");
19112match.func = match.typeOf("function");
19113match.regexp = match.typeOf("regexp");
19114match.date = match.typeOf("date");
19115match.symbol = match.typeOf("symbol");
19116
19117var matcher_1 = match;
19118
19119var valueToString$6 = lib.valueToString;
19120
19121var deepEqual$2 = deepEqual.use(match$1); // eslint-disable-line no-use-before-define
19122
19123
19124
19125
19126
19127
19128function arrayContains(array, subset, compare) {
19129 if (subset.length === 0) {
19130 return true;
19131 }
19132 var i, l, j, k;
19133 for (i = 0, l = array.length; i < l; ++i) {
19134 if (compare(array[i], subset[0])) {
19135 for (j = 0, k = subset.length; j < k; ++j) {
19136 if (i + j >= l) {
19137 return false;
19138 }
19139 if (!compare(array[i + j], subset[j])) {
19140 return false;
19141 }
19142 }
19143 return true;
19144 }
19145 }
19146 return false;
19147}
19148
19149/**
19150 * @name samsam.match
19151 * @param Object object
19152 * @param Object matcher
19153 *
19154 * Compare arbitrary value ``object`` with matcher.
19155 */
19156function match$1(object, matcher) {
19157 if (matcher && typeof matcher.test === "function") {
19158 return matcher.test(object);
19159 }
19160
19161 if (typeof matcher === "function") {
19162 return matcher(object) === true;
19163 }
19164
19165 if (typeof matcher === "string") {
19166 matcher = matcher.toLowerCase();
19167 var notNull = typeof object === "string" || !!object;
19168 return (
19169 notNull &&
19170 valueToString$6(object)
19171 .toLowerCase()
19172 .indexOf(matcher) >= 0
19173 );
19174 }
19175
19176 if (typeof matcher === "number") {
19177 return matcher === object;
19178 }
19179
19180 if (typeof matcher === "boolean") {
19181 return matcher === object;
19182 }
19183
19184 if (typeof matcher === "undefined") {
19185 return typeof object === "undefined";
19186 }
19187
19188 if (matcher === null) {
19189 return object === null;
19190 }
19191
19192 if (object === null) {
19193 return false;
19194 }
19195
19196 if (isSet_1(object)) {
19197 return isSubset_1(matcher, object, match$1);
19198 }
19199
19200 if (getClass_1(object) === "Array" && getClass_1(matcher) === "Array") {
19201 return arrayContains(object, matcher, match$1);
19202 }
19203
19204 if (isDate_1(matcher)) {
19205 return isDate_1(object) && object.getTime() === matcher.getTime();
19206 }
19207
19208 if (matcher && typeof matcher === "object") {
19209 if (matcher === object) {
19210 return true;
19211 }
19212 if (typeof object !== "object") {
19213 return false;
19214 }
19215 var prop;
19216 // eslint-disable-next-line guard-for-in
19217 for (prop in matcher) {
19218 var value = object[prop];
19219 if (
19220 typeof value === "undefined" &&
19221 typeof object.getAttribute === "function"
19222 ) {
19223 value = object.getAttribute(prop);
19224 }
19225 if (
19226 matcher[prop] === null ||
19227 typeof matcher[prop] === "undefined"
19228 ) {
19229 if (value !== matcher[prop]) {
19230 return false;
19231 }
19232 } else if (
19233 typeof value === "undefined" ||
19234 !deepEqual$2(value, matcher[prop])
19235 ) {
19236 return false;
19237 }
19238 }
19239 return true;
19240 }
19241
19242 throw new Error(
19243 "Matcher was not a string, a number, a " +
19244 "function, a boolean or an object"
19245 );
19246}
19247
19248Object.keys(matcher_1).forEach(function(key) {
19249 match$1[key] = matcher_1[key];
19250});
19251
19252var match_1 = match$1;
19253
19254var deepEqualCyclic$1 = deepEqual.use(match_1);
19255
19256
19257var samsam = {
19258 createMatcher: matcher_1,
19259 deepEqual: deepEqualCyclic$1,
19260 identical: identical_1,
19261 isArguments: isArguments_1,
19262 isElement: isElement_1,
19263 isNegZero: isNegZero_1,
19264 isSet: isSet_1,
19265 match: match_1
19266};
19267
19268var array$1 = [null, "once", "twice", "thrice"];
19269
19270var timesInWords = function timesInWords(count) {
19271 return array$1[count] || (count || 0) + " times";
19272};
19273
19274var functionName$3 = lib.functionName;
19275var typeOf$3 = lib.typeOf;
19276
19277var formatio = {
19278 excludeConstructors: ["Object", /^.$/],
19279 quoteStrings: true,
19280 limitChildrenCount: 0
19281};
19282
19283var specialObjects = [];
19284if (typeof commonjsGlobal !== "undefined") {
19285 specialObjects.push({ object: commonjsGlobal, value: "[object global]" });
19286}
19287if (typeof document !== "undefined") {
19288 specialObjects.push({
19289 object: document,
19290 value: "[object HTMLDocument]"
19291 });
19292}
19293if (typeof window !== "undefined") {
19294 specialObjects.push({ object: window, value: "[object Window]" });
19295}
19296
19297function constructorName(f, object) {
19298 var name = functionName$3(object && object.constructor);
19299 var excludes = f.excludeConstructors ||
19300 formatio.excludeConstructors || [];
19301
19302 var i, l;
19303 for (i = 0, l = excludes.length; i < l; ++i) {
19304 if (typeof excludes[i] === "string" && excludes[i] === name) {
19305 return "";
19306 } else if (excludes[i].test && excludes[i].test(name)) {
19307 return "";
19308 }
19309 }
19310
19311 return name;
19312}
19313
19314function isCircular(object, objects) {
19315 if (typeof object !== "object") { return false; }
19316 var i, l;
19317 for (i = 0, l = objects.length; i < l; ++i) {
19318 if (objects[i] === object) { return true; }
19319 }
19320 return false;
19321}
19322
19323function ascii(f, object, processed, indent) {
19324 if (typeof object === "string") {
19325 if (object.length === 0) { return "(empty string)"; }
19326 var qs = f.quoteStrings;
19327 var quote = typeof qs !== "boolean" || qs;
19328 return processed || quote ? "\"" + object + "\"" : object;
19329 }
19330
19331 if (typeof object === "symbol") {
19332 return object.toString();
19333 }
19334
19335 if (typeof object === "function" && !(object instanceof RegExp)) {
19336 return ascii.func(object);
19337 }
19338
19339 processed = processed || [];
19340
19341 if (isCircular(object, processed)) { return "[Circular]"; }
19342
19343 if (typeOf$3(object) === "array") {
19344 return ascii.array.call(f, object, processed);
19345 }
19346
19347 if (!object) { return String((1 / object) === -Infinity ? "-0" : object); }
19348 if (samsam.isElement(object)) { return ascii.element(object); }
19349
19350 if (typeof object.toString === "function" &&
19351 object.toString !== Object.prototype.toString) {
19352 return object.toString();
19353 }
19354
19355 var i, l;
19356 for (i = 0, l = specialObjects.length; i < l; i++) {
19357 if (object === specialObjects[i].object) {
19358 return specialObjects[i].value;
19359 }
19360 }
19361
19362 if (samsam.isSet(object)) {
19363 return ascii.set.call(f, object, processed);
19364 }
19365
19366 return ascii.object.call(f, object, processed, indent);
19367}
19368
19369ascii.func = function (func) {
19370 var funcName = functionName$3(func) || "";
19371 return "function " + funcName + "() {}";
19372};
19373
19374function delimit(str, delimiters) {
19375 delimiters = delimiters || ["[", "]"];
19376 return delimiters[0] + str + delimiters[1];
19377}
19378
19379ascii.array = function (array, processed, delimiters) {
19380 processed = processed || [];
19381 processed.push(array);
19382 var pieces = [];
19383 var i, l;
19384 l = (this.limitChildrenCount > 0) ?
19385 Math.min(this.limitChildrenCount, array.length) : array.length;
19386
19387 for (i = 0; i < l; ++i) {
19388 pieces.push(ascii(this, array[i], processed));
19389 }
19390
19391 if (l < array.length) {
19392 pieces.push("[... " + (array.length - l) + " more elements]");
19393 }
19394
19395 return delimit(pieces.join(", "), delimiters);
19396};
19397
19398ascii.set = function (set, processed) {
19399 return ascii.array.call(this, Array.from(set), processed, ["Set {", "}"]);
19400};
19401
19402ascii.object = function (object, processed, indent) {
19403 processed = processed || [];
19404 processed.push(object);
19405 indent = indent || 0;
19406 var pieces = [];
19407 var symbols = typeof Object.getOwnPropertySymbols === "function"
19408 ? Object.getOwnPropertySymbols(object)
19409 : [];
19410 var properties = Object.keys(object).sort().concat(symbols);
19411 var length = 3;
19412 var prop, str, obj, i, k, l;
19413 l = (this.limitChildrenCount > 0) ?
19414 Math.min(this.limitChildrenCount, properties.length) : properties.length;
19415
19416 for (i = 0; i < l; ++i) {
19417 prop = properties[i];
19418 obj = object[prop];
19419
19420 if (isCircular(obj, processed)) {
19421 str = "[Circular]";
19422 } else {
19423 str = ascii(this, obj, processed, indent + 2);
19424 }
19425
19426 str = (
19427 typeof prop === "string" && /\s/.test(prop) ?
19428 "\"" + prop + "\"" : prop.toString()
19429 ) + ": " + str;
19430 length += str.length;
19431 pieces.push(str);
19432 }
19433
19434 var cons = constructorName(this, object);
19435 var prefix = cons ? "[" + cons + "] " : "";
19436 var is = "";
19437 for (i = 0, k = indent; i < k; ++i) { is += " "; }
19438
19439 if (l < properties.length)
19440 {pieces.push("[... " + (properties.length - l) + " more elements]");}
19441
19442 if (length + indent > 80) {
19443 return prefix + "{\n " + is + pieces.join(",\n " + is) + "\n" +
19444 is + "}";
19445 }
19446 return prefix + "{ " + pieces.join(", ") + " }";
19447};
19448
19449ascii.element = function (element) {
19450 var tagName = element.tagName.toLowerCase();
19451 var attrs = element.attributes;
19452 var pairs = [];
19453 var attr, attrName, i, l, val;
19454
19455 for (i = 0, l = attrs.length; i < l; ++i) {
19456 attr = attrs.item(i);
19457 attrName = attr.nodeName.toLowerCase().replace("html:", "");
19458 val = attr.nodeValue;
19459 if (attrName !== "contenteditable" || val !== "inherit") {
19460 if (val) { pairs.push(attrName + "=\"" + val + "\""); }
19461 }
19462 }
19463
19464 var formatted = "<" + tagName + (pairs.length > 0 ? " " : "");
19465 // SVG elements have undefined innerHTML
19466 var content = element.innerHTML || "";
19467
19468 if (content.length > 20) {
19469 content = content.substr(0, 20) + "[...]";
19470 }
19471
19472 var res = formatted + pairs.join(" ") + ">" + content +
19473 "</" + tagName + ">";
19474
19475 return res.replace(/ contentEditable="inherit"/, "");
19476};
19477
19478function Formatio(options) {
19479 // eslint-disable-next-line guard-for-in
19480 for (var opt in options) {
19481 this[opt] = options[opt];
19482 }
19483}
19484
19485Formatio.prototype = {
19486 functionName: functionName$3,
19487
19488 configure: function (options) {
19489 return new Formatio(options);
19490 },
19491
19492 constructorName: function (object) {
19493 return constructorName(this, object);
19494 },
19495
19496 ascii: function (object, processed, indent) {
19497 return ascii(this, object, processed, indent);
19498 }
19499};
19500
19501var formatio_1 = Formatio.prototype;
19502
19503var formatter = formatio_1.configure({
19504 quoteStrings: false,
19505 limitChildrenCount: 250
19506});
19507
19508var customFormatter;
19509
19510function format() {
19511 if (customFormatter) {
19512 return customFormatter.apply(null, arguments);
19513 }
19514
19515 return formatter.ascii.apply(formatter, arguments);
19516}
19517
19518format.setFormatter = function(aCustomFormatter) {
19519 if (typeof aCustomFormatter !== "function") {
19520 throw new Error("format.setFormatter must be called with a function");
19521 }
19522
19523 customFormatter = aCustomFormatter;
19524};
19525
19526var format_1 = format;
19527
19528var arrayProto$4 = lib.prototypes.array;
19529var calledInOrder$1 = lib.calledInOrder;
19530var createMatcher = samsam.createMatcher;
19531var orderByFirstCall$1 = lib.orderByFirstCall;
19532
19533
19534var stringSlice = lib.prototypes.string.slice;
19535
19536var arraySlice = arrayProto$4.slice;
19537var concat$1 = arrayProto$4.concat;
19538var forEach$1 = arrayProto$4.forEach;
19539var join$3 = arrayProto$4.join;
19540var splice = arrayProto$4.splice;
19541
19542var assert;
19543
19544function verifyIsStub() {
19545 var args = arraySlice(arguments);
19546
19547 forEach$1(args, function(method) {
19548 if (!method) {
19549 assert.fail("fake is not a spy");
19550 }
19551
19552 if (method.proxy && method.proxy.isSinonProxy) {
19553 verifyIsStub(method.proxy);
19554 } else {
19555 if (typeof method !== "function") {
19556 assert.fail(method + " is not a function");
19557 }
19558
19559 if (typeof method.getCall !== "function") {
19560 assert.fail(method + " is not stubbed");
19561 }
19562 }
19563 });
19564}
19565
19566function verifyIsValidAssertion(assertionMethod, assertionArgs) {
19567 switch (assertionMethod) {
19568 case "notCalled":
19569 case "called":
19570 case "calledOnce":
19571 case "calledTwice":
19572 case "calledThrice":
19573 if (assertionArgs.length !== 0) {
19574 assert.fail(
19575 assertionMethod +
19576 " takes 1 argument but was called with " +
19577 (assertionArgs.length + 1) +
19578 " arguments"
19579 );
19580 }
19581 break;
19582 default:
19583 break;
19584 }
19585}
19586
19587function failAssertion(object, msg) {
19588 var obj = object || commonjsGlobal;
19589 var failMethod = obj.fail || assert.fail;
19590 failMethod.call(obj, msg);
19591}
19592
19593function mirrorPropAsAssertion(name, method, message) {
19594 var msg = message;
19595 var meth = method;
19596 if (arguments.length === 2) {
19597 msg = method;
19598 meth = name;
19599 }
19600
19601 assert[name] = function(fake) {
19602 verifyIsStub(fake);
19603
19604 var args = arraySlice(arguments, 1);
19605 var failed = false;
19606
19607 verifyIsValidAssertion(name, args);
19608
19609 if (typeof meth === "function") {
19610 failed = !meth(fake);
19611 } else {
19612 failed = typeof fake[meth] === "function" ? !fake[meth].apply(fake, args) : !fake[meth];
19613 }
19614
19615 if (failed) {
19616 failAssertion(this, (fake.printf || fake.proxy.printf).apply(fake, concat$1([msg], args)));
19617 } else {
19618 assert.pass(name);
19619 }
19620 };
19621}
19622
19623function exposedName(prefix, prop) {
19624 return !prefix || /^fail/.test(prop) ? prop : prefix + stringSlice(prop, 0, 1).toUpperCase() + stringSlice(prop, 1);
19625}
19626
19627assert = {
19628 failException: "AssertError",
19629
19630 fail: function fail(message) {
19631 var error = new Error(message);
19632 error.name = this.failException || assert.failException;
19633
19634 throw error;
19635 },
19636
19637 pass: function pass() {
19638 return;
19639 },
19640
19641 callOrder: function assertCallOrder() {
19642 verifyIsStub.apply(null, arguments);
19643 var expected = "";
19644 var actual = "";
19645
19646 if (!calledInOrder$1(arguments)) {
19647 try {
19648 expected = join$3(arguments, ", ");
19649 var calls = arraySlice(arguments);
19650 var i = calls.length;
19651 while (i) {
19652 if (!calls[--i].called) {
19653 splice(calls, i, 1);
19654 }
19655 }
19656 actual = join$3(orderByFirstCall$1(calls), ", ");
19657 } catch (e) {
19658 // If this fails, we'll just fall back to the blank string
19659 }
19660
19661 failAssertion(this, "expected " + expected + " to be called in order but were called as " + actual);
19662 } else {
19663 assert.pass("callOrder");
19664 }
19665 },
19666
19667 callCount: function assertCallCount(method, count) {
19668 verifyIsStub(method);
19669
19670 if (method.callCount !== count) {
19671 var msg = "expected %n to be called " + timesInWords(count) + " but was called %c%C";
19672 failAssertion(this, method.printf(msg));
19673 } else {
19674 assert.pass("callCount");
19675 }
19676 },
19677
19678 expose: function expose(target, options) {
19679 if (!target) {
19680 throw new TypeError("target is null or undefined");
19681 }
19682
19683 var o = options || {};
19684 var prefix = (typeof o.prefix === "undefined" && "assert") || o.prefix;
19685 var includeFail = typeof o.includeFail === "undefined" || Boolean(o.includeFail);
19686 var instance = this;
19687
19688 forEach$1(Object.keys(instance), function(method) {
19689 if (method !== "expose" && (includeFail || !/^(fail)/.test(method))) {
19690 target[exposedName(prefix, method)] = instance[method];
19691 }
19692 });
19693
19694 return target;
19695 },
19696
19697 match: function match(actual, expectation) {
19698 var matcher = createMatcher(expectation);
19699 if (matcher.test(actual)) {
19700 assert.pass("match");
19701 } else {
19702 var formatted = [
19703 "expected value to match",
19704 " expected = " + format_1(expectation),
19705 " actual = " + format_1(actual)
19706 ];
19707
19708 failAssertion(this, join$3(formatted, "\n"));
19709 }
19710 }
19711};
19712
19713mirrorPropAsAssertion("called", "expected %n to have been called at least once but was never called");
19714mirrorPropAsAssertion(
19715 "notCalled",
19716 function(spy) {
19717 return !spy.called;
19718 },
19719 "expected %n to not have been called but was called %c%C"
19720);
19721mirrorPropAsAssertion("calledOnce", "expected %n to be called once but was called %c%C");
19722mirrorPropAsAssertion("calledTwice", "expected %n to be called twice but was called %c%C");
19723mirrorPropAsAssertion("calledThrice", "expected %n to be called thrice but was called %c%C");
19724mirrorPropAsAssertion("calledOn", "expected %n to be called with %1 as this but was called with %t");
19725mirrorPropAsAssertion("alwaysCalledOn", "expected %n to always be called with %1 as this but was called with %t");
19726mirrorPropAsAssertion("calledWithNew", "expected %n to be called with new");
19727mirrorPropAsAssertion("alwaysCalledWithNew", "expected %n to always be called with new");
19728mirrorPropAsAssertion("calledWith", "expected %n to be called with arguments %D");
19729mirrorPropAsAssertion("calledWithMatch", "expected %n to be called with match %D");
19730mirrorPropAsAssertion("alwaysCalledWith", "expected %n to always be called with arguments %D");
19731mirrorPropAsAssertion("alwaysCalledWithMatch", "expected %n to always be called with match %D");
19732mirrorPropAsAssertion("calledWithExactly", "expected %n to be called with exact arguments %D");
19733mirrorPropAsAssertion("alwaysCalledWithExactly", "expected %n to always be called with exact arguments %D");
19734mirrorPropAsAssertion("neverCalledWith", "expected %n to never be called with arguments %*%C");
19735mirrorPropAsAssertion("neverCalledWithMatch", "expected %n to never be called with match %*%C");
19736mirrorPropAsAssertion("threw", "%n did not throw exception%C");
19737mirrorPropAsAssertion("alwaysThrew", "%n did not always throw exception%C");
19738
19739var assert_1 = assert;
19740
19741var lolex = createCommonjsModule(function (module, exports) {
19742(function(f){{module.exports=f();}})(function(){return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof commonjsRequire&&commonjsRequire;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t);}return n[i].exports}for(var u="function"==typeof commonjsRequire&&commonjsRequire,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
19743(function (global){
19744
19745function withGlobal(_global) {
19746 var userAgent = _global.navigator && _global.navigator.userAgent;
19747 var isRunningInIE = userAgent && userAgent.indexOf("MSIE ") > -1;
19748 var maxTimeout = Math.pow(2, 31) - 1; //see https://heycam.github.io/webidl/#abstract-opdef-converttoint
19749
19750 // Make properties writable in IE, as per
19751 // http://www.adequatelygood.com/Replacing-setTimeout-Globally.html
19752 if (isRunningInIE) {
19753 _global.setTimeout = _global.setTimeout;
19754 _global.clearTimeout = _global.clearTimeout;
19755 _global.setInterval = _global.setInterval;
19756 _global.clearInterval = _global.clearInterval;
19757 _global.Date = _global.Date;
19758 }
19759
19760 // setImmediate is not a standard function
19761 // avoid adding the prop to the window object if not present
19762 if (_global.setImmediate !== undefined) {
19763 _global.setImmediate = _global.setImmediate;
19764 _global.clearImmediate = _global.clearImmediate;
19765 }
19766
19767 // node expects setTimeout/setInterval to return a fn object w/ .ref()/.unref()
19768 // browsers, a number.
19769 // see https://github.com/cjohansen/Sinon.JS/pull/436
19770
19771 var NOOP = function () { return undefined; };
19772 var timeoutResult = _global.setTimeout(NOOP, 0);
19773 var addTimerReturnsObject = typeof timeoutResult === "object";
19774 var hrtimePresent = (_global.process && typeof _global.process.hrtime === "function");
19775 var nextTickPresent = (_global.process && typeof _global.process.nextTick === "function");
19776 var performancePresent = (_global.performance && typeof _global.performance.now === "function");
19777 var hasPerformancePrototype = (_global.Performance && (typeof _global.Performance).match(/^(function|object)$/));
19778 var queueMicrotaskPresent = (typeof _global.queueMicrotask === "function");
19779 var requestAnimationFramePresent = (
19780 _global.requestAnimationFrame && typeof _global.requestAnimationFrame === "function"
19781 );
19782 var cancelAnimationFramePresent = (
19783 _global.cancelAnimationFrame && typeof _global.cancelAnimationFrame === "function"
19784 );
19785 var requestIdleCallbackPresent = (
19786 _global.requestIdleCallback && typeof _global.requestIdleCallback === "function"
19787 );
19788 var cancelIdleCallbackPresent = (
19789 _global.cancelIdleCallback && typeof _global.cancelIdleCallback === "function"
19790 );
19791
19792 _global.clearTimeout(timeoutResult);
19793
19794 var NativeDate = _global.Date;
19795 var uniqueTimerId = 1;
19796
19797 function isNumberFinite(num) {
19798 if (Number.isFinite) {
19799 return Number.isFinite(num);
19800 }
19801
19802 if (typeof num !== "number") {
19803 return false;
19804 }
19805
19806 return isFinite(num);
19807 }
19808
19809 /**
19810 * Parse strings like "01:10:00" (meaning 1 hour, 10 minutes, 0 seconds) into
19811 * number of milliseconds. This is used to support human-readable strings passed
19812 * to clock.tick()
19813 */
19814 function parseTime(str) {
19815 if (!str) {
19816 return 0;
19817 }
19818
19819 var strings = str.split(":");
19820 var l = strings.length;
19821 var i = l;
19822 var ms = 0;
19823 var parsed;
19824
19825 if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
19826 throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");
19827 }
19828
19829 while (i--) {
19830 parsed = parseInt(strings[i], 10);
19831
19832 if (parsed >= 60) {
19833 throw new Error("Invalid time " + str);
19834 }
19835
19836 ms += parsed * Math.pow(60, (l - i - 1));
19837 }
19838
19839 return ms * 1000;
19840 }
19841
19842 /**
19843 * Get the decimal part of the millisecond value as nanoseconds
19844 *
19845 * @param {Number} msFloat the number of milliseconds
19846 * @returns {Number} an integer number of nanoseconds in the range [0,1e6)
19847 *
19848 * Example: nanoRemainer(123.456789) -> 456789
19849 */
19850 function nanoRemainder(msFloat) {
19851 var modulo = 1e6;
19852 var remainder = (msFloat * 1e6) % modulo;
19853 var positiveRemainder = remainder < 0 ? remainder + modulo : remainder;
19854
19855 return Math.floor(positiveRemainder);
19856 }
19857
19858 /**
19859 * Used to grok the `now` parameter to createClock.
19860 * @param epoch {Date|number} the system time
19861 */
19862 function getEpoch(epoch) {
19863 if (!epoch) { return 0; }
19864 if (typeof epoch.getTime === "function") { return epoch.getTime(); }
19865 if (typeof epoch === "number") { return epoch; }
19866 throw new TypeError("now should be milliseconds since UNIX epoch");
19867 }
19868
19869 function inRange(from, to, timer) {
19870 return timer && timer.callAt >= from && timer.callAt <= to;
19871 }
19872
19873 function mirrorDateProperties(target, source) {
19874 var prop;
19875 for (prop in source) {
19876 if (source.hasOwnProperty(prop)) {
19877 target[prop] = source[prop];
19878 }
19879 }
19880
19881 // set special now implementation
19882 if (source.now) {
19883 target.now = function now() {
19884 return target.clock.now;
19885 };
19886 } else {
19887 delete target.now;
19888 }
19889
19890 // set special toSource implementation
19891 if (source.toSource) {
19892 target.toSource = function toSource() {
19893 return source.toSource();
19894 };
19895 } else {
19896 delete target.toSource;
19897 }
19898
19899 // set special toString implementation
19900 target.toString = function toString() {
19901 return source.toString();
19902 };
19903
19904 target.prototype = source.prototype;
19905 target.parse = source.parse;
19906 target.UTC = source.UTC;
19907 target.prototype.toUTCString = source.prototype.toUTCString;
19908
19909 return target;
19910 }
19911
19912 function createDate() {
19913 function ClockDate(year, month, date, hour, minute, second, ms) {
19914 // Defensive and verbose to avoid potential harm in passing
19915 // explicit undefined when user does not pass argument
19916 switch (arguments.length) {
19917 case 0:
19918 return new NativeDate(ClockDate.clock.now);
19919 case 1:
19920 return new NativeDate(year);
19921 case 2:
19922 return new NativeDate(year, month);
19923 case 3:
19924 return new NativeDate(year, month, date);
19925 case 4:
19926 return new NativeDate(year, month, date, hour);
19927 case 5:
19928 return new NativeDate(year, month, date, hour, minute);
19929 case 6:
19930 return new NativeDate(year, month, date, hour, minute, second);
19931 default:
19932 return new NativeDate(year, month, date, hour, minute, second, ms);
19933 }
19934 }
19935
19936 return mirrorDateProperties(ClockDate, NativeDate);
19937 }
19938
19939 function enqueueJob(clock, job) {
19940 // enqueues a microtick-deferred task - ecma262/#sec-enqueuejob
19941 if (!clock.jobs) {
19942 clock.jobs = [];
19943 }
19944 clock.jobs.push(job);
19945 }
19946
19947 function runJobs(clock) {
19948 // runs all microtick-deferred tasks - ecma262/#sec-runjobs
19949 if (!clock.jobs) {
19950 return;
19951 }
19952 for (var i = 0; i < clock.jobs.length; i++) {
19953 var job = clock.jobs[i];
19954 job.func.apply(null, job.args);
19955 if (clock.loopLimit && i > clock.loopLimit) {
19956 throw new Error("Aborting after running " + clock.loopLimit + " timers, assuming an infinite loop!");
19957 }
19958 }
19959 clock.jobs = [];
19960 }
19961
19962 function addTimer(clock, timer) {
19963 if (timer.func === undefined) {
19964 throw new Error("Callback must be provided to timer calls");
19965 }
19966
19967 timer.type = timer.immediate ? "Immediate" : "Timeout";
19968
19969 if (timer.hasOwnProperty("delay")) {
19970 if (!isNumberFinite(timer.delay)) {
19971 timer.delay = 0;
19972 }
19973 timer.delay = timer.delay > maxTimeout ? 1 : timer.delay;
19974 timer.delay = Math.max(0, timer.delay);
19975 }
19976
19977 if (timer.hasOwnProperty("interval")) {
19978 timer.type = "Interval";
19979 timer.interval = timer.interval > maxTimeout ? 1 : timer.interval;
19980 }
19981
19982 if (timer.hasOwnProperty("animation")) {
19983 timer.type = "AnimationFrame";
19984 timer.animation = true;
19985 }
19986
19987 if (!clock.timers) {
19988 clock.timers = {};
19989 }
19990
19991 timer.id = uniqueTimerId++;
19992 timer.createdAt = clock.now;
19993 timer.callAt = clock.now + (parseInt(timer.delay) || (clock.duringTick ? 1 : 0));
19994
19995 clock.timers[timer.id] = timer;
19996
19997 if (addTimerReturnsObject) {
19998 var res = {
19999 id: timer.id,
20000 ref: function () { return res; },
20001 unref: function () { return res; },
20002 refresh: function () { return res; }
20003 };
20004 return res;
20005 }
20006
20007 return timer.id;
20008 }
20009
20010 /* eslint consistent-return: "off" */
20011 function compareTimers(a, b) {
20012 // Sort first by absolute timing
20013 if (a.callAt < b.callAt) {
20014 return -1;
20015 }
20016 if (a.callAt > b.callAt) {
20017 return 1;
20018 }
20019
20020 // Sort next by immediate, immediate timers take precedence
20021 if (a.immediate && !b.immediate) {
20022 return -1;
20023 }
20024 if (!a.immediate && b.immediate) {
20025 return 1;
20026 }
20027
20028 // Sort next by creation time, earlier-created timers take precedence
20029 if (a.createdAt < b.createdAt) {
20030 return -1;
20031 }
20032 if (a.createdAt > b.createdAt) {
20033 return 1;
20034 }
20035
20036 // Sort next by id, lower-id timers take precedence
20037 if (a.id < b.id) {
20038 return -1;
20039 }
20040 if (a.id > b.id) {
20041 return 1;
20042 }
20043
20044 // As timer ids are unique, no fallback `0` is necessary
20045 }
20046
20047 function firstTimerInRange(clock, from, to) {
20048 var timers = clock.timers;
20049 var timer = null;
20050 var id, isInRange;
20051
20052 for (id in timers) {
20053 if (timers.hasOwnProperty(id)) {
20054 isInRange = inRange(from, to, timers[id]);
20055
20056 if (isInRange && (!timer || compareTimers(timer, timers[id]) === 1)) {
20057 timer = timers[id];
20058 }
20059 }
20060 }
20061
20062 return timer;
20063 }
20064
20065 function firstTimer(clock) {
20066 var timers = clock.timers;
20067 var timer = null;
20068 var id;
20069
20070 for (id in timers) {
20071 if (timers.hasOwnProperty(id)) {
20072 if (!timer || compareTimers(timer, timers[id]) === 1) {
20073 timer = timers[id];
20074 }
20075 }
20076 }
20077
20078 return timer;
20079 }
20080
20081 function lastTimer(clock) {
20082 var timers = clock.timers;
20083 var timer = null;
20084 var id;
20085
20086 for (id in timers) {
20087 if (timers.hasOwnProperty(id)) {
20088 if (!timer || compareTimers(timer, timers[id]) === -1) {
20089 timer = timers[id];
20090 }
20091 }
20092 }
20093
20094 return timer;
20095 }
20096
20097 function callTimer(clock, timer) {
20098 if (typeof timer.interval === "number") {
20099 clock.timers[timer.id].callAt += timer.interval;
20100 } else {
20101 delete clock.timers[timer.id];
20102 }
20103
20104 if (typeof timer.func === "function") {
20105 timer.func.apply(null, timer.args);
20106 } else {
20107 /* eslint no-eval: "off" */
20108 eval(timer.func);
20109 }
20110 }
20111
20112 function clearTimer(clock, timerId, ttype) {
20113 if (!timerId) {
20114 // null appears to be allowed in most browsers, and appears to be
20115 // relied upon by some libraries, like Bootstrap carousel
20116 return;
20117 }
20118
20119 if (!clock.timers) {
20120 clock.timers = {};
20121 }
20122
20123 // in Node, timerId is an object with .ref()/.unref(), and
20124 // its .id field is the actual timer id.
20125 if (typeof timerId === "object") {
20126 timerId = timerId.id;
20127 }
20128
20129 if (clock.timers.hasOwnProperty(timerId)) {
20130 // check that the ID matches a timer of the correct type
20131 var timer = clock.timers[timerId];
20132 if (timer.type === ttype) {
20133 delete clock.timers[timerId];
20134 } else {
20135 var clear = ttype === "AnimationFrame" ? "cancelAnimationFrame" : "clear" + ttype;
20136 var schedule = timer.type === "AnimationFrame" ? "requestAnimationFrame" : "set" + timer.type;
20137 throw new Error("Cannot clear timer: timer created with " + schedule
20138 + "() but cleared with " + clear + "()");
20139 }
20140 }
20141 }
20142
20143 function uninstall(clock, target, config) {
20144 var method,
20145 i,
20146 l;
20147 var installedHrTime = "_hrtime";
20148 var installedNextTick = "_nextTick";
20149
20150 for (i = 0, l = clock.methods.length; i < l; i++) {
20151 method = clock.methods[i];
20152 if (method === "hrtime" && target.process) {
20153 target.process.hrtime = clock[installedHrTime];
20154 } else if (method === "nextTick" && target.process) {
20155 target.process.nextTick = clock[installedNextTick];
20156 } else if (method === "performance") {
20157 target[method] = clock["_" + method];
20158 } else {
20159 if (target[method] && target[method].hadOwnProperty) {
20160 target[method] = clock["_" + method];
20161 if (method === "clearInterval" && config.shouldAdvanceTime === true) {
20162 target[method](clock.attachedInterval);
20163 }
20164 } else {
20165 try {
20166 delete target[method];
20167 } catch (ignore) { /* eslint empty-block: "off" */ }
20168 }
20169 }
20170 }
20171
20172 // Prevent multiple executions which will completely remove these props
20173 clock.methods = [];
20174
20175 // return pending timers, to enable checking what timers remained on uninstall
20176 if (!clock.timers) {
20177 return [];
20178 }
20179 return Object.keys(clock.timers).map(function mapper(key) {
20180 return clock.timers[key];
20181 });
20182 }
20183
20184 function hijackMethod(target, method, clock) {
20185 var prop;
20186 clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(target, method);
20187 clock["_" + method] = target[method];
20188
20189 if (method === "Date") {
20190 var date = mirrorDateProperties(clock[method], target[method]);
20191 target[method] = date;
20192 } else if (method === "performance") {
20193 target[method] = clock[method];
20194 } else {
20195 target[method] = function () {
20196 return clock[method].apply(clock, arguments);
20197 };
20198
20199 for (prop in clock[method]) {
20200 if (clock[method].hasOwnProperty(prop)) {
20201 target[method][prop] = clock[method][prop];
20202 }
20203 }
20204 }
20205
20206 target[method].clock = clock;
20207 }
20208
20209 function doIntervalTick(clock, advanceTimeDelta) {
20210 clock.tick(advanceTimeDelta);
20211 }
20212
20213 var timers = {
20214 setTimeout: _global.setTimeout,
20215 clearTimeout: _global.clearTimeout,
20216 setImmediate: _global.setImmediate,
20217 clearImmediate: _global.clearImmediate,
20218 setInterval: _global.setInterval,
20219 clearInterval: _global.clearInterval,
20220 Date: _global.Date
20221 };
20222
20223 if (hrtimePresent) {
20224 timers.hrtime = _global.process.hrtime;
20225 }
20226
20227 if (nextTickPresent) {
20228 timers.nextTick = _global.process.nextTick;
20229 }
20230
20231 if (performancePresent) {
20232 timers.performance = _global.performance;
20233 }
20234
20235 if (requestAnimationFramePresent) {
20236 timers.requestAnimationFrame = _global.requestAnimationFrame;
20237 }
20238 if (queueMicrotaskPresent) {
20239 timers.queueMicrotask = _global.queueMicrotask;
20240 }
20241
20242 if (cancelAnimationFramePresent) {
20243 timers.cancelAnimationFrame = _global.cancelAnimationFrame;
20244 }
20245
20246 if (requestIdleCallbackPresent) {
20247 timers.requestIdleCallback = _global.requestIdleCallback;
20248 }
20249
20250 if (cancelIdleCallbackPresent) {
20251 timers.cancelIdleCallback = _global.cancelIdleCallback;
20252 }
20253
20254 var keys = Object.keys || function (obj) {
20255 var ks = [];
20256 var key;
20257
20258 for (key in obj) {
20259 if (obj.hasOwnProperty(key)) {
20260 ks.push(key);
20261 }
20262 }
20263
20264 return ks;
20265 };
20266
20267 /**
20268 * @param start {Date|number} the system time - non-integer values are floored
20269 * @param loopLimit {number} maximum number of timers that will be run when calling runAll()
20270 */
20271 function createClock(start, loopLimit) {
20272 start = Math.floor(getEpoch(start));
20273 loopLimit = loopLimit || 1000;
20274 var nanos = 0;
20275 var adjustedSystemTime = [0, 0]; // [millis, nanoremainder]
20276
20277 if (NativeDate === undefined) {
20278 throw new Error("The global scope doesn't have a `Date` object"
20279 + " (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");
20280 }
20281
20282 var clock = {
20283 now: start,
20284 timeouts: {},
20285 Date: createDate(),
20286 loopLimit: loopLimit
20287 };
20288
20289 clock.Date.clock = clock;
20290
20291 function getTimeToNextFrame() {
20292 return 16 - ((clock.now - start) % 16);
20293 }
20294
20295 function hrtime(prev) {
20296 var millisSinceStart = clock.now - adjustedSystemTime[0] - start;
20297 var secsSinceStart = Math.floor( millisSinceStart / 1000);
20298 var remainderInNanos = (millisSinceStart - secsSinceStart * 1e3 ) * 1e6 + nanos - adjustedSystemTime[1];
20299
20300 if (Array.isArray(prev)) {
20301 if ( prev[1] > 1e9 ) {
20302 throw new TypeError("Number of nanoseconds can't exceed a billion");
20303 }
20304
20305 var oldSecs = prev[0];
20306 var nanoDiff = remainderInNanos - prev[1];
20307 var secDiff = secsSinceStart - oldSecs;
20308
20309 if (nanoDiff < 0) {
20310 nanoDiff += 1e9;
20311 secDiff -= 1;
20312 }
20313
20314 return [secDiff, nanoDiff];
20315 }
20316 return [secsSinceStart, remainderInNanos];
20317 }
20318
20319 clock.requestIdleCallback = function requestIdleCallback(func, timeout) {
20320 var timeToNextIdlePeriod = 0;
20321
20322 if (clock.countTimers() > 0) {
20323 timeToNextIdlePeriod = 50; // const for now
20324 }
20325
20326 var result = addTimer(clock, {
20327 func: func,
20328 args: Array.prototype.slice.call(arguments, 2),
20329 delay: typeof timeout === "undefined" ? timeToNextIdlePeriod : Math.min(timeout, timeToNextIdlePeriod)
20330 });
20331
20332 return result.id || result;
20333 };
20334
20335 clock.cancelIdleCallback = function cancelIdleCallback(timerId) {
20336 return clearTimer(clock, timerId, "Timeout");
20337 };
20338
20339 clock.setTimeout = function setTimeout(func, timeout) {
20340 return addTimer(clock, {
20341 func: func,
20342 args: Array.prototype.slice.call(arguments, 2),
20343 delay: timeout
20344 });
20345 };
20346
20347 clock.clearTimeout = function clearTimeout(timerId) {
20348 return clearTimer(clock, timerId, "Timeout");
20349 };
20350
20351 clock.nextTick = function nextTick(func) {
20352 return enqueueJob(clock, {
20353 func: func,
20354 args: Array.prototype.slice.call(arguments, 1)
20355 });
20356 };
20357
20358 clock.queueMicrotask = function queueMicrotask(func) {
20359 return clock.nextTick(func); // explicitly drop additional arguments
20360 };
20361
20362 clock.setInterval = function setInterval(func, timeout) {
20363 timeout = parseInt(timeout, 10);
20364 return addTimer(clock, {
20365 func: func,
20366 args: Array.prototype.slice.call(arguments, 2),
20367 delay: timeout,
20368 interval: timeout
20369 });
20370 };
20371
20372 clock.clearInterval = function clearInterval(timerId) {
20373 return clearTimer(clock, timerId, "Interval");
20374 };
20375
20376 clock.setImmediate = function setImmediate(func) {
20377 return addTimer(clock, {
20378 func: func,
20379 args: Array.prototype.slice.call(arguments, 1),
20380 immediate: true
20381 });
20382 };
20383
20384 clock.clearImmediate = function clearImmediate(timerId) {
20385 return clearTimer(clock, timerId, "Immediate");
20386 };
20387
20388 clock.countTimers = function countTimers() {
20389 return Object.keys(clock.timers || {}).length;
20390 };
20391
20392 clock.requestAnimationFrame = function requestAnimationFrame(func) {
20393 var result = addTimer(clock, {
20394 func: func,
20395 delay: getTimeToNextFrame(),
20396 args: [clock.now + getTimeToNextFrame()],
20397 animation: true
20398 });
20399
20400 return result.id || result;
20401 };
20402
20403 clock.cancelAnimationFrame = function cancelAnimationFrame(timerId) {
20404 return clearTimer(clock, timerId, "AnimationFrame");
20405 };
20406
20407 clock.runMicrotasks = function runMicrotasks() {
20408 runJobs(clock);
20409 };
20410
20411 /**
20412 * @param {tickValue} {String|Number} number of milliseconds or a human-readable value like "01:11:15"
20413 */
20414 clock.tick = function tick(tickValue) {
20415 var msFloat = typeof tickValue === "number" ? tickValue : parseTime(tickValue);
20416 var ms = Math.floor(msFloat);
20417 var remainder = nanoRemainder(msFloat);
20418 var nanosTotal = nanos + remainder;
20419 var tickTo = clock.now + ms;
20420
20421 if (msFloat < 0) {
20422 throw new TypeError("Negative ticks are not supported");
20423 }
20424
20425 // adjust for positive overflow
20426 if (nanosTotal >= 1e6) {
20427 tickTo += 1;
20428 nanosTotal -= 1e6;
20429 }
20430
20431 nanos = nanosTotal;
20432 var tickFrom = clock.now;
20433 var previous = clock.now;
20434 var timer, firstException, oldNow;
20435
20436 clock.duringTick = true;
20437
20438 // perform microtasks
20439 oldNow = clock.now;
20440 runJobs(clock);
20441 if (oldNow !== clock.now) {
20442 // compensate for any setSystemTime() call during microtask callback
20443 tickFrom += clock.now - oldNow;
20444 tickTo += clock.now - oldNow;
20445 }
20446
20447 // perform each timer in the requested range
20448 timer = firstTimerInRange(clock, tickFrom, tickTo);
20449 while (timer && tickFrom <= tickTo) {
20450 if (clock.timers[timer.id]) {
20451 tickFrom = timer.callAt;
20452 clock.now = timer.callAt;
20453 oldNow = clock.now;
20454 try {
20455 runJobs(clock);
20456 callTimer(clock, timer);
20457 } catch (e) {
20458 firstException = firstException || e;
20459 }
20460
20461 // compensate for any setSystemTime() call during timer callback
20462 if (oldNow !== clock.now) {
20463 tickFrom += clock.now - oldNow;
20464 tickTo += clock.now - oldNow;
20465 previous += clock.now - oldNow;
20466 }
20467 }
20468
20469 timer = firstTimerInRange(clock, previous, tickTo);
20470 previous = tickFrom;
20471 }
20472
20473 // perform process.nextTick()s again
20474 oldNow = clock.now;
20475 runJobs(clock);
20476 if (oldNow !== clock.now) {
20477 // compensate for any setSystemTime() call during process.nextTick() callback
20478 tickFrom += clock.now - oldNow;
20479 tickTo += clock.now - oldNow;
20480 }
20481 clock.duringTick = false;
20482
20483 // corner case: during runJobs, new timers were scheduled which could be in the range [clock.now, tickTo]
20484 timer = firstTimerInRange(clock, tickFrom, tickTo);
20485 if (timer) {
20486 try {
20487 clock.tick(tickTo - clock.now); // do it all again - for the remainder of the requested range
20488 } catch (e) {
20489 firstException = firstException || e;
20490 }
20491 } else {
20492 // no timers remaining in the requested range: move the clock all the way to the end
20493 clock.now = tickTo;
20494
20495 // update nanos
20496 nanos = nanosTotal;
20497 }
20498 if (firstException) {
20499 throw firstException;
20500 }
20501 return clock.now;
20502 };
20503
20504 clock.next = function next() {
20505 runJobs(clock);
20506 var timer = firstTimer(clock);
20507 if (!timer) {
20508 return clock.now;
20509 }
20510
20511 clock.duringTick = true;
20512 try {
20513 clock.now = timer.callAt;
20514 callTimer(clock, timer);
20515 runJobs(clock);
20516 return clock.now;
20517 } finally {
20518 clock.duringTick = false;
20519 }
20520 };
20521
20522 clock.runAll = function runAll() {
20523 var numTimers, i;
20524 runJobs(clock);
20525 for (i = 0; i < clock.loopLimit; i++) {
20526 if (!clock.timers) {
20527 return clock.now;
20528 }
20529
20530 numTimers = keys(clock.timers).length;
20531 if (numTimers === 0) {
20532 return clock.now;
20533 }
20534
20535 clock.next();
20536 }
20537
20538 throw new Error("Aborting after running " + clock.loopLimit + " timers, assuming an infinite loop!");
20539 };
20540
20541 clock.runToFrame = function runToFrame() {
20542 return clock.tick(getTimeToNextFrame());
20543 };
20544
20545 clock.runToLast = function runToLast() {
20546 var timer = lastTimer(clock);
20547 if (!timer) {
20548 runJobs(clock);
20549 return clock.now;
20550 }
20551
20552 return clock.tick(timer.callAt - clock.now);
20553 };
20554
20555 clock.reset = function reset() {
20556 nanos = 0;
20557 clock.timers = {};
20558 clock.jobs = [];
20559 clock.now = start;
20560 };
20561
20562 clock.setSystemTime = function setSystemTime(systemTime) {
20563 // determine time difference
20564 var newNow = getEpoch(systemTime);
20565 var difference = newNow - clock.now;
20566 var id, timer;
20567
20568 adjustedSystemTime[0] = difference;
20569 adjustedSystemTime[1] = nanos;
20570 // update 'system clock'
20571 clock.now = newNow;
20572 nanos = 0;
20573
20574 // update timers and intervals to keep them stable
20575 for (id in clock.timers) {
20576 if (clock.timers.hasOwnProperty(id)) {
20577 timer = clock.timers[id];
20578 timer.createdAt += difference;
20579 timer.callAt += difference;
20580 }
20581 }
20582 };
20583
20584 if (performancePresent) {
20585 clock.performance = Object.create(null);
20586
20587 if (hasPerformancePrototype) {
20588 var proto = _global.Performance.prototype;
20589
20590 Object
20591 .getOwnPropertyNames(proto)
20592 .forEach(function (name) {
20593 clock.performance[name] = NOOP;
20594 });
20595 }
20596
20597 clock.performance.now = function lolexNow() {
20598 var hrt = hrtime();
20599 var millis = (hrt[0] * 1000 + hrt[1] / 1e6);
20600 return millis;
20601 };
20602 }
20603
20604
20605 if (hrtimePresent) {
20606 clock.hrtime = hrtime;
20607 }
20608
20609 return clock;
20610 }
20611
20612 /**
20613 * @param config {Object} optional config
20614 * @param config.target {Object} the target to install timers in (default `window`)
20615 * @param config.now {number|Date} a number (in milliseconds) or a Date object (default epoch)
20616 * @param config.toFake {string[]} names of the methods that should be faked.
20617 * @param config.loopLimit {number} the maximum number of timers that will be run when calling runAll()
20618 * @param config.shouldAdvanceTime {Boolean} tells lolex to increment mocked time automatically (default false)
20619 * @param config.advanceTimeDelta {Number} increment mocked time every <<advanceTimeDelta>> ms (default: 20ms)
20620 */
20621 function install(config) {
20622 if ( arguments.length > 1 || config instanceof Date || Array.isArray(config) || typeof config === "number") {
20623 throw new TypeError("lolex.install called with " + String(config) +
20624 " lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");
20625 }
20626 config = typeof config !== "undefined" ? config : {};
20627 config.shouldAdvanceTime = config.shouldAdvanceTime || false;
20628 config.advanceTimeDelta = config.advanceTimeDelta || 20;
20629
20630 var i, l;
20631 var target = config.target || _global;
20632 var clock = createClock(config.now, config.loopLimit);
20633
20634 clock.uninstall = function () {
20635 return uninstall(clock, target, config);
20636 };
20637
20638 clock.methods = config.toFake || [];
20639
20640 if (clock.methods.length === 0) {
20641 // do not fake nextTick by default - GitHub#126
20642 clock.methods = keys(timers).filter(function (key) {return key !== "nextTick";});
20643 }
20644
20645 for (i = 0, l = clock.methods.length; i < l; i++) {
20646 if (clock.methods[i] === "hrtime") {
20647 if (target.process && typeof target.process.hrtime === "function") {
20648 hijackMethod(target.process, clock.methods[i], clock);
20649 }
20650 } else if (clock.methods[i] === "nextTick") {
20651 if (target.process && typeof target.process.nextTick === "function") {
20652 hijackMethod(target.process, clock.methods[i], clock);
20653 }
20654 } else {
20655 if (clock.methods[i] === "setInterval" && config.shouldAdvanceTime === true) {
20656 var intervalTick = doIntervalTick.bind(null, clock, config.advanceTimeDelta);
20657 var intervalId = target[clock.methods[i]](
20658 intervalTick,
20659 config.advanceTimeDelta);
20660 clock.attachedInterval = intervalId;
20661 }
20662 hijackMethod(target, clock.methods[i], clock);
20663 }
20664 }
20665
20666 return clock;
20667 }
20668
20669 return {
20670 timers: timers,
20671 createClock: createClock,
20672 install: install,
20673 withGlobal: withGlobal
20674 };
20675}
20676
20677var defaultImplementation = withGlobal(global || window);
20678
20679exports.timers = defaultImplementation.timers;
20680exports.createClock = defaultImplementation.createClock;
20681exports.install = defaultImplementation.install;
20682exports.withGlobal = withGlobal;
20683
20684}).call(this,typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
20685},{}]},{},[1])(1)
20686});
20687});
20688
20689function createClock(config, globalCtx) {
20690 var llxCtx = lolex;
20691 if (globalCtx !== null && typeof globalCtx === "object") {
20692 llxCtx = lolex.withGlobal(globalCtx);
20693 }
20694 var clock = llxCtx.install(config);
20695 clock.restore = clock.uninstall;
20696 return clock;
20697}
20698
20699/**
20700 * @param {number|Date|Object} dateOrConfig The unix epoch value to install with (default 0)
20701 * @returns {Object} Returns a lolex clock instance
20702 */
20703var useFakeTimers = function(dateOrConfig) {
20704 var hasArguments = typeof dateOrConfig !== "undefined";
20705 var argumentIsDateLike =
20706 (typeof dateOrConfig === "number" || dateOrConfig instanceof Date) && arguments.length === 1;
20707 var argumentIsObject = dateOrConfig !== null && typeof dateOrConfig === "object" && arguments.length === 1;
20708
20709 if (!hasArguments) {
20710 return createClock({
20711 now: 0
20712 });
20713 }
20714
20715 if (argumentIsDateLike) {
20716 return createClock({
20717 now: dateOrConfig
20718 });
20719 }
20720
20721 if (argumentIsObject) {
20722 var config = extend.nonEnum({}, dateOrConfig);
20723 var globalCtx = config.global;
20724 delete config.global;
20725 return createClock(config, globalCtx);
20726 }
20727
20728 throw new TypeError("useFakeTimers expected epoch or config object. See https://github.com/sinonjs/sinon");
20729};
20730
20731var clock = {
20732 create: function(now) {
20733 return lolex.createClock(now);
20734 }
20735};
20736
20737var timers = {
20738 setTimeout: setTimeout,
20739 clearTimeout: clearTimeout,
20740 setImmediate: typeof setImmediate !== "undefined" ? setImmediate : undefined,
20741 clearImmediate: typeof clearImmediate !== "undefined" ? clearImmediate : undefined,
20742 setInterval: setInterval,
20743 clearInterval: clearInterval,
20744 Date: Date
20745};
20746
20747var fakeTimers = {
20748 useFakeTimers: useFakeTimers,
20749 clock: clock,
20750 timers: timers
20751};
20752
20753var functionToString = function toString() {
20754 var i, prop, thisValue;
20755 if (this.getCall && this.callCount) {
20756 i = this.callCount;
20757
20758 while (i--) {
20759 thisValue = this.getCall(i).thisValue;
20760
20761 for (prop in thisValue) {
20762 if (thisValue[prop] === this) {
20763 return prop;
20764 }
20765 }
20766 }
20767 }
20768
20769 return this.displayName || "sinon fake";
20770};
20771
20772var arrayProto$5 = lib.prototypes.array;
20773var match$2 = samsam.createMatcher;
20774var deepEqual$3 = samsam.deepEqual;
20775var functionName$4 = lib.functionName;
20776
20777var valueToString$7 = lib.valueToString;
20778
20779var concat$2 = arrayProto$5.concat;
20780var filter = arrayProto$5.filter;
20781var join$4 = arrayProto$5.join;
20782var map$1 = arrayProto$5.map;
20783var reduce$1 = arrayProto$5.reduce;
20784var slice$4 = arrayProto$5.slice;
20785
20786function throwYieldError(proxy, text, args) {
20787 var msg = functionName$4(proxy) + text;
20788 if (args.length) {
20789 msg += " Received [" + join$4(slice$4(args), ", ") + "]";
20790 }
20791 throw new Error(msg);
20792}
20793
20794var callProto = {
20795 calledOn: function calledOn(thisValue) {
20796 if (match$2.isMatcher(thisValue)) {
20797 return thisValue.test(this.thisValue);
20798 }
20799 return this.thisValue === thisValue;
20800 },
20801
20802 calledWith: function calledWith() {
20803 var self = this;
20804 var calledWithArgs = slice$4(arguments);
20805
20806 if (calledWithArgs.length > self.args.length) {
20807 return false;
20808 }
20809
20810 return reduce$1(
20811 calledWithArgs,
20812 function(prev, arg, i) {
20813 return prev && deepEqual$3(self.args[i], arg);
20814 },
20815 true
20816 );
20817 },
20818
20819 calledWithMatch: function calledWithMatch() {
20820 var self = this;
20821 var calledWithMatchArgs = slice$4(arguments);
20822
20823 if (calledWithMatchArgs.length > self.args.length) {
20824 return false;
20825 }
20826
20827 return reduce$1(
20828 calledWithMatchArgs,
20829 function(prev, expectation, i) {
20830 var actual = self.args[i];
20831
20832 return prev && match$2(expectation).test(actual);
20833 },
20834 true
20835 );
20836 },
20837
20838 calledWithExactly: function calledWithExactly() {
20839 return arguments.length === this.args.length && this.calledWith.apply(this, arguments);
20840 },
20841
20842 notCalledWith: function notCalledWith() {
20843 return !this.calledWith.apply(this, arguments);
20844 },
20845
20846 notCalledWithMatch: function notCalledWithMatch() {
20847 return !this.calledWithMatch.apply(this, arguments);
20848 },
20849
20850 returned: function returned(value) {
20851 return deepEqual$3(this.returnValue, value);
20852 },
20853
20854 threw: function threw(error) {
20855 if (typeof error === "undefined" || !this.exception) {
20856 return Boolean(this.exception);
20857 }
20858
20859 return this.exception === error || this.exception.name === error;
20860 },
20861
20862 calledWithNew: function calledWithNew() {
20863 return this.proxy.prototype && this.thisValue instanceof this.proxy;
20864 },
20865
20866 calledBefore: function(other) {
20867 return this.callId < other.callId;
20868 },
20869
20870 calledAfter: function(other) {
20871 return this.callId > other.callId;
20872 },
20873
20874 calledImmediatelyBefore: function(other) {
20875 return this.callId === other.callId - 1;
20876 },
20877
20878 calledImmediatelyAfter: function(other) {
20879 return this.callId === other.callId + 1;
20880 },
20881
20882 callArg: function(pos) {
20883 this.ensureArgIsAFunction(pos);
20884 return this.args[pos]();
20885 },
20886
20887 callArgOn: function(pos, thisValue) {
20888 this.ensureArgIsAFunction(pos);
20889 return this.args[pos].apply(thisValue);
20890 },
20891
20892 callArgWith: function(pos) {
20893 return this.callArgOnWith.apply(this, concat$2([pos, null], slice$4(arguments, 1)));
20894 },
20895
20896 callArgOnWith: function(pos, thisValue) {
20897 this.ensureArgIsAFunction(pos);
20898 var args = slice$4(arguments, 2);
20899 return this.args[pos].apply(thisValue, args);
20900 },
20901
20902 throwArg: function(pos) {
20903 if (pos > this.args.length) {
20904 throw new TypeError("Not enough arguments: " + pos + " required but only " + this.args.length + " present");
20905 }
20906
20907 throw this.args[pos];
20908 },
20909
20910 yield: function() {
20911 return this.yieldOn.apply(this, concat$2([null], slice$4(arguments, 0)));
20912 },
20913
20914 yieldOn: function(thisValue) {
20915 var args = slice$4(this.args);
20916 var yieldFn = filter(args, function(arg) {
20917 return typeof arg === "function";
20918 })[0];
20919
20920 if (!yieldFn) {
20921 throwYieldError(this.proxy, " cannot yield since no callback was passed.", args);
20922 }
20923
20924 return yieldFn.apply(thisValue, slice$4(arguments, 1));
20925 },
20926
20927 yieldTo: function(prop) {
20928 return this.yieldToOn.apply(this, concat$2([prop, null], slice$4(arguments, 1)));
20929 },
20930
20931 yieldToOn: function(prop, thisValue) {
20932 var args = slice$4(this.args);
20933 var yieldArg = filter(args, function(arg) {
20934 return arg && typeof arg[prop] === "function";
20935 })[0];
20936 var yieldFn = yieldArg && yieldArg[prop];
20937
20938 if (!yieldFn) {
20939 throwYieldError(
20940 this.proxy,
20941 " cannot yield to '" + valueToString$7(prop) + "' since no callback was passed.",
20942 args
20943 );
20944 }
20945
20946 return yieldFn.apply(thisValue, slice$4(arguments, 2));
20947 },
20948
20949 toString: function() {
20950 var callStr = this.proxy ? String(this.proxy) + "(" : "";
20951 var formattedArgs;
20952
20953 if (!this.args) {
20954 return ":(";
20955 }
20956
20957 formattedArgs = map$1(this.args, function(arg) {
20958 return format_1(arg);
20959 });
20960
20961 callStr = callStr + join$4(formattedArgs, ", ") + ")";
20962
20963 if (typeof this.returnValue !== "undefined") {
20964 callStr += " => " + format_1(this.returnValue);
20965 }
20966
20967 if (this.exception) {
20968 callStr += " !" + this.exception.name;
20969
20970 if (this.exception.message) {
20971 callStr += "(" + this.exception.message + ")";
20972 }
20973 }
20974 if (this.stack) {
20975 // Omit the error message and the two top stack frames in sinon itself:
20976 callStr += (this.stack.split("\n")[3] || "unknown").replace(/^\s*(?:at\s+|@)?/, " at ");
20977 }
20978
20979 return callStr;
20980 },
20981
20982 ensureArgIsAFunction: function(pos) {
20983 if (typeof this.args[pos] !== "function") {
20984 throw new TypeError(
20985 "Expected argument at position " + pos + " to be a Function, but was " + typeof this.args[pos]
20986 );
20987 }
20988 }
20989};
20990Object.defineProperty(callProto, "stack", {
20991 enumerable: true,
20992 configurable: true,
20993 get: function() {
20994 return (this.errorWithCallStack && this.errorWithCallStack.stack) || "";
20995 }
20996});
20997
20998callProto.invokeCallback = callProto.yield;
20999
21000function createSpyCall(spy, thisValue, args, returnValue, exception, id, errorWithCallStack) {
21001 if (typeof id !== "number") {
21002 throw new TypeError("Call id is not a number");
21003 }
21004
21005 var proxyCall = Object.create(callProto);
21006 var lastArg = (args.length > 0 && args[args.length - 1]) || undefined;
21007 var callback = lastArg && typeof lastArg === "function" ? lastArg : undefined;
21008
21009 proxyCall.proxy = spy;
21010 proxyCall.thisValue = thisValue;
21011 proxyCall.args = args;
21012 proxyCall.lastArg = lastArg;
21013 proxyCall.callback = callback;
21014 proxyCall.returnValue = returnValue;
21015 proxyCall.exception = exception;
21016 proxyCall.callId = id;
21017 proxyCall.errorWithCallStack = errorWithCallStack;
21018
21019 return proxyCall;
21020}
21021createSpyCall.toString = callProto.toString; // used by mocks
21022
21023var call$1 = createSpyCall;
21024
21025var hasOwnProperty$4 = lib.prototypes.object.hasOwnProperty;
21026var valueToString$8 = lib.valueToString;
21027
21028function isFunction(obj) {
21029 return typeof obj === "function" || Boolean(obj && obj.constructor && obj.call && obj.apply);
21030}
21031
21032function mirrorProperties(target, source) {
21033 for (var prop in source) {
21034 if (!hasOwnProperty$4(target, prop)) {
21035 target[prop] = source[prop];
21036 }
21037 }
21038}
21039
21040// Cheap way to detect if we have ES5 support.
21041var hasES5Support = "keys" in Object;
21042
21043var wrapMethod = function wrapMethod(object, property, method) {
21044 if (!object) {
21045 throw new TypeError("Should wrap property of object");
21046 }
21047
21048 if (typeof method !== "function" && typeof method !== "object") {
21049 throw new TypeError("Method wrapper should be a function or a property descriptor");
21050 }
21051
21052 function checkWrappedMethod(wrappedMethod) {
21053 var error;
21054
21055 if (!isFunction(wrappedMethod)) {
21056 error = new TypeError(
21057 "Attempted to wrap " + typeof wrappedMethod + " property " + valueToString$8(property) + " as function"
21058 );
21059 } else if (wrappedMethod.restore && wrappedMethod.restore.sinon) {
21060 error = new TypeError("Attempted to wrap " + valueToString$8(property) + " which is already wrapped");
21061 } else if (wrappedMethod.calledBefore) {
21062 var verb = wrappedMethod.returns ? "stubbed" : "spied on";
21063 error = new TypeError("Attempted to wrap " + valueToString$8(property) + " which is already " + verb);
21064 }
21065
21066 if (error) {
21067 if (wrappedMethod && wrappedMethod.stackTraceError) {
21068 error.stack += "\n--------------\n" + wrappedMethod.stackTraceError.stack;
21069 }
21070 throw error;
21071 }
21072 }
21073
21074 var error, wrappedMethod, i, wrappedMethodDesc;
21075
21076 function simplePropertyAssignment() {
21077 wrappedMethod = object[property];
21078 checkWrappedMethod(wrappedMethod);
21079 object[property] = method;
21080 method.displayName = property;
21081 }
21082
21083 // Firefox has a problem when using hasOwn.call on objects from other frames.
21084 /* eslint-disable-next-line local-rules/no-prototype-methods */
21085 var owned = object.hasOwnProperty ? object.hasOwnProperty(property) : hasOwnProperty$4(object, property);
21086
21087 if (hasES5Support) {
21088 var methodDesc = typeof method === "function" ? { value: method } : method;
21089 wrappedMethodDesc = getPropertyDescriptor(object, property);
21090
21091 if (!wrappedMethodDesc) {
21092 error = new TypeError(
21093 "Attempted to wrap " + typeof wrappedMethod + " property " + property + " as function"
21094 );
21095 } else if (wrappedMethodDesc.restore && wrappedMethodDesc.restore.sinon) {
21096 error = new TypeError("Attempted to wrap " + property + " which is already wrapped");
21097 }
21098 if (error) {
21099 if (wrappedMethodDesc && wrappedMethodDesc.stackTraceError) {
21100 error.stack += "\n--------------\n" + wrappedMethodDesc.stackTraceError.stack;
21101 }
21102 throw error;
21103 }
21104
21105 var types = Object.keys(methodDesc);
21106 for (i = 0; i < types.length; i++) {
21107 wrappedMethod = wrappedMethodDesc[types[i]];
21108 checkWrappedMethod(wrappedMethod);
21109 }
21110
21111 mirrorProperties(methodDesc, wrappedMethodDesc);
21112 for (i = 0; i < types.length; i++) {
21113 mirrorProperties(methodDesc[types[i]], wrappedMethodDesc[types[i]]);
21114 }
21115 Object.defineProperty(object, property, methodDesc);
21116
21117 // catch failing assignment
21118 // this is the converse of the check in `.restore` below
21119 if (typeof method === "function" && object[property] !== method) {
21120 // correct any wrongdoings caused by the defineProperty call above,
21121 // such as adding new items (if object was a Storage object)
21122 delete object[property];
21123 simplePropertyAssignment();
21124 }
21125 } else {
21126 simplePropertyAssignment();
21127 }
21128
21129 extend.nonEnum(method, {
21130 displayName: property,
21131
21132 // Set up an Error object for a stack trace which can be used later to find what line of
21133 // code the original method was created on.
21134 stackTraceError: new Error("Stack Trace for original"),
21135
21136 restore: function() {
21137 // For prototype properties try to reset by delete first.
21138 // If this fails (ex: localStorage on mobile safari) then force a reset
21139 // via direct assignment.
21140 if (!owned) {
21141 // In some cases `delete` may throw an error
21142 try {
21143 delete object[property];
21144 } catch (e) {} // eslint-disable-line no-empty
21145 // For native code functions `delete` fails without throwing an error
21146 // on Chrome < 43, PhantomJS, etc.
21147 } else if (hasES5Support) {
21148 Object.defineProperty(object, property, wrappedMethodDesc);
21149 }
21150
21151 if (hasES5Support) {
21152 var descriptor = getPropertyDescriptor(object, property);
21153 if (descriptor && descriptor.value === method) {
21154 object[property] = wrappedMethod;
21155 }
21156 } else {
21157 // Use strict equality comparison to check failures then force a reset
21158 // via direct assignment.
21159 if (object[property] === method) {
21160 object[property] = wrappedMethod;
21161 }
21162 }
21163 }
21164 });
21165
21166 method.wrappedMethod = wrappedMethod;
21167
21168 method.restore.sinon = true;
21169
21170 if (!hasES5Support) {
21171 mirrorProperties(method, wrappedMethod);
21172 }
21173
21174 return method;
21175};
21176
21177var global$1 = (typeof global !== "undefined" ? global :
21178 typeof self !== "undefined" ? self :
21179 typeof window !== "undefined" ? window : {});
21180
21181// shim for using process in browser
21182// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
21183
21184function defaultSetTimout() {
21185 throw new Error('setTimeout has not been defined');
21186}
21187function defaultClearTimeout () {
21188 throw new Error('clearTimeout has not been defined');
21189}
21190var cachedSetTimeout = defaultSetTimout;
21191var cachedClearTimeout = defaultClearTimeout;
21192if (typeof global$1.setTimeout === 'function') {
21193 cachedSetTimeout = setTimeout;
21194}
21195if (typeof global$1.clearTimeout === 'function') {
21196 cachedClearTimeout = clearTimeout;
21197}
21198
21199function runTimeout(fun) {
21200 if (cachedSetTimeout === setTimeout) {
21201 //normal enviroments in sane situations
21202 return setTimeout(fun, 0);
21203 }
21204 // if setTimeout wasn't available but was latter defined
21205 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
21206 cachedSetTimeout = setTimeout;
21207 return setTimeout(fun, 0);
21208 }
21209 try {
21210 // when when somebody has screwed with setTimeout but no I.E. maddness
21211 return cachedSetTimeout(fun, 0);
21212 } catch(e){
21213 try {
21214 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
21215 return cachedSetTimeout.call(null, fun, 0);
21216 } catch(e){
21217 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
21218 return cachedSetTimeout.call(this, fun, 0);
21219 }
21220 }
21221
21222
21223}
21224function runClearTimeout(marker) {
21225 if (cachedClearTimeout === clearTimeout) {
21226 //normal enviroments in sane situations
21227 return clearTimeout(marker);
21228 }
21229 // if clearTimeout wasn't available but was latter defined
21230 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
21231 cachedClearTimeout = clearTimeout;
21232 return clearTimeout(marker);
21233 }
21234 try {
21235 // when when somebody has screwed with setTimeout but no I.E. maddness
21236 return cachedClearTimeout(marker);
21237 } catch (e){
21238 try {
21239 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
21240 return cachedClearTimeout.call(null, marker);
21241 } catch (e){
21242 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
21243 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
21244 return cachedClearTimeout.call(this, marker);
21245 }
21246 }
21247
21248
21249
21250}
21251var queue = [];
21252var draining = false;
21253var currentQueue;
21254var queueIndex = -1;
21255
21256function cleanUpNextTick() {
21257 if (!draining || !currentQueue) {
21258 return;
21259 }
21260 draining = false;
21261 if (currentQueue.length) {
21262 queue = currentQueue.concat(queue);
21263 } else {
21264 queueIndex = -1;
21265 }
21266 if (queue.length) {
21267 drainQueue();
21268 }
21269}
21270
21271function drainQueue() {
21272 if (draining) {
21273 return;
21274 }
21275 var timeout = runTimeout(cleanUpNextTick);
21276 draining = true;
21277
21278 var len = queue.length;
21279 while(len) {
21280 currentQueue = queue;
21281 queue = [];
21282 while (++queueIndex < len) {
21283 if (currentQueue) {
21284 currentQueue[queueIndex].run();
21285 }
21286 }
21287 queueIndex = -1;
21288 len = queue.length;
21289 }
21290 currentQueue = null;
21291 draining = false;
21292 runClearTimeout(timeout);
21293}
21294function nextTick$2(fun) {
21295 var args = new Array(arguments.length - 1);
21296 if (arguments.length > 1) {
21297 for (var i = 1; i < arguments.length; i++) {
21298 args[i - 1] = arguments[i];
21299 }
21300 }
21301 queue.push(new Item(fun, args));
21302 if (queue.length === 1 && !draining) {
21303 runTimeout(drainQueue);
21304 }
21305}
21306// v8 likes predictible objects
21307function Item(fun, array) {
21308 this.fun = fun;
21309 this.array = array;
21310}
21311Item.prototype.run = function () {
21312 this.fun.apply(null, this.array);
21313};
21314var title = 'browser';
21315var platform = 'browser';
21316var browser = true;
21317var env = {};
21318var argv = [];
21319var version = ''; // empty string to avoid regexp issues
21320var versions = {};
21321var release = {};
21322var config = {};
21323
21324function noop() {}
21325
21326var on = noop;
21327var addListener = noop;
21328var once = noop;
21329var off = noop;
21330var removeListener = noop;
21331var removeAllListeners = noop;
21332var emit = noop;
21333
21334function binding(name) {
21335 throw new Error('process.binding is not supported');
21336}
21337
21338function cwd () { return '/' }
21339function chdir (dir) {
21340 throw new Error('process.chdir is not supported');
21341}function umask() { return 0; }
21342
21343// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
21344var performance = global$1.performance || {};
21345var performanceNow =
21346 performance.now ||
21347 performance.mozNow ||
21348 performance.msNow ||
21349 performance.oNow ||
21350 performance.webkitNow ||
21351 function(){ return (new Date()).getTime() };
21352
21353// generate timestamp or delta
21354// see http://nodejs.org/api/process.html#process_process_hrtime
21355function hrtime(previousTimestamp){
21356 var clocktime = performanceNow.call(performance)*1e-3;
21357 var seconds = Math.floor(clocktime);
21358 var nanoseconds = Math.floor((clocktime%1)*1e9);
21359 if (previousTimestamp) {
21360 seconds = seconds - previousTimestamp[0];
21361 nanoseconds = nanoseconds - previousTimestamp[1];
21362 if (nanoseconds<0) {
21363 seconds--;
21364 nanoseconds += 1e9;
21365 }
21366 }
21367 return [seconds,nanoseconds]
21368}
21369
21370var startTime = new Date();
21371function uptime() {
21372 var currentTime = new Date();
21373 var dif = currentTime - startTime;
21374 return dif / 1000;
21375}
21376
21377var process = {
21378 nextTick: nextTick$2,
21379 title: title,
21380 browser: browser,
21381 env: env,
21382 argv: argv,
21383 version: version,
21384 versions: versions,
21385 on: on,
21386 addListener: addListener,
21387 once: once,
21388 off: off,
21389 removeListener: removeListener,
21390 removeAllListeners: removeAllListeners,
21391 emit: emit,
21392 binding: binding,
21393 cwd: cwd,
21394 chdir: chdir,
21395 umask: umask,
21396 hrtime: hrtime,
21397 platform: platform,
21398 release: release,
21399 config: config,
21400 uptime: uptime
21401};
21402
21403var hasFlag = (flag, argv$$1) => {
21404 argv$$1 = argv$$1 || process.argv;
21405 const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
21406 const pos = argv$$1.indexOf(prefix + flag);
21407 const terminatorPos = argv$$1.indexOf('--');
21408 return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
21409};
21410
21411const env$1 = process.env;
21412
21413let forceColor;
21414if (hasFlag('no-color') ||
21415 hasFlag('no-colors') ||
21416 hasFlag('color=false')) {
21417 forceColor = false;
21418} else if (hasFlag('color') ||
21419 hasFlag('colors') ||
21420 hasFlag('color=true') ||
21421 hasFlag('color=always')) {
21422 forceColor = true;
21423}
21424if ('FORCE_COLOR' in env$1) {
21425 forceColor = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0;
21426}
21427
21428function translateLevel(level) {
21429 if (level === 0) {
21430 return false;
21431 }
21432
21433 return {
21434 level,
21435 hasBasic: true,
21436 has256: level >= 2,
21437 has16m: level >= 3
21438 };
21439}
21440
21441function supportsColor(stream) {
21442 if (forceColor === false) {
21443 return 0;
21444 }
21445
21446 if (hasFlag('color=16m') ||
21447 hasFlag('color=full') ||
21448 hasFlag('color=truecolor')) {
21449 return 3;
21450 }
21451
21452 if (hasFlag('color=256')) {
21453 return 2;
21454 }
21455
21456 if (stream && !stream.isTTY && forceColor !== true) {
21457 return 0;
21458 }
21459
21460 const min = forceColor ? 1 : 0;
21461
21462 if ('CI' in env$1) {
21463 if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env$1) || env$1.CI_NAME === 'codeship') {
21464 return 1;
21465 }
21466
21467 return min;
21468 }
21469
21470 if ('TEAMCITY_VERSION' in env$1) {
21471 return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
21472 }
21473
21474 if (env$1.COLORTERM === 'truecolor') {
21475 return 3;
21476 }
21477
21478 if ('TERM_PROGRAM' in env$1) {
21479 const version$$1 = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
21480
21481 switch (env$1.TERM_PROGRAM) {
21482 case 'iTerm.app':
21483 return version$$1 >= 3 ? 3 : 2;
21484 case 'Apple_Terminal':
21485 return 2;
21486 // No default
21487 }
21488 }
21489
21490 if (/-256(color)?$/i.test(env$1.TERM)) {
21491 return 2;
21492 }
21493
21494 if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) {
21495 return 1;
21496 }
21497
21498 if ('COLORTERM' in env$1) {
21499 return 1;
21500 }
21501
21502 if (env$1.TERM === 'dumb') {
21503 return min;
21504 }
21505
21506 return min;
21507}
21508
21509function getSupportLevel(stream) {
21510 const level = supportsColor(stream);
21511 return translateLevel(level);
21512}
21513
21514var supportsColor_1 = {
21515 supportsColor: getSupportLevel,
21516 stdout: getSupportLevel(process.stdout),
21517 stderr: getSupportLevel(process.stderr)
21518};
21519
21520function colorize(str, color) {
21521 if (supportsColor_1.stdout === false) {
21522 return str;
21523 }
21524
21525 return "\x1b[" + color + "m" + str + "\x1b[0m";
21526}
21527
21528var red = function(str) {
21529 return colorize(str, 31);
21530};
21531
21532var green = function(str) {
21533 return colorize(str, 32);
21534};
21535
21536var cyan = function(str) {
21537 return colorize(str, 96);
21538};
21539
21540var white = function(str) {
21541 return colorize(str, 39);
21542};
21543
21544var bold = function(str) {
21545 return colorize(str, 1);
21546};
21547
21548var color = {
21549 red: red,
21550 green: green,
21551 cyan: cyan,
21552 white: white,
21553 bold: bold
21554};
21555
21556var base = createCommonjsModule(function (module, exports) {
21557
21558exports.__esModule = true;
21559exports['default'] = /*istanbul ignore end*/Diff;
21560function Diff() {}
21561
21562Diff.prototype = {
21563 /*istanbul ignore start*/ /*istanbul ignore end*/diff: function diff(oldString, newString) {
21564 /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
21565
21566 var callback = options.callback;
21567 if (typeof options === 'function') {
21568 callback = options;
21569 options = {};
21570 }
21571 this.options = options;
21572
21573 var self = this;
21574
21575 function done(value) {
21576 if (callback) {
21577 setTimeout(function () {
21578 callback(undefined, value);
21579 }, 0);
21580 return true;
21581 } else {
21582 return value;
21583 }
21584 }
21585
21586 // Allow subclasses to massage the input prior to running
21587 oldString = this.castInput(oldString);
21588 newString = this.castInput(newString);
21589
21590 oldString = this.removeEmpty(this.tokenize(oldString));
21591 newString = this.removeEmpty(this.tokenize(newString));
21592
21593 var newLen = newString.length,
21594 oldLen = oldString.length;
21595 var editLength = 1;
21596 var maxEditLength = newLen + oldLen;
21597 var bestPath = [{ newPos: -1, components: [] }];
21598
21599 // Seed editLength = 0, i.e. the content starts with the same values
21600 var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
21601 if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
21602 // Identity per the equality and tokenizer
21603 return done([{ value: this.join(newString), count: newString.length }]);
21604 }
21605
21606 // Main worker method. checks all permutations of a given edit length for acceptance.
21607 function execEditLength() {
21608 for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
21609 var basePath = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
21610 var addPath = bestPath[diagonalPath - 1],
21611 removePath = bestPath[diagonalPath + 1],
21612 _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
21613 if (addPath) {
21614 // No one else is going to attempt to use this value, clear it
21615 bestPath[diagonalPath - 1] = undefined;
21616 }
21617
21618 var canAdd = addPath && addPath.newPos + 1 < newLen,
21619 canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
21620 if (!canAdd && !canRemove) {
21621 // If this path is a terminal then prune
21622 bestPath[diagonalPath] = undefined;
21623 continue;
21624 }
21625
21626 // Select the diagonal that we want to branch from. We select the prior
21627 // path whose position in the new string is the farthest from the origin
21628 // and does not pass the bounds of the diff graph
21629 if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
21630 basePath = clonePath(removePath);
21631 self.pushComponent(basePath.components, undefined, true);
21632 } else {
21633 basePath = addPath; // No need to clone, we've pulled it from the list
21634 basePath.newPos++;
21635 self.pushComponent(basePath.components, true, undefined);
21636 }
21637
21638 _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
21639
21640 // If we have hit the end of both strings, then we are done
21641 if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
21642 return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
21643 } else {
21644 // Otherwise track this path as a potential candidate and continue.
21645 bestPath[diagonalPath] = basePath;
21646 }
21647 }
21648
21649 editLength++;
21650 }
21651
21652 // Performs the length of edit iteration. Is a bit fugly as this has to support the
21653 // sync and async mode which is never fun. Loops over execEditLength until a value
21654 // is produced.
21655 if (callback) {
21656 (function exec() {
21657 setTimeout(function () {
21658 // This should not happen, but we want to be safe.
21659 /* istanbul ignore next */
21660 if (editLength > maxEditLength) {
21661 return callback();
21662 }
21663
21664 if (!execEditLength()) {
21665 exec();
21666 }
21667 }, 0);
21668 })();
21669 } else {
21670 while (editLength <= maxEditLength) {
21671 var ret = execEditLength();
21672 if (ret) {
21673 return ret;
21674 }
21675 }
21676 }
21677 },
21678 /*istanbul ignore start*/ /*istanbul ignore end*/pushComponent: function pushComponent(components, added, removed) {
21679 var last = components[components.length - 1];
21680 if (last && last.added === added && last.removed === removed) {
21681 // We need to clone here as the component clone operation is just
21682 // as shallow array clone
21683 components[components.length - 1] = { count: last.count + 1, added: added, removed: removed };
21684 } else {
21685 components.push({ count: 1, added: added, removed: removed });
21686 }
21687 },
21688 /*istanbul ignore start*/ /*istanbul ignore end*/extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
21689 var newLen = newString.length,
21690 oldLen = oldString.length,
21691 newPos = basePath.newPos,
21692 oldPos = newPos - diagonalPath,
21693 commonCount = 0;
21694 while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
21695 newPos++;
21696 oldPos++;
21697 commonCount++;
21698 }
21699
21700 if (commonCount) {
21701 basePath.components.push({ count: commonCount });
21702 }
21703
21704 basePath.newPos = newPos;
21705 return oldPos;
21706 },
21707 /*istanbul ignore start*/ /*istanbul ignore end*/equals: function equals(left, right) {
21708 if (this.options.comparator) {
21709 return this.options.comparator(left, right);
21710 } else {
21711 return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
21712 }
21713 },
21714 /*istanbul ignore start*/ /*istanbul ignore end*/removeEmpty: function removeEmpty(array) {
21715 var ret = [];
21716 for (var i = 0; i < array.length; i++) {
21717 if (array[i]) {
21718 ret.push(array[i]);
21719 }
21720 }
21721 return ret;
21722 },
21723 /*istanbul ignore start*/ /*istanbul ignore end*/castInput: function castInput(value) {
21724 return value;
21725 },
21726 /*istanbul ignore start*/ /*istanbul ignore end*/tokenize: function tokenize(value) {
21727 return value.split('');
21728 },
21729 /*istanbul ignore start*/ /*istanbul ignore end*/join: function join(chars) {
21730 return chars.join('');
21731 }
21732};
21733
21734function buildValues(diff, components, newString, oldString, useLongestToken) {
21735 var componentPos = 0,
21736 componentLen = components.length,
21737 newPos = 0,
21738 oldPos = 0;
21739
21740 for (; componentPos < componentLen; componentPos++) {
21741 var component = components[componentPos];
21742 if (!component.removed) {
21743 if (!component.added && useLongestToken) {
21744 var value = newString.slice(newPos, newPos + component.count);
21745 value = value.map(function (value, i) {
21746 var oldValue = oldString[oldPos + i];
21747 return oldValue.length > value.length ? oldValue : value;
21748 });
21749
21750 component.value = diff.join(value);
21751 } else {
21752 component.value = diff.join(newString.slice(newPos, newPos + component.count));
21753 }
21754 newPos += component.count;
21755
21756 // Common case
21757 if (!component.added) {
21758 oldPos += component.count;
21759 }
21760 } else {
21761 component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
21762 oldPos += component.count;
21763
21764 // Reverse add and remove so removes are output first to match common convention
21765 // The diffing algorithm is tied to add then remove output and this is the simplest
21766 // route to get the desired output with minimal overhead.
21767 if (componentPos && components[componentPos - 1].added) {
21768 var tmp = components[componentPos - 1];
21769 components[componentPos - 1] = components[componentPos];
21770 components[componentPos] = tmp;
21771 }
21772 }
21773 }
21774
21775 // Special case handle for when one terminal is ignored (i.e. whitespace).
21776 // For this case we merge the terminal into the prior string and drop the change.
21777 // This is only available for string mode.
21778 var lastComponent = components[componentLen - 1];
21779 if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
21780 components[componentLen - 2].value += lastComponent.value;
21781 components.pop();
21782 }
21783
21784 return components;
21785}
21786
21787function clonePath(path) {
21788 return { newPos: path.newPos, components: path.components.slice(0) };
21789}
21790
21791});
21792
21793unwrapExports(base);
21794
21795var character = createCommonjsModule(function (module, exports) {
21796
21797exports.__esModule = true;
21798exports.characterDiff = undefined;
21799exports. /*istanbul ignore end*/diffChars = diffChars;
21800
21801
21802
21803/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
21804
21805function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
21806
21807/*istanbul ignore end*/var characterDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/characterDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
21808function diffChars(oldStr, newStr, options) {
21809 return characterDiff.diff(oldStr, newStr, options);
21810}
21811
21812});
21813
21814unwrapExports(character);
21815var character_1 = character.characterDiff;
21816var character_2 = character.diffChars;
21817
21818var params = createCommonjsModule(function (module, exports) {
21819
21820exports.__esModule = true;
21821exports. /*istanbul ignore end*/generateOptions = generateOptions;
21822function generateOptions(options, defaults) {
21823 if (typeof options === 'function') {
21824 defaults.callback = options;
21825 } else if (options) {
21826 for (var name in options) {
21827 /* istanbul ignore else */
21828 if (options.hasOwnProperty(name)) {
21829 defaults[name] = options[name];
21830 }
21831 }
21832 }
21833 return defaults;
21834}
21835
21836});
21837
21838unwrapExports(params);
21839var params_1 = params.generateOptions;
21840
21841var word = createCommonjsModule(function (module, exports) {
21842
21843exports.__esModule = true;
21844exports.wordDiff = undefined;
21845exports. /*istanbul ignore end*/diffWords = diffWords;
21846/*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = diffWordsWithSpace;
21847
21848
21849
21850/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
21851
21852/*istanbul ignore end*/
21853
21854/*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
21855
21856/*istanbul ignore end*/ // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode
21857//
21858// Ranges and exceptions:
21859// Latin-1 Supplement, 0080–00FF
21860// - U+00D7 × Multiplication sign
21861// - U+00F7 ÷ Division sign
21862// Latin Extended-A, 0100–017F
21863// Latin Extended-B, 0180–024F
21864// IPA Extensions, 0250–02AF
21865// Spacing Modifier Letters, 02B0–02FF
21866// - U+02C7 ˇ &#711; Caron
21867// - U+02D8 ˘ &#728; Breve
21868// - U+02D9 ˙ &#729; Dot Above
21869// - U+02DA ˚ &#730; Ring Above
21870// - U+02DB ˛ &#731; Ogonek
21871// - U+02DC ˜ &#732; Small Tilde
21872// - U+02DD ˝ &#733; Double Acute Accent
21873// Latin Extended Additional, 1E00–1EFF
21874var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
21875
21876var reWhitespace = /\S/;
21877
21878var wordDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/wordDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
21879wordDiff.equals = function (left, right) {
21880 if (this.options.ignoreCase) {
21881 left = left.toLowerCase();
21882 right = right.toLowerCase();
21883 }
21884 return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
21885};
21886wordDiff.tokenize = function (value) {
21887 var tokens = value.split(/(\s+|\b)/);
21888
21889 // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
21890 for (var i = 0; i < tokens.length - 1; i++) {
21891 // If we have an empty string in the next field and we have only word chars before and after, merge
21892 if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
21893 tokens[i] += tokens[i + 2];
21894 tokens.splice(i + 1, 2);
21895 i--;
21896 }
21897 }
21898
21899 return tokens;
21900};
21901
21902function diffWords(oldStr, newStr, options) {
21903 options = /*istanbul ignore start*/(0, params.generateOptions) /*istanbul ignore end*/(options, { ignoreWhitespace: true });
21904 return wordDiff.diff(oldStr, newStr, options);
21905}
21906
21907function diffWordsWithSpace(oldStr, newStr, options) {
21908 return wordDiff.diff(oldStr, newStr, options);
21909}
21910
21911});
21912
21913unwrapExports(word);
21914var word_1 = word.wordDiff;
21915var word_2 = word.diffWords;
21916var word_3 = word.diffWordsWithSpace;
21917
21918var line = createCommonjsModule(function (module, exports) {
21919
21920exports.__esModule = true;
21921exports.lineDiff = undefined;
21922exports. /*istanbul ignore end*/diffLines = diffLines;
21923/*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = diffTrimmedLines;
21924
21925
21926
21927/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
21928
21929/*istanbul ignore end*/
21930
21931/*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
21932
21933/*istanbul ignore end*/var lineDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/lineDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
21934lineDiff.tokenize = function (value) {
21935 var retLines = [],
21936 linesAndNewlines = value.split(/(\n|\r\n)/);
21937
21938 // Ignore the final empty token that occurs if the string ends with a new line
21939 if (!linesAndNewlines[linesAndNewlines.length - 1]) {
21940 linesAndNewlines.pop();
21941 }
21942
21943 // Merge the content and line separators into single tokens
21944 for (var i = 0; i < linesAndNewlines.length; i++) {
21945 var line = linesAndNewlines[i];
21946
21947 if (i % 2 && !this.options.newlineIsToken) {
21948 retLines[retLines.length - 1] += line;
21949 } else {
21950 if (this.options.ignoreWhitespace) {
21951 line = line.trim();
21952 }
21953 retLines.push(line);
21954 }
21955 }
21956
21957 return retLines;
21958};
21959
21960function diffLines(oldStr, newStr, callback) {
21961 return lineDiff.diff(oldStr, newStr, callback);
21962}
21963function diffTrimmedLines(oldStr, newStr, callback) {
21964 var options = /*istanbul ignore start*/(0, params.generateOptions) /*istanbul ignore end*/(callback, { ignoreWhitespace: true });
21965 return lineDiff.diff(oldStr, newStr, options);
21966}
21967
21968});
21969
21970unwrapExports(line);
21971var line_1 = line.lineDiff;
21972var line_2 = line.diffLines;
21973var line_3 = line.diffTrimmedLines;
21974
21975var sentence = createCommonjsModule(function (module, exports) {
21976
21977exports.__esModule = true;
21978exports.sentenceDiff = undefined;
21979exports. /*istanbul ignore end*/diffSentences = diffSentences;
21980
21981
21982
21983/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
21984
21985function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
21986
21987/*istanbul ignore end*/var sentenceDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/sentenceDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
21988sentenceDiff.tokenize = function (value) {
21989 return value.split(/(\S.+?[.!?])(?=\s+|$)/);
21990};
21991
21992function diffSentences(oldStr, newStr, callback) {
21993 return sentenceDiff.diff(oldStr, newStr, callback);
21994}
21995
21996});
21997
21998unwrapExports(sentence);
21999var sentence_1 = sentence.sentenceDiff;
22000var sentence_2 = sentence.diffSentences;
22001
22002var css = createCommonjsModule(function (module, exports) {
22003
22004exports.__esModule = true;
22005exports.cssDiff = undefined;
22006exports. /*istanbul ignore end*/diffCss = diffCss;
22007
22008
22009
22010/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
22011
22012function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22013
22014/*istanbul ignore end*/var cssDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/cssDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
22015cssDiff.tokenize = function (value) {
22016 return value.split(/([{}:;,]|\s+)/);
22017};
22018
22019function diffCss(oldStr, newStr, callback) {
22020 return cssDiff.diff(oldStr, newStr, callback);
22021}
22022
22023});
22024
22025unwrapExports(css);
22026var css_1 = css.cssDiff;
22027var css_2 = css.diffCss;
22028
22029var json = createCommonjsModule(function (module, exports) {
22030
22031exports.__esModule = true;
22032exports.jsonDiff = undefined;
22033
22034var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
22035
22036exports. /*istanbul ignore end*/diffJson = diffJson;
22037/*istanbul ignore start*/exports. /*istanbul ignore end*/canonicalize = canonicalize;
22038
22039
22040
22041/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
22042
22043/*istanbul ignore end*/
22044
22045/*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22046
22047/*istanbul ignore end*/var objectPrototypeToString = Object.prototype.toString;
22048
22049var jsonDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/jsonDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
22050// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
22051// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
22052jsonDiff.useLongestToken = true;
22053
22054jsonDiff.tokenize = /*istanbul ignore start*/line.lineDiff /*istanbul ignore end*/.tokenize;
22055jsonDiff.castInput = function (value) {
22056 /*istanbul ignore start*/var _options = /*istanbul ignore end*/this.options,
22057 undefinedReplacement = _options.undefinedReplacement,
22058 _options$stringifyRep = _options.stringifyReplacer,
22059 stringifyReplacer = _options$stringifyRep === undefined ? function (k, v) /*istanbul ignore start*/{
22060 return (/*istanbul ignore end*/typeof v === 'undefined' ? undefinedReplacement : v
22061 );
22062 } : _options$stringifyRep;
22063
22064
22065 return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
22066};
22067jsonDiff.equals = function (left, right) {
22068 return (/*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'))
22069 );
22070};
22071
22072function diffJson(oldObj, newObj, options) {
22073 return jsonDiff.diff(oldObj, newObj, options);
22074}
22075
22076// This function handles the presence of circular references by bailing out when encountering an
22077// object that is already on the "stack" of items being processed. Accepts an optional replacer
22078function canonicalize(obj, stack, replacementStack, replacer, key) {
22079 stack = stack || [];
22080 replacementStack = replacementStack || [];
22081
22082 if (replacer) {
22083 obj = replacer(key, obj);
22084 }
22085
22086 var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
22087
22088 for (i = 0; i < stack.length; i += 1) {
22089 if (stack[i] === obj) {
22090 return replacementStack[i];
22091 }
22092 }
22093
22094 var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
22095
22096 if ('[object Array]' === objectPrototypeToString.call(obj)) {
22097 stack.push(obj);
22098 canonicalizedObj = new Array(obj.length);
22099 replacementStack.push(canonicalizedObj);
22100 for (i = 0; i < obj.length; i += 1) {
22101 canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
22102 }
22103 stack.pop();
22104 replacementStack.pop();
22105 return canonicalizedObj;
22106 }
22107
22108 if (obj && obj.toJSON) {
22109 obj = obj.toJSON();
22110 }
22111
22112 if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {
22113 stack.push(obj);
22114 canonicalizedObj = {};
22115 replacementStack.push(canonicalizedObj);
22116 var sortedKeys = [],
22117 _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
22118 for (_key in obj) {
22119 /* istanbul ignore else */
22120 if (obj.hasOwnProperty(_key)) {
22121 sortedKeys.push(_key);
22122 }
22123 }
22124 sortedKeys.sort();
22125 for (i = 0; i < sortedKeys.length; i += 1) {
22126 _key = sortedKeys[i];
22127 canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
22128 }
22129 stack.pop();
22130 replacementStack.pop();
22131 } else {
22132 canonicalizedObj = obj;
22133 }
22134 return canonicalizedObj;
22135}
22136
22137});
22138
22139unwrapExports(json);
22140var json_1 = json.jsonDiff;
22141var json_2 = json.diffJson;
22142var json_3 = json.canonicalize;
22143
22144var array$2 = createCommonjsModule(function (module, exports) {
22145
22146exports.__esModule = true;
22147exports.arrayDiff = undefined;
22148exports. /*istanbul ignore end*/diffArrays = diffArrays;
22149
22150
22151
22152/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
22153
22154function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22155
22156/*istanbul ignore end*/var arrayDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/arrayDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
22157arrayDiff.tokenize = function (value) {
22158 return value.slice();
22159};
22160arrayDiff.join = arrayDiff.removeEmpty = function (value) {
22161 return value;
22162};
22163
22164function diffArrays(oldArr, newArr, callback) {
22165 return arrayDiff.diff(oldArr, newArr, callback);
22166}
22167
22168});
22169
22170unwrapExports(array$2);
22171var array_1 = array$2.arrayDiff;
22172var array_2 = array$2.diffArrays;
22173
22174var parse = createCommonjsModule(function (module, exports) {
22175
22176exports.__esModule = true;
22177exports. /*istanbul ignore end*/parsePatch = parsePatch;
22178function parsePatch(uniDiff) {
22179 /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22180
22181 var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
22182 delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
22183 list = [],
22184 i = 0;
22185
22186 function parseIndex() {
22187 var index = {};
22188 list.push(index);
22189
22190 // Parse diff metadata
22191 while (i < diffstr.length) {
22192 var line = diffstr[i];
22193
22194 // File header found, end parsing diff metadata
22195 if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
22196 break;
22197 }
22198
22199 // Diff index
22200 var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
22201 if (header) {
22202 index.index = header[1];
22203 }
22204
22205 i++;
22206 }
22207
22208 // Parse file headers if they are defined. Unified diff requires them, but
22209 // there's no technical issues to have an isolated hunk without file header
22210 parseFileHeader(index);
22211 parseFileHeader(index);
22212
22213 // Parse hunks
22214 index.hunks = [];
22215
22216 while (i < diffstr.length) {
22217 var _line = diffstr[i];
22218
22219 if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
22220 break;
22221 } else if (/^@@/.test(_line)) {
22222 index.hunks.push(parseHunk());
22223 } else if (_line && options.strict) {
22224 // Ignore unexpected content unless in strict mode
22225 throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
22226 } else {
22227 i++;
22228 }
22229 }
22230 }
22231
22232 // Parses the --- and +++ headers, if none are found, no lines
22233 // are consumed.
22234 function parseFileHeader(index) {
22235 var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
22236 if (fileHeader) {
22237 var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
22238 var data = fileHeader[2].split('\t', 2);
22239 var fileName = data[0].replace(/\\\\/g, '\\');
22240 if (/^".*"$/.test(fileName)) {
22241 fileName = fileName.substr(1, fileName.length - 2);
22242 }
22243 index[keyPrefix + 'FileName'] = fileName;
22244 index[keyPrefix + 'Header'] = (data[1] || '').trim();
22245
22246 i++;
22247 }
22248 }
22249
22250 // Parses a hunk
22251 // This assumes that we are at the start of a hunk.
22252 function parseHunk() {
22253 var chunkHeaderIndex = i,
22254 chunkHeaderLine = diffstr[i++],
22255 chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
22256
22257 var hunk = {
22258 oldStart: +chunkHeader[1],
22259 oldLines: +chunkHeader[2] || 1,
22260 newStart: +chunkHeader[3],
22261 newLines: +chunkHeader[4] || 1,
22262 lines: [],
22263 linedelimiters: []
22264 };
22265
22266 var addCount = 0,
22267 removeCount = 0;
22268 for (; i < diffstr.length; i++) {
22269 // Lines starting with '---' could be mistaken for the "remove line" operation
22270 // But they could be the header for the next file. Therefore prune such cases out.
22271 if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
22272 break;
22273 }
22274 var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
22275
22276 if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
22277 hunk.lines.push(diffstr[i]);
22278 hunk.linedelimiters.push(delimiters[i] || '\n');
22279
22280 if (operation === '+') {
22281 addCount++;
22282 } else if (operation === '-') {
22283 removeCount++;
22284 } else if (operation === ' ') {
22285 addCount++;
22286 removeCount++;
22287 }
22288 } else {
22289 break;
22290 }
22291 }
22292
22293 // Handle the empty block count case
22294 if (!addCount && hunk.newLines === 1) {
22295 hunk.newLines = 0;
22296 }
22297 if (!removeCount && hunk.oldLines === 1) {
22298 hunk.oldLines = 0;
22299 }
22300
22301 // Perform optional sanity checking
22302 if (options.strict) {
22303 if (addCount !== hunk.newLines) {
22304 throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
22305 }
22306 if (removeCount !== hunk.oldLines) {
22307 throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
22308 }
22309 }
22310
22311 return hunk;
22312 }
22313
22314 while (i < diffstr.length) {
22315 parseIndex();
22316 }
22317
22318 return list;
22319}
22320
22321});
22322
22323unwrapExports(parse);
22324var parse_1 = parse.parsePatch;
22325
22326var distanceIterator = createCommonjsModule(function (module, exports) {
22327
22328exports.__esModule = true;
22329
22330exports["default"] = /*istanbul ignore end*/function (start, minLine, maxLine) {
22331 var wantForward = true,
22332 backwardExhausted = false,
22333 forwardExhausted = false,
22334 localOffset = 1;
22335
22336 return function iterator() {
22337 if (wantForward && !forwardExhausted) {
22338 if (backwardExhausted) {
22339 localOffset++;
22340 } else {
22341 wantForward = false;
22342 }
22343
22344 // Check if trying to fit beyond text length, and if not, check it fits
22345 // after offset location (or desired location on first iteration)
22346 if (start + localOffset <= maxLine) {
22347 return localOffset;
22348 }
22349
22350 forwardExhausted = true;
22351 }
22352
22353 if (!backwardExhausted) {
22354 if (!forwardExhausted) {
22355 wantForward = true;
22356 }
22357
22358 // Check if trying to fit before text beginning, and if not, check it fits
22359 // before offset location
22360 if (minLine <= start - localOffset) {
22361 return -localOffset++;
22362 }
22363
22364 backwardExhausted = true;
22365 return iterator();
22366 }
22367
22368 // We tried to fit hunk before text beginning and beyond text length, then
22369 // hunk can't fit on the text. Return undefined
22370 };
22371};
22372
22373});
22374
22375unwrapExports(distanceIterator);
22376
22377var apply = createCommonjsModule(function (module, exports) {
22378
22379exports.__esModule = true;
22380exports. /*istanbul ignore end*/applyPatch = applyPatch;
22381/*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatches = applyPatches;
22382
22383
22384
22385
22386
22387/*istanbul ignore start*/var _distanceIterator2 = _interopRequireDefault(distanceIterator);
22388
22389function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22390
22391/*istanbul ignore end*/function applyPatch(source, uniDiff) {
22392 /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
22393
22394 if (typeof uniDiff === 'string') {
22395 uniDiff = /*istanbul ignore start*/(0, parse.parsePatch) /*istanbul ignore end*/(uniDiff);
22396 }
22397
22398 if (Array.isArray(uniDiff)) {
22399 if (uniDiff.length > 1) {
22400 throw new Error('applyPatch only works with a single input.');
22401 }
22402
22403 uniDiff = uniDiff[0];
22404 }
22405
22406 // Apply the diff to the input
22407 var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
22408 delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
22409 hunks = uniDiff.hunks,
22410 compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) /*istanbul ignore start*/{
22411 return (/*istanbul ignore end*/line === patchContent
22412 );
22413 },
22414 errorCount = 0,
22415 fuzzFactor = options.fuzzFactor || 0,
22416 minLine = 0,
22417 offset = 0,
22418 removeEOFNL = /*istanbul ignore start*/void 0 /*istanbul ignore end*/,
22419 addEOFNL = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
22420
22421 /**
22422 * Checks if the hunk exactly fits on the provided location
22423 */
22424 function hunkFits(hunk, toPos) {
22425 for (var j = 0; j < hunk.lines.length; j++) {
22426 var line = hunk.lines[j],
22427 operation = line.length > 0 ? line[0] : ' ',
22428 content = line.length > 0 ? line.substr(1) : line;
22429
22430 if (operation === ' ' || operation === '-') {
22431 // Context sanity check
22432 if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
22433 errorCount++;
22434
22435 if (errorCount > fuzzFactor) {
22436 return false;
22437 }
22438 }
22439 toPos++;
22440 }
22441 }
22442
22443 return true;
22444 }
22445
22446 // Search best fit offsets for each hunk based on the previous ones
22447 for (var i = 0; i < hunks.length; i++) {
22448 var hunk = hunks[i],
22449 maxLine = lines.length - hunk.oldLines,
22450 localOffset = 0,
22451 toPos = offset + hunk.oldStart - 1;
22452
22453 var iterator = /*istanbul ignore start*/(0, _distanceIterator2['default']) /*istanbul ignore end*/(toPos, minLine, maxLine);
22454
22455 for (; localOffset !== undefined; localOffset = iterator()) {
22456 if (hunkFits(hunk, toPos + localOffset)) {
22457 hunk.offset = offset += localOffset;
22458 break;
22459 }
22460 }
22461
22462 if (localOffset === undefined) {
22463 return false;
22464 }
22465
22466 // Set lower text limit to end of the current hunk, so next ones don't try
22467 // to fit over already patched text
22468 minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
22469 }
22470
22471 // Apply patch hunks
22472 var diffOffset = 0;
22473 for (var _i = 0; _i < hunks.length; _i++) {
22474 var _hunk = hunks[_i],
22475 _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
22476 diffOffset += _hunk.newLines - _hunk.oldLines;
22477
22478 if (_toPos < 0) {
22479 // Creating a new file
22480 _toPos = 0;
22481 }
22482
22483 for (var j = 0; j < _hunk.lines.length; j++) {
22484 var line = _hunk.lines[j],
22485 operation = line.length > 0 ? line[0] : ' ',
22486 content = line.length > 0 ? line.substr(1) : line,
22487 delimiter = _hunk.linedelimiters[j];
22488
22489 if (operation === ' ') {
22490 _toPos++;
22491 } else if (operation === '-') {
22492 lines.splice(_toPos, 1);
22493 delimiters.splice(_toPos, 1);
22494 /* istanbul ignore else */
22495 } else if (operation === '+') {
22496 lines.splice(_toPos, 0, content);
22497 delimiters.splice(_toPos, 0, delimiter);
22498 _toPos++;
22499 } else if (operation === '\\') {
22500 var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
22501 if (previousOperation === '+') {
22502 removeEOFNL = true;
22503 } else if (previousOperation === '-') {
22504 addEOFNL = true;
22505 }
22506 }
22507 }
22508 }
22509
22510 // Handle EOFNL insertion/removal
22511 if (removeEOFNL) {
22512 while (!lines[lines.length - 1]) {
22513 lines.pop();
22514 delimiters.pop();
22515 }
22516 } else if (addEOFNL) {
22517 lines.push('');
22518 delimiters.push('\n');
22519 }
22520 for (var _k = 0; _k < lines.length - 1; _k++) {
22521 lines[_k] = lines[_k] + delimiters[_k];
22522 }
22523 return lines.join('');
22524}
22525
22526// Wrapper that supports multiple file patches via callbacks.
22527function applyPatches(uniDiff, options) {
22528 if (typeof uniDiff === 'string') {
22529 uniDiff = /*istanbul ignore start*/(0, parse.parsePatch) /*istanbul ignore end*/(uniDiff);
22530 }
22531
22532 var currentIndex = 0;
22533 function processIndex() {
22534 var index = uniDiff[currentIndex++];
22535 if (!index) {
22536 return options.complete();
22537 }
22538
22539 options.loadFile(index, function (err, data) {
22540 if (err) {
22541 return options.complete(err);
22542 }
22543
22544 var updatedContent = applyPatch(data, index, options);
22545 options.patched(index, updatedContent, function (err) {
22546 if (err) {
22547 return options.complete(err);
22548 }
22549
22550 processIndex();
22551 });
22552 });
22553 }
22554 processIndex();
22555}
22556
22557});
22558
22559unwrapExports(apply);
22560var apply_1 = apply.applyPatch;
22561var apply_2 = apply.applyPatches;
22562
22563var create = createCommonjsModule(function (module, exports) {
22564
22565exports.__esModule = true;
22566exports. /*istanbul ignore end*/structuredPatch = structuredPatch;
22567/*istanbul ignore start*/exports. /*istanbul ignore end*/createTwoFilesPatch = createTwoFilesPatch;
22568/*istanbul ignore start*/exports. /*istanbul ignore end*/createPatch = createPatch;
22569
22570
22571
22572/*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
22573
22574/*istanbul ignore end*/function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
22575 if (!options) {
22576 options = {};
22577 }
22578 if (typeof options.context === 'undefined') {
22579 options.context = 4;
22580 }
22581
22582 var diff = /*istanbul ignore start*/(0, line.diffLines) /*istanbul ignore end*/(oldStr, newStr, options);
22583 diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier
22584
22585 function contextLines(lines) {
22586 return lines.map(function (entry) {
22587 return ' ' + entry;
22588 });
22589 }
22590
22591 var hunks = [];
22592 var oldRangeStart = 0,
22593 newRangeStart = 0,
22594 curRange = [],
22595 oldLine = 1,
22596 newLine = 1;
22597
22598 /*istanbul ignore start*/var _loop = function _loop( /*istanbul ignore end*/i) {
22599 var current = diff[i],
22600 lines = current.lines || current.value.replace(/\n$/, '').split('\n');
22601 current.lines = lines;
22602
22603 if (current.added || current.removed) {
22604 /*istanbul ignore start*/var _curRange;
22605
22606 /*istanbul ignore end*/ // If we have previous context, start with that
22607 if (!oldRangeStart) {
22608 var prev = diff[i - 1];
22609 oldRangeStart = oldLine;
22610 newRangeStart = newLine;
22611
22612 if (prev) {
22613 curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
22614 oldRangeStart -= curRange.length;
22615 newRangeStart -= curRange.length;
22616 }
22617 }
22618
22619 // Output our changes
22620 /*istanbul ignore start*/(_curRange = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/lines.map(function (entry) {
22621 return (current.added ? '+' : '-') + entry;
22622 })));
22623
22624 // Track the updated file position
22625 if (current.added) {
22626 newLine += lines.length;
22627 } else {
22628 oldLine += lines.length;
22629 }
22630 } else {
22631 // Identical context lines. Track line changes
22632 if (oldRangeStart) {
22633 // Close out any changes that have been output (or join overlapping)
22634 if (lines.length <= options.context * 2 && i < diff.length - 2) {
22635 /*istanbul ignore start*/var _curRange2;
22636
22637 /*istanbul ignore end*/ // Overlapping
22638 /*istanbul ignore start*/(_curRange2 = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange2 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/contextLines(lines)));
22639 } else {
22640 /*istanbul ignore start*/var _curRange3;
22641
22642 /*istanbul ignore end*/ // end the range and output
22643 var contextSize = Math.min(lines.length, options.context);
22644 /*istanbul ignore start*/(_curRange3 = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange3 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/contextLines(lines.slice(0, contextSize))));
22645
22646 var hunk = {
22647 oldStart: oldRangeStart,
22648 oldLines: oldLine - oldRangeStart + contextSize,
22649 newStart: newRangeStart,
22650 newLines: newLine - newRangeStart + contextSize,
22651 lines: curRange
22652 };
22653 if (i >= diff.length - 2 && lines.length <= options.context) {
22654 // EOF is inside this hunk
22655 var oldEOFNewline = /\n$/.test(oldStr);
22656 var newEOFNewline = /\n$/.test(newStr);
22657 if (lines.length == 0 && !oldEOFNewline) {
22658 // special case: old has no eol and no trailing context; no-nl can end up before adds
22659 curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
22660 } else if (!oldEOFNewline || !newEOFNewline) {
22661 curRange.push('\\ No newline at end of file');
22662 }
22663 }
22664 hunks.push(hunk);
22665
22666 oldRangeStart = 0;
22667 newRangeStart = 0;
22668 curRange = [];
22669 }
22670 }
22671 oldLine += lines.length;
22672 newLine += lines.length;
22673 }
22674 };
22675
22676 for (var i = 0; i < diff.length; i++) {
22677 /*istanbul ignore start*/_loop( /*istanbul ignore end*/i);
22678 }
22679
22680 return {
22681 oldFileName: oldFileName, newFileName: newFileName,
22682 oldHeader: oldHeader, newHeader: newHeader,
22683 hunks: hunks
22684 };
22685}
22686
22687function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
22688 var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
22689
22690 var ret = [];
22691 if (oldFileName == newFileName) {
22692 ret.push('Index: ' + oldFileName);
22693 }
22694 ret.push('===================================================================');
22695 ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
22696 ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
22697
22698 for (var i = 0; i < diff.hunks.length; i++) {
22699 var hunk = diff.hunks[i];
22700 ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
22701 ret.push.apply(ret, hunk.lines);
22702 }
22703
22704 return ret.join('\n') + '\n';
22705}
22706
22707function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
22708 return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
22709}
22710
22711});
22712
22713unwrapExports(create);
22714var create_1 = create.structuredPatch;
22715var create_2 = create.createTwoFilesPatch;
22716var create_3 = create.createPatch;
22717
22718var array$4 = createCommonjsModule(function (module, exports) {
22719
22720exports.__esModule = true;
22721exports. /*istanbul ignore end*/arrayEqual = arrayEqual;
22722/*istanbul ignore start*/exports. /*istanbul ignore end*/arrayStartsWith = arrayStartsWith;
22723function arrayEqual(a, b) {
22724 if (a.length !== b.length) {
22725 return false;
22726 }
22727
22728 return arrayStartsWith(a, b);
22729}
22730
22731function arrayStartsWith(array, start) {
22732 if (start.length > array.length) {
22733 return false;
22734 }
22735
22736 for (var i = 0; i < start.length; i++) {
22737 if (start[i] !== array[i]) {
22738 return false;
22739 }
22740 }
22741
22742 return true;
22743}
22744
22745});
22746
22747unwrapExports(array$4);
22748var array_1$1 = array$4.arrayEqual;
22749var array_2$1 = array$4.arrayStartsWith;
22750
22751var merge_1 = createCommonjsModule(function (module, exports) {
22752
22753exports.__esModule = true;
22754exports. /*istanbul ignore end*/calcLineCount = calcLineCount;
22755/*istanbul ignore start*/exports. /*istanbul ignore end*/merge = merge;
22756
22757
22758
22759
22760
22761
22762
22763/*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
22764
22765/*istanbul ignore end*/function calcLineCount(hunk) {
22766 /*istanbul ignore start*/var _calcOldNewLineCount = /*istanbul ignore end*/calcOldNewLineCount(hunk.lines),
22767 oldLines = _calcOldNewLineCount.oldLines,
22768 newLines = _calcOldNewLineCount.newLines;
22769
22770 if (oldLines !== undefined) {
22771 hunk.oldLines = oldLines;
22772 } else {
22773 delete hunk.oldLines;
22774 }
22775
22776 if (newLines !== undefined) {
22777 hunk.newLines = newLines;
22778 } else {
22779 delete hunk.newLines;
22780 }
22781}
22782
22783function merge(mine, theirs, base) {
22784 mine = loadPatch(mine, base);
22785 theirs = loadPatch(theirs, base);
22786
22787 var ret = {};
22788
22789 // For index we just let it pass through as it doesn't have any necessary meaning.
22790 // Leaving sanity checks on this to the API consumer that may know more about the
22791 // meaning in their own context.
22792 if (mine.index || theirs.index) {
22793 ret.index = mine.index || theirs.index;
22794 }
22795
22796 if (mine.newFileName || theirs.newFileName) {
22797 if (!fileNameChanged(mine)) {
22798 // No header or no change in ours, use theirs (and ours if theirs does not exist)
22799 ret.oldFileName = theirs.oldFileName || mine.oldFileName;
22800 ret.newFileName = theirs.newFileName || mine.newFileName;
22801 ret.oldHeader = theirs.oldHeader || mine.oldHeader;
22802 ret.newHeader = theirs.newHeader || mine.newHeader;
22803 } else if (!fileNameChanged(theirs)) {
22804 // No header or no change in theirs, use ours
22805 ret.oldFileName = mine.oldFileName;
22806 ret.newFileName = mine.newFileName;
22807 ret.oldHeader = mine.oldHeader;
22808 ret.newHeader = mine.newHeader;
22809 } else {
22810 // Both changed... figure it out
22811 ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
22812 ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
22813 ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
22814 ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
22815 }
22816 }
22817
22818 ret.hunks = [];
22819
22820 var mineIndex = 0,
22821 theirsIndex = 0,
22822 mineOffset = 0,
22823 theirsOffset = 0;
22824
22825 while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
22826 var mineCurrent = mine.hunks[mineIndex] || { oldStart: Infinity },
22827 theirsCurrent = theirs.hunks[theirsIndex] || { oldStart: Infinity };
22828
22829 if (hunkBefore(mineCurrent, theirsCurrent)) {
22830 // This patch does not overlap with any of the others, yay.
22831 ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
22832 mineIndex++;
22833 theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
22834 } else if (hunkBefore(theirsCurrent, mineCurrent)) {
22835 // This patch does not overlap with any of the others, yay.
22836 ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
22837 theirsIndex++;
22838 mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
22839 } else {
22840 // Overlap, merge as best we can
22841 var mergedHunk = {
22842 oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
22843 oldLines: 0,
22844 newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
22845 newLines: 0,
22846 lines: []
22847 };
22848 mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
22849 theirsIndex++;
22850 mineIndex++;
22851
22852 ret.hunks.push(mergedHunk);
22853 }
22854 }
22855
22856 return ret;
22857}
22858
22859function loadPatch(param, base) {
22860 if (typeof param === 'string') {
22861 if (/^@@/m.test(param) || /^Index:/m.test(param)) {
22862 return (/*istanbul ignore start*/(0, parse.parsePatch) /*istanbul ignore end*/(param)[0]
22863 );
22864 }
22865
22866 if (!base) {
22867 throw new Error('Must provide a base reference or pass in a patch');
22868 }
22869 return (/*istanbul ignore start*/(0, create.structuredPatch) /*istanbul ignore end*/(undefined, undefined, base, param)
22870 );
22871 }
22872
22873 return param;
22874}
22875
22876function fileNameChanged(patch) {
22877 return patch.newFileName && patch.newFileName !== patch.oldFileName;
22878}
22879
22880function selectField(index, mine, theirs) {
22881 if (mine === theirs) {
22882 return mine;
22883 } else {
22884 index.conflict = true;
22885 return { mine: mine, theirs: theirs };
22886 }
22887}
22888
22889function hunkBefore(test, check) {
22890 return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
22891}
22892
22893function cloneHunk(hunk, offset) {
22894 return {
22895 oldStart: hunk.oldStart, oldLines: hunk.oldLines,
22896 newStart: hunk.newStart + offset, newLines: hunk.newLines,
22897 lines: hunk.lines
22898 };
22899}
22900
22901function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
22902 // This will generally result in a conflicted hunk, but there are cases where the context
22903 // is the only overlap where we can successfully merge the content here.
22904 var mine = { offset: mineOffset, lines: mineLines, index: 0 },
22905 their = { offset: theirOffset, lines: theirLines, index: 0 };
22906
22907 // Handle any leading content
22908 insertLeading(hunk, mine, their);
22909 insertLeading(hunk, their, mine);
22910
22911 // Now in the overlap content. Scan through and select the best changes from each.
22912 while (mine.index < mine.lines.length && their.index < their.lines.length) {
22913 var mineCurrent = mine.lines[mine.index],
22914 theirCurrent = their.lines[their.index];
22915
22916 if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
22917 // Both modified ...
22918 mutualChange(hunk, mine, their);
22919 } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
22920 /*istanbul ignore start*/var _hunk$lines;
22921
22922 /*istanbul ignore end*/ // Mine inserted
22923 /*istanbul ignore start*/(_hunk$lines = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/collectChange(mine)));
22924 } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
22925 /*istanbul ignore start*/var _hunk$lines2;
22926
22927 /*istanbul ignore end*/ // Theirs inserted
22928 /*istanbul ignore start*/(_hunk$lines2 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines2 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/collectChange(their)));
22929 } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
22930 // Mine removed or edited
22931 removal(hunk, mine, their);
22932 } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
22933 // Their removed or edited
22934 removal(hunk, their, mine, true);
22935 } else if (mineCurrent === theirCurrent) {
22936 // Context identity
22937 hunk.lines.push(mineCurrent);
22938 mine.index++;
22939 their.index++;
22940 } else {
22941 // Context mismatch
22942 conflict(hunk, collectChange(mine), collectChange(their));
22943 }
22944 }
22945
22946 // Now push anything that may be remaining
22947 insertTrailing(hunk, mine);
22948 insertTrailing(hunk, their);
22949
22950 calcLineCount(hunk);
22951}
22952
22953function mutualChange(hunk, mine, their) {
22954 var myChanges = collectChange(mine),
22955 theirChanges = collectChange(their);
22956
22957 if (allRemoves(myChanges) && allRemoves(theirChanges)) {
22958 // Special case for remove changes that are supersets of one another
22959 if ( /*istanbul ignore start*/(0, array$4.arrayStartsWith) /*istanbul ignore end*/(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
22960 /*istanbul ignore start*/var _hunk$lines3;
22961
22962 /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines3 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines3 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/myChanges));
22963 return;
22964 } else if ( /*istanbul ignore start*/(0, array$4.arrayStartsWith) /*istanbul ignore end*/(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
22965 /*istanbul ignore start*/var _hunk$lines4;
22966
22967 /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines4 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines4 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/theirChanges));
22968 return;
22969 }
22970 } else if ( /*istanbul ignore start*/(0, array$4.arrayEqual) /*istanbul ignore end*/(myChanges, theirChanges)) {
22971 /*istanbul ignore start*/var _hunk$lines5;
22972
22973 /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines5 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines5 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/myChanges));
22974 return;
22975 }
22976
22977 conflict(hunk, myChanges, theirChanges);
22978}
22979
22980function removal(hunk, mine, their, swap) {
22981 var myChanges = collectChange(mine),
22982 theirChanges = collectContext(their, myChanges);
22983 if (theirChanges.merged) {
22984 /*istanbul ignore start*/var _hunk$lines6;
22985
22986 /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines6 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines6 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/theirChanges.merged));
22987 } else {
22988 conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
22989 }
22990}
22991
22992function conflict(hunk, mine, their) {
22993 hunk.conflict = true;
22994 hunk.lines.push({
22995 conflict: true,
22996 mine: mine,
22997 theirs: their
22998 });
22999}
23000
23001function insertLeading(hunk, insert, their) {
23002 while (insert.offset < their.offset && insert.index < insert.lines.length) {
23003 var line = insert.lines[insert.index++];
23004 hunk.lines.push(line);
23005 insert.offset++;
23006 }
23007}
23008function insertTrailing(hunk, insert) {
23009 while (insert.index < insert.lines.length) {
23010 var line = insert.lines[insert.index++];
23011 hunk.lines.push(line);
23012 }
23013}
23014
23015function collectChange(state) {
23016 var ret = [],
23017 operation = state.lines[state.index][0];
23018 while (state.index < state.lines.length) {
23019 var line = state.lines[state.index];
23020
23021 // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
23022 if (operation === '-' && line[0] === '+') {
23023 operation = '+';
23024 }
23025
23026 if (operation === line[0]) {
23027 ret.push(line);
23028 state.index++;
23029 } else {
23030 break;
23031 }
23032 }
23033
23034 return ret;
23035}
23036function collectContext(state, matchChanges) {
23037 var changes = [],
23038 merged = [],
23039 matchIndex = 0,
23040 contextChanges = false,
23041 conflicted = false;
23042 while (matchIndex < matchChanges.length && state.index < state.lines.length) {
23043 var change = state.lines[state.index],
23044 match = matchChanges[matchIndex];
23045
23046 // Once we've hit our add, then we are done
23047 if (match[0] === '+') {
23048 break;
23049 }
23050
23051 contextChanges = contextChanges || change[0] !== ' ';
23052
23053 merged.push(match);
23054 matchIndex++;
23055
23056 // Consume any additions in the other block as a conflict to attempt
23057 // to pull in the remaining context after this
23058 if (change[0] === '+') {
23059 conflicted = true;
23060
23061 while (change[0] === '+') {
23062 changes.push(change);
23063 change = state.lines[++state.index];
23064 }
23065 }
23066
23067 if (match.substr(1) === change.substr(1)) {
23068 changes.push(change);
23069 state.index++;
23070 } else {
23071 conflicted = true;
23072 }
23073 }
23074
23075 if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
23076 conflicted = true;
23077 }
23078
23079 if (conflicted) {
23080 return changes;
23081 }
23082
23083 while (matchIndex < matchChanges.length) {
23084 merged.push(matchChanges[matchIndex++]);
23085 }
23086
23087 return {
23088 merged: merged,
23089 changes: changes
23090 };
23091}
23092
23093function allRemoves(changes) {
23094 return changes.reduce(function (prev, change) {
23095 return prev && change[0] === '-';
23096 }, true);
23097}
23098function skipRemoveSuperset(state, removeChanges, delta) {
23099 for (var i = 0; i < delta; i++) {
23100 var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
23101 if (state.lines[state.index + i] !== ' ' + changeContent) {
23102 return false;
23103 }
23104 }
23105
23106 state.index += delta;
23107 return true;
23108}
23109
23110function calcOldNewLineCount(lines) {
23111 var oldLines = 0;
23112 var newLines = 0;
23113
23114 lines.forEach(function (line) {
23115 if (typeof line !== 'string') {
23116 var myCount = calcOldNewLineCount(line.mine);
23117 var theirCount = calcOldNewLineCount(line.theirs);
23118
23119 if (oldLines !== undefined) {
23120 if (myCount.oldLines === theirCount.oldLines) {
23121 oldLines += myCount.oldLines;
23122 } else {
23123 oldLines = undefined;
23124 }
23125 }
23126
23127 if (newLines !== undefined) {
23128 if (myCount.newLines === theirCount.newLines) {
23129 newLines += myCount.newLines;
23130 } else {
23131 newLines = undefined;
23132 }
23133 }
23134 } else {
23135 if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
23136 newLines++;
23137 }
23138 if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
23139 oldLines++;
23140 }
23141 }
23142 });
23143
23144 return { oldLines: oldLines, newLines: newLines };
23145}
23146
23147});
23148
23149unwrapExports(merge_1);
23150var merge_2 = merge_1.calcLineCount;
23151var merge_3 = merge_1.merge;
23152
23153var dmp = createCommonjsModule(function (module, exports) {
23154
23155exports.__esModule = true;
23156exports. /*istanbul ignore end*/convertChangesToDMP = convertChangesToDMP;
23157// See: http://code.google.com/p/google-diff-match-patch/wiki/API
23158function convertChangesToDMP(changes) {
23159 var ret = [],
23160 change = /*istanbul ignore start*/void 0 /*istanbul ignore end*/,
23161 operation = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
23162 for (var i = 0; i < changes.length; i++) {
23163 change = changes[i];
23164 if (change.added) {
23165 operation = 1;
23166 } else if (change.removed) {
23167 operation = -1;
23168 } else {
23169 operation = 0;
23170 }
23171
23172 ret.push([operation, change.value]);
23173 }
23174 return ret;
23175}
23176
23177});
23178
23179unwrapExports(dmp);
23180var dmp_1 = dmp.convertChangesToDMP;
23181
23182var xml = createCommonjsModule(function (module, exports) {
23183
23184exports.__esModule = true;
23185exports. /*istanbul ignore end*/convertChangesToXML = convertChangesToXML;
23186function convertChangesToXML(changes) {
23187 var ret = [];
23188 for (var i = 0; i < changes.length; i++) {
23189 var change = changes[i];
23190 if (change.added) {
23191 ret.push('<ins>');
23192 } else if (change.removed) {
23193 ret.push('<del>');
23194 }
23195
23196 ret.push(escapeHTML(change.value));
23197
23198 if (change.added) {
23199 ret.push('</ins>');
23200 } else if (change.removed) {
23201 ret.push('</del>');
23202 }
23203 }
23204 return ret.join('');
23205}
23206
23207function escapeHTML(s) {
23208 var n = s;
23209 n = n.replace(/&/g, '&amp;');
23210 n = n.replace(/</g, '&lt;');
23211 n = n.replace(/>/g, '&gt;');
23212 n = n.replace(/"/g, '&quot;');
23213
23214 return n;
23215}
23216
23217});
23218
23219unwrapExports(xml);
23220var xml_1 = xml.convertChangesToXML;
23221
23222var lib$1 = createCommonjsModule(function (module, exports) {
23223
23224exports.__esModule = true;
23225exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.merge = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined;
23226
23227/*istanbul ignore end*/
23228
23229/*istanbul ignore start*/var _base2 = _interopRequireDefault(base);
23230
23231/*istanbul ignore end*/
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257/*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23258
23259/* See LICENSE file for terms of use */
23260
23261/*
23262 * Text diff implementation.
23263 *
23264 * This library supports the following APIS:
23265 * JsDiff.diffChars: Character by character diff
23266 * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
23267 * JsDiff.diffLines: Line based diff
23268 *
23269 * JsDiff.diffCss: Diff targeted at CSS content
23270 *
23271 * These methods are based on the implementation proposed in
23272 * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
23273 * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
23274 */
23275exports. /*istanbul ignore end*/Diff = _base2['default'];
23276/*istanbul ignore start*/exports. /*istanbul ignore end*/diffChars = character.diffChars;
23277/*istanbul ignore start*/exports. /*istanbul ignore end*/diffWords = word.diffWords;
23278/*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = word.diffWordsWithSpace;
23279/*istanbul ignore start*/exports. /*istanbul ignore end*/diffLines = line.diffLines;
23280/*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = line.diffTrimmedLines;
23281/*istanbul ignore start*/exports. /*istanbul ignore end*/diffSentences = sentence.diffSentences;
23282/*istanbul ignore start*/exports. /*istanbul ignore end*/diffCss = css.diffCss;
23283/*istanbul ignore start*/exports. /*istanbul ignore end*/diffJson = json.diffJson;
23284/*istanbul ignore start*/exports. /*istanbul ignore end*/diffArrays = array$2.diffArrays;
23285/*istanbul ignore start*/exports. /*istanbul ignore end*/structuredPatch = create.structuredPatch;
23286/*istanbul ignore start*/exports. /*istanbul ignore end*/createTwoFilesPatch = create.createTwoFilesPatch;
23287/*istanbul ignore start*/exports. /*istanbul ignore end*/createPatch = create.createPatch;
23288/*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatch = apply.applyPatch;
23289/*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatches = apply.applyPatches;
23290/*istanbul ignore start*/exports. /*istanbul ignore end*/parsePatch = parse.parsePatch;
23291/*istanbul ignore start*/exports. /*istanbul ignore end*/merge = merge_1.merge;
23292/*istanbul ignore start*/exports. /*istanbul ignore end*/convertChangesToDMP = dmp.convertChangesToDMP;
23293/*istanbul ignore start*/exports. /*istanbul ignore end*/convertChangesToXML = xml.convertChangesToXML;
23294/*istanbul ignore start*/exports. /*istanbul ignore end*/canonicalize = json.canonicalize;
23295
23296});
23297
23298unwrapExports(lib$1);
23299var lib_1$1 = lib$1.canonicalize;
23300var lib_2$1 = lib$1.convertChangesToXML;
23301var lib_3$1 = lib$1.convertChangesToDMP;
23302var lib_4$1 = lib$1.merge;
23303var lib_5$1 = lib$1.parsePatch;
23304var lib_6$1 = lib$1.applyPatches;
23305var lib_7$1 = lib$1.applyPatch;
23306var lib_8$1 = lib$1.createPatch;
23307var lib_9$1 = lib$1.createTwoFilesPatch;
23308var lib_10 = lib$1.structuredPatch;
23309var lib_11 = lib$1.diffArrays;
23310var lib_12 = lib$1.diffJson;
23311var lib_13 = lib$1.diffCss;
23312var lib_14 = lib$1.diffSentences;
23313var lib_15 = lib$1.diffTrimmedLines;
23314var lib_16 = lib$1.diffLines;
23315var lib_17 = lib$1.diffWordsWithSpace;
23316var lib_18 = lib$1.diffWords;
23317var lib_19 = lib$1.diffChars;
23318var lib_20 = lib$1.Diff;
23319
23320var arrayProto$6 = lib.prototypes.array;
23321
23322var match$3 = samsam.createMatcher;
23323
23324
23325
23326
23327var join$5 = arrayProto$6.join;
23328var map$2 = arrayProto$6.map;
23329var push$2 = arrayProto$6.push;
23330
23331function colorSinonMatchText(matcher, calledArg, calledArgMessage) {
23332 var calledArgumentMessage = calledArgMessage;
23333 if (!matcher.test(calledArg)) {
23334 matcher.message = color.red(matcher.message);
23335 if (calledArgumentMessage) {
23336 calledArgumentMessage = color.green(calledArgumentMessage);
23337 }
23338 }
23339 return calledArgumentMessage + " " + matcher.message;
23340}
23341
23342function colorDiffText(diff) {
23343 var objects = map$2(diff, function(part) {
23344 var text = part.value;
23345 if (part.added) {
23346 text = color.green(text);
23347 } else if (part.removed) {
23348 text = color.red(text);
23349 }
23350 if (diff.length === 2) {
23351 text += " "; // format simple diffs
23352 }
23353 return text;
23354 });
23355 return join$5(objects, "");
23356}
23357
23358var spyFormatters = {
23359 c: function(spyInstance) {
23360 return timesInWords(spyInstance.callCount);
23361 },
23362
23363 n: function(spyInstance) {
23364 // eslint-disable-next-line local-rules/no-prototype-methods
23365 return spyInstance.toString();
23366 },
23367
23368 D: function(spyInstance, args) {
23369 var message = "";
23370
23371 for (var i = 0, l = spyInstance.callCount; i < l; ++i) {
23372 // describe multiple calls
23373 if (l > 1) {
23374 message += "\nCall " + (i + 1) + ":";
23375 }
23376 var calledArgs = spyInstance.getCall(i).args;
23377 for (var j = 0; j < calledArgs.length || j < args.length; ++j) {
23378 message += "\n";
23379 var calledArgMessage = j < calledArgs.length ? format_1(calledArgs[j]) : "";
23380 if (match$3.isMatcher(args[j])) {
23381 message += colorSinonMatchText(args[j], calledArgs[j], calledArgMessage);
23382 } else {
23383 var expectedArgMessage = j < args.length ? format_1(args[j]) : "";
23384 var diff = lib$1.diffJson(calledArgMessage, expectedArgMessage);
23385 message += colorDiffText(diff);
23386 }
23387 }
23388 }
23389
23390 return message;
23391 },
23392
23393 C: function(spyInstance) {
23394 var calls = [];
23395
23396 for (var i = 0, l = spyInstance.callCount; i < l; ++i) {
23397 // eslint-disable-next-line local-rules/no-prototype-methods
23398 var stringifiedCall = " " + spyInstance.getCall(i).toString();
23399 if (/\n/.test(calls[i - 1])) {
23400 stringifiedCall = "\n" + stringifiedCall;
23401 }
23402 push$2(calls, stringifiedCall);
23403 }
23404
23405 return calls.length > 0 ? "\n" + join$5(calls, "\n") : "";
23406 },
23407
23408 t: function(spyInstance) {
23409 var objects = [];
23410
23411 for (var i = 0, l = spyInstance.callCount; i < l; ++i) {
23412 push$2(objects, format_1(spyInstance.thisValues[i]));
23413 }
23414
23415 return join$5(objects, ", ");
23416 },
23417
23418 "*": function(spyInstance, args) {
23419 return join$5(
23420 map$2(args, function(arg) {
23421 return format_1(arg);
23422 }),
23423 ", "
23424 );
23425 }
23426};
23427
23428var arrayProto$7 = lib.prototypes.array;
23429var createBehavior$1 = behavior.create;
23430
23431var functionName$5 = lib.functionName;
23432
23433
23434var deepEqual$4 = samsam.deepEqual;
23435
23436
23437
23438
23439var valueToString$9 = lib.valueToString;
23440
23441/* cache references to library methods so that they also can be stubbed without problems */
23442var concat$3 = arrayProto$7.concat;
23443var forEach$2 = arrayProto$7.forEach;
23444var pop = arrayProto$7.pop;
23445var push$3 = arrayProto$7.push;
23446var slice$5 = arrayProto$7.slice;
23447var filter$1 = Array.prototype.filter;
23448var ErrorConstructor = Error.prototype.constructor;
23449var bind = Function.prototype.bind;
23450
23451var callId = 0;
23452
23453function spy(object, property, types) {
23454 var descriptor, methodDesc;
23455
23456 if (isEsModule(object)) {
23457 throw new TypeError("ES Modules cannot be spied");
23458 }
23459
23460 if (!property && typeof object === "function") {
23461 return spy.create(object);
23462 }
23463
23464 if (!object && !property) {
23465 return spy.create(function() {
23466 return;
23467 });
23468 }
23469
23470 if (!types) {
23471 return wrapMethod(object, property, spy.create(object[property]));
23472 }
23473
23474 descriptor = {};
23475 methodDesc = getPropertyDescriptor(object, property);
23476
23477 forEach$2(types, function(type) {
23478 descriptor[type] = spy.create(methodDesc[type]);
23479 });
23480
23481 return wrapMethod(object, property, descriptor);
23482}
23483
23484function incrementCallCount() {
23485 this.called = true;
23486 this.callCount += 1;
23487 this.notCalled = false;
23488 this.calledOnce = this.callCount === 1;
23489 this.calledTwice = this.callCount === 2;
23490 this.calledThrice = this.callCount === 3;
23491}
23492
23493function createCallProperties() {
23494 this.firstCall = this.getCall(0);
23495 this.secondCall = this.getCall(1);
23496 this.thirdCall = this.getCall(2);
23497 this.lastCall = this.getCall(this.callCount - 1);
23498}
23499
23500function createProxy(func, proxyLength) {
23501 // Retain the function length:
23502 var p;
23503 if (proxyLength) {
23504 // Do not change this to use an eval. Projects that depend on sinon block the use of eval.
23505 // ref: https://github.com/sinonjs/sinon/issues/710
23506 switch (proxyLength) {
23507 /*eslint-disable no-unused-vars, max-len*/
23508 case 1:
23509 p = function proxy(a) {
23510 return p.invoke(func, this, slice$5(arguments));
23511 };
23512 break;
23513 case 2:
23514 p = function proxy(a, b) {
23515 return p.invoke(func, this, slice$5(arguments));
23516 };
23517 break;
23518 case 3:
23519 p = function proxy(a, b, c) {
23520 return p.invoke(func, this, slice$5(arguments));
23521 };
23522 break;
23523 case 4:
23524 p = function proxy(a, b, c, d) {
23525 return p.invoke(func, this, slice$5(arguments));
23526 };
23527 break;
23528 case 5:
23529 p = function proxy(a, b, c, d, e) {
23530 return p.invoke(func, this, slice$5(arguments));
23531 };
23532 break;
23533 case 6:
23534 p = function proxy(a, b, c, d, e, f) {
23535 return p.invoke(func, this, slice$5(arguments));
23536 };
23537 break;
23538 case 7:
23539 p = function proxy(a, b, c, d, e, f, g) {
23540 return p.invoke(func, this, slice$5(arguments));
23541 };
23542 break;
23543 case 8:
23544 p = function proxy(a, b, c, d, e, f, g, h) {
23545 return p.invoke(func, this, slice$5(arguments));
23546 };
23547 break;
23548 case 9:
23549 p = function proxy(a, b, c, d, e, f, g, h, i) {
23550 return p.invoke(func, this, slice$5(arguments));
23551 };
23552 break;
23553 case 10:
23554 p = function proxy(a, b, c, d, e, f, g, h, i, j) {
23555 return p.invoke(func, this, slice$5(arguments));
23556 };
23557 break;
23558 case 11:
23559 p = function proxy(a, b, c, d, e, f, g, h, i, j, k) {
23560 return p.invoke(func, this, slice$5(arguments));
23561 };
23562 break;
23563 case 12:
23564 p = function proxy(a, b, c, d, e, f, g, h, i, j, k, l) {
23565 return p.invoke(func, this, slice$5(arguments));
23566 };
23567 break;
23568 default:
23569 p = function proxy() {
23570 return p.invoke(func, this, slice$5(arguments));
23571 };
23572 break;
23573 /*eslint-enable*/
23574 }
23575 } else {
23576 p = function proxy() {
23577 return p.invoke(func, this, slice$5(arguments));
23578 };
23579 }
23580 var nameDescriptor = Object.getOwnPropertyDescriptor(func, "name");
23581 if (nameDescriptor && nameDescriptor.configurable) {
23582 // IE 11 functions don't have a name.
23583 // Safari 9 has names that are not configurable.
23584 Object.defineProperty(p, "name", nameDescriptor);
23585 }
23586 extend.nonEnum(p, {
23587 isSinonProxy: true,
23588
23589 called: false,
23590 notCalled: true,
23591 calledOnce: false,
23592 calledTwice: false,
23593 calledThrice: false,
23594 callCount: 0,
23595 firstCall: null,
23596 secondCall: null,
23597 thirdCall: null,
23598 lastCall: null,
23599 args: [],
23600 returnValues: [],
23601 thisValues: [],
23602 exceptions: [],
23603 callIds: [],
23604 errorsWithCallStack: []
23605 });
23606 return p;
23607}
23608
23609var uuid = 0;
23610
23611// Public API
23612var spyApi = {
23613 formatters: spyFormatters,
23614
23615 resetHistory: function() {
23616 if (this.invoking) {
23617 var err = new Error(
23618 "Cannot reset Sinon function while invoking it. " +
23619 "Move the call to .resetHistory outside of the callback."
23620 );
23621 err.name = "InvalidResetException";
23622 throw err;
23623 }
23624
23625 this.called = false;
23626 this.notCalled = true;
23627 this.calledOnce = false;
23628 this.calledTwice = false;
23629 this.calledThrice = false;
23630 this.callCount = 0;
23631 this.firstCall = null;
23632 this.secondCall = null;
23633 this.thirdCall = null;
23634 this.lastCall = null;
23635 this.args = [];
23636 this.returnValues = [];
23637 this.thisValues = [];
23638 this.exceptions = [];
23639 this.callIds = [];
23640 this.errorsWithCallStack = [];
23641
23642 if (this.fakes) {
23643 forEach$2(this.fakes, function(fake) {
23644 if (fake.resetHistory) {
23645 fake.resetHistory();
23646 } else {
23647 fake.reset();
23648 }
23649 });
23650 }
23651
23652 return this;
23653 },
23654
23655 create: function create(func, spyLength) {
23656 var name;
23657 var funk = func;
23658
23659 if (typeof funk !== "function") {
23660 funk = function() {
23661 return;
23662 };
23663 } else {
23664 name = functionName$5(funk);
23665 }
23666
23667 var length = spyLength || funk.length;
23668 var proxy = createProxy(funk, length);
23669
23670 extend.nonEnum(proxy, spy);
23671 delete proxy.create;
23672 extend(proxy, funk);
23673
23674 proxy.resetHistory();
23675 proxy.prototype = funk.prototype;
23676
23677 extend.nonEnum(proxy, {
23678 displayName: name || "spy",
23679 toString: functionToString,
23680 instantiateFake: spy.create,
23681 id: "spy#" + uuid++
23682 });
23683
23684 return proxy;
23685 },
23686
23687 invoke: function invoke(func, thisValue, args) {
23688 var matchings = this.matchingFakes(args);
23689 var currentCallId = callId++;
23690 var exception, returnValue;
23691
23692 incrementCallCount.call(this);
23693 push$3(this.thisValues, thisValue);
23694 push$3(this.args, args);
23695 push$3(this.callIds, currentCallId);
23696 forEach$2(matchings, function(matching) {
23697 incrementCallCount.call(matching);
23698 push$3(matching.thisValues, thisValue);
23699 push$3(matching.args, args);
23700 push$3(matching.callIds, currentCallId);
23701 });
23702
23703 // Make call properties available from within the spied function:
23704 createCallProperties.call(this);
23705 forEach$2(matchings, function(matching) {
23706 createCallProperties.call(matching);
23707 });
23708
23709 try {
23710 this.invoking = true;
23711
23712 var thisCall = this.getCall(this.callCount - 1);
23713
23714 if (thisCall.calledWithNew()) {
23715 // Call through with `new`
23716 returnValue = new (bind.apply(this.func || func, concat$3([thisValue], args)))();
23717
23718 if (typeof returnValue !== "object") {
23719 returnValue = thisValue;
23720 }
23721 } else {
23722 returnValue = (this.func || func).apply(thisValue, args);
23723 }
23724 } catch (e) {
23725 exception = e;
23726 } finally {
23727 delete this.invoking;
23728 }
23729
23730 push$3(this.exceptions, exception);
23731 push$3(this.returnValues, returnValue);
23732 forEach$2(matchings, function(matching) {
23733 push$3(matching.exceptions, exception);
23734 push$3(matching.returnValues, returnValue);
23735 });
23736
23737 var err = new ErrorConstructor();
23738 // 1. Please do not get stack at this point. It may be so very slow, and not actually used
23739 // 2. PhantomJS does not serialize the stack trace until the error has been thrown:
23740 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack
23741 try {
23742 throw err;
23743 } catch (e) {
23744 /* empty */
23745 }
23746 push$3(this.errorsWithCallStack, err);
23747 forEach$2(matchings, function(matching) {
23748 push$3(matching.errorsWithCallStack, err);
23749 });
23750
23751 // Make return value and exception available in the calls:
23752 createCallProperties.call(this);
23753 forEach$2(matchings, function(matching) {
23754 createCallProperties.call(matching);
23755 });
23756
23757 if (exception !== undefined) {
23758 throw exception;
23759 }
23760
23761 return returnValue;
23762 },
23763
23764 named: function named(name) {
23765 this.displayName = name;
23766 var nameDescriptor = Object.getOwnPropertyDescriptor(this, "name");
23767 if (nameDescriptor && nameDescriptor.configurable) {
23768 // IE 11 functions don't have a name.
23769 // Safari 9 has names that are not configurable.
23770 nameDescriptor.value = name;
23771 Object.defineProperty(this, "name", nameDescriptor);
23772 }
23773 return this;
23774 },
23775
23776 getCall: function getCall(i) {
23777 if (i < 0 || i >= this.callCount) {
23778 return null;
23779 }
23780
23781 return call$1(
23782 this,
23783 this.thisValues[i],
23784 this.args[i],
23785 this.returnValues[i],
23786 this.exceptions[i],
23787 this.callIds[i],
23788 this.errorsWithCallStack[i]
23789 );
23790 },
23791
23792 getCalls: function() {
23793 var calls = [];
23794 var i;
23795
23796 for (i = 0; i < this.callCount; i++) {
23797 push$3(calls, this.getCall(i));
23798 }
23799
23800 return calls;
23801 },
23802
23803 calledBefore: function calledBefore(spyFn) {
23804 if (!this.called) {
23805 return false;
23806 }
23807
23808 if (!spyFn.called) {
23809 return true;
23810 }
23811
23812 return this.callIds[0] < spyFn.callIds[spyFn.callIds.length - 1];
23813 },
23814
23815 calledAfter: function calledAfter(spyFn) {
23816 if (!this.called || !spyFn.called) {
23817 return false;
23818 }
23819
23820 return this.callIds[this.callCount - 1] > spyFn.callIds[0];
23821 },
23822
23823 calledImmediatelyBefore: function calledImmediatelyBefore(spyFn) {
23824 if (!this.called || !spyFn.called) {
23825 return false;
23826 }
23827
23828 return this.callIds[this.callCount - 1] === spyFn.callIds[spyFn.callCount - 1] - 1;
23829 },
23830
23831 calledImmediatelyAfter: function calledImmediatelyAfter(spyFn) {
23832 if (!this.called || !spyFn.called) {
23833 return false;
23834 }
23835
23836 return this.callIds[this.callCount - 1] === spyFn.callIds[spyFn.callCount - 1] + 1;
23837 },
23838
23839 withArgs: function() {
23840 var args = slice$5(arguments);
23841
23842 if (this.fakes) {
23843 var matching = pop(this.matchingFakes(args, true));
23844
23845 if (matching) {
23846 return matching;
23847 }
23848 } else {
23849 extend.nonEnum(this, { fakes: [] });
23850 }
23851
23852 var original = this;
23853 var fake = this.instantiateFake();
23854 fake.matchingArguments = args;
23855 fake.parent = this;
23856 push$3(this.fakes, fake);
23857
23858 if (original.defaultBehavior && original.defaultBehavior.promiseLibrary) {
23859 fake.defaultBehavior = fake.defaultBehavior || createBehavior$1(fake);
23860 fake.defaultBehavior.promiseLibrary = original.defaultBehavior.promiseLibrary;
23861 }
23862
23863 fake.withArgs = function() {
23864 return original.withArgs.apply(original, arguments);
23865 };
23866
23867 forEach$2(original.args, function(arg, i) {
23868 if (!fake.matches(arg)) {
23869 return;
23870 }
23871
23872 incrementCallCount.call(fake);
23873 push$3(fake.thisValues, original.thisValues[i]);
23874 push$3(fake.args, arg);
23875 push$3(fake.returnValues, original.returnValues[i]);
23876 push$3(fake.exceptions, original.exceptions[i]);
23877 push$3(fake.callIds, original.callIds[i]);
23878 });
23879
23880 createCallProperties.call(fake);
23881
23882 return fake;
23883 },
23884
23885 matchingFakes: function(args, strict) {
23886 return filter$1.call(this.fakes || [], function(fake) {
23887 return fake.matches(args, strict);
23888 });
23889 },
23890
23891 matches: function(args, strict) {
23892 var margs = this.matchingArguments;
23893
23894 if (margs.length <= args.length && deepEqual$4(slice$5(args, 0, margs.length), margs)) {
23895 return !strict || margs.length === args.length;
23896 }
23897
23898 return undefined;
23899 },
23900
23901 printf: function(format) {
23902 var spyInstance = this;
23903 var args = slice$5(arguments, 1);
23904 var formatter;
23905
23906 return (format || "").replace(/%(.)/g, function(match, specifyer) {
23907 formatter = spyApi.formatters[specifyer];
23908
23909 if (typeof formatter === "function") {
23910 return String(formatter(spyInstance, args));
23911 } else if (!isNaN(parseInt(specifyer, 10))) {
23912 return format_1(args[specifyer - 1]);
23913 }
23914
23915 return "%" + specifyer;
23916 });
23917 }
23918};
23919
23920function delegateToCalls(method, matchAny, actual, returnsValues, notCalled, totalCallCount) {
23921 spyApi[method] = function() {
23922 if (!this.called) {
23923 if (notCalled) {
23924 return notCalled.apply(this, arguments);
23925 }
23926 return false;
23927 }
23928
23929 if (totalCallCount !== undefined && this.callCount !== totalCallCount) {
23930 return false;
23931 }
23932
23933 var currentCall;
23934 var matches = 0;
23935 var returnValues = [];
23936
23937 for (var i = 0, l = this.callCount; i < l; i += 1) {
23938 currentCall = this.getCall(i);
23939 var returnValue = currentCall[actual || method].apply(currentCall, arguments);
23940 push$3(returnValues, returnValue);
23941 if (returnValue) {
23942 matches += 1;
23943
23944 if (matchAny) {
23945 return true;
23946 }
23947 }
23948 }
23949
23950 if (returnsValues) {
23951 return returnValues;
23952 }
23953 return matches === this.callCount;
23954 };
23955}
23956
23957delegateToCalls("calledOn", true);
23958delegateToCalls("alwaysCalledOn", false, "calledOn");
23959delegateToCalls("calledWith", true);
23960delegateToCalls("calledOnceWith", true, "calledWith", false, undefined, 1);
23961delegateToCalls("calledWithMatch", true);
23962delegateToCalls("alwaysCalledWith", false, "calledWith");
23963delegateToCalls("alwaysCalledWithMatch", false, "calledWithMatch");
23964delegateToCalls("calledWithExactly", true);
23965delegateToCalls("calledOnceWithExactly", true, "calledWithExactly", false, undefined, 1);
23966delegateToCalls("alwaysCalledWithExactly", false, "calledWithExactly");
23967delegateToCalls("neverCalledWith", false, "notCalledWith", false, function() {
23968 return true;
23969});
23970delegateToCalls("neverCalledWithMatch", false, "notCalledWithMatch", false, function() {
23971 return true;
23972});
23973delegateToCalls("threw", true);
23974delegateToCalls("alwaysThrew", false, "threw");
23975delegateToCalls("returned", true);
23976delegateToCalls("alwaysReturned", false, "returned");
23977delegateToCalls("calledWithNew", true);
23978delegateToCalls("alwaysCalledWithNew", false, "calledWithNew");
23979/* eslint-disable local-rules/no-prototype-methods */
23980delegateToCalls("callArg", false, "callArgWith", true, function() {
23981 throw new Error(this.toString() + " cannot call arg since it was not yet invoked.");
23982});
23983spyApi.callArgWith = spyApi.callArg;
23984delegateToCalls("callArgOn", false, "callArgOnWith", true, function() {
23985 throw new Error(this.toString() + " cannot call arg since it was not yet invoked.");
23986});
23987spyApi.callArgOnWith = spyApi.callArgOn;
23988delegateToCalls("throwArg", false, "throwArg", false, function() {
23989 throw new Error(this.toString() + " cannot throw arg since it was not yet invoked.");
23990});
23991delegateToCalls("yield", false, "yield", true, function() {
23992 throw new Error(this.toString() + " cannot yield since it was not yet invoked.");
23993});
23994// "invokeCallback" is an alias for "yield" since "yield" is invalid in strict mode.
23995spyApi.invokeCallback = spyApi.yield;
23996delegateToCalls("yieldOn", false, "yieldOn", true, function() {
23997 throw new Error(this.toString() + " cannot yield since it was not yet invoked.");
23998});
23999delegateToCalls("yieldTo", false, "yieldTo", true, function(property) {
24000 throw new Error(
24001 this.toString() + " cannot yield to '" + valueToString$9(property) + "' since it was not yet invoked."
24002 );
24003});
24004delegateToCalls("yieldToOn", false, "yieldToOn", true, function(property) {
24005 throw new Error(
24006 this.toString() + " cannot yield to '" + valueToString$9(property) + "' since it was not yet invoked."
24007 );
24008});
24009/* eslint-enable local-rules/no-prototype-methods */
24010
24011extend(spy, spyApi);
24012spy.spyCall = call$1;
24013var spy_1 = spy;
24014
24015var arrayProto$8 = lib.prototypes.array;
24016
24017
24018
24019
24020var slice$6 = arrayProto$8.slice;
24021
24022var useLeftMostCallback$1 = -1;
24023var useRightMostCallback$1 = -2;
24024
24025function throwsException(fake, error, message) {
24026 if (typeof error === "function") {
24027 fake.exceptionCreator = error;
24028 } else if (typeof error === "string") {
24029 fake.exceptionCreator = function() {
24030 var newException = new Error(message || "");
24031 newException.name = error;
24032 return newException;
24033 };
24034 } else if (!error) {
24035 fake.exceptionCreator = function() {
24036 return new Error("Error");
24037 };
24038 } else {
24039 fake.exception = error;
24040 }
24041}
24042
24043var defaultBehaviors = {
24044 callsFake: function callsFake(fake, fn) {
24045 fake.fakeFn = fn;
24046 },
24047
24048 callsArg: function callsArg(fake, index) {
24049 if (typeof index !== "number") {
24050 throw new TypeError("argument index is not number");
24051 }
24052
24053 fake.callArgAt = index;
24054 fake.callbackArguments = [];
24055 fake.callbackContext = undefined;
24056 fake.callArgProp = undefined;
24057 fake.callbackAsync = false;
24058 },
24059
24060 callsArgOn: function callsArgOn(fake, index, context) {
24061 if (typeof index !== "number") {
24062 throw new TypeError("argument index is not number");
24063 }
24064
24065 fake.callArgAt = index;
24066 fake.callbackArguments = [];
24067 fake.callbackContext = context;
24068 fake.callArgProp = undefined;
24069 fake.callbackAsync = false;
24070 },
24071
24072 callsArgWith: function callsArgWith(fake, index) {
24073 if (typeof index !== "number") {
24074 throw new TypeError("argument index is not number");
24075 }
24076
24077 fake.callArgAt = index;
24078 fake.callbackArguments = slice$6(arguments, 2);
24079 fake.callbackContext = undefined;
24080 fake.callArgProp = undefined;
24081 fake.callbackAsync = false;
24082 },
24083
24084 callsArgOnWith: function callsArgWith(fake, index, context) {
24085 if (typeof index !== "number") {
24086 throw new TypeError("argument index is not number");
24087 }
24088
24089 fake.callArgAt = index;
24090 fake.callbackArguments = slice$6(arguments, 3);
24091 fake.callbackContext = context;
24092 fake.callArgProp = undefined;
24093 fake.callbackAsync = false;
24094 },
24095
24096 usingPromise: function usingPromise(fake, promiseLibrary) {
24097 fake.promiseLibrary = promiseLibrary;
24098 },
24099
24100 yields: function(fake) {
24101 fake.callArgAt = useLeftMostCallback$1;
24102 fake.callbackArguments = slice$6(arguments, 1);
24103 fake.callbackContext = undefined;
24104 fake.callArgProp = undefined;
24105 fake.callbackAsync = false;
24106 },
24107
24108 yieldsRight: function(fake) {
24109 fake.callArgAt = useRightMostCallback$1;
24110 fake.callbackArguments = slice$6(arguments, 1);
24111 fake.callbackContext = undefined;
24112 fake.callArgProp = undefined;
24113 fake.callbackAsync = false;
24114 },
24115
24116 yieldsOn: function(fake, context) {
24117 fake.callArgAt = useLeftMostCallback$1;
24118 fake.callbackArguments = slice$6(arguments, 2);
24119 fake.callbackContext = context;
24120 fake.callArgProp = undefined;
24121 fake.callbackAsync = false;
24122 },
24123
24124 yieldsTo: function(fake, prop) {
24125 fake.callArgAt = useLeftMostCallback$1;
24126 fake.callbackArguments = slice$6(arguments, 2);
24127 fake.callbackContext = undefined;
24128 fake.callArgProp = prop;
24129 fake.callbackAsync = false;
24130 },
24131
24132 yieldsToOn: function(fake, prop, context) {
24133 fake.callArgAt = useLeftMostCallback$1;
24134 fake.callbackArguments = slice$6(arguments, 3);
24135 fake.callbackContext = context;
24136 fake.callArgProp = prop;
24137 fake.callbackAsync = false;
24138 },
24139
24140 throws: throwsException,
24141 throwsException: throwsException,
24142
24143 returns: function returns(fake, value) {
24144 fake.returnValue = value;
24145 fake.resolve = false;
24146 fake.reject = false;
24147 fake.returnValueDefined = true;
24148 fake.exception = undefined;
24149 fake.exceptionCreator = undefined;
24150 fake.fakeFn = undefined;
24151 },
24152
24153 returnsArg: function returnsArg(fake, index) {
24154 if (typeof index !== "number") {
24155 throw new TypeError("argument index is not number");
24156 }
24157
24158 fake.returnArgAt = index;
24159 },
24160
24161 throwsArg: function throwsArg(fake, index) {
24162 if (typeof index !== "number") {
24163 throw new TypeError("argument index is not number");
24164 }
24165
24166 fake.throwArgAt = index;
24167 },
24168
24169 returnsThis: function returnsThis(fake) {
24170 fake.returnThis = true;
24171 },
24172
24173 resolves: function resolves(fake, value) {
24174 fake.returnValue = value;
24175 fake.resolve = true;
24176 fake.resolveThis = false;
24177 fake.reject = false;
24178 fake.returnValueDefined = true;
24179 fake.exception = undefined;
24180 fake.exceptionCreator = undefined;
24181 fake.fakeFn = undefined;
24182 },
24183
24184 resolvesArg: function resolvesArg(fake, index) {
24185 if (typeof index !== "number") {
24186 throw new TypeError("argument index is not number");
24187 }
24188 fake.resolveArgAt = index;
24189 fake.returnValue = undefined;
24190 fake.resolve = true;
24191 fake.resolveThis = false;
24192 fake.reject = false;
24193 fake.returnValueDefined = false;
24194 fake.exception = undefined;
24195 fake.exceptionCreator = undefined;
24196 fake.fakeFn = undefined;
24197 },
24198
24199 rejects: function rejects(fake, error, message) {
24200 var reason;
24201 if (typeof error === "string") {
24202 reason = new Error(message || "");
24203 reason.name = error;
24204 } else if (!error) {
24205 reason = new Error("Error");
24206 } else {
24207 reason = error;
24208 }
24209 fake.returnValue = reason;
24210 fake.resolve = false;
24211 fake.resolveThis = false;
24212 fake.reject = true;
24213 fake.returnValueDefined = true;
24214 fake.exception = undefined;
24215 fake.exceptionCreator = undefined;
24216 fake.fakeFn = undefined;
24217
24218 return fake;
24219 },
24220
24221 resolvesThis: function resolvesThis(fake) {
24222 fake.returnValue = undefined;
24223 fake.resolve = false;
24224 fake.resolveThis = true;
24225 fake.reject = false;
24226 fake.returnValueDefined = false;
24227 fake.exception = undefined;
24228 fake.exceptionCreator = undefined;
24229 fake.fakeFn = undefined;
24230 },
24231
24232 callThrough: function callThrough(fake) {
24233 fake.callsThrough = true;
24234 },
24235
24236 get: function get(fake, getterFunction) {
24237 var rootStub = fake.stub || fake;
24238
24239 Object.defineProperty(rootStub.rootObj, rootStub.propName, {
24240 get: getterFunction,
24241 configurable: isPropertyConfigurable_1(rootStub.rootObj, rootStub.propName)
24242 });
24243
24244 return fake;
24245 },
24246
24247 set: function set(fake, setterFunction) {
24248 var rootStub = fake.stub || fake;
24249
24250 Object.defineProperty(
24251 rootStub.rootObj,
24252 rootStub.propName,
24253 // eslint-disable-next-line accessor-pairs
24254 {
24255 set: setterFunction,
24256 configurable: isPropertyConfigurable_1(rootStub.rootObj, rootStub.propName)
24257 }
24258 );
24259
24260 return fake;
24261 },
24262
24263 value: function value(fake, newVal) {
24264 var rootStub = fake.stub || fake;
24265
24266 Object.defineProperty(rootStub.rootObj, rootStub.propName, {
24267 value: newVal,
24268 enumerable: true,
24269 configurable: isPropertyConfigurable_1(rootStub.rootObj, rootStub.propName)
24270 });
24271
24272 return fake;
24273 }
24274};
24275
24276var asyncBehaviors$1 = exportAsyncBehaviors(defaultBehaviors);
24277
24278var defaultBehaviors_1 = extend({}, defaultBehaviors, asyncBehaviors$1);
24279
24280function stubEntireObject(stub, object) {
24281 walk(object || {}, function(prop, propOwner) {
24282 // we don't want to stub things like toString(), valueOf(), etc. so we only stub if the object
24283 // is not Object.prototype
24284 if (
24285 propOwner !== Object.prototype &&
24286 prop !== "constructor" &&
24287 typeof getPropertyDescriptor(propOwner, prop).value === "function"
24288 ) {
24289 stub(object, prop);
24290 }
24291 });
24292
24293 return object;
24294}
24295
24296var stubEntireObject_1 = stubEntireObject;
24297
24298var valueToString$a = lib.valueToString;
24299
24300function throwOnFalsyObject(object, property) {
24301 if (property && !object) {
24302 var type = object === null ? "null" : "undefined";
24303 throw new Error("Trying to stub property '" + valueToString$a(property) + "' of " + type);
24304 }
24305}
24306
24307var throwOnFalsyObject_1 = throwOnFalsyObject;
24308
24309var arrayProto$9 = lib.prototypes.array;
24310
24311
24312var hasOwnProperty$5 = lib.prototypes.object.hasOwnProperty;
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322var valueToString$b = lib.valueToString;
24323
24324var forEach$3 = arrayProto$9.forEach;
24325var pop$1 = arrayProto$9.pop;
24326var slice$7 = arrayProto$9.slice;
24327var sort$1 = arrayProto$9.sort;
24328
24329function stub(object, property) {
24330 if (arguments.length > 2) {
24331 throw new TypeError("stub(obj, 'meth', fn) has been removed, see documentation");
24332 }
24333
24334 if (isEsModule(object)) {
24335 throw new TypeError("ES Modules cannot be stubbed");
24336 }
24337
24338 throwOnFalsyObject_1.apply(null, arguments);
24339
24340 if (isNonExistentOwnProperty_1(object, property)) {
24341 throw new TypeError("Cannot stub non-existent own property " + valueToString$b(property));
24342 }
24343
24344 var actualDescriptor = getPropertyDescriptor(object, property);
24345 var isObject = typeof object === "object" || typeof object === "function";
24346 var isStubbingEntireObject = typeof property === "undefined" && isObject;
24347 var isCreatingNewStub = !object && typeof property === "undefined";
24348 var isStubbingNonFuncProperty =
24349 isObject &&
24350 typeof property !== "undefined" &&
24351 (typeof actualDescriptor === "undefined" || typeof actualDescriptor.value !== "function") &&
24352 typeof descriptor === "undefined";
24353 var isStubbingExistingMethod =
24354 typeof object === "object" &&
24355 typeof actualDescriptor !== "undefined" &&
24356 typeof actualDescriptor.value === "function";
24357 var arity = isStubbingExistingMethod ? object[property].length : 0;
24358
24359 if (isStubbingEntireObject) {
24360 return stubEntireObject_1(stub, object);
24361 }
24362
24363 if (isCreatingNewStub) {
24364 return stub.create();
24365 }
24366
24367 var s = stub.create(arity);
24368
24369 extend.nonEnum(s, {
24370 rootObj: object,
24371 propName: property,
24372 restore: function restore() {
24373 if (actualDescriptor !== undefined) {
24374 Object.defineProperty(object, property, actualDescriptor);
24375 return;
24376 }
24377
24378 delete object[property];
24379 }
24380 });
24381
24382 return isStubbingNonFuncProperty ? s : wrapMethod(object, property, s);
24383}
24384
24385stub.createStubInstance = function(constructor, overrides) {
24386 if (typeof constructor !== "function") {
24387 throw new TypeError("The constructor should be a function.");
24388 }
24389
24390 var stubbedObject = stub(Object.create(constructor.prototype));
24391
24392 forEach$3(Object.keys(overrides || {}), function(propertyName) {
24393 if (propertyName in stubbedObject) {
24394 var value = overrides[propertyName];
24395 if (value && value.createStubInstance) {
24396 stubbedObject[propertyName] = value;
24397 } else {
24398 stubbedObject[propertyName].returns(value);
24399 }
24400 } else {
24401 throw new Error("Cannot stub " + propertyName + ". Property does not exist!");
24402 }
24403 });
24404 return stubbedObject;
24405};
24406
24407/*eslint-disable no-use-before-define*/
24408function getParentBehaviour(stubInstance) {
24409 return stubInstance.parent && getCurrentBehavior(stubInstance.parent);
24410}
24411
24412function getDefaultBehavior(stubInstance) {
24413 return stubInstance.defaultBehavior || getParentBehaviour(stubInstance) || behavior.create(stubInstance);
24414}
24415
24416function getCurrentBehavior(stubInstance) {
24417 var currentBehavior = stubInstance.behaviors[stubInstance.callCount - 1];
24418 return currentBehavior && currentBehavior.isPresent() ? currentBehavior : getDefaultBehavior(stubInstance);
24419}
24420/*eslint-enable no-use-before-define*/
24421
24422var uuid$1 = 0;
24423
24424var proto$1 = {
24425 create: function create(stubLength) {
24426 var functionStub = function() {
24427 var args = slice$7(arguments);
24428 var matchings = functionStub.matchingFakes(args);
24429
24430 var fnStub =
24431 pop$1(
24432 sort$1(matchings, function(a, b) {
24433 return a.matchingArguments.length - b.matchingArguments.length;
24434 })
24435 ) || functionStub;
24436 return getCurrentBehavior(fnStub).invoke(this, arguments);
24437 };
24438
24439 var orig = functionStub;
24440 functionStub = spy_1.create(functionStub, stubLength);
24441
24442 extend.nonEnum(functionStub, {
24443 id: "stub#" + uuid$1++,
24444 func: orig
24445 });
24446
24447 extend(functionStub, stub);
24448
24449 extend.nonEnum(functionStub, {
24450 instantiateFake: stub.create,
24451 displayName: "stub",
24452 toString: functionToString,
24453
24454 defaultBehavior: null,
24455 behaviors: []
24456 });
24457
24458 return functionStub;
24459 },
24460
24461 resetBehavior: function() {
24462 var fakes = this.fakes || [];
24463
24464 this.defaultBehavior = null;
24465 this.behaviors = [];
24466
24467 delete this.returnValue;
24468 delete this.returnArgAt;
24469 delete this.throwArgAt;
24470 delete this.resolveArgAt;
24471 delete this.fakeFn;
24472 this.returnThis = false;
24473 this.resolveThis = false;
24474
24475 forEach$3(fakes, function(fake) {
24476 fake.resetBehavior();
24477 });
24478 },
24479
24480 resetHistory: spy_1.resetHistory,
24481
24482 reset: function() {
24483 this.resetHistory();
24484 this.resetBehavior();
24485 },
24486
24487 onCall: function onCall(index) {
24488 if (!this.behaviors[index]) {
24489 this.behaviors[index] = behavior.create(this);
24490 }
24491
24492 return this.behaviors[index];
24493 },
24494
24495 onFirstCall: function onFirstCall() {
24496 return this.onCall(0);
24497 },
24498
24499 onSecondCall: function onSecondCall() {
24500 return this.onCall(1);
24501 },
24502
24503 onThirdCall: function onThirdCall() {
24504 return this.onCall(2);
24505 }
24506};
24507
24508forEach$3(Object.keys(behavior), function(method) {
24509 if (
24510 hasOwnProperty$5(behavior, method) &&
24511 !hasOwnProperty$5(proto$1, method) &&
24512 method !== "create" &&
24513 method !== "withArgs" &&
24514 method !== "invoke"
24515 ) {
24516 proto$1[method] = behavior.createBehavior(method);
24517 }
24518});
24519
24520forEach$3(Object.keys(defaultBehaviors_1), function(method) {
24521 if (hasOwnProperty$5(defaultBehaviors_1, method) && !hasOwnProperty$5(proto$1, method)) {
24522 behavior.addBehavior(stub, method, defaultBehaviors_1[method]);
24523 }
24524});
24525
24526extend(stub, proto$1);
24527var stub_1 = stub;
24528
24529var arrayProto$a = lib.prototypes.array;
24530var spyInvoke = spy_1.invoke;
24531var spyCallToString = call$1.toString;
24532
24533
24534var match$4 = samsam.createMatcher;
24535
24536
24537var deepEqual$5 = samsam.deepEqual;
24538
24539var valueToString$c = lib.valueToString;
24540
24541var every$4 = arrayProto$a.every;
24542var forEach$4 = arrayProto$a.forEach;
24543var push$4 = arrayProto$a.push;
24544var slice$8 = arrayProto$a.slice;
24545
24546function callCountInWords(callCount) {
24547 if (callCount === 0) {
24548 return "never called";
24549 }
24550
24551 return "called " + timesInWords(callCount);
24552}
24553
24554function expectedCallCountInWords(expectation) {
24555 var min = expectation.minCalls;
24556 var max = expectation.maxCalls;
24557
24558 if (typeof min === "number" && typeof max === "number") {
24559 var str = timesInWords(min);
24560
24561 if (min !== max) {
24562 str = "at least " + str + " and at most " + timesInWords(max);
24563 }
24564
24565 return str;
24566 }
24567
24568 if (typeof min === "number") {
24569 return "at least " + timesInWords(min);
24570 }
24571
24572 return "at most " + timesInWords(max);
24573}
24574
24575function receivedMinCalls(expectation) {
24576 var hasMinLimit = typeof expectation.minCalls === "number";
24577 return !hasMinLimit || expectation.callCount >= expectation.minCalls;
24578}
24579
24580function receivedMaxCalls(expectation) {
24581 if (typeof expectation.maxCalls !== "number") {
24582 return false;
24583 }
24584
24585 return expectation.callCount === expectation.maxCalls;
24586}
24587
24588function verifyMatcher(possibleMatcher, arg) {
24589 var isMatcher = match$4.isMatcher(possibleMatcher);
24590
24591 return (isMatcher && possibleMatcher.test(arg)) || true;
24592}
24593
24594var mockExpectation = {
24595 minCalls: 1,
24596 maxCalls: 1,
24597
24598 create: function create(methodName) {
24599 var expectation = extend.nonEnum(stub_1.create(), mockExpectation);
24600 delete expectation.create;
24601 expectation.method = methodName;
24602
24603 return expectation;
24604 },
24605
24606 invoke: function invoke(func, thisValue, args) {
24607 this.verifyCallAllowed(thisValue, args);
24608
24609 return spyInvoke.apply(this, arguments);
24610 },
24611
24612 atLeast: function atLeast(num) {
24613 if (typeof num !== "number") {
24614 throw new TypeError("'" + valueToString$c(num) + "' is not number");
24615 }
24616
24617 if (!this.limitsSet) {
24618 this.maxCalls = null;
24619 this.limitsSet = true;
24620 }
24621
24622 this.minCalls = num;
24623
24624 return this;
24625 },
24626
24627 atMost: function atMost(num) {
24628 if (typeof num !== "number") {
24629 throw new TypeError("'" + valueToString$c(num) + "' is not number");
24630 }
24631
24632 if (!this.limitsSet) {
24633 this.minCalls = null;
24634 this.limitsSet = true;
24635 }
24636
24637 this.maxCalls = num;
24638
24639 return this;
24640 },
24641
24642 never: function never() {
24643 return this.exactly(0);
24644 },
24645
24646 once: function once() {
24647 return this.exactly(1);
24648 },
24649
24650 twice: function twice() {
24651 return this.exactly(2);
24652 },
24653
24654 thrice: function thrice() {
24655 return this.exactly(3);
24656 },
24657
24658 exactly: function exactly(num) {
24659 if (typeof num !== "number") {
24660 throw new TypeError("'" + valueToString$c(num) + "' is not a number");
24661 }
24662
24663 this.atLeast(num);
24664 return this.atMost(num);
24665 },
24666
24667 met: function met() {
24668 return !this.failed && receivedMinCalls(this);
24669 },
24670
24671 verifyCallAllowed: function verifyCallAllowed(thisValue, args) {
24672 var expectedArguments = this.expectedArguments;
24673
24674 if (receivedMaxCalls(this)) {
24675 this.failed = true;
24676 mockExpectation.fail(this.method + " already called " + timesInWords(this.maxCalls));
24677 }
24678
24679 if ("expectedThis" in this && this.expectedThis !== thisValue) {
24680 mockExpectation.fail(
24681 this.method +
24682 " called with " +
24683 valueToString$c(thisValue) +
24684 " as thisValue, expected " +
24685 valueToString$c(this.expectedThis)
24686 );
24687 }
24688
24689 if (!("expectedArguments" in this)) {
24690 return;
24691 }
24692
24693 if (!args) {
24694 mockExpectation.fail(this.method + " received no arguments, expected " + format_1(expectedArguments));
24695 }
24696
24697 if (args.length < expectedArguments.length) {
24698 mockExpectation.fail(
24699 this.method +
24700 " received too few arguments (" +
24701 format_1(args) +
24702 "), expected " +
24703 format_1(expectedArguments)
24704 );
24705 }
24706
24707 if (this.expectsExactArgCount && args.length !== expectedArguments.length) {
24708 mockExpectation.fail(
24709 this.method +
24710 " received too many arguments (" +
24711 format_1(args) +
24712 "), expected " +
24713 format_1(expectedArguments)
24714 );
24715 }
24716
24717 forEach$4(
24718 expectedArguments,
24719 function(expectedArgument, i) {
24720 if (!verifyMatcher(expectedArgument, args[i])) {
24721 mockExpectation.fail(
24722 this.method +
24723 " received wrong arguments " +
24724 format_1(args) +
24725 ", didn't match " +
24726 String(expectedArguments)
24727 );
24728 }
24729
24730 if (!deepEqual$5(args[i], expectedArgument)) {
24731 mockExpectation.fail(
24732 this.method +
24733 " received wrong arguments " +
24734 format_1(args) +
24735 ", expected " +
24736 format_1(expectedArguments)
24737 );
24738 }
24739 },
24740 this
24741 );
24742 },
24743
24744 allowsCall: function allowsCall(thisValue, args) {
24745 var expectedArguments = this.expectedArguments;
24746
24747 if (this.met() && receivedMaxCalls(this)) {
24748 return false;
24749 }
24750
24751 if ("expectedThis" in this && this.expectedThis !== thisValue) {
24752 return false;
24753 }
24754
24755 if (!("expectedArguments" in this)) {
24756 return true;
24757 }
24758
24759 // eslint-disable-next-line no-underscore-dangle
24760 var _args = args || [];
24761
24762 if (_args.length < expectedArguments.length) {
24763 return false;
24764 }
24765
24766 if (this.expectsExactArgCount && _args.length !== expectedArguments.length) {
24767 return false;
24768 }
24769
24770 return every$4(expectedArguments, function(expectedArgument, i) {
24771 if (!verifyMatcher(expectedArgument, _args[i])) {
24772 return false;
24773 }
24774
24775 if (!deepEqual$5(_args[i], expectedArgument)) {
24776 return false;
24777 }
24778
24779 return true;
24780 });
24781 },
24782
24783 withArgs: function withArgs() {
24784 this.expectedArguments = slice$8(arguments);
24785 return this;
24786 },
24787
24788 withExactArgs: function withExactArgs() {
24789 this.withArgs.apply(this, arguments);
24790 this.expectsExactArgCount = true;
24791 return this;
24792 },
24793
24794 on: function on(thisValue) {
24795 this.expectedThis = thisValue;
24796 return this;
24797 },
24798
24799 toString: function() {
24800 var args = slice$8(this.expectedArguments || []);
24801
24802 if (!this.expectsExactArgCount) {
24803 push$4(args, "[...]");
24804 }
24805
24806 var callStr = spyCallToString.call({
24807 proxy: this.method || "anonymous mock expectation",
24808 args: args
24809 });
24810
24811 var message = callStr.replace(", [...", "[, ...") + " " + expectedCallCountInWords(this);
24812
24813 if (this.met()) {
24814 return "Expectation met: " + message;
24815 }
24816
24817 return "Expected " + message + " (" + callCountInWords(this.callCount) + ")";
24818 },
24819
24820 verify: function verify() {
24821 if (!this.met()) {
24822 mockExpectation.fail(String(this));
24823 } else {
24824 mockExpectation.pass(String(this));
24825 }
24826
24827 return true;
24828 },
24829
24830 pass: function pass(message) {
24831 assert_1.pass(message);
24832 },
24833
24834 fail: function fail(message) {
24835 var exception = new Error(message);
24836 exception.name = "ExpectationError";
24837
24838 throw exception;
24839 }
24840};
24841
24842var mockExpectation_1 = mockExpectation;
24843
24844var forEach$5 = Array.prototype.forEach;
24845
24846function usePromiseLibrary(library, fakes) {
24847 if (typeof library === "undefined") {
24848 return;
24849 }
24850
24851 if (Array.isArray(fakes)) {
24852 forEach$5.call(fakes, usePromiseLibrary.bind(null, library));
24853
24854 return;
24855 }
24856
24857 if (typeof fakes.usingPromise === "function") {
24858 fakes.usingPromise(library);
24859 }
24860}
24861
24862var usePromiseLibrary_1 = usePromiseLibrary;
24863
24864var arrayProto$b = lib.prototypes.array;
24865
24866var spyCallToString$1 = call$1.toString;
24867
24868var deepEqual$6 = samsam.deepEqual;
24869
24870
24871
24872var concat$4 = arrayProto$b.concat;
24873var filter$2 = arrayProto$b.filter;
24874var forEach$6 = arrayProto$b.forEach;
24875var every$5 = arrayProto$b.every;
24876var join$6 = arrayProto$b.join;
24877var push$5 = arrayProto$b.push;
24878var slice$9 = arrayProto$b.slice;
24879var unshift = arrayProto$b.unshift;
24880
24881function mock(object) {
24882 if (!object || typeof object === "string") {
24883 return mockExpectation_1.create(object ? object : "Anonymous mock");
24884 }
24885
24886 return mock.create(object);
24887}
24888
24889function each(collection, callback) {
24890 var col = collection || [];
24891
24892 forEach$6(col, callback);
24893}
24894
24895function arrayEquals(arr1, arr2, compareLength) {
24896 if (compareLength && arr1.length !== arr2.length) {
24897 return false;
24898 }
24899
24900 return every$5(arr1, function(element, i) {
24901 return deepEqual$6(arr2[i], element);
24902 });
24903}
24904
24905extend(mock, {
24906 create: function create(object) {
24907 if (!object) {
24908 throw new TypeError("object is null");
24909 }
24910
24911 var mockObject = extend.nonEnum({}, mock, { object: object });
24912 delete mockObject.create;
24913
24914 return mockObject;
24915 },
24916
24917 expects: function expects(method) {
24918 if (!method) {
24919 throw new TypeError("method is falsy");
24920 }
24921
24922 if (!this.expectations) {
24923 this.expectations = {};
24924 this.proxies = [];
24925 this.failures = [];
24926 }
24927
24928 if (!this.expectations[method]) {
24929 this.expectations[method] = [];
24930 var mockObject = this;
24931
24932 wrapMethod(this.object, method, function() {
24933 return mockObject.invokeMethod(method, this, arguments);
24934 });
24935
24936 push$5(this.proxies, method);
24937 }
24938
24939 var expectation = mockExpectation_1.create(method);
24940 extend.nonEnum(expectation, this.object[method]);
24941 push$5(this.expectations[method], expectation);
24942 usePromiseLibrary_1(this.promiseLibrary, expectation);
24943
24944 return expectation;
24945 },
24946
24947 restore: function restore() {
24948 var object = this.object;
24949
24950 each(this.proxies, function(proxy) {
24951 if (typeof object[proxy].restore === "function") {
24952 object[proxy].restore();
24953 }
24954 });
24955 },
24956
24957 verify: function verify() {
24958 var expectations = this.expectations || {};
24959 var messages = this.failures ? slice$9(this.failures) : [];
24960 var met = [];
24961
24962 each(this.proxies, function(proxy) {
24963 each(expectations[proxy], function(expectation) {
24964 if (!expectation.met()) {
24965 push$5(messages, String(expectation));
24966 } else {
24967 push$5(met, String(expectation));
24968 }
24969 });
24970 });
24971
24972 this.restore();
24973
24974 if (messages.length > 0) {
24975 mockExpectation_1.fail(join$6(concat$4(messages, met), "\n"));
24976 } else if (met.length > 0) {
24977 mockExpectation_1.pass(join$6(concat$4(messages, met), "\n"));
24978 }
24979
24980 return true;
24981 },
24982
24983 usingPromise: function usingPromise(promiseLibrary) {
24984 this.promiseLibrary = promiseLibrary;
24985
24986 return this;
24987 },
24988
24989 invokeMethod: function invokeMethod(method, thisValue, args) {
24990 /* if we cannot find any matching files we will explicitly call mockExpection#fail with error messages */
24991 /* eslint consistent-return: "off" */
24992 var expectations = this.expectations && this.expectations[method] ? this.expectations[method] : [];
24993 var currentArgs = args || [];
24994 var available;
24995
24996 var expectationsWithMatchingArgs = filter$2(expectations, function(expectation) {
24997 var expectedArgs = expectation.expectedArguments || [];
24998
24999 return arrayEquals(expectedArgs, currentArgs, expectation.expectsExactArgCount);
25000 });
25001
25002 var expectationsToApply = filter$2(expectationsWithMatchingArgs, function(expectation) {
25003 return !expectation.met() && expectation.allowsCall(thisValue, args);
25004 });
25005
25006 if (expectationsToApply.length > 0) {
25007 return expectationsToApply[0].apply(thisValue, args);
25008 }
25009
25010 var messages = [];
25011 var exhausted = 0;
25012
25013 forEach$6(expectationsWithMatchingArgs, function(expectation) {
25014 if (expectation.allowsCall(thisValue, args)) {
25015 available = available || expectation;
25016 } else {
25017 exhausted += 1;
25018 }
25019 });
25020
25021 if (available && exhausted === 0) {
25022 return available.apply(thisValue, args);
25023 }
25024
25025 forEach$6(expectations, function(expectation) {
25026 push$5(messages, " " + String(expectation));
25027 });
25028
25029 unshift(
25030 messages,
25031 "Unexpected call: " +
25032 spyCallToString$1.call({
25033 proxy: method,
25034 args: args
25035 })
25036 );
25037
25038 var err = new Error();
25039 if (!err.stack) {
25040 // PhantomJS does not serialize the stack trace until the error has been thrown
25041 try {
25042 throw err;
25043 } catch (e) {
25044 /* empty */
25045 }
25046 }
25047 push$5(
25048 this.failures,
25049 "Unexpected call: " +
25050 spyCallToString$1.call({
25051 proxy: method,
25052 args: args,
25053 stack: err.stack
25054 })
25055 );
25056
25057 mockExpectation_1.fail(join$6(messages, "\n"));
25058 }
25059});
25060
25061var mock_1 = mock;
25062
25063var arrayProto$c = lib.prototypes.array;
25064
25065
25066
25067var forEach$7 = arrayProto$c.forEach;
25068var slice$a = arrayProto$c.slice;
25069
25070function getError(value) {
25071 return value instanceof Error ? value : new Error(value);
25072}
25073
25074function cleanProxy(f) {
25075 var undesirableProperties = [
25076 "instantiateFake",
25077 "callArg",
25078 "callArgOn",
25079 "callArgOnWith",
25080 "callArgWith",
25081 "invokeCallback",
25082 "throwArg",
25083 "withArgs",
25084 "yield",
25085 "yieldOn",
25086 "yieldTo",
25087 "yieldToOn"
25088 ];
25089
25090 forEach$7(undesirableProperties, function(key) {
25091 delete f[key];
25092 });
25093
25094 return f;
25095}
25096
25097var uuid$2 = 0;
25098function wrapFunc(f) {
25099 var fakeInstance = function() {
25100 var lastArg = arguments.length > 0 ? arguments[arguments.length - 1] : undefined;
25101 var callback = lastArg && typeof lastArg === "function" ? lastArg : undefined;
25102
25103 /* eslint-disable no-use-before-define */
25104 p.lastArg = lastArg;
25105 p.callback = callback;
25106 /* eslint-enable no-use-before-define */
25107
25108 return f && f.apply(this, arguments);
25109 };
25110 var p = cleanProxy(spy_1(fakeInstance));
25111
25112 p.displayName = "fake";
25113 p.id = "fake#" + uuid$2++;
25114
25115 return p;
25116}
25117
25118function fake(f) {
25119 if (arguments.length > 0 && typeof f !== "function") {
25120 throw new TypeError("Expected f argument to be a Function");
25121 }
25122
25123 return wrapFunc(f);
25124}
25125
25126fake.returns = function returns(value) {
25127 function f() {
25128 return value;
25129 }
25130
25131 return wrapFunc(f);
25132};
25133
25134fake.throws = function throws(value) {
25135 function f() {
25136 throw getError(value);
25137 }
25138
25139 return wrapFunc(f);
25140};
25141
25142fake.resolves = function resolves(value) {
25143 function f() {
25144 return Promise.resolve(value);
25145 }
25146
25147 return wrapFunc(f);
25148};
25149
25150fake.rejects = function rejects(value) {
25151 function f() {
25152 return Promise.reject(getError(value));
25153 }
25154
25155 return wrapFunc(f);
25156};
25157
25158function yieldInternal(async, values) {
25159 function f() {
25160 var callback = arguments[arguments.length - 1];
25161 if (typeof callback !== "function") {
25162 throw new TypeError("Expected last argument to be a function");
25163 }
25164 if (async) {
25165 nextTick$1(function() {
25166 callback.apply(null, values);
25167 });
25168 } else {
25169 callback.apply(null, values);
25170 }
25171 }
25172
25173 return wrapFunc(f);
25174}
25175
25176fake.yields = function yields() {
25177 return yieldInternal(false, slice$a(arguments));
25178};
25179
25180fake.yieldsAsync = function yieldsAsync() {
25181 return yieldInternal(true, slice$a(arguments));
25182};
25183
25184var fake_1 = fake;
25185
25186var nise = createCommonjsModule(function (module, exports) {
25187(function(f){{module.exports=f();}})(function(){var define;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof commonjsRequire=="function"&&commonjsRequire;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r);}return n[o].exports}var i=typeof commonjsRequire=="function"&&commonjsRequire;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
25188
25189// cache a reference to setTimeout, so that our reference won't be stubbed out
25190// when using fake timers and errors will still get logged
25191// https://github.com/cjohansen/Sinon.JS/issues/381
25192var realSetTimeout = setTimeout;
25193
25194function configureLogger(config) {
25195 config = config || {};
25196 // Function which prints errors.
25197 if (!config.hasOwnProperty("logger")) {
25198 config.logger = function () { };
25199 }
25200 // When set to true, any errors logged will be thrown immediately;
25201 // If set to false, the errors will be thrown in separate execution frame.
25202 if (!config.hasOwnProperty("useImmediateExceptions")) {
25203 config.useImmediateExceptions = true;
25204 }
25205 // wrap realSetTimeout with something we can stub in tests
25206 if (!config.hasOwnProperty("setTimeout")) {
25207 config.setTimeout = realSetTimeout;
25208 }
25209
25210 return function logError(label, e) {
25211 var msg = label + " threw exception: ";
25212 var err = { name: e.name || label, message: e.message || e.toString(), stack: e.stack };
25213
25214 function throwLoggedError() {
25215 err.message = msg + err.message;
25216 throw err;
25217 }
25218
25219 config.logger(msg + "[" + err.name + "] " + err.message);
25220
25221 if (err.stack) {
25222 config.logger(err.stack);
25223 }
25224
25225 if (config.useImmediateExceptions) {
25226 throwLoggedError();
25227 } else {
25228 config.setTimeout(throwLoggedError, 0);
25229 }
25230 };
25231}
25232
25233module.exports = configureLogger;
25234
25235},{}],2:[function(require,module,exports){
25236
25237var Event = require("./event");
25238
25239function CustomEvent(type, customData, target) {
25240 this.initEvent(type, false, false, target);
25241 this.detail = customData.detail || null;
25242}
25243
25244CustomEvent.prototype = new Event();
25245
25246CustomEvent.prototype.constructor = CustomEvent;
25247
25248module.exports = CustomEvent;
25249
25250},{"./event":4}],3:[function(require,module,exports){
25251
25252function flattenOptions(options) {
25253 if (options !== Object(options)) {
25254 return {
25255 capture: Boolean(options),
25256 once: false,
25257 passive: false
25258 };
25259 }
25260 return {
25261 capture: Boolean(options.capture),
25262 once: Boolean(options.once),
25263 passive: Boolean(options.passive)
25264 };
25265}
25266function not(fn) {
25267 return function () {
25268 return !fn.apply(this, arguments);
25269 };
25270}
25271function hasListenerFilter(listener, capture) {
25272 return function (listenerSpec) {
25273 return listenerSpec.capture === capture
25274 && listenerSpec.listener === listener;
25275 };
25276}
25277
25278var EventTarget = {
25279 // https://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener
25280 addEventListener: function addEventListener(event, listener, providedOptions) {
25281 // 3. Let capture, passive, and once be the result of flattening more options.
25282 // Flatten property before executing step 2,
25283 // feture detection is usually based on registering handler with options object,
25284 // that has getter defined
25285 // addEventListener("load", () => {}, {
25286 // get once() { supportsOnce = true; }
25287 // });
25288 var options = flattenOptions(providedOptions);
25289
25290 // 2. If callback is null, then return.
25291 if (listener == null) {
25292 return;
25293 }
25294
25295 this.eventListeners = this.eventListeners || {};
25296 this.eventListeners[event] = this.eventListeners[event] || [];
25297
25298 // 4. If context object’s associated list of event listener
25299 // does not contain an event listener whose type is type,
25300 // callback is callback, and capture is capture, then append
25301 // a new event listener to it, whose type is type, callback is
25302 // callback, capture is capture, passive is passive, and once is once.
25303 if (!this.eventListeners[event].some(hasListenerFilter(listener, options.capture))) {
25304 this.eventListeners[event].push({
25305 listener: listener,
25306 capture: options.capture,
25307 once: options.once
25308 });
25309 }
25310 },
25311
25312 // https://dom.spec.whatwg.org/#dom-eventtarget-removeeventlistener
25313 removeEventListener: function removeEventListener(event, listener, providedOptions) {
25314 if (!this.eventListeners || !this.eventListeners[event]) {
25315 return;
25316 }
25317
25318 // 2. Let capture be the result of flattening options.
25319 var options = flattenOptions(providedOptions);
25320
25321 // 3. If there is an event listener in the associated list of
25322 // event listeners whose type is type, callback is callback,
25323 // and capture is capture, then set that event listener’s
25324 // removed to true and remove it from the associated list of event listeners.
25325 this.eventListeners[event] = this.eventListeners[event]
25326 .filter(not(hasListenerFilter(listener, options.capture)));
25327 },
25328
25329 dispatchEvent: function dispatchEvent(event) {
25330 if (!this.eventListeners || !this.eventListeners[event.type]) {
25331 return Boolean(event.defaultPrevented);
25332 }
25333
25334 var self = this;
25335 var type = event.type;
25336 var listeners = self.eventListeners[type];
25337
25338 // Remove listeners, that should be dispatched once
25339 // before running dispatch loop to avoid nested dispatch issues
25340 self.eventListeners[type] = listeners.filter(function (listenerSpec) {
25341 return !listenerSpec.once;
25342 });
25343 listeners.forEach(function (listenerSpec) {
25344 var listener = listenerSpec.listener;
25345 if (typeof listener === "function") {
25346 listener.call(self, event);
25347 } else {
25348 listener.handleEvent(event);
25349 }
25350 });
25351
25352 return Boolean(event.defaultPrevented);
25353 }
25354};
25355
25356module.exports = EventTarget;
25357
25358},{}],4:[function(require,module,exports){
25359
25360function Event(type, bubbles, cancelable, target) {
25361 this.initEvent(type, bubbles, cancelable, target);
25362}
25363
25364Event.prototype = {
25365 initEvent: function (type, bubbles, cancelable, target) {
25366 this.type = type;
25367 this.bubbles = bubbles;
25368 this.cancelable = cancelable;
25369 this.target = target;
25370 this.currentTarget = target;
25371 },
25372
25373 stopPropagation: function () {},
25374
25375 preventDefault: function () {
25376 this.defaultPrevented = true;
25377 }
25378};
25379
25380module.exports = Event;
25381
25382},{}],5:[function(require,module,exports){
25383
25384module.exports = {
25385 Event: require("./event"),
25386 ProgressEvent: require("./progress-event"),
25387 CustomEvent: require("./custom-event"),
25388 EventTarget: require("./event-target")
25389};
25390
25391},{"./custom-event":2,"./event":4,"./event-target":3,"./progress-event":6}],6:[function(require,module,exports){
25392
25393var Event = require("./event");
25394
25395function ProgressEvent(type, progressEventRaw, target) {
25396 this.initEvent(type, false, false, target);
25397 this.loaded = typeof progressEventRaw.loaded === "number" ? progressEventRaw.loaded : null;
25398 this.total = typeof progressEventRaw.total === "number" ? progressEventRaw.total : null;
25399 this.lengthComputable = !!progressEventRaw.total;
25400}
25401
25402ProgressEvent.prototype = new Event();
25403
25404ProgressEvent.prototype.constructor = ProgressEvent;
25405
25406module.exports = ProgressEvent;
25407
25408},{"./event":4}],7:[function(require,module,exports){
25409
25410var lolex = require("lolex");
25411var fakeServer = require("./index");
25412
25413function Server() {}
25414Server.prototype = fakeServer;
25415
25416var fakeServerWithClock = new Server();
25417
25418fakeServerWithClock.addRequest = function addRequest(xhr) {
25419 if (xhr.async) {
25420 if (typeof setTimeout.clock === "object") {
25421 this.clock = setTimeout.clock;
25422 } else {
25423 this.clock = lolex.install();
25424 this.resetClock = true;
25425 }
25426
25427 if (!this.longestTimeout) {
25428 var clockSetTimeout = this.clock.setTimeout;
25429 var clockSetInterval = this.clock.setInterval;
25430 var server = this;
25431
25432 this.clock.setTimeout = function (fn, timeout) {
25433 server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);
25434
25435 return clockSetTimeout.apply(this, arguments);
25436 };
25437
25438 this.clock.setInterval = function (fn, timeout) {
25439 server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);
25440
25441 return clockSetInterval.apply(this, arguments);
25442 };
25443 }
25444 }
25445
25446 return fakeServer.addRequest.call(this, xhr);
25447};
25448
25449fakeServerWithClock.respond = function respond() {
25450 var returnVal = fakeServer.respond.apply(this, arguments);
25451
25452 if (this.clock) {
25453 this.clock.tick(this.longestTimeout || 0);
25454 this.longestTimeout = 0;
25455
25456 if (this.resetClock) {
25457 this.clock.uninstall();
25458 this.resetClock = false;
25459 }
25460 }
25461
25462 return returnVal;
25463};
25464
25465fakeServerWithClock.restore = function restore() {
25466 if (this.clock) {
25467 this.clock.uninstall();
25468 }
25469
25470 return fakeServer.restore.apply(this, arguments);
25471};
25472
25473module.exports = fakeServerWithClock;
25474
25475},{"./index":9,"lolex":47}],8:[function(require,module,exports){
25476
25477var formatio = require("@sinonjs/formatio");
25478
25479var formatter = formatio.configure({
25480 quoteStrings: false,
25481 limitChildrenCount: 250
25482});
25483
25484module.exports = function format() {
25485 return formatter.ascii.apply(formatter, arguments);
25486};
25487
25488},{"@sinonjs/formatio":24}],9:[function(require,module,exports){
25489
25490var fakeXhr = require("../fake-xhr");
25491var push = [].push;
25492var format = require("./format");
25493var configureLogError = require("../configure-logger");
25494var pathToRegexp = require("path-to-regexp");
25495
25496var supportsArrayBuffer = typeof ArrayBuffer !== "undefined";
25497
25498function responseArray(handler) {
25499 var response = handler;
25500
25501 if (Object.prototype.toString.call(handler) !== "[object Array]") {
25502 response = [200, {}, handler];
25503 }
25504
25505 if (typeof response[2] !== "string") {
25506 if (!supportsArrayBuffer) {
25507 throw new TypeError("Fake server response body should be a string, but was " +
25508 typeof response[2]);
25509 }
25510 else if (!(response[2] instanceof ArrayBuffer)) {
25511 throw new TypeError("Fake server response body should be a string or ArrayBuffer, but was " +
25512 typeof response[2]);
25513 }
25514 }
25515
25516 return response;
25517}
25518
25519function getDefaultWindowLocation() {
25520 return { "host": "localhost", "protocol": "http" };
25521}
25522
25523function getWindowLocation() {
25524 if (typeof window === "undefined") {
25525 // Fallback
25526 return getDefaultWindowLocation();
25527 }
25528
25529 if (typeof window.location !== "undefined") {
25530 // Browsers place location on window
25531 return window.location;
25532 }
25533
25534 if ((typeof window.window !== "undefined") && (typeof window.window.location !== "undefined")) {
25535 // React Native on Android places location on window.window
25536 return window.window.location;
25537 }
25538
25539 return getDefaultWindowLocation();
25540}
25541
25542function matchOne(response, reqMethod, reqUrl) {
25543 var rmeth = response.method;
25544 var matchMethod = !rmeth || rmeth.toLowerCase() === reqMethod.toLowerCase();
25545 var url = response.url;
25546 var matchUrl = !url || url === reqUrl || (typeof url.test === "function" && url.test(reqUrl));
25547
25548 return matchMethod && matchUrl;
25549}
25550
25551function match(response, request) {
25552 var wloc = getWindowLocation();
25553
25554 var rCurrLoc = new RegExp("^" + wloc.protocol + "//" + wloc.host);
25555
25556 var requestUrl = request.url;
25557
25558 if (!/^https?:\/\//.test(requestUrl) || rCurrLoc.test(requestUrl)) {
25559 requestUrl = requestUrl.replace(rCurrLoc, "");
25560 }
25561
25562 if (matchOne(response, this.getHTTPMethod(request), requestUrl)) {
25563 if (typeof response.response === "function") {
25564 var ru = response.url;
25565 var args = [request].concat(ru && typeof ru.exec === "function" ? ru.exec(requestUrl).slice(1) : []);
25566 return response.response.apply(response, args);
25567 }
25568
25569 return true;
25570 }
25571
25572 return false;
25573}
25574
25575function incrementRequestCount() {
25576 var count = ++this.requestCount;
25577
25578 this.requested = true;
25579
25580 this.requestedOnce = count === 1;
25581 this.requestedTwice = count === 2;
25582 this.requestedThrice = count === 3;
25583
25584 this.firstRequest = this.getRequest(0);
25585 this.secondRequest = this.getRequest(1);
25586 this.thirdRequest = this.getRequest(2);
25587
25588 this.lastRequest = this.getRequest(count - 1);
25589}
25590
25591var fakeServer = {
25592 create: function (config) {
25593 var server = Object.create(this);
25594 server.configure(config);
25595 this.xhr = fakeXhr.useFakeXMLHttpRequest();
25596 server.requests = [];
25597 server.requestCount = 0;
25598 server.queue = [];
25599 server.responses = [];
25600
25601
25602 this.xhr.onCreate = function (xhrObj) {
25603 xhrObj.unsafeHeadersEnabled = function () {
25604 return !(server.unsafeHeadersEnabled === false);
25605 };
25606 server.addRequest(xhrObj);
25607 };
25608
25609 return server;
25610 },
25611
25612 configure: function (config) {
25613 var self = this;
25614 var whitelist = {
25615 "autoRespond": true,
25616 "autoRespondAfter": true,
25617 "respondImmediately": true,
25618 "fakeHTTPMethods": true,
25619 "logger": true,
25620 "unsafeHeadersEnabled": true
25621 };
25622
25623 config = config || {};
25624
25625 Object.keys(config).forEach(function (setting) {
25626 if (setting in whitelist) {
25627 self[setting] = config[setting];
25628 }
25629 });
25630
25631 self.logError = configureLogError(config);
25632 },
25633
25634 addRequest: function addRequest(xhrObj) {
25635 var server = this;
25636 push.call(this.requests, xhrObj);
25637
25638 incrementRequestCount.call(this);
25639
25640 xhrObj.onSend = function () {
25641 server.handleRequest(this);
25642
25643 if (server.respondImmediately) {
25644 server.respond();
25645 } else if (server.autoRespond && !server.responding) {
25646 setTimeout(function () {
25647 server.responding = false;
25648 server.respond();
25649 }, server.autoRespondAfter || 10);
25650
25651 server.responding = true;
25652 }
25653 };
25654 },
25655
25656 getHTTPMethod: function getHTTPMethod(request) {
25657 if (this.fakeHTTPMethods && /post/i.test(request.method)) {
25658 var matches = (request.requestBody || "").match(/_method=([^\b;]+)/);
25659 return matches ? matches[1] : request.method;
25660 }
25661
25662 return request.method;
25663 },
25664
25665 handleRequest: function handleRequest(xhr) {
25666 if (xhr.async) {
25667 push.call(this.queue, xhr);
25668 } else {
25669 this.processRequest(xhr);
25670 }
25671 },
25672
25673 logger: function () {
25674 // no-op; override via configure()
25675 },
25676
25677 logError: configureLogError({}),
25678
25679 log: function log(response, request) {
25680 var str;
25681
25682 str = "Request:\n" + format(request) + "\n\n";
25683 str += "Response:\n" + format(response) + "\n\n";
25684
25685 if (typeof this.logger === "function") {
25686 this.logger(str);
25687 }
25688 },
25689
25690 respondWith: function respondWith(method, url, body) {
25691 if (arguments.length === 1 && typeof method !== "function") {
25692 this.response = responseArray(method);
25693 return;
25694 }
25695
25696 if (arguments.length === 1) {
25697 body = method;
25698 url = method = null;
25699 }
25700
25701 if (arguments.length === 2) {
25702 body = url;
25703 url = method;
25704 method = null;
25705 }
25706
25707 push.call(this.responses, {
25708 method: method,
25709 url: typeof url === "string" && url !== "" ? pathToRegexp(url) : url,
25710 response: typeof body === "function" ? body : responseArray(body)
25711 });
25712 },
25713
25714 respond: function respond() {
25715 if (arguments.length > 0) {
25716 this.respondWith.apply(this, arguments);
25717 }
25718
25719 var queue = this.queue || [];
25720 var requests = queue.splice(0, queue.length);
25721 var self = this;
25722
25723 requests.forEach(function (request) {
25724 self.processRequest(request);
25725 });
25726 },
25727
25728 processRequest: function processRequest(request) {
25729 try {
25730 if (request.aborted) {
25731 return;
25732 }
25733
25734 var response = this.response || [404, {}, ""];
25735
25736 if (this.responses) {
25737 for (var l = this.responses.length, i = l - 1; i >= 0; i--) {
25738 if (match.call(this, this.responses[i], request)) {
25739 response = this.responses[i].response;
25740 break;
25741 }
25742 }
25743 }
25744
25745 if (request.readyState !== 4) {
25746 this.log(response, request);
25747
25748 request.respond(response[0], response[1], response[2]);
25749 }
25750 } catch (e) {
25751 this.logError("Fake server request processing", e);
25752 }
25753 },
25754
25755 restore: function restore() {
25756 return this.xhr.restore && this.xhr.restore.apply(this.xhr, arguments);
25757 },
25758
25759 getRequest: function getRequest(index) {
25760 return this.requests[index] || null;
25761 },
25762
25763 reset: function reset() {
25764 this.resetBehavior();
25765 this.resetHistory();
25766 },
25767
25768 resetBehavior: function resetBehavior() {
25769 this.responses.length = this.queue.length = 0;
25770 },
25771
25772 resetHistory: function resetHistory() {
25773 this.requests.length = this.requestCount = 0;
25774
25775 this.requestedOnce = this.requestedTwice = this.requestedThrice = this.requested = false;
25776
25777 this.firstRequest = this.secondRequest = this.thirdRequest = this.lastRequest = null;
25778 }
25779};
25780
25781module.exports = fakeServer;
25782
25783},{"../configure-logger":1,"../fake-xhr":11,"./format":8,"path-to-regexp":48}],10:[function(require,module,exports){
25784
25785exports.isSupported = (function () {
25786 try {
25787 return !!new Blob();
25788 } catch (e) {
25789 return false;
25790 }
25791}());
25792
25793},{}],11:[function(require,module,exports){
25794(function (global){
25795
25796var TextEncoder = require("@sinonjs/text-encoding").TextEncoder;
25797
25798var configureLogError = require("../configure-logger");
25799var sinonEvent = require("../event");
25800var extend = require("just-extend");
25801
25802function getWorkingXHR(globalScope) {
25803 var supportsXHR = typeof globalScope.XMLHttpRequest !== "undefined";
25804 if (supportsXHR) {
25805 return globalScope.XMLHttpRequest;
25806 }
25807
25808 var supportsActiveX = typeof globalScope.ActiveXObject !== "undefined";
25809 if (supportsActiveX) {
25810 return function () {
25811 return new globalScope.ActiveXObject("MSXML2.XMLHTTP.3.0");
25812 };
25813 }
25814
25815 return false;
25816}
25817
25818var supportsProgress = typeof ProgressEvent !== "undefined";
25819var supportsCustomEvent = typeof CustomEvent !== "undefined";
25820var supportsFormData = typeof FormData !== "undefined";
25821var supportsArrayBuffer = typeof ArrayBuffer !== "undefined";
25822var supportsBlob = require("./blob").isSupported;
25823var isReactNative = global.navigator && global.navigator.product === "ReactNative";
25824var sinonXhr = { XMLHttpRequest: global.XMLHttpRequest };
25825sinonXhr.GlobalXMLHttpRequest = global.XMLHttpRequest;
25826sinonXhr.GlobalActiveXObject = global.ActiveXObject;
25827sinonXhr.supportsActiveX = typeof sinonXhr.GlobalActiveXObject !== "undefined";
25828sinonXhr.supportsXHR = typeof sinonXhr.GlobalXMLHttpRequest !== "undefined";
25829sinonXhr.workingXHR = getWorkingXHR(global);
25830sinonXhr.supportsTimeout =
25831 (sinonXhr.supportsXHR && "timeout" in (new sinonXhr.GlobalXMLHttpRequest()));
25832sinonXhr.supportsCORS = isReactNative ||
25833 (sinonXhr.supportsXHR && "withCredentials" in (new sinonXhr.GlobalXMLHttpRequest()));
25834
25835// Ref: https://fetch.spec.whatwg.org/#forbidden-header-name
25836var unsafeHeaders = {
25837 "Accept-Charset": true,
25838 "Access-Control-Request-Headers": true,
25839 "Access-Control-Request-Method": true,
25840 "Accept-Encoding": true,
25841 "Connection": true,
25842 "Content-Length": true,
25843 "Cookie": true,
25844 "Cookie2": true,
25845 "Content-Transfer-Encoding": true,
25846 "Date": true,
25847 "DNT": true,
25848 "Expect": true,
25849 "Host": true,
25850 "Keep-Alive": true,
25851 "Origin": true,
25852 "Referer": true,
25853 "TE": true,
25854 "Trailer": true,
25855 "Transfer-Encoding": true,
25856 "Upgrade": true,
25857 "User-Agent": true,
25858 "Via": true
25859};
25860
25861
25862function EventTargetHandler() {
25863 var self = this;
25864 var events = ["loadstart", "progress", "abort", "error", "load", "timeout", "loadend"];
25865
25866 function addEventListener(eventName) {
25867 self.addEventListener(eventName, function (event) {
25868 var listener = self["on" + eventName];
25869
25870 if (listener && typeof listener === "function") {
25871 listener.call(this, event);
25872 }
25873 });
25874 }
25875
25876 events.forEach(addEventListener);
25877}
25878
25879EventTargetHandler.prototype = sinonEvent.EventTarget;
25880
25881// Note that for FakeXMLHttpRequest to work pre ES5
25882// we lose some of the alignment with the spec.
25883// To ensure as close a match as possible,
25884// set responseType before calling open, send or respond;
25885function FakeXMLHttpRequest(config) {
25886 EventTargetHandler.call(this);
25887 this.readyState = FakeXMLHttpRequest.UNSENT;
25888 this.requestHeaders = {};
25889 this.requestBody = null;
25890 this.status = 0;
25891 this.statusText = "";
25892 this.upload = new EventTargetHandler();
25893 this.responseType = "";
25894 this.response = "";
25895 this.logError = configureLogError(config);
25896
25897 if (sinonXhr.supportsTimeout) {
25898 this.timeout = 0;
25899 }
25900
25901 if (sinonXhr.supportsCORS) {
25902 this.withCredentials = false;
25903 }
25904
25905 if (typeof FakeXMLHttpRequest.onCreate === "function") {
25906 FakeXMLHttpRequest.onCreate(this);
25907 }
25908}
25909
25910function verifyState(xhr) {
25911 if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {
25912 throw new Error("INVALID_STATE_ERR");
25913 }
25914
25915 if (xhr.sendFlag) {
25916 throw new Error("INVALID_STATE_ERR");
25917 }
25918}
25919
25920function normalizeHeaderValue(value) {
25921 // Ref: https://fetch.spec.whatwg.org/#http-whitespace-bytes
25922 /*eslint no-control-regex: "off"*/
25923 return value.replace(/^[\x09\x0A\x0D\x20]+|[\x09\x0A\x0D\x20]+$/g, "");
25924}
25925
25926function getHeader(headers, header) {
25927 var foundHeader = Object.keys(headers).filter(function (h) {
25928 return h.toLowerCase() === header.toLowerCase();
25929 });
25930
25931 return foundHeader[0] || null;
25932}
25933
25934function excludeSetCookie2Header(header) {
25935 return !/^Set-Cookie2?$/i.test(header);
25936}
25937
25938// largest arity in XHR is 5 - XHR#open
25939var apply = function (obj, method, args) {
25940 switch (args.length) {
25941 case 0: return obj[method]();
25942 case 1: return obj[method](args[0]);
25943 case 2: return obj[method](args[0], args[1]);
25944 case 3: return obj[method](args[0], args[1], args[2]);
25945 case 4: return obj[method](args[0], args[1], args[2], args[3]);
25946 case 5: return obj[method](args[0], args[1], args[2], args[3], args[4]);
25947 default: throw new Error("Unhandled case");
25948 }
25949};
25950
25951FakeXMLHttpRequest.filters = [];
25952FakeXMLHttpRequest.addFilter = function addFilter(fn) {
25953 this.filters.push(fn);
25954};
25955FakeXMLHttpRequest.defake = function defake(fakeXhr, xhrArgs) {
25956 var xhr = new sinonXhr.workingXHR(); // eslint-disable-line new-cap
25957
25958 [
25959 "open",
25960 "setRequestHeader",
25961 "abort",
25962 "getResponseHeader",
25963 "getAllResponseHeaders",
25964 "addEventListener",
25965 "overrideMimeType",
25966 "removeEventListener"
25967 ].forEach(function (method) {
25968 fakeXhr[method] = function () {
25969 return apply(xhr, method, arguments);
25970 };
25971 });
25972
25973 fakeXhr.send = function () {
25974 // Ref: https://xhr.spec.whatwg.org/#the-responsetype-attribute
25975 if (xhr.responseType !== fakeXhr.responseType) {
25976 xhr.responseType = fakeXhr.responseType;
25977 }
25978 return apply(xhr, "send", arguments);
25979 };
25980
25981 var copyAttrs = function (args) {
25982 args.forEach(function (attr) {
25983 fakeXhr[attr] = xhr[attr];
25984 });
25985 };
25986
25987 var stateChangeStart = function () {
25988 fakeXhr.readyState = xhr.readyState;
25989 if (xhr.readyState >= FakeXMLHttpRequest.HEADERS_RECEIVED) {
25990 copyAttrs(["status", "statusText"]);
25991 }
25992 if (xhr.readyState >= FakeXMLHttpRequest.LOADING) {
25993 copyAttrs(["response"]);
25994 if (xhr.responseType === "" || xhr.responseType === "text") {
25995 copyAttrs(["responseText"]);
25996 }
25997 }
25998 if (
25999 xhr.readyState === FakeXMLHttpRequest.DONE &&
26000 (xhr.responseType === "" || xhr.responseType === "document")
26001 ) {
26002 copyAttrs(["responseXML"]);
26003 }
26004 };
26005
26006 var stateChangeEnd = function () {
26007 if (fakeXhr.onreadystatechange) {
26008 fakeXhr.onreadystatechange.call(fakeXhr, { target: fakeXhr, currentTarget: fakeXhr });
26009 }
26010 };
26011
26012 var stateChange = function stateChange() {
26013 stateChangeStart();
26014 stateChangeEnd();
26015 };
26016
26017 if (xhr.addEventListener) {
26018 xhr.addEventListener("readystatechange", stateChangeStart);
26019
26020 Object.keys(fakeXhr.eventListeners).forEach(function (event) {
26021 /*eslint-disable no-loop-func*/
26022 fakeXhr.eventListeners[event].forEach(function (handler) {
26023 xhr.addEventListener(event, handler.listener, {
26024 capture: handler.capture,
26025 once: handler.once
26026 });
26027 });
26028 /*eslint-enable no-loop-func*/
26029 });
26030
26031 xhr.addEventListener("readystatechange", stateChangeEnd);
26032 } else {
26033 xhr.onreadystatechange = stateChange;
26034 }
26035 apply(xhr, "open", xhrArgs);
26036};
26037FakeXMLHttpRequest.useFilters = false;
26038
26039function verifyRequestOpened(xhr) {
26040 if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {
26041 throw new Error("INVALID_STATE_ERR - " + xhr.readyState);
26042 }
26043}
26044
26045function verifyRequestSent(xhr) {
26046 if (xhr.readyState === FakeXMLHttpRequest.DONE) {
26047 throw new Error("Request done");
26048 }
26049}
26050
26051function verifyHeadersReceived(xhr) {
26052 if (xhr.async && xhr.readyState !== FakeXMLHttpRequest.HEADERS_RECEIVED) {
26053 throw new Error("No headers received");
26054 }
26055}
26056
26057function verifyResponseBodyType(body, responseType) {
26058 var error = null;
26059 var isString = typeof body === "string";
26060
26061 if (responseType === "arraybuffer") {
26062
26063 if (!isString && !(body instanceof ArrayBuffer)) {
26064 error = new Error("Attempted to respond to fake XMLHttpRequest with " +
26065 body + ", which is not a string or ArrayBuffer.");
26066 error.name = "InvalidBodyException";
26067 }
26068 }
26069 else if (!isString) {
26070 error = new Error("Attempted to respond to fake XMLHttpRequest with " +
26071 body + ", which is not a string.");
26072 error.name = "InvalidBodyException";
26073 }
26074
26075 if (error) {
26076 throw error;
26077 }
26078}
26079
26080function convertToArrayBuffer(body, encoding) {
26081 if (body instanceof ArrayBuffer) {
26082 return body;
26083 }
26084
26085 return new TextEncoder(encoding || "utf-8").encode(body).buffer;
26086}
26087
26088function isXmlContentType(contentType) {
26089 return !contentType || /(text\/xml)|(application\/xml)|(\+xml)/.test(contentType);
26090}
26091
26092function convertResponseBody(responseType, contentType, body) {
26093 if (responseType === "" || responseType === "text") {
26094 return body;
26095 } else if (supportsArrayBuffer && responseType === "arraybuffer") {
26096 return convertToArrayBuffer(body);
26097 } else if (responseType === "json") {
26098 try {
26099 return JSON.parse(body);
26100 } catch (e) {
26101 // Return parsing failure as null
26102 return null;
26103 }
26104 } else if (supportsBlob && responseType === "blob") {
26105 var blobOptions = {};
26106 if (contentType) {
26107 blobOptions.type = contentType;
26108 }
26109 return new Blob([convertToArrayBuffer(body)], blobOptions);
26110 } else if (responseType === "document") {
26111 if (isXmlContentType(contentType)) {
26112 return FakeXMLHttpRequest.parseXML(body);
26113 }
26114 return null;
26115 }
26116 throw new Error("Invalid responseType " + responseType);
26117}
26118
26119function clearResponse(xhr) {
26120 if (xhr.responseType === "" || xhr.responseType === "text") {
26121 xhr.response = xhr.responseText = "";
26122 } else {
26123 xhr.response = xhr.responseText = null;
26124 }
26125 xhr.responseXML = null;
26126}
26127
26128/**
26129 * Steps to follow when there is an error, according to:
26130 * https://xhr.spec.whatwg.org/#request-error-steps
26131 */
26132function requestErrorSteps(xhr) {
26133 clearResponse(xhr);
26134 xhr.errorFlag = true;
26135 xhr.requestHeaders = {};
26136 xhr.responseHeaders = {};
26137
26138 if (xhr.readyState !== FakeXMLHttpRequest.UNSENT && xhr.sendFlag
26139 && xhr.readyState !== FakeXMLHttpRequest.DONE) {
26140 xhr.readyStateChange(FakeXMLHttpRequest.DONE);
26141 xhr.sendFlag = false;
26142 }
26143}
26144
26145FakeXMLHttpRequest.parseXML = function parseXML(text) {
26146 // Treat empty string as parsing failure
26147 if (text !== "") {
26148 try {
26149 if (typeof DOMParser !== "undefined") {
26150 var parser = new DOMParser();
26151 var parsererrorNS = "";
26152
26153 try {
26154 var parsererrors = parser
26155 .parseFromString("INVALID", "text/xml")
26156 .getElementsByTagName("parsererror");
26157 if (parsererrors.length) {
26158 parsererrorNS = parsererrors[0].namespaceURI;
26159 }
26160 } catch (e) {
26161 // passing invalid XML makes IE11 throw
26162 // so no namespace needs to be determined
26163 }
26164
26165 var result;
26166 try {
26167 result = parser.parseFromString(text, "text/xml");
26168 } catch (err) {
26169 return null;
26170 }
26171
26172 return result.getElementsByTagNameNS(parsererrorNS, "parsererror").length
26173 ? null : result;
26174 }
26175 var xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM");
26176 xmlDoc.async = "false";
26177 xmlDoc.loadXML(text);
26178 return xmlDoc.parseError.errorCode !== 0
26179 ? null : xmlDoc;
26180 } catch (e) {
26181 // Unable to parse XML - no biggie
26182 }
26183 }
26184
26185 return null;
26186};
26187
26188FakeXMLHttpRequest.statusCodes = {
26189 100: "Continue",
26190 101: "Switching Protocols",
26191 200: "OK",
26192 201: "Created",
26193 202: "Accepted",
26194 203: "Non-Authoritative Information",
26195 204: "No Content",
26196 205: "Reset Content",
26197 206: "Partial Content",
26198 207: "Multi-Status",
26199 300: "Multiple Choice",
26200 301: "Moved Permanently",
26201 302: "Found",
26202 303: "See Other",
26203 304: "Not Modified",
26204 305: "Use Proxy",
26205 307: "Temporary Redirect",
26206 400: "Bad Request",
26207 401: "Unauthorized",
26208 402: "Payment Required",
26209 403: "Forbidden",
26210 404: "Not Found",
26211 405: "Method Not Allowed",
26212 406: "Not Acceptable",
26213 407: "Proxy Authentication Required",
26214 408: "Request Timeout",
26215 409: "Conflict",
26216 410: "Gone",
26217 411: "Length Required",
26218 412: "Precondition Failed",
26219 413: "Request Entity Too Large",
26220 414: "Request-URI Too Long",
26221 415: "Unsupported Media Type",
26222 416: "Requested Range Not Satisfiable",
26223 417: "Expectation Failed",
26224 422: "Unprocessable Entity",
26225 500: "Internal Server Error",
26226 501: "Not Implemented",
26227 502: "Bad Gateway",
26228 503: "Service Unavailable",
26229 504: "Gateway Timeout",
26230 505: "HTTP Version Not Supported"
26231};
26232
26233extend(FakeXMLHttpRequest.prototype, sinonEvent.EventTarget, {
26234 async: true,
26235
26236 open: function open(method, url, async, username, password) {
26237 this.method = method;
26238 this.url = url;
26239 this.async = typeof async === "boolean" ? async : true;
26240 this.username = username;
26241 this.password = password;
26242 clearResponse(this);
26243 this.requestHeaders = {};
26244 this.sendFlag = false;
26245
26246 if (FakeXMLHttpRequest.useFilters === true) {
26247 var xhrArgs = arguments;
26248 var defake = FakeXMLHttpRequest.filters.some(function (filter) {
26249 return filter.apply(this, xhrArgs);
26250 });
26251 if (defake) {
26252 FakeXMLHttpRequest.defake(this, arguments);
26253 return;
26254 }
26255 }
26256 this.readyStateChange(FakeXMLHttpRequest.OPENED);
26257 },
26258
26259 readyStateChange: function readyStateChange(state) {
26260 this.readyState = state;
26261
26262 var readyStateChangeEvent = new sinonEvent.Event("readystatechange", false, false, this);
26263 var event, progress;
26264
26265 if (typeof this.onreadystatechange === "function") {
26266 try {
26267 this.onreadystatechange(readyStateChangeEvent);
26268 } catch (e) {
26269 this.logError("Fake XHR onreadystatechange handler", e);
26270 }
26271 }
26272
26273 if (this.readyState === FakeXMLHttpRequest.DONE) {
26274 if (this.timedOut || this.aborted || this.status === 0) {
26275 progress = {loaded: 0, total: 0};
26276 event = (this.timedOut && "timeout") || (this.aborted && "abort") || "error";
26277 } else {
26278 progress = {loaded: 100, total: 100};
26279 event = "load";
26280 }
26281
26282 if (supportsProgress) {
26283 this.upload.dispatchEvent(new sinonEvent.ProgressEvent("progress", progress, this));
26284 this.upload.dispatchEvent(new sinonEvent.ProgressEvent(event, progress, this));
26285 this.upload.dispatchEvent(new sinonEvent.ProgressEvent("loadend", progress, this));
26286 }
26287
26288 this.dispatchEvent(new sinonEvent.ProgressEvent("progress", progress, this));
26289 this.dispatchEvent(new sinonEvent.ProgressEvent(event, progress, this));
26290 this.dispatchEvent(new sinonEvent.ProgressEvent("loadend", progress, this));
26291 }
26292
26293 this.dispatchEvent(readyStateChangeEvent);
26294 },
26295
26296 // Ref https://xhr.spec.whatwg.org/#the-setrequestheader()-method
26297 setRequestHeader: function setRequestHeader(header, value) {
26298 if (typeof value !== "string") {
26299 throw new TypeError("By RFC7230, section 3.2.4, header values should be strings. Got " + typeof value);
26300 }
26301 verifyState(this);
26302
26303 var checkUnsafeHeaders = true;
26304 if (typeof this.unsafeHeadersEnabled === "function") {
26305 checkUnsafeHeaders = this.unsafeHeadersEnabled();
26306 }
26307
26308 if (checkUnsafeHeaders && (getHeader(unsafeHeaders, header) !== null || /^(Sec-|Proxy-)/i.test(header))) {
26309 throw new Error("Refused to set unsafe header \"" + header + "\"");
26310 }
26311
26312 value = normalizeHeaderValue(value);
26313
26314 var existingHeader = getHeader(this.requestHeaders, header);
26315 if (existingHeader) {
26316 this.requestHeaders[existingHeader] += ", " + value;
26317 } else {
26318 this.requestHeaders[header] = value;
26319 }
26320 },
26321
26322 setStatus: function setStatus(status) {
26323 var sanitizedStatus = typeof status === "number" ? status : 200;
26324
26325 verifyRequestOpened(this);
26326 this.status = sanitizedStatus;
26327 this.statusText = FakeXMLHttpRequest.statusCodes[sanitizedStatus];
26328 },
26329
26330 // Helps testing
26331 setResponseHeaders: function setResponseHeaders(headers) {
26332 verifyRequestOpened(this);
26333
26334 var responseHeaders = this.responseHeaders = {};
26335
26336 Object.keys(headers).forEach(function (header) {
26337 responseHeaders[header] = headers[header];
26338 });
26339
26340 if (this.async) {
26341 this.readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);
26342 } else {
26343 this.readyState = FakeXMLHttpRequest.HEADERS_RECEIVED;
26344 }
26345 },
26346
26347 // Currently treats ALL data as a DOMString (i.e. no Document)
26348 send: function send(data) {
26349 verifyState(this);
26350
26351 if (!/^(head)$/i.test(this.method)) {
26352 var contentType = getHeader(this.requestHeaders, "Content-Type");
26353 if (this.requestHeaders[contentType]) {
26354 var value = this.requestHeaders[contentType].split(";");
26355 this.requestHeaders[contentType] = value[0] + ";charset=utf-8";
26356 } else if (supportsFormData && !(data instanceof FormData)) {
26357 this.requestHeaders["Content-Type"] = "text/plain;charset=utf-8";
26358 }
26359
26360 this.requestBody = data;
26361 }
26362
26363 this.errorFlag = false;
26364 this.sendFlag = this.async;
26365 clearResponse(this);
26366 this.readyStateChange(FakeXMLHttpRequest.OPENED);
26367
26368 if (typeof this.onSend === "function") {
26369 this.onSend(this);
26370 }
26371
26372 // Only listen if setInterval and Date are a stubbed.
26373 if (sinonXhr.supportsTimeout && typeof setInterval.clock === "object" && typeof Date.clock === "object") {
26374 var initiatedTime = Date.now();
26375 var self = this;
26376
26377 // Listen to any possible tick by fake timers and check to see if timeout has
26378 // been exceeded. It's important to note that timeout can be changed while a request
26379 // is in flight, so we must check anytime the end user forces a clock tick to make
26380 // sure timeout hasn't changed.
26381 // https://xhr.spec.whatwg.org/#dfnReturnLink-2
26382 var clearIntervalId = setInterval(function () {
26383 // Check if the readyState has been reset or is done. If this is the case, there
26384 // should be no timeout. This will also prevent aborted requests and
26385 // fakeServerWithClock from triggering unnecessary responses.
26386 if (self.readyState === FakeXMLHttpRequest.UNSENT
26387 || self.readyState === FakeXMLHttpRequest.DONE) {
26388 clearInterval(clearIntervalId);
26389 } else if (typeof self.timeout === "number" && self.timeout > 0) {
26390 if (Date.now() >= (initiatedTime + self.timeout)) {
26391 self.triggerTimeout();
26392 clearInterval(clearIntervalId);
26393 }
26394 }
26395 }, 1);
26396 }
26397
26398 this.dispatchEvent(new sinonEvent.Event("loadstart", false, false, this));
26399 },
26400
26401 abort: function abort() {
26402 this.aborted = true;
26403 requestErrorSteps(this);
26404 this.readyState = FakeXMLHttpRequest.UNSENT;
26405 },
26406
26407 error: function () {
26408 clearResponse(this);
26409 this.errorFlag = true;
26410 this.requestHeaders = {};
26411 this.responseHeaders = {};
26412
26413 this.readyStateChange(FakeXMLHttpRequest.DONE);
26414 },
26415
26416 triggerTimeout: function triggerTimeout() {
26417 if (sinonXhr.supportsTimeout) {
26418 this.timedOut = true;
26419 requestErrorSteps(this);
26420 }
26421 },
26422
26423 getResponseHeader: function getResponseHeader(header) {
26424 if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {
26425 return null;
26426 }
26427
26428 if (/^Set-Cookie2?$/i.test(header)) {
26429 return null;
26430 }
26431
26432 header = getHeader(this.responseHeaders, header);
26433
26434 return this.responseHeaders[header] || null;
26435 },
26436
26437 getAllResponseHeaders: function getAllResponseHeaders() {
26438 if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {
26439 return "";
26440 }
26441
26442 var responseHeaders = this.responseHeaders;
26443 var headers = Object.keys(responseHeaders)
26444 .filter(excludeSetCookie2Header)
26445 .reduce(function (prev, header) {
26446 var value = responseHeaders[header];
26447
26448 return prev + (header + ": " + value + "\r\n");
26449 }, "");
26450
26451 return headers;
26452 },
26453
26454 setResponseBody: function setResponseBody(body) {
26455 verifyRequestSent(this);
26456 verifyHeadersReceived(this);
26457 verifyResponseBodyType(body, this.responseType);
26458 var contentType = this.overriddenMimeType || this.getResponseHeader("Content-Type");
26459
26460 var isTextResponse = this.responseType === "" || this.responseType === "text";
26461 clearResponse(this);
26462 if (this.async) {
26463 var chunkSize = this.chunkSize || 10;
26464 var index = 0;
26465
26466 do {
26467 this.readyStateChange(FakeXMLHttpRequest.LOADING);
26468
26469 if (isTextResponse) {
26470 this.responseText = this.response += body.substring(index, index + chunkSize);
26471 }
26472 index += chunkSize;
26473 } while (index < body.length);
26474 }
26475
26476 this.response = convertResponseBody(this.responseType, contentType, body);
26477 if (isTextResponse) {
26478 this.responseText = this.response;
26479 }
26480
26481 if (this.responseType === "document") {
26482 this.responseXML = this.response;
26483 } else if (this.responseType === "" && isXmlContentType(contentType)) {
26484 this.responseXML = FakeXMLHttpRequest.parseXML(this.responseText);
26485 }
26486 this.readyStateChange(FakeXMLHttpRequest.DONE);
26487 },
26488
26489 respond: function respond(status, headers, body) {
26490 this.setStatus(status);
26491 this.setResponseHeaders(headers || {});
26492 this.setResponseBody(body || "");
26493 },
26494
26495 uploadProgress: function uploadProgress(progressEventRaw) {
26496 if (supportsProgress) {
26497 this.upload.dispatchEvent(new sinonEvent.ProgressEvent("progress", progressEventRaw, this.upload));
26498 }
26499 },
26500
26501 downloadProgress: function downloadProgress(progressEventRaw) {
26502 if (supportsProgress) {
26503 this.dispatchEvent(new sinonEvent.ProgressEvent("progress", progressEventRaw, this));
26504 }
26505 },
26506
26507 uploadError: function uploadError(error) {
26508 if (supportsCustomEvent) {
26509 this.upload.dispatchEvent(new sinonEvent.CustomEvent("error", {detail: error}));
26510 }
26511 },
26512
26513 overrideMimeType: function overrideMimeType(type) {
26514 if (this.readyState >= FakeXMLHttpRequest.LOADING) {
26515 throw new Error("INVALID_STATE_ERR");
26516 }
26517 this.overriddenMimeType = type;
26518 }
26519});
26520
26521var states = {
26522 UNSENT: 0,
26523 OPENED: 1,
26524 HEADERS_RECEIVED: 2,
26525 LOADING: 3,
26526 DONE: 4
26527};
26528
26529extend(FakeXMLHttpRequest, states);
26530extend(FakeXMLHttpRequest.prototype, states);
26531
26532function useFakeXMLHttpRequest() {
26533 FakeXMLHttpRequest.restore = function restore(keepOnCreate) {
26534 if (sinonXhr.supportsXHR) {
26535 global.XMLHttpRequest = sinonXhr.GlobalXMLHttpRequest;
26536 }
26537
26538 if (sinonXhr.supportsActiveX) {
26539 global.ActiveXObject = sinonXhr.GlobalActiveXObject;
26540 }
26541
26542 delete FakeXMLHttpRequest.restore;
26543
26544 if (keepOnCreate !== true) {
26545 delete FakeXMLHttpRequest.onCreate;
26546 }
26547 };
26548 if (sinonXhr.supportsXHR) {
26549 global.XMLHttpRequest = FakeXMLHttpRequest;
26550 }
26551
26552 if (sinonXhr.supportsActiveX) {
26553 global.ActiveXObject = function ActiveXObject(objId) {
26554 if (objId === "Microsoft.XMLHTTP" || /^Msxml2\.XMLHTTP/i.test(objId)) {
26555
26556 return new FakeXMLHttpRequest();
26557 }
26558
26559 return new sinonXhr.GlobalActiveXObject(objId);
26560 };
26561 }
26562
26563 return FakeXMLHttpRequest;
26564}
26565
26566module.exports = {
26567 xhr: sinonXhr,
26568 FakeXMLHttpRequest: FakeXMLHttpRequest,
26569 useFakeXMLHttpRequest: useFakeXMLHttpRequest
26570};
26571
26572}).call(this,typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
26573},{"../configure-logger":1,"../event":5,"./blob":10,"@sinonjs/text-encoding":41,"just-extend":45}],12:[function(require,module,exports){
26574
26575module.exports = {
26576 fakeServer: require("./fake-server"),
26577 fakeServerWithClock: require("./fake-server/fake-server-with-clock"),
26578 fakeXhr: require("./fake-xhr")
26579};
26580
26581},{"./fake-server":9,"./fake-server/fake-server-with-clock":7,"./fake-xhr":11}],13:[function(require,module,exports){
26582
26583// This is an `every` implementation that works for all iterables
26584module.exports = function every(obj, fn) {
26585 var pass = true;
26586
26587 try {
26588 /* eslint-disable-next-line local-rules/no-prototype-methods */
26589 obj.forEach(function() {
26590 if (!fn.apply(this, arguments)) {
26591 // Throwing an error is the only way to break `forEach`
26592 throw new Error();
26593 }
26594 });
26595 } catch (e) {
26596 pass = false;
26597 }
26598
26599 return pass;
26600};
26601
26602},{}],14:[function(require,module,exports){
26603
26604module.exports = function functionName(func) {
26605 return (
26606 func.displayName ||
26607 func.name ||
26608 // Use function decomposition as a last resort to get function
26609 // name. Does not rely on function decomposition to work - if it
26610 // doesn't debugging will be slightly less informative
26611 // (i.e. toString will say 'spy' rather than 'myFunc').
26612 (String(func).match(/function ([^\s\(]+)/) || [])[1]
26613 );
26614};
26615
26616},{}],15:[function(require,module,exports){
26617
26618module.exports = {
26619 every: require("./every"),
26620 functionName: require("./function-name"),
26621 prototypes: require("./prototypes"),
26622 typeOf: require("./type-of"),
26623 valueToString: require("./value-to-string")
26624};
26625
26626},{"./every":13,"./function-name":14,"./prototypes":19,"./type-of":22,"./value-to-string":23}],16:[function(require,module,exports){
26627
26628var copyPrototype = require("./copy-prototype");
26629
26630module.exports = copyPrototype(Array.prototype);
26631
26632},{"./copy-prototype":17}],17:[function(require,module,exports){
26633
26634var call = Function.call;
26635
26636module.exports = function copyPrototypeMethods(prototype) {
26637 /* eslint-disable local-rules/no-prototype-methods */
26638 return Object.getOwnPropertyNames(prototype).reduce(function(result, name) {
26639 // ignore size because it throws from Map
26640 if (
26641 name !== "size" &&
26642 name !== "caller" &&
26643 name !== "callee" &&
26644 name !== "arguments" &&
26645 typeof prototype[name] === "function"
26646 ) {
26647 result[name] = call.bind(prototype[name]);
26648 }
26649
26650 return result;
26651 }, Object.create(null));
26652};
26653
26654},{}],18:[function(require,module,exports){
26655
26656var copyPrototype = require("./copy-prototype");
26657
26658module.exports = copyPrototype(Function.prototype);
26659
26660},{"./copy-prototype":17}],19:[function(require,module,exports){
26661
26662module.exports = {
26663 array: require("./array"),
26664 function: require("./function"),
26665 object: require("./object"),
26666 string: require("./string")
26667};
26668
26669},{"./array":16,"./function":18,"./object":20,"./string":21}],20:[function(require,module,exports){
26670
26671var copyPrototype = require("./copy-prototype");
26672
26673module.exports = copyPrototype(Object.prototype);
26674
26675},{"./copy-prototype":17}],21:[function(require,module,exports){
26676
26677var copyPrototype = require("./copy-prototype");
26678
26679module.exports = copyPrototype(String.prototype);
26680
26681},{"./copy-prototype":17}],22:[function(require,module,exports){
26682
26683var type = require("type-detect");
26684
26685module.exports = function typeOf(value) {
26686 return type(value).toLowerCase();
26687};
26688
26689},{"type-detect":49}],23:[function(require,module,exports){
26690
26691function valueToString(value) {
26692 if (value && value.toString) {
26693 /* eslint-disable-next-line local-rules/no-prototype-methods */
26694 return value.toString();
26695 }
26696 return String(value);
26697}
26698
26699module.exports = valueToString;
26700
26701},{}],24:[function(require,module,exports){
26702(function (global){
26703
26704var samsam = require("@sinonjs/samsam");
26705var formatio = {
26706 excludeConstructors: ["Object", /^.$/],
26707 quoteStrings: true,
26708 limitChildrenCount: 0
26709};
26710
26711var specialObjects = [];
26712if (typeof global !== "undefined") {
26713 specialObjects.push({ object: global, value: "[object global]" });
26714}
26715if (typeof document !== "undefined") {
26716 specialObjects.push({
26717 object: document,
26718 value: "[object HTMLDocument]"
26719 });
26720}
26721if (typeof window !== "undefined") {
26722 specialObjects.push({ object: window, value: "[object Window]" });
26723}
26724
26725function functionName(func) {
26726 if (!func) { return ""; }
26727 if (func.displayName) { return func.displayName; }
26728 if (func.name) { return func.name; }
26729 var matches = func.toString().match(/function\s+([^\(]+)/m);
26730 return (matches && matches[1]) || "";
26731}
26732
26733function constructorName(f, object) {
26734 var name = functionName(object && object.constructor);
26735 var excludes = f.excludeConstructors ||
26736 formatio.excludeConstructors || [];
26737
26738 var i, l;
26739 for (i = 0, l = excludes.length; i < l; ++i) {
26740 if (typeof excludes[i] === "string" && excludes[i] === name) {
26741 return "";
26742 } else if (excludes[i].test && excludes[i].test(name)) {
26743 return "";
26744 }
26745 }
26746
26747 return name;
26748}
26749
26750function isCircular(object, objects) {
26751 if (typeof object !== "object") { return false; }
26752 var i, l;
26753 for (i = 0, l = objects.length; i < l; ++i) {
26754 if (objects[i] === object) { return true; }
26755 }
26756 return false;
26757}
26758
26759function ascii(f, object, processed, indent) {
26760 if (typeof object === "string") {
26761 if (object.length === 0) { return "(empty string)"; }
26762 var qs = f.quoteStrings;
26763 var quote = typeof qs !== "boolean" || qs;
26764 return processed || quote ? "\"" + object + "\"" : object;
26765 }
26766
26767 if (typeof object === "function" && !(object instanceof RegExp)) {
26768 return ascii.func(object);
26769 }
26770
26771 processed = processed || [];
26772
26773 if (isCircular(object, processed)) { return "[Circular]"; }
26774
26775 if (Object.prototype.toString.call(object) === "[object Array]") {
26776 return ascii.array.call(f, object, processed);
26777 }
26778
26779 if (!object) { return String((1 / object) === -Infinity ? "-0" : object); }
26780 if (samsam.isElement(object)) { return ascii.element(object); }
26781
26782 if (typeof object.toString === "function" &&
26783 object.toString !== Object.prototype.toString) {
26784 return object.toString();
26785 }
26786
26787 var i, l;
26788 for (i = 0, l = specialObjects.length; i < l; i++) {
26789 if (object === specialObjects[i].object) {
26790 return specialObjects[i].value;
26791 }
26792 }
26793
26794 if (typeof Set !== "undefined" && object instanceof Set) {
26795 return ascii.set.call(f, object, processed);
26796 }
26797
26798 return ascii.object.call(f, object, processed, indent);
26799}
26800
26801ascii.func = function (func) {
26802 return "function " + functionName(func) + "() {}";
26803};
26804
26805function delimit(str, delimiters) {
26806 delimiters = delimiters || ["[", "]"];
26807 return delimiters[0] + str + delimiters[1];
26808}
26809
26810ascii.array = function (array, processed, delimiters) {
26811 processed = processed || [];
26812 processed.push(array);
26813 var pieces = [];
26814 var i, l;
26815 l = (this.limitChildrenCount > 0) ?
26816 Math.min(this.limitChildrenCount, array.length) : array.length;
26817
26818 for (i = 0; i < l; ++i) {
26819 pieces.push(ascii(this, array[i], processed));
26820 }
26821
26822 if (l < array.length) {
26823 pieces.push("[... " + (array.length - l) + " more elements]");
26824 }
26825
26826 return delimit(pieces.join(", "), delimiters);
26827};
26828
26829ascii.set = function (set, processed) {
26830 return ascii.array.call(this, Array.from(set), processed, ["Set {", "}"]);
26831};
26832
26833ascii.object = function (object, processed, indent) {
26834 processed = processed || [];
26835 processed.push(object);
26836 indent = indent || 0;
26837 var pieces = [];
26838 var properties = Object.keys(object).sort();
26839 var length = 3;
26840 var prop, str, obj, i, k, l;
26841 l = (this.limitChildrenCount > 0) ?
26842 Math.min(this.limitChildrenCount, properties.length) : properties.length;
26843
26844 for (i = 0; i < l; ++i) {
26845 prop = properties[i];
26846 obj = object[prop];
26847
26848 if (isCircular(obj, processed)) {
26849 str = "[Circular]";
26850 } else {
26851 str = ascii(this, obj, processed, indent + 2);
26852 }
26853
26854 str = (/\s/.test(prop) ? "\"" + prop + "\"" : prop) + ": " + str;
26855 length += str.length;
26856 pieces.push(str);
26857 }
26858
26859 var cons = constructorName(this, object);
26860 var prefix = cons ? "[" + cons + "] " : "";
26861 var is = "";
26862 for (i = 0, k = indent; i < k; ++i) { is += " "; }
26863
26864 if (l < properties.length)
26865 {pieces.push("[... " + (properties.length - l) + " more elements]");}
26866
26867 if (length + indent > 80) {
26868 return prefix + "{\n " + is + pieces.join(",\n " + is) + "\n" +
26869 is + "}";
26870 }
26871 return prefix + "{ " + pieces.join(", ") + " }";
26872};
26873
26874ascii.element = function (element) {
26875 var tagName = element.tagName.toLowerCase();
26876 var attrs = element.attributes;
26877 var pairs = [];
26878 var attr, attrName, i, l, val;
26879
26880 for (i = 0, l = attrs.length; i < l; ++i) {
26881 attr = attrs.item(i);
26882 attrName = attr.nodeName.toLowerCase().replace("html:", "");
26883 val = attr.nodeValue;
26884 if (attrName !== "contenteditable" || val !== "inherit") {
26885 if (val) { pairs.push(attrName + "=\"" + val + "\""); }
26886 }
26887 }
26888
26889 var formatted = "<" + tagName + (pairs.length > 0 ? " " : "");
26890 // SVG elements have undefined innerHTML
26891 var content = element.innerHTML || "";
26892
26893 if (content.length > 20) {
26894 content = content.substr(0, 20) + "[...]";
26895 }
26896
26897 var res = formatted + pairs.join(" ") + ">" + content +
26898 "</" + tagName + ">";
26899
26900 return res.replace(/ contentEditable="inherit"/, "");
26901};
26902
26903function Formatio(options) {
26904 // eslint-disable-next-line guard-for-in
26905 for (var opt in options) {
26906 this[opt] = options[opt];
26907 }
26908}
26909
26910Formatio.prototype = {
26911 functionName: functionName,
26912
26913 configure: function (options) {
26914 return new Formatio(options);
26915 },
26916
26917 constructorName: function (object) {
26918 return constructorName(this, object);
26919 },
26920
26921 ascii: function (object, processed, indent) {
26922 return ascii(this, object, processed, indent);
26923 }
26924};
26925
26926module.exports = Formatio.prototype;
26927
26928}).call(this,typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
26929},{"@sinonjs/samsam":40}],25:[function(require,module,exports){
26930
26931var getClass = require("./get-class");
26932var identical = require("./identical");
26933var isArguments = require("./is-arguments");
26934var isDate = require("./is-date");
26935var isElement = require("./is-element");
26936var isNaN = require("./is-nan");
26937var isObject = require("./is-object");
26938var isSet = require("./is-set");
26939var isSubset = require("./is-subset");
26940var getClassName = require("./get-class-name");
26941
26942var every = Array.prototype.every;
26943var getTime = Date.prototype.getTime;
26944var hasOwnProperty = Object.prototype.hasOwnProperty;
26945var indexOf = Array.prototype.indexOf;
26946var keys = Object.keys;
26947
26948/**
26949 * @name samsam.deepEqual
26950 * @param Object first
26951 * @param Object second
26952 *
26953 * Deep equal comparison. Two values are "deep equal" if:
26954 *
26955 * - They are equal, according to samsam.identical
26956 * - They are both date objects representing the same time
26957 * - They are both arrays containing elements that are all deepEqual
26958 * - They are objects with the same set of properties, and each property
26959 * in ``first`` is deepEqual to the corresponding property in ``second``
26960 *
26961 * Supports cyclic objects.
26962 */
26963function deepEqualCyclic(first, second, match) {
26964 // used for cyclic comparison
26965 // contain already visited objects
26966 var objects1 = [];
26967 var objects2 = [];
26968 // contain pathes (position in the object structure)
26969 // of the already visited objects
26970 // indexes same as in objects arrays
26971 var paths1 = [];
26972 var paths2 = [];
26973 // contains combinations of already compared objects
26974 // in the manner: { "$1['ref']$2['ref']": true }
26975 var compared = {};
26976
26977 // does the recursion for the deep equal check
26978 return (function deepEqual(obj1, obj2, path1, path2) {
26979 // If both are matchers they must be the same instance in order to be
26980 // considered equal If we didn't do that we would end up running one
26981 // matcher against the other
26982 if (match && match.isMatcher(obj2)) {
26983 if (match.isMatcher(obj1)) {
26984 return obj1 === obj2;
26985 }
26986 return obj2.test(obj1);
26987 }
26988
26989 var type1 = typeof obj1;
26990 var type2 = typeof obj2;
26991
26992 // == null also matches undefined
26993 if (
26994 obj1 === obj2 ||
26995 isNaN(obj1) ||
26996 isNaN(obj2) ||
26997 obj1 == null ||
26998 obj2 == null ||
26999 type1 !== "object" ||
27000 type2 !== "object"
27001 ) {
27002 return identical(obj1, obj2);
27003 }
27004
27005 // Elements are only equal if identical(expected, actual)
27006 if (isElement(obj1) || isElement(obj2)) {
27007 return false;
27008 }
27009
27010 var isDate1 = isDate(obj1);
27011 var isDate2 = isDate(obj2);
27012 if (isDate1 || isDate2) {
27013 if (
27014 !isDate1 ||
27015 !isDate2 ||
27016 getTime.call(obj1) !== getTime.call(obj2)
27017 ) {
27018 return false;
27019 }
27020 }
27021
27022 if (obj1 instanceof RegExp && obj2 instanceof RegExp) {
27023 if (obj1.toString() !== obj2.toString()) {
27024 return false;
27025 }
27026 }
27027
27028 if (obj1 instanceof Error && obj2 instanceof Error) {
27029 if (
27030 obj1.constructor !== obj2.constructor ||
27031 obj1.message !== obj2.message ||
27032 obj1.stack !== obj2.stack
27033 ) {
27034 return false;
27035 }
27036 }
27037
27038 var class1 = getClass(obj1);
27039 var class2 = getClass(obj2);
27040 var keys1 = keys(obj1);
27041 var keys2 = keys(obj2);
27042 var name1 = getClassName(obj1);
27043 var name2 = getClassName(obj2);
27044
27045 if (isArguments(obj1) || isArguments(obj2)) {
27046 if (obj1.length !== obj2.length) {
27047 return false;
27048 }
27049 } else {
27050 if (
27051 type1 !== type2 ||
27052 class1 !== class2 ||
27053 keys1.length !== keys2.length ||
27054 (name1 && name2 && name1 !== name2)
27055 ) {
27056 return false;
27057 }
27058 }
27059
27060 if (isSet(obj1) || isSet(obj2)) {
27061 if (!isSet(obj1) || !isSet(obj2) || obj1.size !== obj2.size) {
27062 return false;
27063 }
27064
27065 return isSubset(obj1, obj2, deepEqual);
27066 }
27067
27068 return every.call(keys1, function(key) {
27069 if (!hasOwnProperty.call(obj2, key)) {
27070 return false;
27071 }
27072
27073 var value1 = obj1[key];
27074 var value2 = obj2[key];
27075 var isObject1 = isObject(value1);
27076 var isObject2 = isObject(value2);
27077 // determines, if the objects were already visited
27078 // (it's faster to check for isObject first, than to
27079 // get -1 from getIndex for non objects)
27080 var index1 = isObject1 ? indexOf.call(objects1, value1) : -1;
27081 var index2 = isObject2 ? indexOf.call(objects2, value2) : -1;
27082 // determines the new paths of the objects
27083 // - for non cyclic objects the current path will be extended
27084 // by current property name
27085 // - for cyclic objects the stored path is taken
27086 var newPath1 =
27087 index1 !== -1
27088 ? paths1[index1]
27089 : path1 + "[" + JSON.stringify(key) + "]";
27090 var newPath2 =
27091 index2 !== -1
27092 ? paths2[index2]
27093 : path2 + "[" + JSON.stringify(key) + "]";
27094 var combinedPath = newPath1 + newPath2;
27095
27096 // stop recursion if current objects are already compared
27097 if (compared[combinedPath]) {
27098 return true;
27099 }
27100
27101 // remember the current objects and their paths
27102 if (index1 === -1 && isObject1) {
27103 objects1.push(value1);
27104 paths1.push(newPath1);
27105 }
27106 if (index2 === -1 && isObject2) {
27107 objects2.push(value2);
27108 paths2.push(newPath2);
27109 }
27110
27111 // remember that the current objects are already compared
27112 if (isObject1 && isObject2) {
27113 compared[combinedPath] = true;
27114 }
27115
27116 // End of cyclic logic
27117
27118 // neither value1 nor value2 is a cycle
27119 // continue with next level
27120 return deepEqual(value1, value2, newPath1, newPath2);
27121 });
27122 })(first, second, "$1", "$2");
27123}
27124
27125deepEqualCyclic.use = function(match) {
27126 return function(a, b) {
27127 return deepEqualCyclic(a, b, match);
27128 };
27129};
27130
27131module.exports = deepEqualCyclic;
27132
27133},{"./get-class":27,"./get-class-name":26,"./identical":28,"./is-arguments":29,"./is-date":30,"./is-element":31,"./is-nan":32,"./is-object":34,"./is-set":35,"./is-subset":36}],26:[function(require,module,exports){
27134
27135var re = /function (\w+)\s*\(/;
27136
27137function getClassName(value) {
27138 if (value.constructor && "name" in value.constructor) {
27139 return value.constructor.name;
27140 }
27141
27142 if (typeof value.constructor === "function") {
27143 var match = value.constructor.toString().match(re);
27144 if (match.length > 1) {
27145 return match[1];
27146 }
27147 }
27148
27149 return null;
27150}
27151
27152module.exports = getClassName;
27153
27154},{}],27:[function(require,module,exports){
27155
27156var o = Object.prototype;
27157
27158function getClass(value) {
27159 // Returns the internal [[Class]] by calling Object.prototype.toString
27160 // with the provided value as this. Return value is a string, naming the
27161 // internal class, e.g. "Array"
27162 return o.toString.call(value).split(/[ \]]/)[1];
27163}
27164
27165module.exports = getClass;
27166
27167},{}],28:[function(require,module,exports){
27168
27169var isNaN = require("./is-nan");
27170var isNegZero = require("./is-neg-zero");
27171
27172/**
27173 * @name samsam.equal
27174 * @param Object obj1
27175 * @param Object obj2
27176 *
27177 * Returns ``true`` if two objects are strictly equal. Compared to
27178 * ``===`` there are two exceptions:
27179 *
27180 * - NaN is considered equal to NaN
27181 * - -0 and +0 are not considered equal
27182 */
27183function identical(obj1, obj2) {
27184 if (obj1 === obj2 || (isNaN(obj1) && isNaN(obj2))) {
27185 return obj1 !== 0 || isNegZero(obj1) === isNegZero(obj2);
27186 }
27187
27188 return false;
27189}
27190
27191module.exports = identical;
27192
27193},{"./is-nan":32,"./is-neg-zero":33}],29:[function(require,module,exports){
27194
27195var getClass = require("./get-class");
27196
27197/**
27198 * @name samsam.isArguments
27199 * @param Object object
27200 *
27201 * Returns ``true`` if ``object`` is an ``arguments`` object,
27202 * ``false`` otherwise.
27203 */
27204function isArguments(object) {
27205 if (getClass(object) === "Arguments") {
27206 return true;
27207 }
27208 if (
27209 typeof object !== "object" ||
27210 typeof object.length !== "number" ||
27211 getClass(object) === "Array"
27212 ) {
27213 return false;
27214 }
27215 if (typeof object.callee === "function") {
27216 return true;
27217 }
27218 try {
27219 object[object.length] = 6;
27220 delete object[object.length];
27221 } catch (e) {
27222 return true;
27223 }
27224 return false;
27225}
27226
27227module.exports = isArguments;
27228
27229},{"./get-class":27}],30:[function(require,module,exports){
27230
27231function isDate(value) {
27232 return value instanceof Date;
27233}
27234
27235module.exports = isDate;
27236
27237},{}],31:[function(require,module,exports){
27238
27239var div = typeof document !== "undefined" && document.createElement("div");
27240
27241/**
27242 * @name samsam.isElement
27243 * @param Object object
27244 *
27245 * Returns ``true`` if ``object`` is a DOM element node. Unlike
27246 * Underscore.js/lodash, this function will return ``false`` if ``object``
27247 * is an *element-like* object, i.e. a regular object with a ``nodeType``
27248 * property that holds the value ``1``.
27249 */
27250function isElement(object) {
27251 if (!object || object.nodeType !== 1 || !div) {
27252 return false;
27253 }
27254 try {
27255 object.appendChild(div);
27256 object.removeChild(div);
27257 } catch (e) {
27258 return false;
27259 }
27260 return true;
27261}
27262
27263module.exports = isElement;
27264
27265},{}],32:[function(require,module,exports){
27266
27267function isNaN(value) {
27268 // Unlike global isNaN, this avoids type coercion
27269 // typeof check avoids IE host object issues, hat tip to
27270 // lodash
27271 var val = value; // JsLint thinks value !== value is "weird"
27272 return typeof value === "number" && value !== val;
27273}
27274
27275module.exports = isNaN;
27276
27277},{}],33:[function(require,module,exports){
27278
27279/**
27280 * @name samsam.isNegZero
27281 * @param Object value
27282 *
27283 * Returns ``true`` if ``value`` is ``-0``.
27284 */
27285function isNegZero(value) {
27286 return value === 0 && 1 / value === -Infinity;
27287}
27288
27289module.exports = isNegZero;
27290
27291},{}],34:[function(require,module,exports){
27292
27293// Returns true when the value is a regular Object and not a specialized Object
27294//
27295// This helps speeding up deepEqual cyclic checks
27296// The premise is that only Objects are stored in the visited array.
27297// So if this function returns false, we don't have to do the
27298// expensive operation of searching for the value in the the array of already
27299// visited objects
27300function isObject(value) {
27301 return (
27302 typeof value === "object" &&
27303 value !== null &&
27304 // none of these are collection objects, so we can return false
27305 !(value instanceof Boolean) &&
27306 !(value instanceof Date) &&
27307 !(value instanceof Error) &&
27308 !(value instanceof Number) &&
27309 !(value instanceof RegExp) &&
27310 !(value instanceof String)
27311 );
27312}
27313
27314module.exports = isObject;
27315
27316},{}],35:[function(require,module,exports){
27317
27318function isSet(val) {
27319 return (typeof Set !== "undefined" && val instanceof Set) || false;
27320}
27321
27322module.exports = isSet;
27323
27324},{}],36:[function(require,module,exports){
27325
27326function isSubset(s1, s2, compare) {
27327 var allContained = true;
27328 s1.forEach(function(v1) {
27329 var includes = false;
27330 s2.forEach(function(v2) {
27331 if (compare(v2, v1)) {
27332 includes = true;
27333 }
27334 });
27335 allContained = allContained && includes;
27336 });
27337
27338 return allContained;
27339}
27340
27341module.exports = isSubset;
27342
27343},{}],37:[function(require,module,exports){
27344
27345var slice = require("@sinonjs/commons").prototypes.string.slice;
27346var typeOf = require("@sinonjs/commons").typeOf;
27347
27348module.exports = function iterableToString(obj) {
27349 var representation = "";
27350
27351 function stringify(item) {
27352 return typeof item === "string" ? "'" + item + "'" : String(item);
27353 }
27354
27355 function mapToString(map) {
27356 /* eslint-disable-next-line local-rules/no-prototype-methods */
27357 map.forEach(function(value, key) {
27358 representation +=
27359 "[" + stringify(key) + "," + stringify(value) + "],";
27360 });
27361
27362 representation = slice(representation, 0, -1);
27363 return representation;
27364 }
27365
27366 function genericIterableToString(iterable) {
27367 /* eslint-disable-next-line local-rules/no-prototype-methods */
27368 iterable.forEach(function(value) {
27369 representation += stringify(value) + ",";
27370 });
27371
27372 representation = slice(representation, 0, -1);
27373 return representation;
27374 }
27375
27376 if (typeOf(obj) === "map") {
27377 return mapToString(obj);
27378 }
27379
27380 return genericIterableToString(obj);
27381};
27382
27383},{"@sinonjs/commons":15}],38:[function(require,module,exports){
27384
27385var deepEqual = require("./deep-equal").use(match); // eslint-disable-line no-use-before-define
27386var getClass = require("./get-class");
27387var isDate = require("./is-date");
27388var isSet = require("./is-set");
27389var isSubset = require("./is-subset");
27390var createMatcher = require("./matcher");
27391
27392function arrayContains(array, subset, compare) {
27393 if (subset.length === 0) {
27394 return true;
27395 }
27396 var i, l, j, k;
27397 for (i = 0, l = array.length; i < l; ++i) {
27398 if (compare(array[i], subset[0])) {
27399 for (j = 0, k = subset.length; j < k; ++j) {
27400 if (i + j >= l) {
27401 return false;
27402 }
27403 if (!compare(array[i + j], subset[j])) {
27404 return false;
27405 }
27406 }
27407 return true;
27408 }
27409 }
27410 return false;
27411}
27412
27413/**
27414 * @name samsam.match
27415 * @param Object object
27416 * @param Object matcher
27417 *
27418 * Compare arbitrary value ``object`` with matcher.
27419 */
27420function match(object, matcher) {
27421 if (matcher && typeof matcher.test === "function") {
27422 return matcher.test(object);
27423 }
27424
27425 if (typeof matcher === "function") {
27426 return matcher(object) === true;
27427 }
27428
27429 if (typeof matcher === "string") {
27430 matcher = matcher.toLowerCase();
27431 var notNull = typeof object === "string" || !!object;
27432 return (
27433 notNull &&
27434 String(object)
27435 .toLowerCase()
27436 .indexOf(matcher) >= 0
27437 );
27438 }
27439
27440 if (typeof matcher === "number") {
27441 return matcher === object;
27442 }
27443
27444 if (typeof matcher === "boolean") {
27445 return matcher === object;
27446 }
27447
27448 if (typeof matcher === "undefined") {
27449 return typeof object === "undefined";
27450 }
27451
27452 if (matcher === null) {
27453 return object === null;
27454 }
27455
27456 if (object === null) {
27457 return false;
27458 }
27459
27460 if (isSet(object)) {
27461 return isSubset(matcher, object, match);
27462 }
27463
27464 if (getClass(object) === "Array" && getClass(matcher) === "Array") {
27465 return arrayContains(object, matcher, match);
27466 }
27467
27468 if (isDate(matcher)) {
27469 return isDate(object) && object.getTime() === matcher.getTime();
27470 }
27471
27472 if (matcher && typeof matcher === "object") {
27473 if (matcher === object) {
27474 return true;
27475 }
27476 if (typeof object !== "object") {
27477 return false;
27478 }
27479 var prop;
27480 // eslint-disable-next-line guard-for-in
27481 for (prop in matcher) {
27482 var value = object[prop];
27483 if (
27484 typeof value === "undefined" &&
27485 typeof object.getAttribute === "function"
27486 ) {
27487 value = object.getAttribute(prop);
27488 }
27489 if (
27490 matcher[prop] === null ||
27491 typeof matcher[prop] === "undefined"
27492 ) {
27493 if (value !== matcher[prop]) {
27494 return false;
27495 }
27496 } else if (
27497 typeof value === "undefined" ||
27498 !deepEqual(value, matcher[prop])
27499 ) {
27500 return false;
27501 }
27502 }
27503 return true;
27504 }
27505
27506 throw new Error(
27507 "Matcher was not a string, a number, a " +
27508 "function, a boolean or an object"
27509 );
27510}
27511
27512Object.keys(createMatcher).forEach(function(key) {
27513 match[key] = createMatcher[key];
27514});
27515
27516module.exports = match;
27517
27518},{"./deep-equal":25,"./get-class":27,"./is-date":30,"./is-set":35,"./is-subset":36,"./matcher":39}],39:[function(require,module,exports){
27519
27520var arrayProto = require("@sinonjs/commons").prototypes.array;
27521var deepEqual = require("./deep-equal").use(match); // eslint-disable-line no-use-before-define
27522var every = require("@sinonjs/commons").every;
27523var functionName = require("@sinonjs/commons").functionName;
27524var get = require("lodash.get");
27525var iterableToString = require("./iterable-to-string");
27526var objectProto = require("@sinonjs/commons").prototypes.object;
27527var stringProto = require("@sinonjs/commons").prototypes.string;
27528var typeOf = require("@sinonjs/commons").typeOf;
27529var valueToString = require("@sinonjs/commons").valueToString;
27530
27531var arrayIndexOf = arrayProto.indexOf;
27532var arrayEvery = arrayProto.every;
27533var join = arrayProto.join;
27534var map = arrayProto.map;
27535var some = arrayProto.some;
27536
27537var hasOwnProperty = objectProto.hasOwnProperty;
27538var isPrototypeOf = objectProto.isPrototypeOf;
27539
27540var stringIndexOf = stringProto.indexOf;
27541
27542function assertType(value, type, name) {
27543 var actual = typeOf(value);
27544 if (actual !== type) {
27545 throw new TypeError(
27546 "Expected type of " +
27547 name +
27548 " to be " +
27549 type +
27550 ", but was " +
27551 actual
27552 );
27553 }
27554}
27555
27556function assertMethodExists(value, method, name, methodPath) {
27557 if (value[method] == null) {
27558 throw new TypeError(
27559 "Expected " + name + " to have method " + methodPath
27560 );
27561 }
27562}
27563
27564var matcher = {
27565 toString: function() {
27566 return this.message;
27567 }
27568};
27569
27570function isMatcher(object) {
27571 return isPrototypeOf(matcher, object);
27572}
27573
27574function matchObject(actual, expectation) {
27575 if (actual === null || actual === undefined) {
27576 return false;
27577 }
27578
27579 return arrayEvery(Object.keys(expectation), function(key) {
27580 var exp = expectation[key];
27581 var act = actual[key];
27582
27583 if (isMatcher(exp)) {
27584 if (!exp.test(act)) {
27585 return false;
27586 }
27587 } else if (typeOf(exp) === "object") {
27588 if (!matchObject(act, exp)) {
27589 return false;
27590 }
27591 } else if (!deepEqual(act, exp)) {
27592 return false;
27593 }
27594
27595 return true;
27596 });
27597}
27598
27599var TYPE_MAP = {
27600 function: function(m, expectation, message) {
27601 m.test = expectation;
27602 m.message = message || "match(" + functionName(expectation) + ")";
27603 },
27604 number: function(m, expectation) {
27605 m.test = function(actual) {
27606 // we need type coercion here
27607 return expectation == actual; // eslint-disable-line eqeqeq
27608 };
27609 },
27610 object: function(m, expectation) {
27611 var array = [];
27612
27613 if (typeof expectation.test === "function") {
27614 m.test = function(actual) {
27615 return expectation.test(actual) === true;
27616 };
27617 m.message = "match(" + functionName(expectation.test) + ")";
27618 return m;
27619 }
27620
27621 array = map(Object.keys(expectation), function(key) {
27622 return key + ": " + valueToString(expectation[key]);
27623 });
27624
27625 m.test = function(actual) {
27626 return matchObject(actual, expectation);
27627 };
27628 m.message = "match(" + join(array, ", ") + ")";
27629
27630 return m;
27631 },
27632 regexp: function(m, expectation) {
27633 m.test = function(actual) {
27634 return typeof actual === "string" && expectation.test(actual);
27635 };
27636 },
27637 string: function(m, expectation) {
27638 m.test = function(actual) {
27639 return (
27640 typeof actual === "string" &&
27641 stringIndexOf(actual, expectation) !== -1
27642 );
27643 };
27644 m.message = 'match("' + expectation + '")';
27645 }
27646};
27647
27648function match(expectation, message) {
27649 var m = Object.create(matcher);
27650 var type = typeOf(expectation);
27651
27652 if (type in TYPE_MAP) {
27653 TYPE_MAP[type](m, expectation, message);
27654 } else {
27655 m.test = function(actual) {
27656 return deepEqual(actual, expectation);
27657 };
27658 }
27659
27660 if (!m.message) {
27661 m.message = "match(" + valueToString(expectation) + ")";
27662 }
27663
27664 return m;
27665}
27666
27667matcher.or = function(m2) {
27668 if (!arguments.length) {
27669 throw new TypeError("Matcher expected");
27670 } else if (!isMatcher(m2)) {
27671 m2 = match(m2);
27672 }
27673 var m1 = this;
27674 var or = Object.create(matcher);
27675 or.test = function(actual) {
27676 return m1.test(actual) || m2.test(actual);
27677 };
27678 or.message = m1.message + ".or(" + m2.message + ")";
27679 return or;
27680};
27681
27682matcher.and = function(m2) {
27683 if (!arguments.length) {
27684 throw new TypeError("Matcher expected");
27685 } else if (!isMatcher(m2)) {
27686 m2 = match(m2);
27687 }
27688 var m1 = this;
27689 var and = Object.create(matcher);
27690 and.test = function(actual) {
27691 return m1.test(actual) && m2.test(actual);
27692 };
27693 and.message = m1.message + ".and(" + m2.message + ")";
27694 return and;
27695};
27696
27697match.isMatcher = isMatcher;
27698
27699match.any = match(function() {
27700 return true;
27701}, "any");
27702
27703match.defined = match(function(actual) {
27704 return actual !== null && actual !== undefined;
27705}, "defined");
27706
27707match.truthy = match(function(actual) {
27708 return !!actual;
27709}, "truthy");
27710
27711match.falsy = match(function(actual) {
27712 return !actual;
27713}, "falsy");
27714
27715match.same = function(expectation) {
27716 return match(function(actual) {
27717 return expectation === actual;
27718 }, "same(" + valueToString(expectation) + ")");
27719};
27720
27721match.in = function(arrayOfExpectations) {
27722 if (!Array.isArray(arrayOfExpectations)) {
27723 throw new TypeError("array expected");
27724 }
27725
27726 return match(function(actual) {
27727 return some(arrayOfExpectations, function(expectation) {
27728 return expectation === actual;
27729 });
27730 }, "in(" + valueToString(arrayOfExpectations) + ")");
27731};
27732
27733match.typeOf = function(type) {
27734 assertType(type, "string", "type");
27735 return match(function(actual) {
27736 return typeOf(actual) === type;
27737 }, 'typeOf("' + type + '")');
27738};
27739
27740match.instanceOf = function(type) {
27741 if (
27742 typeof Symbol === "undefined" ||
27743 typeof Symbol.hasInstance === "undefined"
27744 ) {
27745 assertType(type, "function", "type");
27746 } else {
27747 assertMethodExists(
27748 type,
27749 Symbol.hasInstance,
27750 "type",
27751 "[Symbol.hasInstance]"
27752 );
27753 }
27754 return match(function(actual) {
27755 return actual instanceof type;
27756 }, "instanceOf(" +
27757 (functionName(type) || Object.prototype.toString.call(type)) +
27758 ")");
27759};
27760
27761function createPropertyMatcher(propertyTest, messagePrefix) {
27762 return function(property, value) {
27763 assertType(property, "string", "property");
27764 var onlyProperty = arguments.length === 1;
27765 var message = messagePrefix + '("' + property + '"';
27766 if (!onlyProperty) {
27767 message += ", " + valueToString(value);
27768 }
27769 message += ")";
27770 return match(function(actual) {
27771 if (
27772 actual === undefined ||
27773 actual === null ||
27774 !propertyTest(actual, property)
27775 ) {
27776 return false;
27777 }
27778 return onlyProperty || deepEqual(actual[property], value);
27779 }, message);
27780 };
27781}
27782
27783match.has = createPropertyMatcher(function(actual, property) {
27784 if (typeof actual === "object") {
27785 return property in actual;
27786 }
27787 return actual[property] !== undefined;
27788}, "has");
27789
27790match.hasOwn = createPropertyMatcher(function(actual, property) {
27791 return hasOwnProperty(actual, property);
27792}, "hasOwn");
27793
27794match.hasNested = function(property, value) {
27795 assertType(property, "string", "property");
27796 var onlyProperty = arguments.length === 1;
27797 var message = 'hasNested("' + property + '"';
27798 if (!onlyProperty) {
27799 message += ", " + valueToString(value);
27800 }
27801 message += ")";
27802 return match(function(actual) {
27803 if (
27804 actual === undefined ||
27805 actual === null ||
27806 get(actual, property) === undefined
27807 ) {
27808 return false;
27809 }
27810 return onlyProperty || deepEqual(get(actual, property), value);
27811 }, message);
27812};
27813
27814match.every = function(predicate) {
27815 if (!isMatcher(predicate)) {
27816 throw new TypeError("Matcher expected");
27817 }
27818
27819 return match(function(actual) {
27820 if (typeOf(actual) === "object") {
27821 return every(Object.keys(actual), function(key) {
27822 return predicate.test(actual[key]);
27823 });
27824 }
27825
27826 return (
27827 !!actual &&
27828 typeOf(actual.forEach) === "function" &&
27829 every(actual, function(element) {
27830 return predicate.test(element);
27831 })
27832 );
27833 }, "every(" + predicate.message + ")");
27834};
27835
27836match.some = function(predicate) {
27837 if (!isMatcher(predicate)) {
27838 throw new TypeError("Matcher expected");
27839 }
27840
27841 return match(function(actual) {
27842 if (typeOf(actual) === "object") {
27843 return !every(Object.keys(actual), function(key) {
27844 return !predicate.test(actual[key]);
27845 });
27846 }
27847
27848 return (
27849 !!actual &&
27850 typeOf(actual.forEach) === "function" &&
27851 !every(actual, function(element) {
27852 return !predicate.test(element);
27853 })
27854 );
27855 }, "some(" + predicate.message + ")");
27856};
27857
27858match.array = match.typeOf("array");
27859
27860match.array.deepEquals = function(expectation) {
27861 return match(function(actual) {
27862 // Comparing lengths is the fastest way to spot a difference before iterating through every item
27863 var sameLength = actual.length === expectation.length;
27864 return (
27865 typeOf(actual) === "array" &&
27866 sameLength &&
27867 every(actual, function(element, index) {
27868 return expectation[index] === element;
27869 })
27870 );
27871 }, "deepEquals([" + iterableToString(expectation) + "])");
27872};
27873
27874match.array.startsWith = function(expectation) {
27875 return match(function(actual) {
27876 return (
27877 typeOf(actual) === "array" &&
27878 every(expectation, function(expectedElement, index) {
27879 return actual[index] === expectedElement;
27880 })
27881 );
27882 }, "startsWith([" + iterableToString(expectation) + "])");
27883};
27884
27885match.array.endsWith = function(expectation) {
27886 return match(function(actual) {
27887 // This indicates the index in which we should start matching
27888 var offset = actual.length - expectation.length;
27889
27890 return (
27891 typeOf(actual) === "array" &&
27892 every(expectation, function(expectedElement, index) {
27893 return actual[offset + index] === expectedElement;
27894 })
27895 );
27896 }, "endsWith([" + iterableToString(expectation) + "])");
27897};
27898
27899match.array.contains = function(expectation) {
27900 return match(function(actual) {
27901 return (
27902 typeOf(actual) === "array" &&
27903 every(expectation, function(expectedElement) {
27904 return arrayIndexOf(actual, expectedElement) !== -1;
27905 })
27906 );
27907 }, "contains([" + iterableToString(expectation) + "])");
27908};
27909
27910match.map = match.typeOf("map");
27911
27912match.map.deepEquals = function mapDeepEquals(expectation) {
27913 return match(function(actual) {
27914 // Comparing lengths is the fastest way to spot a difference before iterating through every item
27915 var sameLength = actual.size === expectation.size;
27916 return (
27917 typeOf(actual) === "map" &&
27918 sameLength &&
27919 every(actual, function(element, key) {
27920 return expectation.has(key) && expectation.get(key) === element;
27921 })
27922 );
27923 }, "deepEquals(Map[" + iterableToString(expectation) + "])");
27924};
27925
27926match.map.contains = function mapContains(expectation) {
27927 return match(function(actual) {
27928 return (
27929 typeOf(actual) === "map" &&
27930 every(expectation, function(element, key) {
27931 return actual.has(key) && actual.get(key) === element;
27932 })
27933 );
27934 }, "contains(Map[" + iterableToString(expectation) + "])");
27935};
27936
27937match.set = match.typeOf("set");
27938
27939match.set.deepEquals = function setDeepEquals(expectation) {
27940 return match(function(actual) {
27941 // Comparing lengths is the fastest way to spot a difference before iterating through every item
27942 var sameLength = actual.size === expectation.size;
27943 return (
27944 typeOf(actual) === "set" &&
27945 sameLength &&
27946 every(actual, function(element) {
27947 return expectation.has(element);
27948 })
27949 );
27950 }, "deepEquals(Set[" + iterableToString(expectation) + "])");
27951};
27952
27953match.set.contains = function setContains(expectation) {
27954 return match(function(actual) {
27955 return (
27956 typeOf(actual) === "set" &&
27957 every(expectation, function(element) {
27958 return actual.has(element);
27959 })
27960 );
27961 }, "contains(Set[" + iterableToString(expectation) + "])");
27962};
27963
27964match.bool = match.typeOf("boolean");
27965match.number = match.typeOf("number");
27966match.string = match.typeOf("string");
27967match.object = match.typeOf("object");
27968match.func = match.typeOf("function");
27969match.regexp = match.typeOf("regexp");
27970match.date = match.typeOf("date");
27971match.symbol = match.typeOf("symbol");
27972
27973module.exports = match;
27974
27975},{"./deep-equal":25,"./iterable-to-string":37,"@sinonjs/commons":15,"lodash.get":46}],40:[function(require,module,exports){
27976
27977var identical = require("./identical");
27978var isArguments = require("./is-arguments");
27979var isElement = require("./is-element");
27980var isNegZero = require("./is-neg-zero");
27981var match = require("./match");
27982var deepEqualCyclic = require("./deep-equal").use(match);
27983var createMatcher = require("./matcher");
27984
27985module.exports = {
27986 createMatcher: createMatcher,
27987 deepEqual: deepEqualCyclic,
27988 isArguments: isArguments,
27989 isElement: isElement,
27990 isNegZero: isNegZero,
27991 identical: identical,
27992 match: match
27993};
27994
27995},{"./deep-equal":25,"./identical":28,"./is-arguments":29,"./is-element":31,"./is-neg-zero":33,"./match":38,"./matcher":39}],41:[function(require,module,exports){
27996// This is free and unencumbered software released into the public domain.
27997// See LICENSE.md for more information.
27998
27999var encoding = require("./lib/encoding.js");
28000
28001module.exports = {
28002 TextEncoder: encoding.TextEncoder,
28003 TextDecoder: encoding.TextDecoder,
28004};
28005
28006},{"./lib/encoding.js":43}],42:[function(require,module,exports){
28007(function(global) {
28008
28009 if (typeof module !== "undefined" && module.exports) {
28010 module.exports = global;
28011 }
28012
28013 global["encoding-indexes"] =
28014{
28015 "big5":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,17392,19506,17923,17830,17784,160359,19831,17843,162993,19682,163013,15253,18230,18244,19527,19520,148159,144919,160594,159371,159954,19543,172881,18255,17882,19589,162924,19719,19108,18081,158499,29221,154196,137827,146950,147297,26189,22267,null,32149,22813,166841,15860,38708,162799,23515,138590,23204,13861,171696,23249,23479,23804,26478,34195,170309,29793,29853,14453,138579,145054,155681,16108,153822,15093,31484,40855,147809,166157,143850,133770,143966,17162,33924,40854,37935,18736,34323,22678,38730,37400,31184,31282,26208,27177,34973,29772,31685,26498,31276,21071,36934,13542,29636,155065,29894,40903,22451,18735,21580,16689,145038,22552,31346,162661,35727,18094,159368,16769,155033,31662,140476,40904,140481,140489,140492,40905,34052,144827,16564,40906,17633,175615,25281,28782,40907,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,12736,12737,12738,12739,12740,131340,12741,131281,131277,12742,12743,131275,139240,12744,131274,12745,12746,12747,12748,131342,12749,12750,256,193,461,192,274,201,282,200,332,211,465,210,null,7870,null,7872,202,257,225,462,224,593,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,null,7871,null,7873,234,609,9178,9179,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,172969,135493,null,25866,null,null,20029,28381,40270,37343,null,null,161589,25745,20250,20264,20392,20822,20852,20892,20964,21153,21160,21307,21326,21457,21464,22242,22768,22788,22791,22834,22836,23398,23454,23455,23706,24198,24635,25993,26622,26628,26725,27982,28860,30005,32420,32428,32442,32455,32463,32479,32518,32567,33402,33487,33647,35270,35774,35810,36710,36711,36718,29713,31996,32205,26950,31433,21031,null,null,null,null,37260,30904,37214,32956,null,36107,33014,133607,null,null,32927,40647,19661,40393,40460,19518,171510,159758,40458,172339,13761,null,28314,33342,29977,null,18705,39532,39567,40857,31111,164972,138698,132560,142054,20004,20097,20096,20103,20159,20203,20279,13388,20413,15944,20483,20616,13437,13459,13477,20870,22789,20955,20988,20997,20105,21113,21136,21287,13767,21417,13649,21424,13651,21442,21539,13677,13682,13953,21651,21667,21684,21689,21712,21743,21784,21795,21800,13720,21823,13733,13759,21975,13765,163204,21797,null,134210,134421,151851,21904,142534,14828,131905,36422,150968,169189,16467,164030,30586,142392,14900,18389,164189,158194,151018,25821,134524,135092,134357,135412,25741,36478,134806,134155,135012,142505,164438,148691,null,134470,170573,164073,18420,151207,142530,39602,14951,169460,16365,13574,152263,169940,161992,142660,40302,38933,null,17369,155813,25780,21731,142668,142282,135287,14843,135279,157402,157462,162208,25834,151634,134211,36456,139681,166732,132913,null,18443,131497,16378,22643,142733,null,148936,132348,155799,134988,134550,21881,16571,17338,null,19124,141926,135325,33194,39157,134556,25465,14846,141173,36288,22177,25724,15939,null,173569,134665,142031,142537,null,135368,145858,14738,14854,164507,13688,155209,139463,22098,134961,142514,169760,13500,27709,151099,null,null,161140,142987,139784,173659,167117,134778,134196,157724,32659,135375,141315,141625,13819,152035,134796,135053,134826,16275,134960,134471,135503,134732,null,134827,134057,134472,135360,135485,16377,140950,25650,135085,144372,161337,142286,134526,134527,142417,142421,14872,134808,135367,134958,173618,158544,167122,167321,167114,38314,21708,33476,21945,null,171715,39974,39606,161630,142830,28992,33133,33004,23580,157042,33076,14231,21343,164029,37302,134906,134671,134775,134907,13789,151019,13833,134358,22191,141237,135369,134672,134776,135288,135496,164359,136277,134777,151120,142756,23124,135197,135198,135413,135414,22428,134673,161428,164557,135093,134779,151934,14083,135094,135552,152280,172733,149978,137274,147831,164476,22681,21096,13850,153405,31666,23400,18432,19244,40743,18919,39967,39821,154484,143677,22011,13810,22153,20008,22786,138177,194680,38737,131206,20059,20155,13630,23587,24401,24516,14586,25164,25909,27514,27701,27706,28780,29227,20012,29357,149737,32594,31035,31993,32595,156266,13505,null,156491,32770,32896,157202,158033,21341,34916,35265,161970,35744,36125,38021,38264,38271,38376,167439,38886,39029,39118,39134,39267,170000,40060,40479,40644,27503,63751,20023,131207,38429,25143,38050,null,20539,28158,171123,40870,15817,34959,147790,28791,23797,19232,152013,13657,154928,24866,166450,36775,37366,29073,26393,29626,144001,172295,15499,137600,19216,30948,29698,20910,165647,16393,27235,172730,16931,34319,133743,31274,170311,166634,38741,28749,21284,139390,37876,30425,166371,40871,30685,20131,20464,20668,20015,20247,40872,21556,32139,22674,22736,138678,24210,24217,24514,141074,25995,144377,26905,27203,146531,27903,null,29184,148741,29580,16091,150035,23317,29881,35715,154788,153237,31379,31724,31939,32364,33528,34199,40873,34960,40874,36537,40875,36815,34143,39392,37409,40876,167353,136255,16497,17058,23066,null,null,null,39016,26475,17014,22333,null,34262,149883,33471,160013,19585,159092,23931,158485,159678,40877,40878,23446,40879,26343,32347,28247,31178,15752,17603,143958,141206,17306,17718,null,23765,146202,35577,23672,15634,144721,23928,40882,29015,17752,147692,138787,19575,14712,13386,131492,158785,35532,20404,131641,22975,33132,38998,170234,24379,134047,null,139713,166253,16642,18107,168057,16135,40883,172469,16632,14294,18167,158790,16764,165554,160767,17773,14548,152730,17761,17691,19849,19579,19830,17898,16328,150287,13921,17630,17597,16877,23870,23880,23894,15868,14351,23972,23993,14368,14392,24130,24253,24357,24451,14600,14612,14655,14669,24791,24893,23781,14729,25015,25017,25039,14776,25132,25232,25317,25368,14840,22193,14851,25570,25595,25607,25690,14923,25792,23829,22049,40863,14999,25990,15037,26111,26195,15090,26258,15138,26390,15170,26532,26624,15192,26698,26756,15218,15217,15227,26889,26947,29276,26980,27039,27013,15292,27094,15325,27237,27252,27249,27266,15340,27289,15346,27307,27317,27348,27382,27521,27585,27626,27765,27818,15563,27906,27910,27942,28033,15599,28068,28081,28181,28184,28201,28294,166336,28347,28386,28378,40831,28392,28393,28452,28468,15686,147265,28545,28606,15722,15733,29111,23705,15754,28716,15761,28752,28756,28783,28799,28809,131877,17345,13809,134872,147159,22462,159443,28990,153568,13902,27042,166889,23412,31305,153825,169177,31333,31357,154028,31419,31408,31426,31427,29137,156813,16842,31450,31453,31466,16879,21682,154625,31499,31573,31529,152334,154878,31650,31599,33692,154548,158847,31696,33825,31634,31672,154912,15789,154725,33938,31738,31750,31797,154817,31812,31875,149634,31910,26237,148856,31945,31943,31974,31860,31987,31989,31950,32359,17693,159300,32093,159446,29837,32137,32171,28981,32179,32210,147543,155689,32228,15635,32245,137209,32229,164717,32285,155937,155994,32366,32402,17195,37996,32295,32576,32577,32583,31030,156368,39393,32663,156497,32675,136801,131176,17756,145254,17667,164666,32762,156809,32773,32776,32797,32808,32815,172167,158915,32827,32828,32865,141076,18825,157222,146915,157416,26405,32935,166472,33031,33050,22704,141046,27775,156824,151480,25831,136330,33304,137310,27219,150117,150165,17530,33321,133901,158290,146814,20473,136445,34018,33634,158474,149927,144688,137075,146936,33450,26907,194964,16859,34123,33488,33562,134678,137140,14017,143741,144730,33403,33506,33560,147083,159139,158469,158615,144846,15807,33565,21996,33669,17675,159141,33708,33729,33747,13438,159444,27223,34138,13462,159298,143087,33880,154596,33905,15827,17636,27303,33866,146613,31064,33960,158614,159351,159299,34014,33807,33681,17568,33939,34020,154769,16960,154816,17731,34100,23282,159385,17703,34163,17686,26559,34326,165413,165435,34241,159880,34306,136578,159949,194994,17770,34344,13896,137378,21495,160666,34430,34673,172280,34798,142375,34737,34778,34831,22113,34412,26710,17935,34885,34886,161248,146873,161252,34910,34972,18011,34996,34997,25537,35013,30583,161551,35207,35210,35238,35241,35239,35260,166437,35303,162084,162493,35484,30611,37374,35472,162393,31465,162618,147343,18195,162616,29052,35596,35615,152624,152933,35647,35660,35661,35497,150138,35728,35739,35503,136927,17941,34895,35995,163156,163215,195028,14117,163155,36054,163224,163261,36114,36099,137488,36059,28764,36113,150729,16080,36215,36265,163842,135188,149898,15228,164284,160012,31463,36525,36534,36547,37588,36633,36653,164709,164882,36773,37635,172703,133712,36787,18730,166366,165181,146875,24312,143970,36857,172052,165564,165121,140069,14720,159447,36919,165180,162494,36961,165228,165387,37032,165651,37060,165606,37038,37117,37223,15088,37289,37316,31916,166195,138889,37390,27807,37441,37474,153017,37561,166598,146587,166668,153051,134449,37676,37739,166625,166891,28815,23235,166626,166629,18789,37444,166892,166969,166911,37747,37979,36540,38277,38310,37926,38304,28662,17081,140922,165592,135804,146990,18911,27676,38523,38550,16748,38563,159445,25050,38582,30965,166624,38589,21452,18849,158904,131700,156688,168111,168165,150225,137493,144138,38705,34370,38710,18959,17725,17797,150249,28789,23361,38683,38748,168405,38743,23370,168427,38751,37925,20688,143543,143548,38793,38815,38833,38846,38848,38866,38880,152684,38894,29724,169011,38911,38901,168989,162170,19153,38964,38963,38987,39014,15118,160117,15697,132656,147804,153350,39114,39095,39112,39111,19199,159015,136915,21936,39137,39142,39148,37752,39225,150057,19314,170071,170245,39413,39436,39483,39440,39512,153381,14020,168113,170965,39648,39650,170757,39668,19470,39700,39725,165376,20532,39732,158120,14531,143485,39760,39744,171326,23109,137315,39822,148043,39938,39935,39948,171624,40404,171959,172434,172459,172257,172323,172511,40318,40323,172340,40462,26760,40388,139611,172435,172576,137531,172595,40249,172217,172724,40592,40597,40606,40610,19764,40618,40623,148324,40641,15200,14821,15645,20274,14270,166955,40706,40712,19350,37924,159138,40727,40726,40761,22175,22154,40773,39352,168075,38898,33919,40802,40809,31452,40846,29206,19390,149877,149947,29047,150008,148296,150097,29598,166874,137466,31135,166270,167478,37737,37875,166468,37612,37761,37835,166252,148665,29207,16107,30578,31299,28880,148595,148472,29054,137199,28835,137406,144793,16071,137349,152623,137208,14114,136955,137273,14049,137076,137425,155467,14115,136896,22363,150053,136190,135848,136134,136374,34051,145062,34051,33877,149908,160101,146993,152924,147195,159826,17652,145134,170397,159526,26617,14131,15381,15847,22636,137506,26640,16471,145215,147681,147595,147727,158753,21707,22174,157361,22162,135135,134056,134669,37830,166675,37788,20216,20779,14361,148534,20156,132197,131967,20299,20362,153169,23144,131499,132043,14745,131850,132116,13365,20265,131776,167603,131701,35546,131596,20120,20685,20749,20386,20227,150030,147082,20290,20526,20588,20609,20428,20453,20568,20732,20825,20827,20829,20830,28278,144789,147001,147135,28018,137348,147081,20904,20931,132576,17629,132259,132242,132241,36218,166556,132878,21081,21156,133235,21217,37742,18042,29068,148364,134176,149932,135396,27089,134685,29817,16094,29849,29716,29782,29592,19342,150204,147597,21456,13700,29199,147657,21940,131909,21709,134086,22301,37469,38644,37734,22493,22413,22399,13886,22731,23193,166470,136954,137071,136976,23084,22968,37519,23166,23247,23058,153926,137715,137313,148117,14069,27909,29763,23073,155267,23169,166871,132115,37856,29836,135939,28933,18802,37896,166395,37821,14240,23582,23710,24158,24136,137622,137596,146158,24269,23375,137475,137476,14081,137376,14045,136958,14035,33066,166471,138682,144498,166312,24332,24334,137511,137131,23147,137019,23364,34324,161277,34912,24702,141408,140843,24539,16056,140719,140734,168072,159603,25024,131134,131142,140827,24985,24984,24693,142491,142599,149204,168269,25713,149093,142186,14889,142114,144464,170218,142968,25399,173147,25782,25393,25553,149987,142695,25252,142497,25659,25963,26994,15348,143502,144045,149897,144043,21773,144096,137433,169023,26318,144009,143795,15072,16784,152964,166690,152975,136956,152923,152613,30958,143619,137258,143924,13412,143887,143746,148169,26254,159012,26219,19347,26160,161904,138731,26211,144082,144097,26142,153714,14545,145466,145340,15257,145314,144382,29904,15254,26511,149034,26806,26654,15300,27326,14435,145365,148615,27187,27218,27337,27397,137490,25873,26776,27212,15319,27258,27479,147392,146586,37792,37618,166890,166603,37513,163870,166364,37991,28069,28427,149996,28007,147327,15759,28164,147516,23101,28170,22599,27940,30786,28987,148250,148086,28913,29264,29319,29332,149391,149285,20857,150180,132587,29818,147192,144991,150090,149783,155617,16134,16049,150239,166947,147253,24743,16115,29900,29756,37767,29751,17567,159210,17745,30083,16227,150745,150790,16216,30037,30323,173510,15129,29800,166604,149931,149902,15099,15821,150094,16127,149957,149747,37370,22322,37698,166627,137316,20703,152097,152039,30584,143922,30478,30479,30587,149143,145281,14942,149744,29752,29851,16063,150202,150215,16584,150166,156078,37639,152961,30750,30861,30856,30930,29648,31065,161601,153315,16654,31131,33942,31141,27181,147194,31290,31220,16750,136934,16690,37429,31217,134476,149900,131737,146874,137070,13719,21867,13680,13994,131540,134157,31458,23129,141045,154287,154268,23053,131675,30960,23082,154566,31486,16889,31837,31853,16913,154547,155324,155302,31949,150009,137136,31886,31868,31918,27314,32220,32263,32211,32590,156257,155996,162632,32151,155266,17002,158581,133398,26582,131150,144847,22468,156690,156664,149858,32733,31527,133164,154345,154947,31500,155150,39398,34373,39523,27164,144447,14818,150007,157101,39455,157088,33920,160039,158929,17642,33079,17410,32966,33033,33090,157620,39107,158274,33378,33381,158289,33875,159143,34320,160283,23174,16767,137280,23339,137377,23268,137432,34464,195004,146831,34861,160802,23042,34926,20293,34951,35007,35046,35173,35149,153219,35156,161669,161668,166901,166873,166812,166393,16045,33955,18165,18127,14322,35389,35356,169032,24397,37419,148100,26068,28969,28868,137285,40301,35999,36073,163292,22938,30659,23024,17262,14036,36394,36519,150537,36656,36682,17140,27736,28603,140065,18587,28537,28299,137178,39913,14005,149807,37051,37015,21873,18694,37307,37892,166475,16482,166652,37927,166941,166971,34021,35371,38297,38311,38295,38294,167220,29765,16066,149759,150082,148458,16103,143909,38543,167655,167526,167525,16076,149997,150136,147438,29714,29803,16124,38721,168112,26695,18973,168083,153567,38749,37736,166281,166950,166703,156606,37562,23313,35689,18748,29689,147995,38811,38769,39224,134950,24001,166853,150194,38943,169178,37622,169431,37349,17600,166736,150119,166756,39132,166469,16128,37418,18725,33812,39227,39245,162566,15869,39323,19311,39338,39516,166757,153800,27279,39457,23294,39471,170225,19344,170312,39356,19389,19351,37757,22642,135938,22562,149944,136424,30788,141087,146872,26821,15741,37976,14631,24912,141185,141675,24839,40015,40019,40059,39989,39952,39807,39887,171565,39839,172533,172286,40225,19630,147716,40472,19632,40204,172468,172269,172275,170287,40357,33981,159250,159711,158594,34300,17715,159140,159364,159216,33824,34286,159232,145367,155748,31202,144796,144960,18733,149982,15714,37851,37566,37704,131775,30905,37495,37965,20452,13376,36964,152925,30781,30804,30902,30795,137047,143817,149825,13978,20338,28634,28633,28702,28702,21524,147893,22459,22771,22410,40214,22487,28980,13487,147884,29163,158784,151447,23336,137141,166473,24844,23246,23051,17084,148616,14124,19323,166396,37819,37816,137430,134941,33906,158912,136211,148218,142374,148417,22932,146871,157505,32168,155995,155812,149945,149899,166394,37605,29666,16105,29876,166755,137375,16097,150195,27352,29683,29691,16086,150078,150164,137177,150118,132007,136228,149989,29768,149782,28837,149878,37508,29670,37727,132350,37681,166606,166422,37766,166887,153045,18741,166530,29035,149827,134399,22180,132634,134123,134328,21762,31172,137210,32254,136898,150096,137298,17710,37889,14090,166592,149933,22960,137407,137347,160900,23201,14050,146779,14000,37471,23161,166529,137314,37748,15565,133812,19094,14730,20724,15721,15692,136092,29045,17147,164376,28175,168164,17643,27991,163407,28775,27823,15574,147437,146989,28162,28428,15727,132085,30033,14012,13512,18048,16090,18545,22980,37486,18750,36673,166940,158656,22546,22472,14038,136274,28926,148322,150129,143331,135856,140221,26809,26983,136088,144613,162804,145119,166531,145366,144378,150687,27162,145069,158903,33854,17631,17614,159014,159057,158850,159710,28439,160009,33597,137018,33773,158848,159827,137179,22921,23170,137139,23137,23153,137477,147964,14125,23023,137020,14023,29070,37776,26266,148133,23150,23083,148115,27179,147193,161590,148571,148170,28957,148057,166369,20400,159016,23746,148686,163405,148413,27148,148054,135940,28838,28979,148457,15781,27871,194597,150095,32357,23019,23855,15859,24412,150109,137183,32164,33830,21637,146170,144128,131604,22398,133333,132633,16357,139166,172726,28675,168283,23920,29583,31955,166489,168992,20424,32743,29389,29456,162548,29496,29497,153334,29505,29512,16041,162584,36972,29173,149746,29665,33270,16074,30476,16081,27810,22269,29721,29726,29727,16098,16112,16116,16122,29907,16142,16211,30018,30061,30066,30093,16252,30152,30172,16320,30285,16343,30324,16348,30330,151388,29064,22051,35200,22633,16413,30531,16441,26465,16453,13787,30616,16490,16495,23646,30654,30667,22770,30744,28857,30748,16552,30777,30791,30801,30822,33864,152885,31027,26627,31026,16643,16649,31121,31129,36795,31238,36796,16743,31377,16818,31420,33401,16836,31439,31451,16847,20001,31586,31596,31611,31762,31771,16992,17018,31867,31900,17036,31928,17044,31981,36755,28864,134351,32207,32212,32208,32253,32686,32692,29343,17303,32800,32805,31545,32814,32817,32852,15820,22452,28832,32951,33001,17389,33036,29482,33038,33042,30048,33044,17409,15161,33110,33113,33114,17427,22586,33148,33156,17445,33171,17453,33189,22511,33217,33252,33364,17551,33446,33398,33482,33496,33535,17584,33623,38505,27018,33797,28917,33892,24803,33928,17668,33982,34017,34040,34064,34104,34130,17723,34159,34160,34272,17783,34418,34450,34482,34543,38469,34699,17926,17943,34990,35071,35108,35143,35217,162151,35369,35384,35476,35508,35921,36052,36082,36124,18328,22623,36291,18413,20206,36410,21976,22356,36465,22005,36528,18487,36558,36578,36580,36589,36594,36791,36801,36810,36812,36915,39364,18605,39136,37395,18718,37416,37464,37483,37553,37550,37567,37603,37611,37619,37620,37629,37699,37764,37805,18757,18769,40639,37911,21249,37917,37933,37950,18794,37972,38009,38189,38306,18855,38388,38451,18917,26528,18980,38720,18997,38834,38850,22100,19172,24808,39097,19225,39153,22596,39182,39193,20916,39196,39223,39234,39261,39266,19312,39365,19357,39484,39695,31363,39785,39809,39901,39921,39924,19565,39968,14191,138178,40265,39994,40702,22096,40339,40381,40384,40444,38134,36790,40571,40620,40625,40637,40646,38108,40674,40689,40696,31432,40772,131220,131767,132000,26906,38083,22956,132311,22592,38081,14265,132565,132629,132726,136890,22359,29043,133826,133837,134079,21610,194619,134091,21662,134139,134203,134227,134245,134268,24807,134285,22138,134325,134365,134381,134511,134578,134600,26965,39983,34725,134660,134670,134871,135056,134957,134771,23584,135100,24075,135260,135247,135286,26398,135291,135304,135318,13895,135359,135379,135471,135483,21348,33965,135907,136053,135990,35713,136567,136729,137155,137159,20088,28859,137261,137578,137773,137797,138282,138352,138412,138952,25283,138965,139029,29080,26709,139333,27113,14024,139900,140247,140282,141098,141425,141647,33533,141671,141715,142037,35237,142056,36768,142094,38840,142143,38983,39613,142412,null,142472,142519,154600,142600,142610,142775,142741,142914,143220,143308,143411,143462,144159,144350,24497,26184,26303,162425,144743,144883,29185,149946,30679,144922,145174,32391,131910,22709,26382,26904,146087,161367,155618,146961,147129,161278,139418,18640,19128,147737,166554,148206,148237,147515,148276,148374,150085,132554,20946,132625,22943,138920,15294,146687,148484,148694,22408,149108,14747,149295,165352,170441,14178,139715,35678,166734,39382,149522,149755,150037,29193,150208,134264,22885,151205,151430,132985,36570,151596,21135,22335,29041,152217,152601,147274,150183,21948,152646,152686,158546,37332,13427,152895,161330,152926,18200,152930,152934,153543,149823,153693,20582,13563,144332,24798,153859,18300,166216,154286,154505,154630,138640,22433,29009,28598,155906,162834,36950,156082,151450,35682,156674,156746,23899,158711,36662,156804,137500,35562,150006,156808,147439,156946,19392,157119,157365,141083,37989,153569,24981,23079,194765,20411,22201,148769,157436,20074,149812,38486,28047,158909,13848,35191,157593,157806,156689,157790,29151,157895,31554,168128,133649,157990,37124,158009,31301,40432,158202,39462,158253,13919,156777,131105,31107,158260,158555,23852,144665,33743,158621,18128,158884,30011,34917,159150,22710,14108,140685,159819,160205,15444,160384,160389,37505,139642,160395,37680,160486,149968,27705,38047,160848,134904,34855,35061,141606,164979,137137,28344,150058,137248,14756,14009,23568,31203,17727,26294,171181,170148,35139,161740,161880,22230,16607,136714,14753,145199,164072,136133,29101,33638,162269,168360,23143,19639,159919,166315,162301,162314,162571,163174,147834,31555,31102,163849,28597,172767,27139,164632,21410,159239,37823,26678,38749,164207,163875,158133,136173,143919,163912,23941,166960,163971,22293,38947,166217,23979,149896,26046,27093,21458,150181,147329,15377,26422,163984,164084,164142,139169,164175,164233,164271,164378,164614,164655,164746,13770,164968,165546,18682,25574,166230,30728,37461,166328,17394,166375,17375,166376,166726,166868,23032,166921,36619,167877,168172,31569,168208,168252,15863,168286,150218,36816,29327,22155,169191,169449,169392,169400,169778,170193,170313,170346,170435,170536,170766,171354,171419,32415,171768,171811,19620,38215,172691,29090,172799,19857,36882,173515,19868,134300,36798,21953,36794,140464,36793,150163,17673,32383,28502,27313,20202,13540,166700,161949,14138,36480,137205,163876,166764,166809,162366,157359,15851,161365,146615,153141,153942,20122,155265,156248,22207,134765,36366,23405,147080,150686,25566,25296,137206,137339,25904,22061,154698,21530,152337,15814,171416,19581,22050,22046,32585,155352,22901,146752,34672,19996,135146,134473,145082,33047,40286,36120,30267,40005,30286,30649,37701,21554,33096,33527,22053,33074,33816,32957,21994,31074,22083,21526,134813,13774,22021,22001,26353,164578,13869,30004,22000,21946,21655,21874,134209,134294,24272,151880,134774,142434,134818,40619,32090,21982,135285,25245,38765,21652,36045,29174,37238,25596,25529,25598,21865,142147,40050,143027,20890,13535,134567,20903,21581,21790,21779,30310,36397,157834,30129,32950,34820,34694,35015,33206,33820,135361,17644,29444,149254,23440,33547,157843,22139,141044,163119,147875,163187,159440,160438,37232,135641,37384,146684,173737,134828,134905,29286,138402,18254,151490,163833,135147,16634,40029,25887,142752,18675,149472,171388,135148,134666,24674,161187,135149,null,155720,135559,29091,32398,40272,19994,19972,13687,23309,27826,21351,13996,14812,21373,13989,149016,22682,150382,33325,21579,22442,154261,133497,null,14930,140389,29556,171692,19721,39917,146686,171824,19547,151465,169374,171998,33884,146870,160434,157619,145184,25390,32037,147191,146988,14890,36872,21196,15988,13946,17897,132238,30272,23280,134838,30842,163630,22695,16575,22140,39819,23924,30292,173108,40581,19681,30201,14331,24857,143578,148466,null,22109,135849,22439,149859,171526,21044,159918,13741,27722,40316,31830,39737,22494,137068,23635,25811,169168,156469,160100,34477,134440,159010,150242,134513,null,20990,139023,23950,38659,138705,40577,36940,31519,39682,23761,31651,25192,25397,39679,31695,39722,31870,39726,31810,31878,39957,31740,39689,40727,39963,149822,40794,21875,23491,20477,40600,20466,21088,15878,21201,22375,20566,22967,24082,38856,40363,36700,21609,38836,39232,38842,21292,24880,26924,21466,39946,40194,19515,38465,27008,20646,30022,137069,39386,21107,null,37209,38529,37212,null,37201,167575,25471,159011,27338,22033,37262,30074,25221,132092,29519,31856,154657,146685,null,149785,30422,39837,20010,134356,33726,34882,null,23626,27072,20717,22394,21023,24053,20174,27697,131570,20281,21660,21722,21146,36226,13822,24332,13811,null,27474,37244,40869,39831,38958,39092,39610,40616,40580,29050,31508,null,27642,34840,32632,null,22048,173642,36471,40787,null,36308,36431,40476,36353,25218,164733,36392,36469,31443,150135,31294,30936,27882,35431,30215,166490,40742,27854,34774,30147,172722,30803,194624,36108,29410,29553,35629,29442,29937,36075,150203,34351,24506,34976,17591,null,137275,159237,null,35454,140571,null,24829,30311,39639,40260,37742,39823,34805,null,34831,36087,29484,38689,39856,13782,29362,19463,31825,39242,155993,24921,19460,40598,24957,null,22367,24943,25254,25145,25294,14940,25058,21418,144373,25444,26626,13778,23895,166850,36826,167481,null,20697,138566,30982,21298,38456,134971,16485,null,30718,null,31938,155418,31962,31277,32870,32867,32077,29957,29938,35220,33306,26380,32866,160902,32859,29936,33027,30500,35209,157644,30035,159441,34729,34766,33224,34700,35401,36013,35651,30507,29944,34010,13877,27058,36262,null,35241,29800,28089,34753,147473,29927,15835,29046,24740,24988,15569,29026,24695,null,32625,166701,29264,24809,19326,21024,15384,146631,155351,161366,152881,137540,135934,170243,159196,159917,23745,156077,166415,145015,131310,157766,151310,17762,23327,156492,40784,40614,156267,12288,65292,12289,12290,65294,8231,65307,65306,65311,65281,65072,8230,8229,65104,65105,65106,183,65108,65109,65110,65111,65372,8211,65073,8212,65075,9588,65076,65103,65288,65289,65077,65078,65371,65373,65079,65080,12308,12309,65081,65082,12304,12305,65083,65084,12298,12299,65085,65086,12296,12297,65087,65088,12300,12301,65089,65090,12302,12303,65091,65092,65113,65114,65115,65116,65117,65118,8216,8217,8220,8221,12317,12318,8245,8242,65283,65286,65290,8251,167,12291,9675,9679,9651,9650,9678,9734,9733,9671,9670,9633,9632,9661,9660,12963,8453,175,65507,65343,717,65097,65098,65101,65102,65099,65100,65119,65120,65121,65291,65293,215,247,177,8730,65308,65310,65309,8806,8807,8800,8734,8786,8801,65122,65123,65124,65125,65126,65374,8745,8746,8869,8736,8735,8895,13266,13265,8747,8750,8757,8756,9792,9794,8853,8857,8593,8595,8592,8594,8598,8599,8601,8600,8741,8739,65295,65340,8725,65128,65284,65509,12306,65504,65505,65285,65312,8451,8457,65129,65130,65131,13269,13212,13213,13214,13262,13217,13198,13199,13252,176,20825,20827,20830,20829,20833,20835,21991,29929,31950,9601,9602,9603,9604,9605,9606,9607,9608,9615,9614,9613,9612,9611,9610,9609,9532,9524,9516,9508,9500,9620,9472,9474,9621,9484,9488,9492,9496,9581,9582,9584,9583,9552,9566,9578,9569,9698,9699,9701,9700,9585,9586,9587,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,12321,12322,12323,12324,12325,12326,12327,12328,12329,21313,21316,21317,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,729,713,714,711,715,9216,9217,9218,9219,9220,9221,9222,9223,9224,9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240,9241,9242,9243,9244,9245,9246,9247,9249,8364,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19968,20057,19969,19971,20035,20061,20102,20108,20154,20799,20837,20843,20960,20992,20993,21147,21269,21313,21340,21448,19977,19979,19976,19978,20011,20024,20961,20037,20040,20063,20062,20110,20129,20800,20995,21242,21315,21449,21475,22303,22763,22805,22823,22899,23376,23377,23379,23544,23567,23586,23608,23665,24029,24037,24049,24050,24051,24062,24178,24318,24331,24339,25165,19985,19984,19981,20013,20016,20025,20043,23609,20104,20113,20117,20114,20116,20130,20161,20160,20163,20166,20167,20173,20170,20171,20164,20803,20801,20839,20845,20846,20844,20887,20982,20998,20999,21000,21243,21246,21247,21270,21305,21320,21319,21317,21342,21380,21451,21450,21453,22764,22825,22827,22826,22829,23380,23569,23588,23610,23663,24052,24187,24319,24340,24341,24515,25096,25142,25163,25166,25903,25991,26007,26020,26041,26085,26352,26376,26408,27424,27490,27513,27595,27604,27611,27663,27700,28779,29226,29238,29243,29255,29273,29275,29356,29579,19993,19990,19989,19988,19992,20027,20045,20047,20046,20197,20184,20180,20181,20182,20183,20195,20196,20185,20190,20805,20804,20873,20874,20908,20985,20986,20984,21002,21152,21151,21253,21254,21271,21277,20191,21322,21321,21345,21344,21359,21358,21435,21487,21476,21491,21484,21486,21481,21480,21500,21496,21493,21483,21478,21482,21490,21489,21488,21477,21485,21499,22235,22234,22806,22830,22833,22900,22902,23381,23427,23612,24040,24039,24038,24066,24067,24179,24188,24321,24344,24343,24517,25098,25171,25172,25170,25169,26021,26086,26414,26412,26410,26411,26413,27491,27597,27665,27664,27704,27713,27712,27710,29359,29572,29577,29916,29926,29976,29983,29992,29993,30000,30001,30002,30003,30091,30333,30382,30399,30446,30683,30690,30707,31034,31166,31348,31435,19998,19999,20050,20051,20073,20121,20132,20134,20133,20223,20233,20249,20234,20245,20237,20240,20241,20239,20210,20214,20219,20208,20211,20221,20225,20235,20809,20807,20806,20808,20840,20849,20877,20912,21015,21009,21010,21006,21014,21155,21256,21281,21280,21360,21361,21513,21519,21516,21514,21520,21505,21515,21508,21521,21517,21512,21507,21518,21510,21522,22240,22238,22237,22323,22320,22312,22317,22316,22319,22313,22809,22810,22839,22840,22916,22904,22915,22909,22905,22914,22913,23383,23384,23431,23432,23429,23433,23546,23574,23673,24030,24070,24182,24180,24335,24347,24537,24534,25102,25100,25101,25104,25187,25179,25176,25910,26089,26088,26092,26093,26354,26355,26377,26429,26420,26417,26421,27425,27492,27515,27670,27741,27735,27737,27743,27744,27728,27733,27745,27739,27725,27726,28784,29279,29277,30334,31481,31859,31992,32566,32650,32701,32769,32771,32780,32786,32819,32895,32905,32907,32908,33251,33258,33267,33276,33292,33307,33311,33390,33394,33406,34411,34880,34892,34915,35199,38433,20018,20136,20301,20303,20295,20311,20318,20276,20315,20309,20272,20304,20305,20285,20282,20280,20291,20308,20284,20294,20323,20316,20320,20271,20302,20278,20313,20317,20296,20314,20812,20811,20813,20853,20918,20919,21029,21028,21033,21034,21032,21163,21161,21162,21164,21283,21363,21365,21533,21549,21534,21566,21542,21582,21543,21574,21571,21555,21576,21570,21531,21545,21578,21561,21563,21560,21550,21557,21558,21536,21564,21568,21553,21547,21535,21548,22250,22256,22244,22251,22346,22353,22336,22349,22343,22350,22334,22352,22351,22331,22767,22846,22941,22930,22952,22942,22947,22937,22934,22925,22948,22931,22922,22949,23389,23388,23386,23387,23436,23435,23439,23596,23616,23617,23615,23614,23696,23697,23700,23692,24043,24076,24207,24199,24202,24311,24324,24351,24420,24418,24439,24441,24536,24524,24535,24525,24561,24555,24568,24554,25106,25105,25220,25239,25238,25216,25206,25225,25197,25226,25212,25214,25209,25203,25234,25199,25240,25198,25237,25235,25233,25222,25913,25915,25912,26097,26356,26463,26446,26447,26448,26449,26460,26454,26462,26441,26438,26464,26451,26455,27493,27599,27714,27742,27801,27777,27784,27785,27781,27803,27754,27770,27792,27760,27788,27752,27798,27794,27773,27779,27762,27774,27764,27782,27766,27789,27796,27800,27778,28790,28796,28797,28792,29282,29281,29280,29380,29378,29590,29996,29995,30007,30008,30338,30447,30691,31169,31168,31167,31350,31995,32597,32918,32915,32925,32920,32923,32922,32946,33391,33426,33419,33421,35211,35282,35328,35895,35910,35925,35997,36196,36208,36275,36523,36554,36763,36784,36802,36806,36805,36804,24033,37009,37026,37034,37030,37027,37193,37318,37324,38450,38446,38449,38442,38444,20006,20054,20083,20107,20123,20126,20139,20140,20335,20381,20365,20339,20351,20332,20379,20363,20358,20355,20336,20341,20360,20329,20347,20374,20350,20367,20369,20346,20820,20818,20821,20841,20855,20854,20856,20925,20989,21051,21048,21047,21050,21040,21038,21046,21057,21182,21179,21330,21332,21331,21329,21350,21367,21368,21369,21462,21460,21463,21619,21621,21654,21624,21653,21632,21627,21623,21636,21650,21638,21628,21648,21617,21622,21644,21658,21602,21608,21643,21629,21646,22266,22403,22391,22378,22377,22369,22374,22372,22396,22812,22857,22855,22856,22852,22868,22974,22971,22996,22969,22958,22993,22982,22992,22989,22987,22995,22986,22959,22963,22994,22981,23391,23396,23395,23447,23450,23448,23452,23449,23451,23578,23624,23621,23622,23735,23713,23736,23721,23723,23729,23731,24088,24090,24086,24085,24091,24081,24184,24218,24215,24220,24213,24214,24310,24358,24359,24361,24448,24449,24447,24444,24541,24544,24573,24565,24575,24591,24596,24623,24629,24598,24618,24597,24609,24615,24617,24619,24603,25110,25109,25151,25150,25152,25215,25289,25292,25284,25279,25282,25273,25298,25307,25259,25299,25300,25291,25288,25256,25277,25276,25296,25305,25287,25293,25269,25306,25265,25304,25302,25303,25286,25260,25294,25918,26023,26044,26106,26132,26131,26124,26118,26114,26126,26112,26127,26133,26122,26119,26381,26379,26477,26507,26517,26481,26524,26483,26487,26503,26525,26519,26479,26480,26495,26505,26494,26512,26485,26522,26515,26492,26474,26482,27427,27494,27495,27519,27667,27675,27875,27880,27891,27825,27852,27877,27827,27837,27838,27836,27874,27819,27861,27859,27832,27844,27833,27841,27822,27863,27845,27889,27839,27835,27873,27867,27850,27820,27887,27868,27862,27872,28821,28814,28818,28810,28825,29228,29229,29240,29256,29287,29289,29376,29390,29401,29399,29392,29609,29608,29599,29611,29605,30013,30109,30105,30106,30340,30402,30450,30452,30693,30717,31038,31040,31041,31177,31176,31354,31353,31482,31998,32596,32652,32651,32773,32954,32933,32930,32945,32929,32939,32937,32948,32938,32943,33253,33278,33293,33459,33437,33433,33453,33469,33439,33465,33457,33452,33445,33455,33464,33443,33456,33470,33463,34382,34417,21021,34920,36555,36814,36820,36817,37045,37048,37041,37046,37319,37329,38263,38272,38428,38464,38463,38459,38468,38466,38585,38632,38738,38750,20127,20141,20142,20449,20405,20399,20415,20448,20433,20431,20445,20419,20406,20440,20447,20426,20439,20398,20432,20420,20418,20442,20430,20446,20407,20823,20882,20881,20896,21070,21059,21066,21069,21068,21067,21063,21191,21193,21187,21185,21261,21335,21371,21402,21467,21676,21696,21672,21710,21705,21688,21670,21683,21703,21698,21693,21674,21697,21700,21704,21679,21675,21681,21691,21673,21671,21695,22271,22402,22411,22432,22435,22434,22478,22446,22419,22869,22865,22863,22862,22864,23004,23000,23039,23011,23016,23043,23013,23018,23002,23014,23041,23035,23401,23459,23462,23460,23458,23461,23553,23630,23631,23629,23627,23769,23762,24055,24093,24101,24095,24189,24224,24230,24314,24328,24365,24421,24456,24453,24458,24459,24455,24460,24457,24594,24605,24608,24613,24590,24616,24653,24688,24680,24674,24646,24643,24684,24683,24682,24676,25153,25308,25366,25353,25340,25325,25345,25326,25341,25351,25329,25335,25327,25324,25342,25332,25361,25346,25919,25925,26027,26045,26082,26149,26157,26144,26151,26159,26143,26152,26161,26148,26359,26623,26579,26609,26580,26576,26604,26550,26543,26613,26601,26607,26564,26577,26548,26586,26597,26552,26575,26590,26611,26544,26585,26594,26589,26578,27498,27523,27526,27573,27602,27607,27679,27849,27915,27954,27946,27969,27941,27916,27953,27934,27927,27963,27965,27966,27958,27931,27893,27961,27943,27960,27945,27950,27957,27918,27947,28843,28858,28851,28844,28847,28845,28856,28846,28836,29232,29298,29295,29300,29417,29408,29409,29623,29642,29627,29618,29645,29632,29619,29978,29997,30031,30028,30030,30027,30123,30116,30117,30114,30115,30328,30342,30343,30344,30408,30406,30403,30405,30465,30457,30456,30473,30475,30462,30460,30471,30684,30722,30740,30732,30733,31046,31049,31048,31047,31161,31162,31185,31186,31179,31359,31361,31487,31485,31869,32002,32005,32000,32009,32007,32004,32006,32568,32654,32703,32772,32784,32781,32785,32822,32982,32997,32986,32963,32964,32972,32993,32987,32974,32990,32996,32989,33268,33314,33511,33539,33541,33507,33499,33510,33540,33509,33538,33545,33490,33495,33521,33537,33500,33492,33489,33502,33491,33503,33519,33542,34384,34425,34427,34426,34893,34923,35201,35284,35336,35330,35331,35998,36000,36212,36211,36276,36557,36556,36848,36838,36834,36842,36837,36845,36843,36836,36840,37066,37070,37057,37059,37195,37194,37325,38274,38480,38475,38476,38477,38754,38761,38859,38893,38899,38913,39080,39131,39135,39318,39321,20056,20147,20492,20493,20515,20463,20518,20517,20472,20521,20502,20486,20540,20511,20506,20498,20497,20474,20480,20500,20520,20465,20513,20491,20505,20504,20467,20462,20525,20522,20478,20523,20489,20860,20900,20901,20898,20941,20940,20934,20939,21078,21084,21076,21083,21085,21290,21375,21407,21405,21471,21736,21776,21761,21815,21756,21733,21746,21766,21754,21780,21737,21741,21729,21769,21742,21738,21734,21799,21767,21757,21775,22275,22276,22466,22484,22475,22467,22537,22799,22871,22872,22874,23057,23064,23068,23071,23067,23059,23020,23072,23075,23081,23077,23052,23049,23403,23640,23472,23475,23478,23476,23470,23477,23481,23480,23556,23633,23637,23632,23789,23805,23803,23786,23784,23792,23798,23809,23796,24046,24109,24107,24235,24237,24231,24369,24466,24465,24464,24665,24675,24677,24656,24661,24685,24681,24687,24708,24735,24730,24717,24724,24716,24709,24726,25159,25331,25352,25343,25422,25406,25391,25429,25410,25414,25423,25417,25402,25424,25405,25386,25387,25384,25421,25420,25928,25929,26009,26049,26053,26178,26185,26191,26179,26194,26188,26181,26177,26360,26388,26389,26391,26657,26680,26696,26694,26707,26681,26690,26708,26665,26803,26647,26700,26705,26685,26612,26704,26688,26684,26691,26666,26693,26643,26648,26689,27530,27529,27575,27683,27687,27688,27686,27684,27888,28010,28053,28040,28039,28006,28024,28023,27993,28051,28012,28041,28014,27994,28020,28009,28044,28042,28025,28037,28005,28052,28874,28888,28900,28889,28872,28879,29241,29305,29436,29433,29437,29432,29431,29574,29677,29705,29678,29664,29674,29662,30036,30045,30044,30042,30041,30142,30149,30151,30130,30131,30141,30140,30137,30146,30136,30347,30384,30410,30413,30414,30505,30495,30496,30504,30697,30768,30759,30776,30749,30772,30775,30757,30765,30752,30751,30770,31061,31056,31072,31071,31062,31070,31069,31063,31066,31204,31203,31207,31199,31206,31209,31192,31364,31368,31449,31494,31505,31881,32033,32023,32011,32010,32032,32034,32020,32016,32021,32026,32028,32013,32025,32027,32570,32607,32660,32709,32705,32774,32792,32789,32793,32791,32829,32831,33009,33026,33008,33029,33005,33012,33030,33016,33011,33032,33021,33034,33020,33007,33261,33260,33280,33296,33322,33323,33320,33324,33467,33579,33618,33620,33610,33592,33616,33609,33589,33588,33615,33586,33593,33590,33559,33600,33585,33576,33603,34388,34442,34474,34451,34468,34473,34444,34467,34460,34928,34935,34945,34946,34941,34937,35352,35344,35342,35340,35349,35338,35351,35347,35350,35343,35345,35912,35962,35961,36001,36002,36215,36524,36562,36564,36559,36785,36865,36870,36855,36864,36858,36852,36867,36861,36869,36856,37013,37089,37085,37090,37202,37197,37196,37336,37341,37335,37340,37337,38275,38498,38499,38497,38491,38493,38500,38488,38494,38587,39138,39340,39592,39640,39717,39730,39740,20094,20602,20605,20572,20551,20547,20556,20570,20553,20581,20598,20558,20565,20597,20596,20599,20559,20495,20591,20589,20828,20885,20976,21098,21103,21202,21209,21208,21205,21264,21263,21273,21311,21312,21310,21443,26364,21830,21866,21862,21828,21854,21857,21827,21834,21809,21846,21839,21845,21807,21860,21816,21806,21852,21804,21859,21811,21825,21847,22280,22283,22281,22495,22533,22538,22534,22496,22500,22522,22530,22581,22519,22521,22816,22882,23094,23105,23113,23142,23146,23104,23100,23138,23130,23110,23114,23408,23495,23493,23492,23490,23487,23494,23561,23560,23559,23648,23644,23645,23815,23814,23822,23835,23830,23842,23825,23849,23828,23833,23844,23847,23831,24034,24120,24118,24115,24119,24247,24248,24246,24245,24254,24373,24375,24407,24428,24425,24427,24471,24473,24478,24472,24481,24480,24476,24703,24739,24713,24736,24744,24779,24756,24806,24765,24773,24763,24757,24796,24764,24792,24789,24774,24799,24760,24794,24775,25114,25115,25160,25504,25511,25458,25494,25506,25509,25463,25447,25496,25514,25457,25513,25481,25475,25499,25451,25512,25476,25480,25497,25505,25516,25490,25487,25472,25467,25449,25448,25466,25949,25942,25937,25945,25943,21855,25935,25944,25941,25940,26012,26011,26028,26063,26059,26060,26062,26205,26202,26212,26216,26214,26206,26361,21207,26395,26753,26799,26786,26771,26805,26751,26742,26801,26791,26775,26800,26755,26820,26797,26758,26757,26772,26781,26792,26783,26785,26754,27442,27578,27627,27628,27691,28046,28092,28147,28121,28082,28129,28108,28132,28155,28154,28165,28103,28107,28079,28113,28078,28126,28153,28088,28151,28149,28101,28114,28186,28085,28122,28139,28120,28138,28145,28142,28136,28102,28100,28074,28140,28095,28134,28921,28937,28938,28925,28911,29245,29309,29313,29468,29467,29462,29459,29465,29575,29701,29706,29699,29702,29694,29709,29920,29942,29943,29980,29986,30053,30054,30050,30064,30095,30164,30165,30133,30154,30157,30350,30420,30418,30427,30519,30526,30524,30518,30520,30522,30827,30787,30798,31077,31080,31085,31227,31378,31381,31520,31528,31515,31532,31526,31513,31518,31534,31890,31895,31893,32070,32067,32113,32046,32057,32060,32064,32048,32051,32068,32047,32066,32050,32049,32573,32670,32666,32716,32718,32722,32796,32842,32838,33071,33046,33059,33067,33065,33072,33060,33282,33333,33335,33334,33337,33678,33694,33688,33656,33698,33686,33725,33707,33682,33674,33683,33673,33696,33655,33659,33660,33670,33703,34389,24426,34503,34496,34486,34500,34485,34502,34507,34481,34479,34505,34899,34974,34952,34987,34962,34966,34957,34955,35219,35215,35370,35357,35363,35365,35377,35373,35359,35355,35362,35913,35930,36009,36012,36011,36008,36010,36007,36199,36198,36286,36282,36571,36575,36889,36877,36890,36887,36899,36895,36893,36880,36885,36894,36896,36879,36898,36886,36891,36884,37096,37101,37117,37207,37326,37365,37350,37347,37351,37357,37353,38281,38506,38517,38515,38520,38512,38516,38518,38519,38508,38592,38634,38633,31456,31455,38914,38915,39770,40165,40565,40575,40613,40635,20642,20621,20613,20633,20625,20608,20630,20632,20634,26368,20977,21106,21108,21109,21097,21214,21213,21211,21338,21413,21883,21888,21927,21884,21898,21917,21912,21890,21916,21930,21908,21895,21899,21891,21939,21934,21919,21822,21938,21914,21947,21932,21937,21886,21897,21931,21913,22285,22575,22570,22580,22564,22576,22577,22561,22557,22560,22777,22778,22880,23159,23194,23167,23186,23195,23207,23411,23409,23506,23500,23507,23504,23562,23563,23601,23884,23888,23860,23879,24061,24133,24125,24128,24131,24190,24266,24257,24258,24260,24380,24429,24489,24490,24488,24785,24801,24754,24758,24800,24860,24867,24826,24853,24816,24827,24820,24936,24817,24846,24822,24841,24832,24850,25119,25161,25507,25484,25551,25536,25577,25545,25542,25549,25554,25571,25552,25569,25558,25581,25582,25462,25588,25578,25563,25682,25562,25593,25950,25958,25954,25955,26001,26000,26031,26222,26224,26228,26230,26223,26257,26234,26238,26231,26366,26367,26399,26397,26874,26837,26848,26840,26839,26885,26847,26869,26862,26855,26873,26834,26866,26851,26827,26829,26893,26898,26894,26825,26842,26990,26875,27454,27450,27453,27544,27542,27580,27631,27694,27695,27692,28207,28216,28244,28193,28210,28263,28234,28192,28197,28195,28187,28251,28248,28196,28246,28270,28205,28198,28271,28212,28237,28218,28204,28227,28189,28222,28363,28297,28185,28238,28259,28228,28274,28265,28255,28953,28954,28966,28976,28961,28982,29038,28956,29260,29316,29312,29494,29477,29492,29481,29754,29738,29747,29730,29733,29749,29750,29748,29743,29723,29734,29736,29989,29990,30059,30058,30178,30171,30179,30169,30168,30174,30176,30331,30332,30358,30355,30388,30428,30543,30701,30813,30828,30831,31245,31240,31243,31237,31232,31384,31383,31382,31461,31459,31561,31574,31558,31568,31570,31572,31565,31563,31567,31569,31903,31909,32094,32080,32104,32085,32043,32110,32114,32097,32102,32098,32112,32115,21892,32724,32725,32779,32850,32901,33109,33108,33099,33105,33102,33081,33094,33086,33100,33107,33140,33298,33308,33769,33795,33784,33805,33760,33733,33803,33729,33775,33777,33780,33879,33802,33776,33804,33740,33789,33778,33738,33848,33806,33796,33756,33799,33748,33759,34395,34527,34521,34541,34516,34523,34532,34512,34526,34903,35009,35010,34993,35203,35222,35387,35424,35413,35422,35388,35393,35412,35419,35408,35398,35380,35386,35382,35414,35937,35970,36015,36028,36019,36029,36033,36027,36032,36020,36023,36022,36031,36024,36234,36229,36225,36302,36317,36299,36314,36305,36300,36315,36294,36603,36600,36604,36764,36910,36917,36913,36920,36914,36918,37122,37109,37129,37118,37219,37221,37327,37396,37397,37411,37385,37406,37389,37392,37383,37393,38292,38287,38283,38289,38291,38290,38286,38538,38542,38539,38525,38533,38534,38541,38514,38532,38593,38597,38596,38598,38599,38639,38642,38860,38917,38918,38920,39143,39146,39151,39145,39154,39149,39342,39341,40643,40653,40657,20098,20653,20661,20658,20659,20677,20670,20652,20663,20667,20655,20679,21119,21111,21117,21215,21222,21220,21218,21219,21295,21983,21992,21971,21990,21966,21980,21959,21969,21987,21988,21999,21978,21985,21957,21958,21989,21961,22290,22291,22622,22609,22616,22615,22618,22612,22635,22604,22637,22602,22626,22610,22603,22887,23233,23241,23244,23230,23229,23228,23219,23234,23218,23913,23919,24140,24185,24265,24264,24338,24409,24492,24494,24858,24847,24904,24863,24819,24859,24825,24833,24840,24910,24908,24900,24909,24894,24884,24871,24845,24838,24887,25121,25122,25619,25662,25630,25642,25645,25661,25644,25615,25628,25620,25613,25654,25622,25623,25606,25964,26015,26032,26263,26249,26247,26248,26262,26244,26264,26253,26371,27028,26989,26970,26999,26976,26964,26997,26928,27010,26954,26984,26987,26974,26963,27001,27014,26973,26979,26971,27463,27506,27584,27583,27603,27645,28322,28335,28371,28342,28354,28304,28317,28359,28357,28325,28312,28348,28346,28331,28369,28310,28316,28356,28372,28330,28327,28340,29006,29017,29033,29028,29001,29031,29020,29036,29030,29004,29029,29022,28998,29032,29014,29242,29266,29495,29509,29503,29502,29807,29786,29781,29791,29790,29761,29759,29785,29787,29788,30070,30072,30208,30192,30209,30194,30193,30202,30207,30196,30195,30430,30431,30555,30571,30566,30558,30563,30585,30570,30572,30556,30565,30568,30562,30702,30862,30896,30871,30872,30860,30857,30844,30865,30867,30847,31098,31103,31105,33836,31165,31260,31258,31264,31252,31263,31262,31391,31392,31607,31680,31584,31598,31591,31921,31923,31925,32147,32121,32145,32129,32143,32091,32622,32617,32618,32626,32681,32680,32676,32854,32856,32902,32900,33137,33136,33144,33125,33134,33139,33131,33145,33146,33126,33285,33351,33922,33911,33853,33841,33909,33894,33899,33865,33900,33883,33852,33845,33889,33891,33897,33901,33862,34398,34396,34399,34553,34579,34568,34567,34560,34558,34555,34562,34563,34566,34570,34905,35039,35028,35033,35036,35032,35037,35041,35018,35029,35026,35228,35299,35435,35442,35443,35430,35433,35440,35463,35452,35427,35488,35441,35461,35437,35426,35438,35436,35449,35451,35390,35432,35938,35978,35977,36042,36039,36040,36036,36018,36035,36034,36037,36321,36319,36328,36335,36339,36346,36330,36324,36326,36530,36611,36617,36606,36618,36767,36786,36939,36938,36947,36930,36948,36924,36949,36944,36935,36943,36942,36941,36945,36926,36929,37138,37143,37228,37226,37225,37321,37431,37463,37432,37437,37440,37438,37467,37451,37476,37457,37428,37449,37453,37445,37433,37439,37466,38296,38552,38548,38549,38605,38603,38601,38602,38647,38651,38649,38646,38742,38772,38774,38928,38929,38931,38922,38930,38924,39164,39156,39165,39166,39347,39345,39348,39649,40169,40578,40718,40723,40736,20711,20718,20709,20694,20717,20698,20693,20687,20689,20721,20686,20713,20834,20979,21123,21122,21297,21421,22014,22016,22043,22039,22013,22036,22022,22025,22029,22030,22007,22038,22047,22024,22032,22006,22296,22294,22645,22654,22659,22675,22666,22649,22661,22653,22781,22821,22818,22820,22890,22889,23265,23270,23273,23255,23254,23256,23267,23413,23518,23527,23521,23525,23526,23528,23522,23524,23519,23565,23650,23940,23943,24155,24163,24149,24151,24148,24275,24278,24330,24390,24432,24505,24903,24895,24907,24951,24930,24931,24927,24922,24920,24949,25130,25735,25688,25684,25764,25720,25695,25722,25681,25703,25652,25709,25723,25970,26017,26071,26070,26274,26280,26269,27036,27048,27029,27073,27054,27091,27083,27035,27063,27067,27051,27060,27088,27085,27053,27084,27046,27075,27043,27465,27468,27699,28467,28436,28414,28435,28404,28457,28478,28448,28460,28431,28418,28450,28415,28399,28422,28465,28472,28466,28451,28437,28459,28463,28552,28458,28396,28417,28402,28364,28407,29076,29081,29053,29066,29060,29074,29246,29330,29334,29508,29520,29796,29795,29802,29808,29805,29956,30097,30247,30221,30219,30217,30227,30433,30435,30596,30589,30591,30561,30913,30879,30887,30899,30889,30883,31118,31119,31117,31278,31281,31402,31401,31469,31471,31649,31637,31627,31605,31639,31645,31636,31631,31672,31623,31620,31929,31933,31934,32187,32176,32156,32189,32190,32160,32202,32180,32178,32177,32186,32162,32191,32181,32184,32173,32210,32199,32172,32624,32736,32737,32735,32862,32858,32903,33104,33152,33167,33160,33162,33151,33154,33255,33274,33287,33300,33310,33355,33993,33983,33990,33988,33945,33950,33970,33948,33995,33976,33984,34003,33936,33980,34001,33994,34623,34588,34619,34594,34597,34612,34584,34645,34615,34601,35059,35074,35060,35065,35064,35069,35048,35098,35055,35494,35468,35486,35491,35469,35489,35475,35492,35498,35493,35496,35480,35473,35482,35495,35946,35981,35980,36051,36049,36050,36203,36249,36245,36348,36628,36626,36629,36627,36771,36960,36952,36956,36963,36953,36958,36962,36957,36955,37145,37144,37150,37237,37240,37239,37236,37496,37504,37509,37528,37526,37499,37523,37532,37544,37500,37521,38305,38312,38313,38307,38309,38308,38553,38556,38555,38604,38610,38656,38780,38789,38902,38935,38936,39087,39089,39171,39173,39180,39177,39361,39599,39600,39654,39745,39746,40180,40182,40179,40636,40763,40778,20740,20736,20731,20725,20729,20738,20744,20745,20741,20956,21127,21128,21129,21133,21130,21232,21426,22062,22075,22073,22066,22079,22068,22057,22099,22094,22103,22132,22070,22063,22064,22656,22687,22686,22707,22684,22702,22697,22694,22893,23305,23291,23307,23285,23308,23304,23534,23532,23529,23531,23652,23653,23965,23956,24162,24159,24161,24290,24282,24287,24285,24291,24288,24392,24433,24503,24501,24950,24935,24942,24925,24917,24962,24956,24944,24939,24958,24999,24976,25003,24974,25004,24986,24996,24980,25006,25134,25705,25711,25721,25758,25778,25736,25744,25776,25765,25747,25749,25769,25746,25774,25773,25771,25754,25772,25753,25762,25779,25973,25975,25976,26286,26283,26292,26289,27171,27167,27112,27137,27166,27161,27133,27169,27155,27146,27123,27138,27141,27117,27153,27472,27470,27556,27589,27590,28479,28540,28548,28497,28518,28500,28550,28525,28507,28536,28526,28558,28538,28528,28516,28567,28504,28373,28527,28512,28511,29087,29100,29105,29096,29270,29339,29518,29527,29801,29835,29827,29822,29824,30079,30240,30249,30239,30244,30246,30241,30242,30362,30394,30436,30606,30599,30604,30609,30603,30923,30917,30906,30922,30910,30933,30908,30928,31295,31292,31296,31293,31287,31291,31407,31406,31661,31665,31684,31668,31686,31687,31681,31648,31692,31946,32224,32244,32239,32251,32216,32236,32221,32232,32227,32218,32222,32233,32158,32217,32242,32249,32629,32631,32687,32745,32806,33179,33180,33181,33184,33178,33176,34071,34109,34074,34030,34092,34093,34067,34065,34083,34081,34068,34028,34085,34047,34054,34690,34676,34678,34656,34662,34680,34664,34649,34647,34636,34643,34907,34909,35088,35079,35090,35091,35093,35082,35516,35538,35527,35524,35477,35531,35576,35506,35529,35522,35519,35504,35542,35533,35510,35513,35547,35916,35918,35948,36064,36062,36070,36068,36076,36077,36066,36067,36060,36074,36065,36205,36255,36259,36395,36368,36381,36386,36367,36393,36383,36385,36382,36538,36637,36635,36639,36649,36646,36650,36636,36638,36645,36969,36974,36968,36973,36983,37168,37165,37159,37169,37255,37257,37259,37251,37573,37563,37559,37610,37548,37604,37569,37555,37564,37586,37575,37616,37554,38317,38321,38660,38662,38663,38665,38752,38797,38795,38799,38945,38955,38940,39091,39178,39187,39186,39192,39389,39376,39391,39387,39377,39381,39378,39385,39607,39662,39663,39719,39749,39748,39799,39791,40198,40201,40195,40617,40638,40654,22696,40786,20754,20760,20756,20752,20757,20864,20906,20957,21137,21139,21235,22105,22123,22137,22121,22116,22136,22122,22120,22117,22129,22127,22124,22114,22134,22721,22718,22727,22725,22894,23325,23348,23416,23536,23566,24394,25010,24977,25001,24970,25037,25014,25022,25034,25032,25136,25797,25793,25803,25787,25788,25818,25796,25799,25794,25805,25791,25810,25812,25790,25972,26310,26313,26297,26308,26311,26296,27197,27192,27194,27225,27243,27224,27193,27204,27234,27233,27211,27207,27189,27231,27208,27481,27511,27653,28610,28593,28577,28611,28580,28609,28583,28595,28608,28601,28598,28582,28576,28596,29118,29129,29136,29138,29128,29141,29113,29134,29145,29148,29123,29124,29544,29852,29859,29848,29855,29854,29922,29964,29965,30260,30264,30266,30439,30437,30624,30622,30623,30629,30952,30938,30956,30951,31142,31309,31310,31302,31308,31307,31418,31705,31761,31689,31716,31707,31713,31721,31718,31957,31958,32266,32273,32264,32283,32291,32286,32285,32265,32272,32633,32690,32752,32753,32750,32808,33203,33193,33192,33275,33288,33368,33369,34122,34137,34120,34152,34153,34115,34121,34157,34154,34142,34691,34719,34718,34722,34701,34913,35114,35122,35109,35115,35105,35242,35238,35558,35578,35563,35569,35584,35548,35559,35566,35582,35585,35586,35575,35565,35571,35574,35580,35947,35949,35987,36084,36420,36401,36404,36418,36409,36405,36667,36655,36664,36659,36776,36774,36981,36980,36984,36978,36988,36986,37172,37266,37664,37686,37624,37683,37679,37666,37628,37675,37636,37658,37648,37670,37665,37653,37678,37657,38331,38567,38568,38570,38613,38670,38673,38678,38669,38675,38671,38747,38748,38758,38808,38960,38968,38971,38967,38957,38969,38948,39184,39208,39198,39195,39201,39194,39405,39394,39409,39608,39612,39675,39661,39720,39825,40213,40227,40230,40232,40210,40219,40664,40660,40845,40860,20778,20767,20769,20786,21237,22158,22144,22160,22149,22151,22159,22741,22739,22737,22734,23344,23338,23332,23418,23607,23656,23996,23994,23997,23992,24171,24396,24509,25033,25026,25031,25062,25035,25138,25140,25806,25802,25816,25824,25840,25830,25836,25841,25826,25837,25986,25987,26329,26326,27264,27284,27268,27298,27292,27355,27299,27262,27287,27280,27296,27484,27566,27610,27656,28632,28657,28639,28640,28635,28644,28651,28655,28544,28652,28641,28649,28629,28654,28656,29159,29151,29166,29158,29157,29165,29164,29172,29152,29237,29254,29552,29554,29865,29872,29862,29864,30278,30274,30284,30442,30643,30634,30640,30636,30631,30637,30703,30967,30970,30964,30959,30977,31143,31146,31319,31423,31751,31757,31742,31735,31756,31712,31968,31964,31966,31970,31967,31961,31965,32302,32318,32326,32311,32306,32323,32299,32317,32305,32325,32321,32308,32313,32328,32309,32319,32303,32580,32755,32764,32881,32882,32880,32879,32883,33222,33219,33210,33218,33216,33215,33213,33225,33214,33256,33289,33393,34218,34180,34174,34204,34193,34196,34223,34203,34183,34216,34186,34407,34752,34769,34739,34770,34758,34731,34747,34746,34760,34763,35131,35126,35140,35128,35133,35244,35598,35607,35609,35611,35594,35616,35613,35588,35600,35905,35903,35955,36090,36093,36092,36088,36091,36264,36425,36427,36424,36426,36676,36670,36674,36677,36671,36991,36989,36996,36993,36994,36992,37177,37283,37278,37276,37709,37762,37672,37749,37706,37733,37707,37656,37758,37740,37723,37744,37722,37716,38346,38347,38348,38344,38342,38577,38584,38614,38684,38686,38816,38867,38982,39094,39221,39425,39423,39854,39851,39850,39853,40251,40255,40587,40655,40670,40668,40669,40667,40766,40779,21474,22165,22190,22745,22744,23352,24413,25059,25139,25844,25842,25854,25862,25850,25851,25847,26039,26332,26406,27315,27308,27331,27323,27320,27330,27310,27311,27487,27512,27567,28681,28683,28670,28678,28666,28689,28687,29179,29180,29182,29176,29559,29557,29863,29887,29973,30294,30296,30290,30653,30655,30651,30652,30990,31150,31329,31330,31328,31428,31429,31787,31783,31786,31774,31779,31777,31975,32340,32341,32350,32346,32353,32338,32345,32584,32761,32763,32887,32886,33229,33231,33290,34255,34217,34253,34256,34249,34224,34234,34233,34214,34799,34796,34802,34784,35206,35250,35316,35624,35641,35628,35627,35920,36101,36441,36451,36454,36452,36447,36437,36544,36681,36685,36999,36995,37000,37291,37292,37328,37780,37770,37782,37794,37811,37806,37804,37808,37784,37786,37783,38356,38358,38352,38357,38626,38620,38617,38619,38622,38692,38819,38822,38829,38905,38989,38991,38988,38990,38995,39098,39230,39231,39229,39214,39333,39438,39617,39683,39686,39759,39758,39757,39882,39881,39933,39880,39872,40273,40285,40288,40672,40725,40748,20787,22181,22750,22751,22754,23541,40848,24300,25074,25079,25078,25077,25856,25871,26336,26333,27365,27357,27354,27347,28699,28703,28712,28698,28701,28693,28696,29190,29197,29272,29346,29560,29562,29885,29898,29923,30087,30086,30303,30305,30663,31001,31153,31339,31337,31806,31807,31800,31805,31799,31808,32363,32365,32377,32361,32362,32645,32371,32694,32697,32696,33240,34281,34269,34282,34261,34276,34277,34295,34811,34821,34829,34809,34814,35168,35167,35158,35166,35649,35676,35672,35657,35674,35662,35663,35654,35673,36104,36106,36476,36466,36487,36470,36460,36474,36468,36692,36686,36781,37002,37003,37297,37294,37857,37841,37855,37827,37832,37852,37853,37846,37858,37837,37848,37860,37847,37864,38364,38580,38627,38698,38695,38753,38876,38907,39006,39000,39003,39100,39237,39241,39446,39449,39693,39912,39911,39894,39899,40329,40289,40306,40298,40300,40594,40599,40595,40628,21240,22184,22199,22198,22196,22204,22756,23360,23363,23421,23542,24009,25080,25082,25880,25876,25881,26342,26407,27372,28734,28720,28722,29200,29563,29903,30306,30309,31014,31018,31020,31019,31431,31478,31820,31811,31821,31983,31984,36782,32381,32380,32386,32588,32768,33242,33382,34299,34297,34321,34298,34310,34315,34311,34314,34836,34837,35172,35258,35320,35696,35692,35686,35695,35679,35691,36111,36109,36489,36481,36485,36482,37300,37323,37912,37891,37885,38369,38704,39108,39250,39249,39336,39467,39472,39479,39477,39955,39949,40569,40629,40680,40751,40799,40803,40801,20791,20792,22209,22208,22210,22804,23660,24013,25084,25086,25885,25884,26005,26345,27387,27396,27386,27570,28748,29211,29351,29910,29908,30313,30675,31824,32399,32396,32700,34327,34349,34330,34851,34850,34849,34847,35178,35180,35261,35700,35703,35709,36115,36490,36493,36491,36703,36783,37306,37934,37939,37941,37946,37944,37938,37931,38370,38712,38713,38706,38911,39015,39013,39255,39493,39491,39488,39486,39631,39764,39761,39981,39973,40367,40372,40386,40376,40605,40687,40729,40796,40806,40807,20796,20795,22216,22218,22217,23423,24020,24018,24398,25087,25892,27402,27489,28753,28760,29568,29924,30090,30318,30316,31155,31840,31839,32894,32893,33247,35186,35183,35324,35712,36118,36119,36497,36499,36705,37192,37956,37969,37970,38717,38718,38851,38849,39019,39253,39509,39501,39634,39706,40009,39985,39998,39995,40403,40407,40756,40812,40810,40852,22220,24022,25088,25891,25899,25898,26348,27408,29914,31434,31844,31843,31845,32403,32406,32404,33250,34360,34367,34865,35722,37008,37007,37987,37984,37988,38760,39023,39260,39514,39515,39511,39635,39636,39633,40020,40023,40022,40421,40607,40692,22225,22761,25900,28766,30321,30322,30679,32592,32648,34870,34873,34914,35731,35730,35734,33399,36123,37312,37994,38722,38728,38724,38854,39024,39519,39714,39768,40031,40441,40442,40572,40573,40711,40823,40818,24307,27414,28771,31852,31854,34875,35264,36513,37313,38002,38000,39025,39262,39638,39715,40652,28772,30682,35738,38007,38857,39522,39525,32412,35740,36522,37317,38013,38014,38012,40055,40056,40695,35924,38015,40474,29224,39530,39729,40475,40478,31858,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,20022,20031,20101,20128,20866,20886,20907,21241,21304,21353,21430,22794,23424,24027,12083,24191,24308,24400,24417,25908,26080,30098,30326,36789,38582,168,710,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,65339,65341,10045,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8679,8632,8633,12751,131276,20058,131210,20994,17553,40880,20872,40881,161287,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65506,65508,65287,65282,12849,8470,8481,12443,12444,11904,11908,11910,11911,11912,11914,11916,11917,11925,11932,11933,11941,11943,11946,11948,11950,11958,11964,11966,11974,11978,11980,11981,11983,11990,11991,11998,12003,null,null,null,643,592,603,596,629,339,248,331,650,618,20034,20060,20981,21274,21378,19975,19980,20039,20109,22231,64012,23662,24435,19983,20871,19982,20014,20115,20162,20169,20168,20888,21244,21356,21433,22304,22787,22828,23568,24063,26081,27571,27596,27668,29247,20017,20028,20200,20188,20201,20193,20189,20186,21004,21276,21324,22306,22307,22807,22831,23425,23428,23570,23611,23668,23667,24068,24192,24194,24521,25097,25168,27669,27702,27715,27711,27707,29358,29360,29578,31160,32906,38430,20238,20248,20268,20213,20244,20209,20224,20215,20232,20253,20226,20229,20258,20243,20228,20212,20242,20913,21011,21001,21008,21158,21282,21279,21325,21386,21511,22241,22239,22318,22314,22324,22844,22912,22908,22917,22907,22910,22903,22911,23382,23573,23589,23676,23674,23675,23678,24031,24181,24196,24322,24346,24436,24533,24532,24527,25180,25182,25188,25185,25190,25186,25177,25184,25178,25189,26095,26094,26430,26425,26424,26427,26426,26431,26428,26419,27672,27718,27730,27740,27727,27722,27732,27723,27724,28785,29278,29364,29365,29582,29994,30335,31349,32593,33400,33404,33408,33405,33407,34381,35198,37017,37015,37016,37019,37012,38434,38436,38432,38435,20310,20283,20322,20297,20307,20324,20286,20327,20306,20319,20289,20312,20269,20275,20287,20321,20879,20921,21020,21022,21025,21165,21166,21257,21347,21362,21390,21391,21552,21559,21546,21588,21573,21529,21532,21541,21528,21565,21583,21569,21544,21540,21575,22254,22247,22245,22337,22341,22348,22345,22347,22354,22790,22848,22950,22936,22944,22935,22926,22946,22928,22927,22951,22945,23438,23442,23592,23594,23693,23695,23688,23691,23689,23698,23690,23686,23699,23701,24032,24074,24078,24203,24201,24204,24200,24205,24325,24349,24440,24438,24530,24529,24528,24557,24552,24558,24563,24545,24548,24547,24570,24559,24567,24571,24576,24564,25146,25219,25228,25230,25231,25236,25223,25201,25211,25210,25200,25217,25224,25207,25213,25202,25204,25911,26096,26100,26099,26098,26101,26437,26439,26457,26453,26444,26440,26461,26445,26458,26443,27600,27673,27674,27768,27751,27755,27780,27787,27791,27761,27759,27753,27802,27757,27783,27797,27804,27750,27763,27749,27771,27790,28788,28794,29283,29375,29373,29379,29382,29377,29370,29381,29589,29591,29587,29588,29586,30010,30009,30100,30101,30337,31037,32820,32917,32921,32912,32914,32924,33424,33423,33413,33422,33425,33427,33418,33411,33412,35960,36809,36799,37023,37025,37029,37022,37031,37024,38448,38440,38447,38445,20019,20376,20348,20357,20349,20352,20359,20342,20340,20361,20356,20343,20300,20375,20330,20378,20345,20353,20344,20368,20380,20372,20382,20370,20354,20373,20331,20334,20894,20924,20926,21045,21042,21043,21062,21041,21180,21258,21259,21308,21394,21396,21639,21631,21633,21649,21634,21640,21611,21626,21630,21605,21612,21620,21606,21645,21615,21601,21600,21656,21603,21607,21604,22263,22265,22383,22386,22381,22379,22385,22384,22390,22400,22389,22395,22387,22388,22370,22376,22397,22796,22853,22965,22970,22991,22990,22962,22988,22977,22966,22972,22979,22998,22961,22973,22976,22984,22964,22983,23394,23397,23443,23445,23620,23623,23726,23716,23712,23733,23727,23720,23724,23711,23715,23725,23714,23722,23719,23709,23717,23734,23728,23718,24087,24084,24089,24360,24354,24355,24356,24404,24450,24446,24445,24542,24549,24621,24614,24601,24626,24587,24628,24586,24599,24627,24602,24606,24620,24610,24589,24592,24622,24595,24593,24588,24585,24604,25108,25149,25261,25268,25297,25278,25258,25270,25290,25262,25267,25263,25275,25257,25264,25272,25917,26024,26043,26121,26108,26116,26130,26120,26107,26115,26123,26125,26117,26109,26129,26128,26358,26378,26501,26476,26510,26514,26486,26491,26520,26502,26500,26484,26509,26508,26490,26527,26513,26521,26499,26493,26497,26488,26489,26516,27429,27520,27518,27614,27677,27795,27884,27883,27886,27865,27830,27860,27821,27879,27831,27856,27842,27834,27843,27846,27885,27890,27858,27869,27828,27786,27805,27776,27870,27840,27952,27853,27847,27824,27897,27855,27881,27857,28820,28824,28805,28819,28806,28804,28817,28822,28802,28826,28803,29290,29398,29387,29400,29385,29404,29394,29396,29402,29388,29393,29604,29601,29613,29606,29602,29600,29612,29597,29917,29928,30015,30016,30014,30092,30104,30383,30451,30449,30448,30453,30712,30716,30713,30715,30714,30711,31042,31039,31173,31352,31355,31483,31861,31997,32821,32911,32942,32931,32952,32949,32941,33312,33440,33472,33451,33434,33432,33435,33461,33447,33454,33468,33438,33466,33460,33448,33441,33449,33474,33444,33475,33462,33442,34416,34415,34413,34414,35926,36818,36811,36819,36813,36822,36821,36823,37042,37044,37039,37043,37040,38457,38461,38460,38458,38467,20429,20421,20435,20402,20425,20427,20417,20436,20444,20441,20411,20403,20443,20423,20438,20410,20416,20409,20460,21060,21065,21184,21186,21309,21372,21399,21398,21401,21400,21690,21665,21677,21669,21711,21699,33549,21687,21678,21718,21686,21701,21702,21664,21616,21692,21666,21694,21618,21726,21680,22453,22430,22431,22436,22412,22423,22429,22427,22420,22424,22415,22425,22437,22426,22421,22772,22797,22867,23009,23006,23022,23040,23025,23005,23034,23037,23036,23030,23012,23026,23031,23003,23017,23027,23029,23008,23038,23028,23021,23464,23628,23760,23768,23756,23767,23755,23771,23774,23770,23753,23751,23754,23766,23763,23764,23759,23752,23750,23758,23775,23800,24057,24097,24098,24099,24096,24100,24240,24228,24226,24219,24227,24229,24327,24366,24406,24454,24631,24633,24660,24690,24670,24645,24659,24647,24649,24667,24652,24640,24642,24671,24612,24644,24664,24678,24686,25154,25155,25295,25357,25355,25333,25358,25347,25323,25337,25359,25356,25336,25334,25344,25363,25364,25338,25365,25339,25328,25921,25923,26026,26047,26166,26145,26162,26165,26140,26150,26146,26163,26155,26170,26141,26164,26169,26158,26383,26384,26561,26610,26568,26554,26588,26555,26616,26584,26560,26551,26565,26603,26596,26591,26549,26573,26547,26615,26614,26606,26595,26562,26553,26574,26599,26608,26546,26620,26566,26605,26572,26542,26598,26587,26618,26569,26570,26563,26602,26571,27432,27522,27524,27574,27606,27608,27616,27680,27681,27944,27956,27949,27935,27964,27967,27922,27914,27866,27955,27908,27929,27962,27930,27921,27904,27933,27970,27905,27928,27959,27907,27919,27968,27911,27936,27948,27912,27938,27913,27920,28855,28831,28862,28849,28848,28833,28852,28853,28841,29249,29257,29258,29292,29296,29299,29294,29386,29412,29416,29419,29407,29418,29414,29411,29573,29644,29634,29640,29637,29625,29622,29621,29620,29675,29631,29639,29630,29635,29638,29624,29643,29932,29934,29998,30023,30024,30119,30122,30329,30404,30472,30467,30468,30469,30474,30455,30459,30458,30695,30696,30726,30737,30738,30725,30736,30735,30734,30729,30723,30739,31050,31052,31051,31045,31044,31189,31181,31183,31190,31182,31360,31358,31441,31488,31489,31866,31864,31865,31871,31872,31873,32003,32008,32001,32600,32657,32653,32702,32775,32782,32783,32788,32823,32984,32967,32992,32977,32968,32962,32976,32965,32995,32985,32988,32970,32981,32969,32975,32983,32998,32973,33279,33313,33428,33497,33534,33529,33543,33512,33536,33493,33594,33515,33494,33524,33516,33505,33522,33525,33548,33531,33526,33520,33514,33508,33504,33530,33523,33517,34423,34420,34428,34419,34881,34894,34919,34922,34921,35283,35332,35335,36210,36835,36833,36846,36832,37105,37053,37055,37077,37061,37054,37063,37067,37064,37332,37331,38484,38479,38481,38483,38474,38478,20510,20485,20487,20499,20514,20528,20507,20469,20468,20531,20535,20524,20470,20471,20503,20508,20512,20519,20533,20527,20529,20494,20826,20884,20883,20938,20932,20933,20936,20942,21089,21082,21074,21086,21087,21077,21090,21197,21262,21406,21798,21730,21783,21778,21735,21747,21732,21786,21759,21764,21768,21739,21777,21765,21745,21770,21755,21751,21752,21728,21774,21763,21771,22273,22274,22476,22578,22485,22482,22458,22470,22461,22460,22456,22454,22463,22471,22480,22457,22465,22798,22858,23065,23062,23085,23086,23061,23055,23063,23050,23070,23091,23404,23463,23469,23468,23555,23638,23636,23788,23807,23790,23793,23799,23808,23801,24105,24104,24232,24238,24234,24236,24371,24368,24423,24669,24666,24679,24641,24738,24712,24704,24722,24705,24733,24707,24725,24731,24727,24711,24732,24718,25113,25158,25330,25360,25430,25388,25412,25413,25398,25411,25572,25401,25419,25418,25404,25385,25409,25396,25432,25428,25433,25389,25415,25395,25434,25425,25400,25431,25408,25416,25930,25926,26054,26051,26052,26050,26186,26207,26183,26193,26386,26387,26655,26650,26697,26674,26675,26683,26699,26703,26646,26673,26652,26677,26667,26669,26671,26702,26692,26676,26653,26642,26644,26662,26664,26670,26701,26682,26661,26656,27436,27439,27437,27441,27444,27501,32898,27528,27622,27620,27624,27619,27618,27623,27685,28026,28003,28004,28022,27917,28001,28050,27992,28002,28013,28015,28049,28045,28143,28031,28038,27998,28007,28000,28055,28016,28028,27999,28034,28056,27951,28008,28043,28030,28032,28036,27926,28035,28027,28029,28021,28048,28892,28883,28881,28893,28875,32569,28898,28887,28882,28894,28896,28884,28877,28869,28870,28871,28890,28878,28897,29250,29304,29303,29302,29440,29434,29428,29438,29430,29427,29435,29441,29651,29657,29669,29654,29628,29671,29667,29673,29660,29650,29659,29652,29661,29658,29655,29656,29672,29918,29919,29940,29941,29985,30043,30047,30128,30145,30139,30148,30144,30143,30134,30138,30346,30409,30493,30491,30480,30483,30482,30499,30481,30485,30489,30490,30498,30503,30755,30764,30754,30773,30767,30760,30766,30763,30753,30761,30771,30762,30769,31060,31067,31055,31068,31059,31058,31057,31211,31212,31200,31214,31213,31210,31196,31198,31197,31366,31369,31365,31371,31372,31370,31367,31448,31504,31492,31507,31493,31503,31496,31498,31502,31497,31506,31876,31889,31882,31884,31880,31885,31877,32030,32029,32017,32014,32024,32022,32019,32031,32018,32015,32012,32604,32609,32606,32608,32605,32603,32662,32658,32707,32706,32704,32790,32830,32825,33018,33010,33017,33013,33025,33019,33024,33281,33327,33317,33587,33581,33604,33561,33617,33573,33622,33599,33601,33574,33564,33570,33602,33614,33563,33578,33544,33596,33613,33558,33572,33568,33591,33583,33577,33607,33605,33612,33619,33566,33580,33611,33575,33608,34387,34386,34466,34472,34454,34445,34449,34462,34439,34455,34438,34443,34458,34437,34469,34457,34465,34471,34453,34456,34446,34461,34448,34452,34883,34884,34925,34933,34934,34930,34944,34929,34943,34927,34947,34942,34932,34940,35346,35911,35927,35963,36004,36003,36214,36216,36277,36279,36278,36561,36563,36862,36853,36866,36863,36859,36868,36860,36854,37078,37088,37081,37082,37091,37087,37093,37080,37083,37079,37084,37092,37200,37198,37199,37333,37346,37338,38492,38495,38588,39139,39647,39727,20095,20592,20586,20577,20574,20576,20563,20555,20573,20594,20552,20557,20545,20571,20554,20578,20501,20549,20575,20585,20587,20579,20580,20550,20544,20590,20595,20567,20561,20944,21099,21101,21100,21102,21206,21203,21293,21404,21877,21878,21820,21837,21840,21812,21802,21841,21858,21814,21813,21808,21842,21829,21772,21810,21861,21838,21817,21832,21805,21819,21824,21835,22282,22279,22523,22548,22498,22518,22492,22516,22528,22509,22525,22536,22520,22539,22515,22479,22535,22510,22499,22514,22501,22508,22497,22542,22524,22544,22503,22529,22540,22513,22505,22512,22541,22532,22876,23136,23128,23125,23143,23134,23096,23093,23149,23120,23135,23141,23148,23123,23140,23127,23107,23133,23122,23108,23131,23112,23182,23102,23117,23097,23116,23152,23145,23111,23121,23126,23106,23132,23410,23406,23489,23488,23641,23838,23819,23837,23834,23840,23820,23848,23821,23846,23845,23823,23856,23826,23843,23839,23854,24126,24116,24241,24244,24249,24242,24243,24374,24376,24475,24470,24479,24714,24720,24710,24766,24752,24762,24787,24788,24783,24804,24793,24797,24776,24753,24795,24759,24778,24767,24771,24781,24768,25394,25445,25482,25474,25469,25533,25502,25517,25501,25495,25515,25486,25455,25479,25488,25454,25519,25461,25500,25453,25518,25468,25508,25403,25503,25464,25477,25473,25489,25485,25456,25939,26061,26213,26209,26203,26201,26204,26210,26392,26745,26759,26768,26780,26733,26734,26798,26795,26966,26735,26787,26796,26793,26741,26740,26802,26767,26743,26770,26748,26731,26738,26794,26752,26737,26750,26779,26774,26763,26784,26761,26788,26744,26747,26769,26764,26762,26749,27446,27443,27447,27448,27537,27535,27533,27534,27532,27690,28096,28075,28084,28083,28276,28076,28137,28130,28087,28150,28116,28160,28104,28128,28127,28118,28094,28133,28124,28125,28123,28148,28106,28093,28141,28144,28090,28117,28098,28111,28105,28112,28146,28115,28157,28119,28109,28131,28091,28922,28941,28919,28951,28916,28940,28912,28932,28915,28944,28924,28927,28934,28947,28928,28920,28918,28939,28930,28942,29310,29307,29308,29311,29469,29463,29447,29457,29464,29450,29448,29439,29455,29470,29576,29686,29688,29685,29700,29697,29693,29703,29696,29690,29692,29695,29708,29707,29684,29704,30052,30051,30158,30162,30159,30155,30156,30161,30160,30351,30345,30419,30521,30511,30509,30513,30514,30516,30515,30525,30501,30523,30517,30792,30802,30793,30797,30794,30796,30758,30789,30800,31076,31079,31081,31082,31075,31083,31073,31163,31226,31224,31222,31223,31375,31380,31376,31541,31559,31540,31525,31536,31522,31524,31539,31512,31530,31517,31537,31531,31533,31535,31538,31544,31514,31523,31892,31896,31894,31907,32053,32061,32056,32054,32058,32069,32044,32041,32065,32071,32062,32063,32074,32059,32040,32611,32661,32668,32669,32667,32714,32715,32717,32720,32721,32711,32719,32713,32799,32798,32795,32839,32835,32840,33048,33061,33049,33051,33069,33055,33068,33054,33057,33045,33063,33053,33058,33297,33336,33331,33338,33332,33330,33396,33680,33699,33704,33677,33658,33651,33700,33652,33679,33665,33685,33689,33653,33684,33705,33661,33667,33676,33693,33691,33706,33675,33662,33701,33711,33672,33687,33712,33663,33702,33671,33710,33654,33690,34393,34390,34495,34487,34498,34497,34501,34490,34480,34504,34489,34483,34488,34508,34484,34491,34492,34499,34493,34494,34898,34953,34965,34984,34978,34986,34970,34961,34977,34975,34968,34983,34969,34971,34967,34980,34988,34956,34963,34958,35202,35286,35289,35285,35376,35367,35372,35358,35897,35899,35932,35933,35965,36005,36221,36219,36217,36284,36290,36281,36287,36289,36568,36574,36573,36572,36567,36576,36577,36900,36875,36881,36892,36876,36897,37103,37098,37104,37108,37106,37107,37076,37099,37100,37097,37206,37208,37210,37203,37205,37356,37364,37361,37363,37368,37348,37369,37354,37355,37367,37352,37358,38266,38278,38280,38524,38509,38507,38513,38511,38591,38762,38916,39141,39319,20635,20629,20628,20638,20619,20643,20611,20620,20622,20637,20584,20636,20626,20610,20615,20831,20948,21266,21265,21412,21415,21905,21928,21925,21933,21879,22085,21922,21907,21896,21903,21941,21889,21923,21906,21924,21885,21900,21926,21887,21909,21921,21902,22284,22569,22583,22553,22558,22567,22563,22568,22517,22600,22565,22556,22555,22579,22591,22582,22574,22585,22584,22573,22572,22587,22881,23215,23188,23199,23162,23202,23198,23160,23206,23164,23205,23212,23189,23214,23095,23172,23178,23191,23171,23179,23209,23163,23165,23180,23196,23183,23187,23197,23530,23501,23499,23508,23505,23498,23502,23564,23600,23863,23875,23915,23873,23883,23871,23861,23889,23886,23893,23859,23866,23890,23869,23857,23897,23874,23865,23881,23864,23868,23858,23862,23872,23877,24132,24129,24408,24486,24485,24491,24777,24761,24780,24802,24782,24772,24852,24818,24842,24854,24837,24821,24851,24824,24828,24830,24769,24835,24856,24861,24848,24831,24836,24843,25162,25492,25521,25520,25550,25573,25576,25583,25539,25757,25587,25546,25568,25590,25557,25586,25589,25697,25567,25534,25565,25564,25540,25560,25555,25538,25543,25548,25547,25544,25584,25559,25561,25906,25959,25962,25956,25948,25960,25957,25996,26013,26014,26030,26064,26066,26236,26220,26235,26240,26225,26233,26218,26226,26369,26892,26835,26884,26844,26922,26860,26858,26865,26895,26838,26871,26859,26852,26870,26899,26896,26867,26849,26887,26828,26888,26992,26804,26897,26863,26822,26900,26872,26832,26877,26876,26856,26891,26890,26903,26830,26824,26845,26846,26854,26868,26833,26886,26836,26857,26901,26917,26823,27449,27451,27455,27452,27540,27543,27545,27541,27581,27632,27634,27635,27696,28156,28230,28231,28191,28233,28296,28220,28221,28229,28258,28203,28223,28225,28253,28275,28188,28211,28235,28224,28241,28219,28163,28206,28254,28264,28252,28257,28209,28200,28256,28273,28267,28217,28194,28208,28243,28261,28199,28280,28260,28279,28245,28281,28242,28262,28213,28214,28250,28960,28958,28975,28923,28974,28977,28963,28965,28962,28978,28959,28968,28986,28955,29259,29274,29320,29321,29318,29317,29323,29458,29451,29488,29474,29489,29491,29479,29490,29485,29478,29475,29493,29452,29742,29740,29744,29739,29718,29722,29729,29741,29745,29732,29731,29725,29737,29728,29746,29947,29999,30063,30060,30183,30170,30177,30182,30173,30175,30180,30167,30357,30354,30426,30534,30535,30532,30541,30533,30538,30542,30539,30540,30686,30700,30816,30820,30821,30812,30829,30833,30826,30830,30832,30825,30824,30814,30818,31092,31091,31090,31088,31234,31242,31235,31244,31236,31385,31462,31460,31562,31547,31556,31560,31564,31566,31552,31576,31557,31906,31902,31912,31905,32088,32111,32099,32083,32086,32103,32106,32079,32109,32092,32107,32082,32084,32105,32081,32095,32078,32574,32575,32613,32614,32674,32672,32673,32727,32849,32847,32848,33022,32980,33091,33098,33106,33103,33095,33085,33101,33082,33254,33262,33271,33272,33273,33284,33340,33341,33343,33397,33595,33743,33785,33827,33728,33768,33810,33767,33764,33788,33782,33808,33734,33736,33771,33763,33727,33793,33757,33765,33752,33791,33761,33739,33742,33750,33781,33737,33801,33807,33758,33809,33798,33730,33779,33749,33786,33735,33745,33770,33811,33731,33772,33774,33732,33787,33751,33762,33819,33755,33790,34520,34530,34534,34515,34531,34522,34538,34525,34539,34524,34540,34537,34519,34536,34513,34888,34902,34901,35002,35031,35001,35000,35008,35006,34998,35004,34999,35005,34994,35073,35017,35221,35224,35223,35293,35290,35291,35406,35405,35385,35417,35392,35415,35416,35396,35397,35410,35400,35409,35402,35404,35407,35935,35969,35968,36026,36030,36016,36025,36021,36228,36224,36233,36312,36307,36301,36295,36310,36316,36303,36309,36313,36296,36311,36293,36591,36599,36602,36601,36582,36590,36581,36597,36583,36584,36598,36587,36593,36588,36596,36585,36909,36916,36911,37126,37164,37124,37119,37116,37128,37113,37115,37121,37120,37127,37125,37123,37217,37220,37215,37218,37216,37377,37386,37413,37379,37402,37414,37391,37388,37376,37394,37375,37373,37382,37380,37415,37378,37404,37412,37401,37399,37381,37398,38267,38285,38284,38288,38535,38526,38536,38537,38531,38528,38594,38600,38595,38641,38640,38764,38768,38766,38919,39081,39147,40166,40697,20099,20100,20150,20669,20671,20678,20654,20676,20682,20660,20680,20674,20656,20673,20666,20657,20683,20681,20662,20664,20951,21114,21112,21115,21116,21955,21979,21964,21968,21963,21962,21981,21952,21972,21956,21993,21951,21970,21901,21967,21973,21986,21974,21960,22002,21965,21977,21954,22292,22611,22632,22628,22607,22605,22601,22639,22613,22606,22621,22617,22629,22619,22589,22627,22641,22780,23239,23236,23243,23226,23224,23217,23221,23216,23231,23240,23227,23238,23223,23232,23242,23220,23222,23245,23225,23184,23510,23512,23513,23583,23603,23921,23907,23882,23909,23922,23916,23902,23912,23911,23906,24048,24143,24142,24138,24141,24139,24261,24268,24262,24267,24263,24384,24495,24493,24823,24905,24906,24875,24901,24886,24882,24878,24902,24879,24911,24873,24896,25120,37224,25123,25125,25124,25541,25585,25579,25616,25618,25609,25632,25636,25651,25667,25631,25621,25624,25657,25655,25634,25635,25612,25638,25648,25640,25665,25653,25647,25610,25626,25664,25637,25639,25611,25575,25627,25646,25633,25614,25967,26002,26067,26246,26252,26261,26256,26251,26250,26265,26260,26232,26400,26982,26975,26936,26958,26978,26993,26943,26949,26986,26937,26946,26967,26969,27002,26952,26953,26933,26988,26931,26941,26981,26864,27000,26932,26985,26944,26991,26948,26998,26968,26945,26996,26956,26939,26955,26935,26972,26959,26961,26930,26962,26927,27003,26940,27462,27461,27459,27458,27464,27457,27547,64013,27643,27644,27641,27639,27640,28315,28374,28360,28303,28352,28319,28307,28308,28320,28337,28345,28358,28370,28349,28353,28318,28361,28343,28336,28365,28326,28367,28338,28350,28355,28380,28376,28313,28306,28302,28301,28324,28321,28351,28339,28368,28362,28311,28334,28323,28999,29012,29010,29027,29024,28993,29021,29026,29042,29048,29034,29025,28994,29016,28995,29003,29040,29023,29008,29011,28996,29005,29018,29263,29325,29324,29329,29328,29326,29500,29506,29499,29498,29504,29514,29513,29764,29770,29771,29778,29777,29783,29760,29775,29776,29774,29762,29766,29773,29780,29921,29951,29950,29949,29981,30073,30071,27011,30191,30223,30211,30199,30206,30204,30201,30200,30224,30203,30198,30189,30197,30205,30361,30389,30429,30549,30559,30560,30546,30550,30554,30569,30567,30548,30553,30573,30688,30855,30874,30868,30863,30852,30869,30853,30854,30881,30851,30841,30873,30848,30870,30843,31100,31106,31101,31097,31249,31256,31257,31250,31255,31253,31266,31251,31259,31248,31395,31394,31390,31467,31590,31588,31597,31604,31593,31602,31589,31603,31601,31600,31585,31608,31606,31587,31922,31924,31919,32136,32134,32128,32141,32127,32133,32122,32142,32123,32131,32124,32140,32148,32132,32125,32146,32621,32619,32615,32616,32620,32678,32677,32679,32731,32732,32801,33124,33120,33143,33116,33129,33115,33122,33138,26401,33118,33142,33127,33135,33092,33121,33309,33353,33348,33344,33346,33349,34033,33855,33878,33910,33913,33935,33933,33893,33873,33856,33926,33895,33840,33869,33917,33882,33881,33908,33907,33885,34055,33886,33847,33850,33844,33914,33859,33912,33842,33861,33833,33753,33867,33839,33858,33837,33887,33904,33849,33870,33868,33874,33903,33989,33934,33851,33863,33846,33843,33896,33918,33860,33835,33888,33876,33902,33872,34571,34564,34551,34572,34554,34518,34549,34637,34552,34574,34569,34561,34550,34573,34565,35030,35019,35021,35022,35038,35035,35034,35020,35024,35205,35227,35295,35301,35300,35297,35296,35298,35292,35302,35446,35462,35455,35425,35391,35447,35458,35460,35445,35459,35457,35444,35450,35900,35915,35914,35941,35940,35942,35974,35972,35973,36044,36200,36201,36241,36236,36238,36239,36237,36243,36244,36240,36242,36336,36320,36332,36337,36334,36304,36329,36323,36322,36327,36338,36331,36340,36614,36607,36609,36608,36613,36615,36616,36610,36619,36946,36927,36932,36937,36925,37136,37133,37135,37137,37142,37140,37131,37134,37230,37231,37448,37458,37424,37434,37478,37427,37477,37470,37507,37422,37450,37446,37485,37484,37455,37472,37479,37487,37430,37473,37488,37425,37460,37475,37456,37490,37454,37459,37452,37462,37426,38303,38300,38302,38299,38546,38547,38545,38551,38606,38650,38653,38648,38645,38771,38775,38776,38770,38927,38925,38926,39084,39158,39161,39343,39346,39344,39349,39597,39595,39771,40170,40173,40167,40576,40701,20710,20692,20695,20712,20723,20699,20714,20701,20708,20691,20716,20720,20719,20707,20704,20952,21120,21121,21225,21227,21296,21420,22055,22037,22028,22034,22012,22031,22044,22017,22035,22018,22010,22045,22020,22015,22009,22665,22652,22672,22680,22662,22657,22655,22644,22667,22650,22663,22673,22670,22646,22658,22664,22651,22676,22671,22782,22891,23260,23278,23269,23253,23274,23258,23277,23275,23283,23266,23264,23259,23276,23262,23261,23257,23272,23263,23415,23520,23523,23651,23938,23936,23933,23942,23930,23937,23927,23946,23945,23944,23934,23932,23949,23929,23935,24152,24153,24147,24280,24273,24279,24270,24284,24277,24281,24274,24276,24388,24387,24431,24502,24876,24872,24897,24926,24945,24947,24914,24915,24946,24940,24960,24948,24916,24954,24923,24933,24891,24938,24929,24918,25129,25127,25131,25643,25677,25691,25693,25716,25718,25714,25715,25725,25717,25702,25766,25678,25730,25694,25692,25675,25683,25696,25680,25727,25663,25708,25707,25689,25701,25719,25971,26016,26273,26272,26271,26373,26372,26402,27057,27062,27081,27040,27086,27030,27056,27052,27068,27025,27033,27022,27047,27021,27049,27070,27055,27071,27076,27069,27044,27092,27065,27082,27034,27087,27059,27027,27050,27041,27038,27097,27031,27024,27074,27061,27045,27078,27466,27469,27467,27550,27551,27552,27587,27588,27646,28366,28405,28401,28419,28453,28408,28471,28411,28462,28425,28494,28441,28442,28455,28440,28475,28434,28397,28426,28470,28531,28409,28398,28461,28480,28464,28476,28469,28395,28423,28430,28483,28421,28413,28406,28473,28444,28412,28474,28447,28429,28446,28424,28449,29063,29072,29065,29056,29061,29058,29071,29051,29062,29057,29079,29252,29267,29335,29333,29331,29507,29517,29521,29516,29794,29811,29809,29813,29810,29799,29806,29952,29954,29955,30077,30096,30230,30216,30220,30229,30225,30218,30228,30392,30593,30588,30597,30594,30574,30592,30575,30590,30595,30898,30890,30900,30893,30888,30846,30891,30878,30885,30880,30892,30882,30884,31128,31114,31115,31126,31125,31124,31123,31127,31112,31122,31120,31275,31306,31280,31279,31272,31270,31400,31403,31404,31470,31624,31644,31626,31633,31632,31638,31629,31628,31643,31630,31621,31640,21124,31641,31652,31618,31931,31935,31932,31930,32167,32183,32194,32163,32170,32193,32192,32197,32157,32206,32196,32198,32203,32204,32175,32185,32150,32188,32159,32166,32174,32169,32161,32201,32627,32738,32739,32741,32734,32804,32861,32860,33161,33158,33155,33159,33165,33164,33163,33301,33943,33956,33953,33951,33978,33998,33986,33964,33966,33963,33977,33972,33985,33997,33962,33946,33969,34000,33949,33959,33979,33954,33940,33991,33996,33947,33961,33967,33960,34006,33944,33974,33999,33952,34007,34004,34002,34011,33968,33937,34401,34611,34595,34600,34667,34624,34606,34590,34593,34585,34587,34627,34604,34625,34622,34630,34592,34610,34602,34605,34620,34578,34618,34609,34613,34626,34598,34599,34616,34596,34586,34608,34577,35063,35047,35057,35058,35066,35070,35054,35068,35062,35067,35056,35052,35051,35229,35233,35231,35230,35305,35307,35304,35499,35481,35467,35474,35471,35478,35901,35944,35945,36053,36047,36055,36246,36361,36354,36351,36365,36349,36362,36355,36359,36358,36357,36350,36352,36356,36624,36625,36622,36621,37155,37148,37152,37154,37151,37149,37146,37156,37153,37147,37242,37234,37241,37235,37541,37540,37494,37531,37498,37536,37524,37546,37517,37542,37530,37547,37497,37527,37503,37539,37614,37518,37506,37525,37538,37501,37512,37537,37514,37510,37516,37529,37543,37502,37511,37545,37533,37515,37421,38558,38561,38655,38744,38781,38778,38782,38787,38784,38786,38779,38788,38785,38783,38862,38861,38934,39085,39086,39170,39168,39175,39325,39324,39363,39353,39355,39354,39362,39357,39367,39601,39651,39655,39742,39743,39776,39777,39775,40177,40178,40181,40615,20735,20739,20784,20728,20742,20743,20726,20734,20747,20748,20733,20746,21131,21132,21233,21231,22088,22082,22092,22069,22081,22090,22089,22086,22104,22106,22080,22067,22077,22060,22078,22072,22058,22074,22298,22699,22685,22705,22688,22691,22703,22700,22693,22689,22783,23295,23284,23293,23287,23286,23299,23288,23298,23289,23297,23303,23301,23311,23655,23961,23959,23967,23954,23970,23955,23957,23968,23964,23969,23962,23966,24169,24157,24160,24156,32243,24283,24286,24289,24393,24498,24971,24963,24953,25009,25008,24994,24969,24987,24979,25007,25005,24991,24978,25002,24993,24973,24934,25011,25133,25710,25712,25750,25760,25733,25751,25756,25743,25739,25738,25740,25763,25759,25704,25777,25752,25974,25978,25977,25979,26034,26035,26293,26288,26281,26290,26295,26282,26287,27136,27142,27159,27109,27128,27157,27121,27108,27168,27135,27116,27106,27163,27165,27134,27175,27122,27118,27156,27127,27111,27200,27144,27110,27131,27149,27132,27115,27145,27140,27160,27173,27151,27126,27174,27143,27124,27158,27473,27557,27555,27554,27558,27649,27648,27647,27650,28481,28454,28542,28551,28614,28562,28557,28553,28556,28514,28495,28549,28506,28566,28534,28524,28546,28501,28530,28498,28496,28503,28564,28563,28509,28416,28513,28523,28541,28519,28560,28499,28555,28521,28543,28565,28515,28535,28522,28539,29106,29103,29083,29104,29088,29082,29097,29109,29085,29093,29086,29092,29089,29098,29084,29095,29107,29336,29338,29528,29522,29534,29535,29536,29533,29531,29537,29530,29529,29538,29831,29833,29834,29830,29825,29821,29829,29832,29820,29817,29960,29959,30078,30245,30238,30233,30237,30236,30243,30234,30248,30235,30364,30365,30366,30363,30605,30607,30601,30600,30925,30907,30927,30924,30929,30926,30932,30920,30915,30916,30921,31130,31137,31136,31132,31138,31131,27510,31289,31410,31412,31411,31671,31691,31678,31660,31694,31663,31673,31690,31669,31941,31944,31948,31947,32247,32219,32234,32231,32215,32225,32259,32250,32230,32246,32241,32240,32238,32223,32630,32684,32688,32685,32749,32747,32746,32748,32742,32744,32868,32871,33187,33183,33182,33173,33186,33177,33175,33302,33359,33363,33362,33360,33358,33361,34084,34107,34063,34048,34089,34062,34057,34061,34079,34058,34087,34076,34043,34091,34042,34056,34060,34036,34090,34034,34069,34039,34027,34035,34044,34066,34026,34025,34070,34046,34088,34077,34094,34050,34045,34078,34038,34097,34086,34023,34024,34032,34031,34041,34072,34080,34096,34059,34073,34095,34402,34646,34659,34660,34679,34785,34675,34648,34644,34651,34642,34657,34650,34641,34654,34669,34666,34640,34638,34655,34653,34671,34668,34682,34670,34652,34661,34639,34683,34677,34658,34663,34665,34906,35077,35084,35092,35083,35095,35096,35097,35078,35094,35089,35086,35081,35234,35236,35235,35309,35312,35308,35535,35526,35512,35539,35537,35540,35541,35515,35543,35518,35520,35525,35544,35523,35514,35517,35545,35902,35917,35983,36069,36063,36057,36072,36058,36061,36071,36256,36252,36257,36251,36384,36387,36389,36388,36398,36373,36379,36374,36369,36377,36390,36391,36372,36370,36376,36371,36380,36375,36378,36652,36644,36632,36634,36640,36643,36630,36631,36979,36976,36975,36967,36971,37167,37163,37161,37162,37170,37158,37166,37253,37254,37258,37249,37250,37252,37248,37584,37571,37572,37568,37593,37558,37583,37617,37599,37592,37609,37591,37597,37580,37615,37570,37608,37578,37576,37582,37606,37581,37589,37577,37600,37598,37607,37585,37587,37557,37601,37574,37556,38268,38316,38315,38318,38320,38564,38562,38611,38661,38664,38658,38746,38794,38798,38792,38864,38863,38942,38941,38950,38953,38952,38944,38939,38951,39090,39176,39162,39185,39188,39190,39191,39189,39388,39373,39375,39379,39380,39374,39369,39382,39384,39371,39383,39372,39603,39660,39659,39667,39666,39665,39750,39747,39783,39796,39793,39782,39798,39797,39792,39784,39780,39788,40188,40186,40189,40191,40183,40199,40192,40185,40187,40200,40197,40196,40579,40659,40719,40720,20764,20755,20759,20762,20753,20958,21300,21473,22128,22112,22126,22131,22118,22115,22125,22130,22110,22135,22300,22299,22728,22717,22729,22719,22714,22722,22716,22726,23319,23321,23323,23329,23316,23315,23312,23318,23336,23322,23328,23326,23535,23980,23985,23977,23975,23989,23984,23982,23978,23976,23986,23981,23983,23988,24167,24168,24166,24175,24297,24295,24294,24296,24293,24395,24508,24989,25000,24982,25029,25012,25030,25025,25036,25018,25023,25016,24972,25815,25814,25808,25807,25801,25789,25737,25795,25819,25843,25817,25907,25983,25980,26018,26312,26302,26304,26314,26315,26319,26301,26299,26298,26316,26403,27188,27238,27209,27239,27186,27240,27198,27229,27245,27254,27227,27217,27176,27226,27195,27199,27201,27242,27236,27216,27215,27220,27247,27241,27232,27196,27230,27222,27221,27213,27214,27206,27477,27476,27478,27559,27562,27563,27592,27591,27652,27651,27654,28589,28619,28579,28615,28604,28622,28616,28510,28612,28605,28574,28618,28584,28676,28581,28590,28602,28588,28586,28623,28607,28600,28578,28617,28587,28621,28591,28594,28592,29125,29122,29119,29112,29142,29120,29121,29131,29140,29130,29127,29135,29117,29144,29116,29126,29146,29147,29341,29342,29545,29542,29543,29548,29541,29547,29546,29823,29850,29856,29844,29842,29845,29857,29963,30080,30255,30253,30257,30269,30259,30268,30261,30258,30256,30395,30438,30618,30621,30625,30620,30619,30626,30627,30613,30617,30615,30941,30953,30949,30954,30942,30947,30939,30945,30946,30957,30943,30944,31140,31300,31304,31303,31414,31416,31413,31409,31415,31710,31715,31719,31709,31701,31717,31706,31720,31737,31700,31722,31714,31708,31723,31704,31711,31954,31956,31959,31952,31953,32274,32289,32279,32268,32287,32288,32275,32270,32284,32277,32282,32290,32267,32271,32278,32269,32276,32293,32292,32579,32635,32636,32634,32689,32751,32810,32809,32876,33201,33190,33198,33209,33205,33195,33200,33196,33204,33202,33207,33191,33266,33365,33366,33367,34134,34117,34155,34125,34131,34145,34136,34112,34118,34148,34113,34146,34116,34129,34119,34147,34110,34139,34161,34126,34158,34165,34133,34151,34144,34188,34150,34141,34132,34149,34156,34403,34405,34404,34715,34703,34711,34707,34706,34696,34689,34710,34712,34681,34695,34723,34693,34704,34705,34717,34692,34708,34716,34714,34697,35102,35110,35120,35117,35118,35111,35121,35106,35113,35107,35119,35116,35103,35313,35552,35554,35570,35572,35573,35549,35604,35556,35551,35568,35528,35550,35553,35560,35583,35567,35579,35985,35986,35984,36085,36078,36081,36080,36083,36204,36206,36261,36263,36403,36414,36408,36416,36421,36406,36412,36413,36417,36400,36415,36541,36662,36654,36661,36658,36665,36663,36660,36982,36985,36987,36998,37114,37171,37173,37174,37267,37264,37265,37261,37263,37671,37662,37640,37663,37638,37647,37754,37688,37692,37659,37667,37650,37633,37702,37677,37646,37645,37579,37661,37626,37669,37651,37625,37623,37684,37634,37668,37631,37673,37689,37685,37674,37652,37644,37643,37630,37641,37632,37627,37654,38332,38349,38334,38329,38330,38326,38335,38325,38333,38569,38612,38667,38674,38672,38809,38807,38804,38896,38904,38965,38959,38962,39204,39199,39207,39209,39326,39406,39404,39397,39396,39408,39395,39402,39401,39399,39609,39615,39604,39611,39670,39674,39673,39671,39731,39808,39813,39815,39804,39806,39803,39810,39827,39826,39824,39802,39829,39805,39816,40229,40215,40224,40222,40212,40233,40221,40216,40226,40208,40217,40223,40584,40582,40583,40622,40621,40661,40662,40698,40722,40765,20774,20773,20770,20772,20768,20777,21236,22163,22156,22157,22150,22148,22147,22142,22146,22143,22145,22742,22740,22735,22738,23341,23333,23346,23331,23340,23335,23334,23343,23342,23419,23537,23538,23991,24172,24170,24510,24507,25027,25013,25020,25063,25056,25061,25060,25064,25054,25839,25833,25827,25835,25828,25832,25985,25984,26038,26074,26322,27277,27286,27265,27301,27273,27295,27291,27297,27294,27271,27283,27278,27285,27267,27304,27300,27281,27263,27302,27290,27269,27276,27282,27483,27565,27657,28620,28585,28660,28628,28643,28636,28653,28647,28646,28638,28658,28637,28642,28648,29153,29169,29160,29170,29156,29168,29154,29555,29550,29551,29847,29874,29867,29840,29866,29869,29873,29861,29871,29968,29969,29970,29967,30084,30275,30280,30281,30279,30372,30441,30645,30635,30642,30647,30646,30644,30641,30632,30704,30963,30973,30978,30971,30972,30962,30981,30969,30974,30980,31147,31144,31324,31323,31318,31320,31316,31322,31422,31424,31425,31749,31759,31730,31744,31743,31739,31758,31732,31755,31731,31746,31753,31747,31745,31736,31741,31750,31728,31729,31760,31754,31976,32301,32316,32322,32307,38984,32312,32298,32329,32320,32327,32297,32332,32304,32315,32310,32324,32314,32581,32639,32638,32637,32756,32754,32812,33211,33220,33228,33226,33221,33223,33212,33257,33371,33370,33372,34179,34176,34191,34215,34197,34208,34187,34211,34171,34212,34202,34206,34167,34172,34185,34209,34170,34168,34135,34190,34198,34182,34189,34201,34205,34177,34210,34178,34184,34181,34169,34166,34200,34192,34207,34408,34750,34730,34733,34757,34736,34732,34745,34741,34748,34734,34761,34755,34754,34764,34743,34735,34756,34762,34740,34742,34751,34744,34749,34782,34738,35125,35123,35132,35134,35137,35154,35127,35138,35245,35247,35246,35314,35315,35614,35608,35606,35601,35589,35595,35618,35599,35602,35605,35591,35597,35592,35590,35612,35603,35610,35919,35952,35954,35953,35951,35989,35988,36089,36207,36430,36429,36435,36432,36428,36423,36675,36672,36997,36990,37176,37274,37282,37275,37273,37279,37281,37277,37280,37793,37763,37807,37732,37718,37703,37756,37720,37724,37750,37705,37712,37713,37728,37741,37775,37708,37738,37753,37719,37717,37714,37711,37745,37751,37755,37729,37726,37731,37735,37760,37710,37721,38343,38336,38345,38339,38341,38327,38574,38576,38572,38688,38687,38680,38685,38681,38810,38817,38812,38814,38813,38869,38868,38897,38977,38980,38986,38985,38981,38979,39205,39211,39212,39210,39219,39218,39215,39213,39217,39216,39320,39331,39329,39426,39418,39412,39415,39417,39416,39414,39419,39421,39422,39420,39427,39614,39678,39677,39681,39676,39752,39834,39848,39838,39835,39846,39841,39845,39844,39814,39842,39840,39855,40243,40257,40295,40246,40238,40239,40241,40248,40240,40261,40258,40259,40254,40247,40256,40253,32757,40237,40586,40585,40589,40624,40648,40666,40699,40703,40740,40739,40738,40788,40864,20785,20781,20782,22168,22172,22167,22170,22173,22169,22896,23356,23657,23658,24000,24173,24174,25048,25055,25069,25070,25073,25066,25072,25067,25046,25065,25855,25860,25853,25848,25857,25859,25852,26004,26075,26330,26331,26328,27333,27321,27325,27361,27334,27322,27318,27319,27335,27316,27309,27486,27593,27659,28679,28684,28685,28673,28677,28692,28686,28671,28672,28667,28710,28668,28663,28682,29185,29183,29177,29187,29181,29558,29880,29888,29877,29889,29886,29878,29883,29890,29972,29971,30300,30308,30297,30288,30291,30295,30298,30374,30397,30444,30658,30650,30975,30988,30995,30996,30985,30992,30994,30993,31149,31148,31327,31772,31785,31769,31776,31775,31789,31773,31782,31784,31778,31781,31792,32348,32336,32342,32355,32344,32354,32351,32337,32352,32343,32339,32693,32691,32759,32760,32885,33233,33234,33232,33375,33374,34228,34246,34240,34243,34242,34227,34229,34237,34247,34244,34239,34251,34254,34248,34245,34225,34230,34258,34340,34232,34231,34238,34409,34791,34790,34786,34779,34795,34794,34789,34783,34803,34788,34772,34780,34771,34797,34776,34787,34724,34775,34777,34817,34804,34792,34781,35155,35147,35151,35148,35142,35152,35153,35145,35626,35623,35619,35635,35632,35637,35655,35631,35644,35646,35633,35621,35639,35622,35638,35630,35620,35643,35645,35642,35906,35957,35993,35992,35991,36094,36100,36098,36096,36444,36450,36448,36439,36438,36446,36453,36455,36443,36442,36449,36445,36457,36436,36678,36679,36680,36683,37160,37178,37179,37182,37288,37285,37287,37295,37290,37813,37772,37778,37815,37787,37789,37769,37799,37774,37802,37790,37798,37781,37768,37785,37791,37773,37809,37777,37810,37796,37800,37812,37795,37797,38354,38355,38353,38579,38615,38618,24002,38623,38616,38621,38691,38690,38693,38828,38830,38824,38827,38820,38826,38818,38821,38871,38873,38870,38872,38906,38992,38993,38994,39096,39233,39228,39226,39439,39435,39433,39437,39428,39441,39434,39429,39431,39430,39616,39644,39688,39684,39685,39721,39733,39754,39756,39755,39879,39878,39875,39871,39873,39861,39864,39891,39862,39876,39865,39869,40284,40275,40271,40266,40283,40267,40281,40278,40268,40279,40274,40276,40287,40280,40282,40590,40588,40671,40705,40704,40726,40741,40747,40746,40745,40744,40780,40789,20788,20789,21142,21239,21428,22187,22189,22182,22183,22186,22188,22746,22749,22747,22802,23357,23358,23359,24003,24176,24511,25083,25863,25872,25869,25865,25868,25870,25988,26078,26077,26334,27367,27360,27340,27345,27353,27339,27359,27356,27344,27371,27343,27341,27358,27488,27568,27660,28697,28711,28704,28694,28715,28705,28706,28707,28713,28695,28708,28700,28714,29196,29194,29191,29186,29189,29349,29350,29348,29347,29345,29899,29893,29879,29891,29974,30304,30665,30666,30660,30705,31005,31003,31009,31004,30999,31006,31152,31335,31336,31795,31804,31801,31788,31803,31980,31978,32374,32373,32376,32368,32375,32367,32378,32370,32372,32360,32587,32586,32643,32646,32695,32765,32766,32888,33239,33237,33380,33377,33379,34283,34289,34285,34265,34273,34280,34266,34263,34284,34290,34296,34264,34271,34275,34268,34257,34288,34278,34287,34270,34274,34816,34810,34819,34806,34807,34825,34828,34827,34822,34812,34824,34815,34826,34818,35170,35162,35163,35159,35169,35164,35160,35165,35161,35208,35255,35254,35318,35664,35656,35658,35648,35667,35670,35668,35659,35669,35665,35650,35666,35671,35907,35959,35958,35994,36102,36103,36105,36268,36266,36269,36267,36461,36472,36467,36458,36463,36475,36546,36690,36689,36687,36688,36691,36788,37184,37183,37296,37293,37854,37831,37839,37826,37850,37840,37881,37868,37836,37849,37801,37862,37834,37844,37870,37859,37845,37828,37838,37824,37842,37863,38269,38362,38363,38625,38697,38699,38700,38696,38694,38835,38839,38838,38877,38878,38879,39004,39001,39005,38999,39103,39101,39099,39102,39240,39239,39235,39334,39335,39450,39445,39461,39453,39460,39451,39458,39456,39463,39459,39454,39452,39444,39618,39691,39690,39694,39692,39735,39914,39915,39904,39902,39908,39910,39906,39920,39892,39895,39916,39900,39897,39909,39893,39905,39898,40311,40321,40330,40324,40328,40305,40320,40312,40326,40331,40332,40317,40299,40308,40309,40304,40297,40325,40307,40315,40322,40303,40313,40319,40327,40296,40596,40593,40640,40700,40749,40768,40769,40781,40790,40791,40792,21303,22194,22197,22195,22755,23365,24006,24007,24302,24303,24512,24513,25081,25879,25878,25877,25875,26079,26344,26339,26340,27379,27376,27370,27368,27385,27377,27374,27375,28732,28725,28719,28727,28724,28721,28738,28728,28735,28730,28729,28736,28731,28723,28737,29203,29204,29352,29565,29564,29882,30379,30378,30398,30445,30668,30670,30671,30669,30706,31013,31011,31015,31016,31012,31017,31154,31342,31340,31341,31479,31817,31816,31818,31815,31813,31982,32379,32382,32385,32384,32698,32767,32889,33243,33241,33291,33384,33385,34338,34303,34305,34302,34331,34304,34294,34308,34313,34309,34316,34301,34841,34832,34833,34839,34835,34838,35171,35174,35257,35319,35680,35690,35677,35688,35683,35685,35687,35693,36270,36486,36488,36484,36697,36694,36695,36693,36696,36698,37005,37187,37185,37303,37301,37298,37299,37899,37907,37883,37920,37903,37908,37886,37909,37904,37928,37913,37901,37877,37888,37879,37895,37902,37910,37906,37882,37897,37880,37898,37887,37884,37900,37878,37905,37894,38366,38368,38367,38702,38703,38841,38843,38909,38910,39008,39010,39011,39007,39105,39106,39248,39246,39257,39244,39243,39251,39474,39476,39473,39468,39466,39478,39465,39470,39480,39469,39623,39626,39622,39696,39698,39697,39947,39944,39927,39941,39954,39928,40000,39943,39950,39942,39959,39956,39945,40351,40345,40356,40349,40338,40344,40336,40347,40352,40340,40348,40362,40343,40353,40346,40354,40360,40350,40355,40383,40361,40342,40358,40359,40601,40603,40602,40677,40676,40679,40678,40752,40750,40795,40800,40798,40797,40793,40849,20794,20793,21144,21143,22211,22205,22206,23368,23367,24011,24015,24305,25085,25883,27394,27388,27395,27384,27392,28739,28740,28746,28744,28745,28741,28742,29213,29210,29209,29566,29975,30314,30672,31021,31025,31023,31828,31827,31986,32394,32391,32392,32395,32390,32397,32589,32699,32816,33245,34328,34346,34342,34335,34339,34332,34329,34343,34350,34337,34336,34345,34334,34341,34857,34845,34843,34848,34852,34844,34859,34890,35181,35177,35182,35179,35322,35705,35704,35653,35706,35707,36112,36116,36271,36494,36492,36702,36699,36701,37190,37188,37189,37305,37951,37947,37942,37929,37949,37948,37936,37945,37930,37943,37932,37952,37937,38373,38372,38371,38709,38714,38847,38881,39012,39113,39110,39104,39256,39254,39481,39485,39494,39492,39490,39489,39482,39487,39629,39701,39703,39704,39702,39738,39762,39979,39965,39964,39980,39971,39976,39977,39972,39969,40375,40374,40380,40385,40391,40394,40399,40382,40389,40387,40379,40373,40398,40377,40378,40364,40392,40369,40365,40396,40371,40397,40370,40570,40604,40683,40686,40685,40731,40728,40730,40753,40782,40805,40804,40850,20153,22214,22213,22219,22897,23371,23372,24021,24017,24306,25889,25888,25894,25890,27403,27400,27401,27661,28757,28758,28759,28754,29214,29215,29353,29567,29912,29909,29913,29911,30317,30381,31029,31156,31344,31345,31831,31836,31833,31835,31834,31988,31985,32401,32591,32647,33246,33387,34356,34357,34355,34348,34354,34358,34860,34856,34854,34858,34853,35185,35263,35262,35323,35710,35716,35714,35718,35717,35711,36117,36501,36500,36506,36498,36496,36502,36503,36704,36706,37191,37964,37968,37962,37963,37967,37959,37957,37960,37961,37958,38719,38883,39018,39017,39115,39252,39259,39502,39507,39508,39500,39503,39496,39498,39497,39506,39504,39632,39705,39723,39739,39766,39765,40006,40008,39999,40004,39993,39987,40001,39996,39991,39988,39986,39997,39990,40411,40402,40414,40410,40395,40400,40412,40401,40415,40425,40409,40408,40406,40437,40405,40413,40630,40688,40757,40755,40754,40770,40811,40853,40866,20797,21145,22760,22759,22898,23373,24024,34863,24399,25089,25091,25092,25897,25893,26006,26347,27409,27410,27407,27594,28763,28762,29218,29570,29569,29571,30320,30676,31847,31846,32405,33388,34362,34368,34361,34364,34353,34363,34366,34864,34866,34862,34867,35190,35188,35187,35326,35724,35726,35723,35720,35909,36121,36504,36708,36707,37308,37986,37973,37981,37975,37982,38852,38853,38912,39510,39513,39710,39711,39712,40018,40024,40016,40010,40013,40011,40021,40025,40012,40014,40443,40439,40431,40419,40427,40440,40420,40438,40417,40430,40422,40434,40432,40418,40428,40436,40435,40424,40429,40642,40656,40690,40691,40710,40732,40760,40759,40758,40771,40783,40817,40816,40814,40815,22227,22221,23374,23661,25901,26349,26350,27411,28767,28769,28765,28768,29219,29915,29925,30677,31032,31159,31158,31850,32407,32649,33389,34371,34872,34871,34869,34891,35732,35733,36510,36511,36512,36509,37310,37309,37314,37995,37992,37993,38629,38726,38723,38727,38855,38885,39518,39637,39769,40035,40039,40038,40034,40030,40032,40450,40446,40455,40451,40454,40453,40448,40449,40457,40447,40445,40452,40608,40734,40774,40820,40821,40822,22228,25902,26040,27416,27417,27415,27418,28770,29222,29354,30680,30681,31033,31849,31851,31990,32410,32408,32411,32409,33248,33249,34374,34375,34376,35193,35194,35196,35195,35327,35736,35737,36517,36516,36515,37998,37997,37999,38001,38003,38729,39026,39263,40040,40046,40045,40459,40461,40464,40463,40466,40465,40609,40693,40713,40775,40824,40827,40826,40825,22302,28774,31855,34876,36274,36518,37315,38004,38008,38006,38005,39520,40052,40051,40049,40053,40468,40467,40694,40714,40868,28776,28773,31991,34410,34878,34877,34879,35742,35996,36521,36553,38731,39027,39028,39116,39265,39339,39524,39526,39527,39716,40469,40471,40776,25095,27422,29223,34380,36520,38018,38016,38017,39529,39528,39726,40473,29225,34379,35743,38019,40057,40631,30325,39531,40058,40477,28777,28778,40612,40830,40777,40856,30849,37561,35023,22715,24658,31911,23290,9556,9574,9559,9568,9580,9571,9562,9577,9565,9554,9572,9557,9566,9578,9569,9560,9575,9563,9555,9573,9558,9567,9579,9570,9561,9576,9564,9553,9552,9581,9582,9584,9583,65517,132423,37595,132575,147397,34124,17077,29679,20917,13897,149826,166372,37700,137691,33518,146632,30780,26436,25311,149811,166314,131744,158643,135941,20395,140525,20488,159017,162436,144896,150193,140563,20521,131966,24484,131968,131911,28379,132127,20605,20737,13434,20750,39020,14147,33814,149924,132231,20832,144308,20842,134143,139516,131813,140592,132494,143923,137603,23426,34685,132531,146585,20914,20920,40244,20937,20943,20945,15580,20947,150182,20915,20962,21314,20973,33741,26942,145197,24443,21003,21030,21052,21173,21079,21140,21177,21189,31765,34114,21216,34317,158483,21253,166622,21833,28377,147328,133460,147436,21299,21316,134114,27851,136998,26651,29653,24650,16042,14540,136936,29149,17570,21357,21364,165547,21374,21375,136598,136723,30694,21395,166555,21408,21419,21422,29607,153458,16217,29596,21441,21445,27721,20041,22526,21465,15019,134031,21472,147435,142755,21494,134263,21523,28793,21803,26199,27995,21613,158547,134516,21853,21647,21668,18342,136973,134877,15796,134477,166332,140952,21831,19693,21551,29719,21894,21929,22021,137431,147514,17746,148533,26291,135348,22071,26317,144010,26276,26285,22093,22095,30961,22257,38791,21502,22272,22255,22253,166758,13859,135759,22342,147877,27758,28811,22338,14001,158846,22502,136214,22531,136276,148323,22566,150517,22620,22698,13665,22752,22748,135740,22779,23551,22339,172368,148088,37843,13729,22815,26790,14019,28249,136766,23076,21843,136850,34053,22985,134478,158849,159018,137180,23001,137211,137138,159142,28017,137256,136917,23033,159301,23211,23139,14054,149929,23159,14088,23190,29797,23251,159649,140628,15749,137489,14130,136888,24195,21200,23414,25992,23420,162318,16388,18525,131588,23509,24928,137780,154060,132517,23539,23453,19728,23557,138052,23571,29646,23572,138405,158504,23625,18653,23685,23785,23791,23947,138745,138807,23824,23832,23878,138916,23738,24023,33532,14381,149761,139337,139635,33415,14390,15298,24110,27274,24181,24186,148668,134355,21414,20151,24272,21416,137073,24073,24308,164994,24313,24315,14496,24316,26686,37915,24333,131521,194708,15070,18606,135994,24378,157832,140240,24408,140401,24419,38845,159342,24434,37696,166454,24487,23990,15711,152144,139114,159992,140904,37334,131742,166441,24625,26245,137335,14691,15815,13881,22416,141236,31089,15936,24734,24740,24755,149890,149903,162387,29860,20705,23200,24932,33828,24898,194726,159442,24961,20980,132694,24967,23466,147383,141407,25043,166813,170333,25040,14642,141696,141505,24611,24924,25886,25483,131352,25285,137072,25301,142861,25452,149983,14871,25656,25592,136078,137212,25744,28554,142902,38932,147596,153373,25825,25829,38011,14950,25658,14935,25933,28438,150056,150051,25989,25965,25951,143486,26037,149824,19255,26065,16600,137257,26080,26083,24543,144384,26136,143863,143864,26180,143780,143781,26187,134773,26215,152038,26227,26228,138813,143921,165364,143816,152339,30661,141559,39332,26370,148380,150049,15147,27130,145346,26462,26471,26466,147917,168173,26583,17641,26658,28240,37436,26625,144358,159136,26717,144495,27105,27147,166623,26995,26819,144845,26881,26880,15666,14849,144956,15232,26540,26977,166474,17148,26934,27032,15265,132041,33635,20624,27129,144985,139562,27205,145155,27293,15347,26545,27336,168348,15373,27421,133411,24798,27445,27508,141261,28341,146139,132021,137560,14144,21537,146266,27617,147196,27612,27703,140427,149745,158545,27738,33318,27769,146876,17605,146877,147876,149772,149760,146633,14053,15595,134450,39811,143865,140433,32655,26679,159013,159137,159211,28054,27996,28284,28420,149887,147589,159346,34099,159604,20935,27804,28189,33838,166689,28207,146991,29779,147330,31180,28239,23185,143435,28664,14093,28573,146992,28410,136343,147517,17749,37872,28484,28508,15694,28532,168304,15675,28575,147780,28627,147601,147797,147513,147440,147380,147775,20959,147798,147799,147776,156125,28747,28798,28839,28801,28876,28885,28886,28895,16644,15848,29108,29078,148087,28971,28997,23176,29002,29038,23708,148325,29007,37730,148161,28972,148570,150055,150050,29114,166888,28861,29198,37954,29205,22801,37955,29220,37697,153093,29230,29248,149876,26813,29269,29271,15957,143428,26637,28477,29314,29482,29483,149539,165931,18669,165892,29480,29486,29647,29610,134202,158254,29641,29769,147938,136935,150052,26147,14021,149943,149901,150011,29687,29717,26883,150054,29753,132547,16087,29788,141485,29792,167602,29767,29668,29814,33721,29804,14128,29812,37873,27180,29826,18771,150156,147807,150137,166799,23366,166915,137374,29896,137608,29966,29929,29982,167641,137803,23511,167596,37765,30029,30026,30055,30062,151426,16132,150803,30094,29789,30110,30132,30210,30252,30289,30287,30319,30326,156661,30352,33263,14328,157969,157966,30369,30373,30391,30412,159647,33890,151709,151933,138780,30494,30502,30528,25775,152096,30552,144044,30639,166244,166248,136897,30708,30729,136054,150034,26826,30895,30919,30931,38565,31022,153056,30935,31028,30897,161292,36792,34948,166699,155779,140828,31110,35072,26882,31104,153687,31133,162617,31036,31145,28202,160038,16040,31174,168205,31188],
28016 "euc-kr":[44034,44035,44037,44038,44043,44044,44045,44046,44047,44056,44062,44063,44065,44066,44067,44069,44070,44071,44072,44073,44074,44075,44078,44082,44083,44084,null,null,null,null,null,null,44085,44086,44087,44090,44091,44093,44094,44095,44097,44098,44099,44100,44101,44102,44103,44104,44105,44106,44108,44110,44111,44112,44113,44114,44115,44117,null,null,null,null,null,null,44118,44119,44121,44122,44123,44125,44126,44127,44128,44129,44130,44131,44132,44133,44134,44135,44136,44137,44138,44139,44140,44141,44142,44143,44146,44147,44149,44150,44153,44155,44156,44157,44158,44159,44162,44167,44168,44173,44174,44175,44177,44178,44179,44181,44182,44183,44184,44185,44186,44187,44190,44194,44195,44196,44197,44198,44199,44203,44205,44206,44209,44210,44211,44212,44213,44214,44215,44218,44222,44223,44224,44226,44227,44229,44230,44231,44233,44234,44235,44237,44238,44239,44240,44241,44242,44243,44244,44246,44248,44249,44250,44251,44252,44253,44254,44255,44258,44259,44261,44262,44265,44267,44269,44270,44274,44276,44279,44280,44281,44282,44283,44286,44287,44289,44290,44291,44293,44295,44296,44297,44298,44299,44302,44304,44306,44307,44308,44309,44310,44311,44313,44314,44315,44317,44318,44319,44321,44322,44323,44324,44325,44326,44327,44328,44330,44331,44334,44335,44336,44337,44338,44339,null,null,null,null,null,null,44342,44343,44345,44346,44347,44349,44350,44351,44352,44353,44354,44355,44358,44360,44362,44363,44364,44365,44366,44367,44369,44370,44371,44373,44374,44375,null,null,null,null,null,null,44377,44378,44379,44380,44381,44382,44383,44384,44386,44388,44389,44390,44391,44392,44393,44394,44395,44398,44399,44401,44402,44407,44408,44409,44410,44414,44416,44419,44420,44421,44422,44423,44426,44427,44429,44430,44431,44433,44434,44435,44436,44437,44438,44439,44440,44441,44442,44443,44446,44447,44448,44449,44450,44451,44453,44454,44455,44456,44457,44458,44459,44460,44461,44462,44463,44464,44465,44466,44467,44468,44469,44470,44472,44473,44474,44475,44476,44477,44478,44479,44482,44483,44485,44486,44487,44489,44490,44491,44492,44493,44494,44495,44498,44500,44501,44502,44503,44504,44505,44506,44507,44509,44510,44511,44513,44514,44515,44517,44518,44519,44520,44521,44522,44523,44524,44525,44526,44527,44528,44529,44530,44531,44532,44533,44534,44535,44538,44539,44541,44542,44546,44547,44548,44549,44550,44551,44554,44556,44558,44559,44560,44561,44562,44563,44565,44566,44567,44568,44569,44570,44571,44572,null,null,null,null,null,null,44573,44574,44575,44576,44577,44578,44579,44580,44581,44582,44583,44584,44585,44586,44587,44588,44589,44590,44591,44594,44595,44597,44598,44601,44603,44604,null,null,null,null,null,null,44605,44606,44607,44610,44612,44615,44616,44617,44619,44623,44625,44626,44627,44629,44631,44632,44633,44634,44635,44638,44642,44643,44644,44646,44647,44650,44651,44653,44654,44655,44657,44658,44659,44660,44661,44662,44663,44666,44670,44671,44672,44673,44674,44675,44678,44679,44680,44681,44682,44683,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44735,44737,44738,44739,44741,44742,44743,44744,44745,44746,44747,44750,44754,44755,44756,44757,44758,44759,44762,44763,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44777,44778,44780,44782,44783,44784,44785,44786,44787,44789,44790,44791,44793,44794,44795,44797,44798,44799,44800,44801,44802,44803,44804,44805,null,null,null,null,null,null,44806,44809,44810,44811,44812,44814,44815,44817,44818,44819,44820,44821,44822,44823,44824,44825,44826,44827,44828,44829,44830,44831,44832,44833,44834,44835,null,null,null,null,null,null,44836,44837,44838,44839,44840,44841,44842,44843,44846,44847,44849,44851,44853,44854,44855,44856,44857,44858,44859,44862,44864,44868,44869,44870,44871,44874,44875,44876,44877,44878,44879,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44894,44895,44896,44897,44898,44899,44902,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44922,44923,44924,44925,44926,44927,44929,44930,44931,44933,44934,44935,44937,44938,44939,44940,44941,44942,44943,44946,44947,44948,44950,44951,44952,44953,44954,44955,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44986,44987,44989,44990,44991,44993,44994,44995,44996,44997,44998,45002,45004,45007,45008,45009,45010,45011,45013,45014,45015,45016,45017,45018,45019,45021,45022,45023,45024,45025,null,null,null,null,null,null,45026,45027,45028,45029,45030,45031,45034,45035,45036,45037,45038,45039,45042,45043,45045,45046,45047,45049,45050,45051,45052,45053,45054,45055,45058,45059,null,null,null,null,null,null,45061,45062,45063,45064,45065,45066,45067,45069,45070,45071,45073,45074,45075,45077,45078,45079,45080,45081,45082,45083,45086,45087,45088,45089,45090,45091,45092,45093,45094,45095,45097,45098,45099,45100,45101,45102,45103,45104,45105,45106,45107,45108,45109,45110,45111,45112,45113,45114,45115,45116,45117,45118,45119,45120,45121,45122,45123,45126,45127,45129,45131,45133,45135,45136,45137,45138,45142,45144,45146,45147,45148,45150,45151,45152,45153,45154,45155,45156,45157,45158,45159,45160,45161,45162,45163,45164,45165,45166,45167,45168,45169,45170,45171,45172,45173,45174,45175,45176,45177,45178,45179,45182,45183,45185,45186,45187,45189,45190,45191,45192,45193,45194,45195,45198,45200,45202,45203,45204,45205,45206,45207,45211,45213,45214,45219,45220,45221,45222,45223,45226,45232,45234,45238,45239,45241,45242,45243,45245,45246,45247,45248,45249,45250,45251,45254,45258,45259,45260,45261,45262,45263,45266,null,null,null,null,null,null,45267,45269,45270,45271,45273,45274,45275,45276,45277,45278,45279,45281,45282,45283,45284,45286,45287,45288,45289,45290,45291,45292,45293,45294,45295,45296,null,null,null,null,null,null,45297,45298,45299,45300,45301,45302,45303,45304,45305,45306,45307,45308,45309,45310,45311,45312,45313,45314,45315,45316,45317,45318,45319,45322,45325,45326,45327,45329,45332,45333,45334,45335,45338,45342,45343,45344,45345,45346,45350,45351,45353,45354,45355,45357,45358,45359,45360,45361,45362,45363,45366,45370,45371,45372,45373,45374,45375,45378,45379,45381,45382,45383,45385,45386,45387,45388,45389,45390,45391,45394,45395,45398,45399,45401,45402,45403,45405,45406,45407,45409,45410,45411,45412,45413,45414,45415,45416,45417,45418,45419,45420,45421,45422,45423,45424,45425,45426,45427,45428,45429,45430,45431,45434,45435,45437,45438,45439,45441,45443,45444,45445,45446,45447,45450,45452,45454,45455,45456,45457,45461,45462,45463,45465,45466,45467,45469,45470,45471,45472,45473,45474,45475,45476,45477,45478,45479,45481,45482,45483,45484,45485,45486,45487,45488,45489,45490,45491,45492,45493,45494,45495,45496,null,null,null,null,null,null,45497,45498,45499,45500,45501,45502,45503,45504,45505,45506,45507,45508,45509,45510,45511,45512,45513,45514,45515,45517,45518,45519,45521,45522,45523,45525,null,null,null,null,null,null,45526,45527,45528,45529,45530,45531,45534,45536,45537,45538,45539,45540,45541,45542,45543,45546,45547,45549,45550,45551,45553,45554,45555,45556,45557,45558,45559,45560,45562,45564,45566,45567,45568,45569,45570,45571,45574,45575,45577,45578,45581,45582,45583,45584,45585,45586,45587,45590,45592,45594,45595,45596,45597,45598,45599,45601,45602,45603,45604,45605,45606,45607,45608,45609,45610,45611,45612,45613,45614,45615,45616,45617,45618,45619,45621,45622,45623,45624,45625,45626,45627,45629,45630,45631,45632,45633,45634,45635,45636,45637,45638,45639,45640,45641,45642,45643,45644,45645,45646,45647,45648,45649,45650,45651,45652,45653,45654,45655,45657,45658,45659,45661,45662,45663,45665,45666,45667,45668,45669,45670,45671,45674,45675,45676,45677,45678,45679,45680,45681,45682,45683,45686,45687,45688,45689,45690,45691,45693,45694,45695,45696,45697,45698,45699,45702,45703,45704,45706,45707,45708,45709,45710,null,null,null,null,null,null,45711,45714,45715,45717,45718,45719,45723,45724,45725,45726,45727,45730,45732,45735,45736,45737,45739,45741,45742,45743,45745,45746,45747,45749,45750,45751,null,null,null,null,null,null,45752,45753,45754,45755,45756,45757,45758,45759,45760,45761,45762,45763,45764,45765,45766,45767,45770,45771,45773,45774,45775,45777,45779,45780,45781,45782,45783,45786,45788,45790,45791,45792,45793,45795,45799,45801,45802,45808,45809,45810,45814,45820,45821,45822,45826,45827,45829,45830,45831,45833,45834,45835,45836,45837,45838,45839,45842,45846,45847,45848,45849,45850,45851,45853,45854,45855,45856,45857,45858,45859,45860,45861,45862,45863,45864,45865,45866,45867,45868,45869,45870,45871,45872,45873,45874,45875,45876,45877,45878,45879,45880,45881,45882,45883,45884,45885,45886,45887,45888,45889,45890,45891,45892,45893,45894,45895,45896,45897,45898,45899,45900,45901,45902,45903,45904,45905,45906,45907,45911,45913,45914,45917,45920,45921,45922,45923,45926,45928,45930,45932,45933,45935,45938,45939,45941,45942,45943,45945,45946,45947,45948,45949,45950,45951,45954,45958,45959,45960,45961,45962,45963,45965,null,null,null,null,null,null,45966,45967,45969,45970,45971,45973,45974,45975,45976,45977,45978,45979,45980,45981,45982,45983,45986,45987,45988,45989,45990,45991,45993,45994,45995,45997,null,null,null,null,null,null,45998,45999,46000,46001,46002,46003,46004,46005,46006,46007,46008,46009,46010,46011,46012,46013,46014,46015,46016,46017,46018,46019,46022,46023,46025,46026,46029,46031,46033,46034,46035,46038,46040,46042,46044,46046,46047,46049,46050,46051,46053,46054,46055,46057,46058,46059,46060,46061,46062,46063,46064,46065,46066,46067,46068,46069,46070,46071,46072,46073,46074,46075,46077,46078,46079,46080,46081,46082,46083,46084,46085,46086,46087,46088,46089,46090,46091,46092,46093,46094,46095,46097,46098,46099,46100,46101,46102,46103,46105,46106,46107,46109,46110,46111,46113,46114,46115,46116,46117,46118,46119,46122,46124,46125,46126,46127,46128,46129,46130,46131,46133,46134,46135,46136,46137,46138,46139,46140,46141,46142,46143,46144,46145,46146,46147,46148,46149,46150,46151,46152,46153,46154,46155,46156,46157,46158,46159,46162,46163,46165,46166,46167,46169,46170,46171,46172,46173,46174,46175,46178,46180,46182,null,null,null,null,null,null,46183,46184,46185,46186,46187,46189,46190,46191,46192,46193,46194,46195,46196,46197,46198,46199,46200,46201,46202,46203,46204,46205,46206,46207,46209,46210,null,null,null,null,null,null,46211,46212,46213,46214,46215,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46232,46233,46234,46235,46236,46238,46239,46240,46241,46242,46243,46245,46246,46247,46249,46250,46251,46253,46254,46255,46256,46257,46258,46259,46260,46262,46264,46266,46267,46268,46269,46270,46271,46273,46274,46275,46277,46278,46279,46281,46282,46283,46284,46285,46286,46287,46289,46290,46291,46292,46294,46295,46296,46297,46298,46299,46302,46303,46305,46306,46309,46311,46312,46313,46314,46315,46318,46320,46322,46323,46324,46325,46326,46327,46329,46330,46331,46332,46333,46334,46335,46336,46337,46338,46339,46340,46341,46342,46343,46344,46345,46346,46347,46348,46349,46350,46351,46352,46353,46354,46355,46358,46359,46361,46362,46365,46366,46367,46368,46369,46370,46371,46374,46379,46380,46381,46382,46383,46386,46387,46389,46390,46391,46393,46394,46395,46396,46397,46398,46399,46402,46406,null,null,null,null,null,null,46407,46408,46409,46410,46414,46415,46417,46418,46419,46421,46422,46423,46424,46425,46426,46427,46430,46434,46435,46436,46437,46438,46439,46440,46441,46442,null,null,null,null,null,null,46443,46444,46445,46446,46447,46448,46449,46450,46451,46452,46453,46454,46455,46456,46457,46458,46459,46460,46461,46462,46463,46464,46465,46466,46467,46468,46469,46470,46471,46472,46473,46474,46475,46476,46477,46478,46479,46480,46481,46482,46483,46484,46485,46486,46487,46488,46489,46490,46491,46492,46493,46494,46495,46498,46499,46501,46502,46503,46505,46508,46509,46510,46511,46514,46518,46519,46520,46521,46522,46526,46527,46529,46530,46531,46533,46534,46535,46536,46537,46538,46539,46542,46546,46547,46548,46549,46550,46551,46553,46554,46555,46556,46557,46558,46559,46560,46561,46562,46563,46564,46565,46566,46567,46568,46569,46570,46571,46573,46574,46575,46576,46577,46578,46579,46580,46581,46582,46583,46584,46585,46586,46587,46588,46589,46590,46591,46592,46593,46594,46595,46596,46597,46598,46599,46600,46601,46602,46603,46604,46605,46606,46607,46610,46611,46613,46614,46615,46617,46618,46619,46620,46621,null,null,null,null,null,null,46622,46623,46624,46625,46626,46627,46628,46630,46631,46632,46633,46634,46635,46637,46638,46639,46640,46641,46642,46643,46645,46646,46647,46648,46649,46650,null,null,null,null,null,null,46651,46652,46653,46654,46655,46656,46657,46658,46659,46660,46661,46662,46663,46665,46666,46667,46668,46669,46670,46671,46672,46673,46674,46675,46676,46677,46678,46679,46680,46681,46682,46683,46684,46685,46686,46687,46688,46689,46690,46691,46693,46694,46695,46697,46698,46699,46700,46701,46702,46703,46704,46705,46706,46707,46708,46709,46710,46711,46712,46713,46714,46715,46716,46717,46718,46719,46720,46721,46722,46723,46724,46725,46726,46727,46728,46729,46730,46731,46732,46733,46734,46735,46736,46737,46738,46739,46740,46741,46742,46743,46744,46745,46746,46747,46750,46751,46753,46754,46755,46757,46758,46759,46760,46761,46762,46765,46766,46767,46768,46770,46771,46772,46773,46774,46775,46776,46777,46778,46779,46780,46781,46782,46783,46784,46785,46786,46787,46788,46789,46790,46791,46792,46793,46794,46795,46796,46797,46798,46799,46800,46801,46802,46803,46805,46806,46807,46808,46809,46810,46811,46812,46813,null,null,null,null,null,null,46814,46815,46816,46817,46818,46819,46820,46821,46822,46823,46824,46825,46826,46827,46828,46829,46830,46831,46833,46834,46835,46837,46838,46839,46841,46842,null,null,null,null,null,null,46843,46844,46845,46846,46847,46850,46851,46852,46854,46855,46856,46857,46858,46859,46860,46861,46862,46863,46864,46865,46866,46867,46868,46869,46870,46871,46872,46873,46874,46875,46876,46877,46878,46879,46880,46881,46882,46883,46884,46885,46886,46887,46890,46891,46893,46894,46897,46898,46899,46900,46901,46902,46903,46906,46908,46909,46910,46911,46912,46913,46914,46915,46917,46918,46919,46921,46922,46923,46925,46926,46927,46928,46929,46930,46931,46934,46935,46936,46937,46938,46939,46940,46941,46942,46943,46945,46946,46947,46949,46950,46951,46953,46954,46955,46956,46957,46958,46959,46962,46964,46966,46967,46968,46969,46970,46971,46974,46975,46977,46978,46979,46981,46982,46983,46984,46985,46986,46987,46990,46995,46996,46997,47002,47003,47005,47006,47007,47009,47010,47011,47012,47013,47014,47015,47018,47022,47023,47024,47025,47026,47027,47030,47031,47033,47034,47035,47036,47037,47038,47039,47040,47041,null,null,null,null,null,null,47042,47043,47044,47045,47046,47048,47050,47051,47052,47053,47054,47055,47056,47057,47058,47059,47060,47061,47062,47063,47064,47065,47066,47067,47068,47069,null,null,null,null,null,null,47070,47071,47072,47073,47074,47075,47076,47077,47078,47079,47080,47081,47082,47083,47086,47087,47089,47090,47091,47093,47094,47095,47096,47097,47098,47099,47102,47106,47107,47108,47109,47110,47114,47115,47117,47118,47119,47121,47122,47123,47124,47125,47126,47127,47130,47132,47134,47135,47136,47137,47138,47139,47142,47143,47145,47146,47147,47149,47150,47151,47152,47153,47154,47155,47158,47162,47163,47164,47165,47166,47167,47169,47170,47171,47173,47174,47175,47176,47177,47178,47179,47180,47181,47182,47183,47184,47186,47188,47189,47190,47191,47192,47193,47194,47195,47198,47199,47201,47202,47203,47205,47206,47207,47208,47209,47210,47211,47214,47216,47218,47219,47220,47221,47222,47223,47225,47226,47227,47229,47230,47231,47232,47233,47234,47235,47236,47237,47238,47239,47240,47241,47242,47243,47244,47246,47247,47248,47249,47250,47251,47252,47253,47254,47255,47256,47257,47258,47259,47260,47261,47262,47263,null,null,null,null,null,null,47264,47265,47266,47267,47268,47269,47270,47271,47273,47274,47275,47276,47277,47278,47279,47281,47282,47283,47285,47286,47287,47289,47290,47291,47292,47293,null,null,null,null,null,null,47294,47295,47298,47300,47302,47303,47304,47305,47306,47307,47309,47310,47311,47313,47314,47315,47317,47318,47319,47320,47321,47322,47323,47324,47326,47328,47330,47331,47332,47333,47334,47335,47338,47339,47341,47342,47343,47345,47346,47347,47348,47349,47350,47351,47354,47356,47358,47359,47360,47361,47362,47363,47365,47366,47367,47368,47369,47370,47371,47372,47373,47374,47375,47376,47377,47378,47379,47380,47381,47382,47383,47385,47386,47387,47388,47389,47390,47391,47393,47394,47395,47396,47397,47398,47399,47400,47401,47402,47403,47404,47405,47406,47407,47408,47409,47410,47411,47412,47413,47414,47415,47416,47417,47418,47419,47422,47423,47425,47426,47427,47429,47430,47431,47432,47433,47434,47435,47437,47438,47440,47442,47443,47444,47445,47446,47447,47450,47451,47453,47454,47455,47457,47458,47459,47460,47461,47462,47463,47466,47468,47470,47471,47472,47473,47474,47475,47478,47479,47481,47482,47483,47485,null,null,null,null,null,null,47486,47487,47488,47489,47490,47491,47494,47496,47499,47500,47503,47504,47505,47506,47507,47508,47509,47510,47511,47512,47513,47514,47515,47516,47517,47518,null,null,null,null,null,null,47519,47520,47521,47522,47523,47524,47525,47526,47527,47528,47529,47530,47531,47534,47535,47537,47538,47539,47541,47542,47543,47544,47545,47546,47547,47550,47552,47554,47555,47556,47557,47558,47559,47562,47563,47565,47571,47572,47573,47574,47575,47578,47580,47583,47584,47586,47590,47591,47593,47594,47595,47597,47598,47599,47600,47601,47602,47603,47606,47611,47612,47613,47614,47615,47618,47619,47620,47621,47622,47623,47625,47626,47627,47628,47629,47630,47631,47632,47633,47634,47635,47636,47638,47639,47640,47641,47642,47643,47644,47645,47646,47647,47648,47649,47650,47651,47652,47653,47654,47655,47656,47657,47658,47659,47660,47661,47662,47663,47664,47665,47666,47667,47668,47669,47670,47671,47674,47675,47677,47678,47679,47681,47683,47684,47685,47686,47687,47690,47692,47695,47696,47697,47698,47702,47703,47705,47706,47707,47709,47710,47711,47712,47713,47714,47715,47718,47722,47723,47724,47725,47726,47727,null,null,null,null,null,null,47730,47731,47733,47734,47735,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47750,47752,47753,47754,47755,47757,47758,47759,47760,47761,47762,null,null,null,null,null,null,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,47775,47776,47777,47778,47779,47780,47781,47782,47783,47786,47789,47790,47791,47793,47795,47796,47797,47798,47799,47802,47804,47806,47807,47808,47809,47810,47811,47813,47814,47815,47817,47818,47819,47820,47821,47822,47823,47824,47825,47826,47827,47828,47829,47830,47831,47834,47835,47836,47837,47838,47839,47840,47841,47842,47843,47844,47845,47846,47847,47848,47849,47850,47851,47852,47853,47854,47855,47856,47857,47858,47859,47860,47861,47862,47863,47864,47865,47866,47867,47869,47870,47871,47873,47874,47875,47877,47878,47879,47880,47881,47882,47883,47884,47886,47888,47890,47891,47892,47893,47894,47895,47897,47898,47899,47901,47902,47903,47905,47906,47907,47908,47909,47910,47911,47912,47914,47916,47917,47918,47919,47920,47921,47922,47923,47927,47929,47930,47935,47936,47937,47938,47939,47942,47944,47946,47947,47948,47950,47953,47954,null,null,null,null,null,null,47955,47957,47958,47959,47961,47962,47963,47964,47965,47966,47967,47968,47970,47972,47973,47974,47975,47976,47977,47978,47979,47981,47982,47983,47984,47985,null,null,null,null,null,null,47986,47987,47988,47989,47990,47991,47992,47993,47994,47995,47996,47997,47998,47999,48000,48001,48002,48003,48004,48005,48006,48007,48009,48010,48011,48013,48014,48015,48017,48018,48019,48020,48021,48022,48023,48024,48025,48026,48027,48028,48029,48030,48031,48032,48033,48034,48035,48037,48038,48039,48041,48042,48043,48045,48046,48047,48048,48049,48050,48051,48053,48054,48056,48057,48058,48059,48060,48061,48062,48063,48065,48066,48067,48069,48070,48071,48073,48074,48075,48076,48077,48078,48079,48081,48082,48084,48085,48086,48087,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48100,48101,48102,48103,48104,48105,48106,48107,48108,48109,48110,48111,48112,48113,48114,48115,48116,48117,48118,48119,48122,48123,48125,48126,48129,48131,48132,48133,48134,48135,48138,48142,48144,48146,48147,48153,48154,48160,48161,48162,48163,48166,48168,48170,48171,48172,48174,48175,48178,48179,48181,null,null,null,null,null,null,48182,48183,48185,48186,48187,48188,48189,48190,48191,48194,48198,48199,48200,48202,48203,48206,48207,48209,48210,48211,48212,48213,48214,48215,48216,48217,null,null,null,null,null,null,48218,48219,48220,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48241,48242,48243,48244,48245,48246,48247,48248,48249,48250,48251,48252,48253,48254,48255,48256,48257,48258,48259,48262,48263,48265,48266,48269,48271,48272,48273,48274,48275,48278,48280,48283,48284,48285,48286,48287,48290,48291,48293,48294,48297,48298,48299,48300,48301,48302,48303,48306,48310,48311,48312,48313,48314,48315,48318,48319,48321,48322,48323,48325,48326,48327,48328,48329,48330,48331,48332,48334,48338,48339,48340,48342,48343,48345,48346,48347,48349,48350,48351,48352,48353,48354,48355,48356,48357,48358,48359,48360,48361,48362,48363,48364,48365,48366,48367,48368,48369,48370,48371,48375,48377,48378,48379,48381,48382,48383,48384,48385,48386,48387,48390,48392,48394,48395,48396,48397,48398,48399,48401,48402,48403,48405,48406,48407,48408,48409,48410,48411,48412,48413,null,null,null,null,null,null,48414,48415,48416,48417,48418,48419,48421,48422,48423,48424,48425,48426,48427,48429,48430,48431,48432,48433,48434,48435,48436,48437,48438,48439,48440,48441,null,null,null,null,null,null,48442,48443,48444,48445,48446,48447,48449,48450,48451,48452,48453,48454,48455,48458,48459,48461,48462,48463,48465,48466,48467,48468,48469,48470,48471,48474,48475,48476,48477,48478,48479,48480,48481,48482,48483,48485,48486,48487,48489,48490,48491,48492,48493,48494,48495,48496,48497,48498,48499,48500,48501,48502,48503,48504,48505,48506,48507,48508,48509,48510,48511,48514,48515,48517,48518,48523,48524,48525,48526,48527,48530,48532,48534,48535,48536,48539,48541,48542,48543,48544,48545,48546,48547,48549,48550,48551,48552,48553,48554,48555,48556,48557,48558,48559,48561,48562,48563,48564,48565,48566,48567,48569,48570,48571,48572,48573,48574,48575,48576,48577,48578,48579,48580,48581,48582,48583,48584,48585,48586,48587,48588,48589,48590,48591,48592,48593,48594,48595,48598,48599,48601,48602,48603,48605,48606,48607,48608,48609,48610,48611,48612,48613,48614,48615,48616,48618,48619,48620,48621,48622,48623,48625,null,null,null,null,null,null,48626,48627,48629,48630,48631,48633,48634,48635,48636,48637,48638,48639,48641,48642,48644,48646,48647,48648,48649,48650,48651,48654,48655,48657,48658,48659,null,null,null,null,null,null,48661,48662,48663,48664,48665,48666,48667,48670,48672,48673,48674,48675,48676,48677,48678,48679,48680,48681,48682,48683,48684,48685,48686,48687,48688,48689,48690,48691,48692,48693,48694,48695,48696,48697,48698,48699,48700,48701,48702,48703,48704,48705,48706,48707,48710,48711,48713,48714,48715,48717,48719,48720,48721,48722,48723,48726,48728,48732,48733,48734,48735,48738,48739,48741,48742,48743,48745,48747,48748,48749,48750,48751,48754,48758,48759,48760,48761,48762,48766,48767,48769,48770,48771,48773,48774,48775,48776,48777,48778,48779,48782,48786,48787,48788,48789,48790,48791,48794,48795,48796,48797,48798,48799,48800,48801,48802,48803,48804,48805,48806,48807,48809,48810,48811,48812,48813,48814,48815,48816,48817,48818,48819,48820,48821,48822,48823,48824,48825,48826,48827,48828,48829,48830,48831,48832,48833,48834,48835,48836,48837,48838,48839,48840,48841,48842,48843,48844,48845,48846,48847,48850,48851,null,null,null,null,null,null,48853,48854,48857,48858,48859,48860,48861,48862,48863,48865,48866,48870,48871,48872,48873,48874,48875,48877,48878,48879,48880,48881,48882,48883,48884,48885,null,null,null,null,null,null,48886,48887,48888,48889,48890,48891,48892,48893,48894,48895,48896,48898,48899,48900,48901,48902,48903,48906,48907,48908,48909,48910,48911,48912,48913,48914,48915,48916,48917,48918,48919,48922,48926,48927,48928,48929,48930,48931,48932,48933,48934,48935,48936,48937,48938,48939,48940,48941,48942,48943,48944,48945,48946,48947,48948,48949,48950,48951,48952,48953,48954,48955,48956,48957,48958,48959,48962,48963,48965,48966,48967,48969,48970,48971,48972,48973,48974,48975,48978,48979,48980,48982,48983,48984,48985,48986,48987,48988,48989,48990,48991,48992,48993,48994,48995,48996,48997,48998,48999,49000,49001,49002,49003,49004,49005,49006,49007,49008,49009,49010,49011,49012,49013,49014,49015,49016,49017,49018,49019,49020,49021,49022,49023,49024,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,49035,49036,49037,49038,49039,49040,49041,49042,49043,49045,49046,49047,49048,49049,49050,49051,49052,49053,null,null,null,null,null,null,49054,49055,49056,49057,49058,49059,49060,49061,49062,49063,49064,49065,49066,49067,49068,49069,49070,49071,49073,49074,49075,49076,49077,49078,49079,49080,null,null,null,null,null,null,49081,49082,49083,49084,49085,49086,49087,49088,49089,49090,49091,49092,49094,49095,49096,49097,49098,49099,49102,49103,49105,49106,49107,49109,49110,49111,49112,49113,49114,49115,49117,49118,49120,49122,49123,49124,49125,49126,49127,49128,49129,49130,49131,49132,49133,49134,49135,49136,49137,49138,49139,49140,49141,49142,49143,49144,49145,49146,49147,49148,49149,49150,49151,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49162,49163,49164,49165,49166,49167,49168,49169,49170,49171,49172,49173,49174,49175,49176,49177,49178,49179,49180,49181,49182,49183,49184,49185,49186,49187,49188,49189,49190,49191,49192,49193,49194,49195,49196,49197,49198,49199,49200,49201,49202,49203,49204,49205,49206,49207,49208,49209,49210,49211,49213,49214,49215,49216,49217,49218,49219,49220,49221,49222,49223,49224,49225,49226,49227,49228,49229,49230,49231,49232,49234,49235,49236,49237,49238,49239,49241,49242,49243,null,null,null,null,null,null,49245,49246,49247,49249,49250,49251,49252,49253,49254,49255,49258,49259,49260,49261,49262,49263,49264,49265,49266,49267,49268,49269,49270,49271,49272,49273,null,null,null,null,null,null,49274,49275,49276,49277,49278,49279,49280,49281,49282,49283,49284,49285,49286,49287,49288,49289,49290,49291,49292,49293,49294,49295,49298,49299,49301,49302,49303,49305,49306,49307,49308,49309,49310,49311,49314,49316,49318,49319,49320,49321,49322,49323,49326,49329,49330,49335,49336,49337,49338,49339,49342,49346,49347,49348,49350,49351,49354,49355,49357,49358,49359,49361,49362,49363,49364,49365,49366,49367,49370,49374,49375,49376,49377,49378,49379,49382,49383,49385,49386,49387,49389,49390,49391,49392,49393,49394,49395,49398,49400,49402,49403,49404,49405,49406,49407,49409,49410,49411,49413,49414,49415,49417,49418,49419,49420,49421,49422,49423,49425,49426,49427,49428,49430,49431,49432,49433,49434,49435,49441,49442,49445,49448,49449,49450,49451,49454,49458,49459,49460,49461,49463,49466,49467,49469,49470,49471,49473,49474,49475,49476,49477,49478,49479,49482,49486,49487,49488,49489,49490,49491,49494,49495,null,null,null,null,null,null,49497,49498,49499,49501,49502,49503,49504,49505,49506,49507,49510,49514,49515,49516,49517,49518,49519,49521,49522,49523,49525,49526,49527,49529,49530,49531,null,null,null,null,null,null,49532,49533,49534,49535,49536,49537,49538,49539,49540,49542,49543,49544,49545,49546,49547,49551,49553,49554,49555,49557,49559,49560,49561,49562,49563,49566,49568,49570,49571,49572,49574,49575,49578,49579,49581,49582,49583,49585,49586,49587,49588,49589,49590,49591,49592,49593,49594,49595,49596,49598,49599,49600,49601,49602,49603,49605,49606,49607,49609,49610,49611,49613,49614,49615,49616,49617,49618,49619,49621,49622,49625,49626,49627,49628,49629,49630,49631,49633,49634,49635,49637,49638,49639,49641,49642,49643,49644,49645,49646,49647,49650,49652,49653,49654,49655,49656,49657,49658,49659,49662,49663,49665,49666,49667,49669,49670,49671,49672,49673,49674,49675,49678,49680,49682,49683,49684,49685,49686,49687,49690,49691,49693,49694,49697,49698,49699,49700,49701,49702,49703,49706,49708,49710,49712,49715,49717,49718,49719,49720,49721,49722,49723,49724,49725,49726,49727,49728,49729,49730,49731,49732,49733,null,null,null,null,null,null,49734,49735,49737,49738,49739,49740,49741,49742,49743,49746,49747,49749,49750,49751,49753,49754,49755,49756,49757,49758,49759,49761,49762,49763,49764,49766,null,null,null,null,null,null,49767,49768,49769,49770,49771,49774,49775,49777,49778,49779,49781,49782,49783,49784,49785,49786,49787,49790,49792,49794,49795,49796,49797,49798,49799,49802,49803,49804,49805,49806,49807,49809,49810,49811,49812,49813,49814,49815,49817,49818,49820,49822,49823,49824,49825,49826,49827,49830,49831,49833,49834,49835,49838,49839,49840,49841,49842,49843,49846,49848,49850,49851,49852,49853,49854,49855,49856,49857,49858,49859,49860,49861,49862,49863,49864,49865,49866,49867,49868,49869,49870,49871,49872,49873,49874,49875,49876,49877,49878,49879,49880,49881,49882,49883,49886,49887,49889,49890,49893,49894,49895,49896,49897,49898,49902,49904,49906,49907,49908,49909,49911,49914,49917,49918,49919,49921,49922,49923,49924,49925,49926,49927,49930,49931,49934,49935,49936,49937,49938,49942,49943,49945,49946,49947,49949,49950,49951,49952,49953,49954,49955,49958,49959,49962,49963,49964,49965,49966,49967,49968,49969,49970,null,null,null,null,null,null,49971,49972,49973,49974,49975,49976,49977,49978,49979,49980,49981,49982,49983,49984,49985,49986,49987,49988,49990,49991,49992,49993,49994,49995,49996,49997,null,null,null,null,null,null,49998,49999,50000,50001,50002,50003,50004,50005,50006,50007,50008,50009,50010,50011,50012,50013,50014,50015,50016,50017,50018,50019,50020,50021,50022,50023,50026,50027,50029,50030,50031,50033,50035,50036,50037,50038,50039,50042,50043,50046,50047,50048,50049,50050,50051,50053,50054,50055,50057,50058,50059,50061,50062,50063,50064,50065,50066,50067,50068,50069,50070,50071,50072,50073,50074,50075,50076,50077,50078,50079,50080,50081,50082,50083,50084,50085,50086,50087,50088,50089,50090,50091,50092,50093,50094,50095,50096,50097,50098,50099,50100,50101,50102,50103,50104,50105,50106,50107,50108,50109,50110,50111,50113,50114,50115,50116,50117,50118,50119,50120,50121,50122,50123,50124,50125,50126,50127,50128,50129,50130,50131,50132,50133,50134,50135,50138,50139,50141,50142,50145,50147,50148,50149,50150,50151,50154,50155,50156,50158,50159,50160,50161,50162,50163,50166,50167,50169,50170,50171,50172,50173,50174,null,null,null,null,null,null,50175,50176,50177,50178,50179,50180,50181,50182,50183,50185,50186,50187,50188,50189,50190,50191,50193,50194,50195,50196,50197,50198,50199,50200,50201,50202,null,null,null,null,null,null,50203,50204,50205,50206,50207,50208,50209,50210,50211,50213,50214,50215,50216,50217,50218,50219,50221,50222,50223,50225,50226,50227,50229,50230,50231,50232,50233,50234,50235,50238,50239,50240,50241,50242,50243,50244,50245,50246,50247,50249,50250,50251,50252,50253,50254,50255,50256,50257,50258,50259,50260,50261,50262,50263,50264,50265,50266,50267,50268,50269,50270,50271,50272,50273,50274,50275,50278,50279,50281,50282,50283,50285,50286,50287,50288,50289,50290,50291,50294,50295,50296,50298,50299,50300,50301,50302,50303,50305,50306,50307,50308,50309,50310,50311,50312,50313,50314,50315,50316,50317,50318,50319,50320,50321,50322,50323,50325,50326,50327,50328,50329,50330,50331,50333,50334,50335,50336,50337,50338,50339,50340,50341,50342,50343,50344,50345,50346,50347,50348,50349,50350,50351,50352,50353,50354,50355,50356,50357,50358,50359,50361,50362,50363,50365,50366,50367,50368,50369,50370,50371,50372,50373,null,null,null,null,null,null,50374,50375,50376,50377,50378,50379,50380,50381,50382,50383,50384,50385,50386,50387,50388,50389,50390,50391,50392,50393,50394,50395,50396,50397,50398,50399,null,null,null,null,null,null,50400,50401,50402,50403,50404,50405,50406,50407,50408,50410,50411,50412,50413,50414,50415,50418,50419,50421,50422,50423,50425,50427,50428,50429,50430,50434,50435,50436,50437,50438,50439,50440,50441,50442,50443,50445,50446,50447,50449,50450,50451,50453,50454,50455,50456,50457,50458,50459,50461,50462,50463,50464,50465,50466,50467,50468,50469,50470,50471,50474,50475,50477,50478,50479,50481,50482,50483,50484,50485,50486,50487,50490,50492,50494,50495,50496,50497,50498,50499,50502,50503,50507,50511,50512,50513,50514,50518,50522,50523,50524,50527,50530,50531,50533,50534,50535,50537,50538,50539,50540,50541,50542,50543,50546,50550,50551,50552,50553,50554,50555,50558,50559,50561,50562,50563,50565,50566,50568,50569,50570,50571,50574,50576,50578,50579,50580,50582,50585,50586,50587,50589,50590,50591,50593,50594,50595,50596,50597,50598,50599,50600,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50614,null,null,null,null,null,null,50615,50618,50623,50624,50625,50626,50627,50635,50637,50639,50642,50643,50645,50646,50647,50649,50650,50651,50652,50653,50654,50655,50658,50660,50662,50663,null,null,null,null,null,null,50664,50665,50666,50667,50671,50673,50674,50675,50677,50680,50681,50682,50683,50690,50691,50692,50697,50698,50699,50701,50702,50703,50705,50706,50707,50708,50709,50710,50711,50714,50717,50718,50719,50720,50721,50722,50723,50726,50727,50729,50730,50731,50735,50737,50738,50742,50744,50746,50748,50749,50750,50751,50754,50755,50757,50758,50759,50761,50762,50763,50764,50765,50766,50767,50770,50774,50775,50776,50777,50778,50779,50782,50783,50785,50786,50787,50788,50789,50790,50791,50792,50793,50794,50795,50797,50798,50800,50802,50803,50804,50805,50806,50807,50810,50811,50813,50814,50815,50817,50818,50819,50820,50821,50822,50823,50826,50828,50830,50831,50832,50833,50834,50835,50838,50839,50841,50842,50843,50845,50846,50847,50848,50849,50850,50851,50854,50856,50858,50859,50860,50861,50862,50863,50866,50867,50869,50870,50871,50875,50876,50877,50878,50879,50882,50884,50886,50887,50888,50889,50890,50891,50894,null,null,null,null,null,null,50895,50897,50898,50899,50901,50902,50903,50904,50905,50906,50907,50910,50911,50914,50915,50916,50917,50918,50919,50922,50923,50925,50926,50927,50929,50930,null,null,null,null,null,null,50931,50932,50933,50934,50935,50938,50939,50940,50942,50943,50944,50945,50946,50947,50950,50951,50953,50954,50955,50957,50958,50959,50960,50961,50962,50963,50966,50968,50970,50971,50972,50973,50974,50975,50978,50979,50981,50982,50983,50985,50986,50987,50988,50989,50990,50991,50994,50996,50998,51000,51001,51002,51003,51006,51007,51009,51010,51011,51013,51014,51015,51016,51017,51019,51022,51024,51033,51034,51035,51037,51038,51039,51041,51042,51043,51044,51045,51046,51047,51049,51050,51052,51053,51054,51055,51056,51057,51058,51059,51062,51063,51065,51066,51067,51071,51072,51073,51074,51078,51083,51084,51085,51087,51090,51091,51093,51097,51099,51100,51101,51102,51103,51106,51111,51112,51113,51114,51115,51118,51119,51121,51122,51123,51125,51126,51127,51128,51129,51130,51131,51134,51138,51139,51140,51141,51142,51143,51146,51147,51149,51151,51153,51154,51155,51156,51157,51158,51159,51161,51162,51163,51164,null,null,null,null,null,null,51166,51167,51168,51169,51170,51171,51173,51174,51175,51177,51178,51179,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,null,null,null,null,null,null,51195,51196,51197,51198,51199,51202,51203,51205,51206,51207,51209,51211,51212,51213,51214,51215,51218,51220,51223,51224,51225,51226,51227,51230,51231,51233,51234,51235,51237,51238,51239,51240,51241,51242,51243,51246,51248,51250,51251,51252,51253,51254,51255,51257,51258,51259,51261,51262,51263,51265,51266,51267,51268,51269,51270,51271,51274,51275,51278,51279,51280,51281,51282,51283,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51295,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51310,51311,51314,51315,51317,51318,51319,51321,51323,51324,51325,51326,51327,51330,51332,51336,51337,51338,51342,51343,51344,51345,51346,51347,51349,51350,51351,51352,51353,51354,51355,51356,51358,51360,51362,51363,51364,51365,51366,51367,51369,51370,51371,51372,51373,51374,51375,51376,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,51387,51390,51391,51392,51393,null,null,null,null,null,null,51394,51395,51397,51398,51399,51401,51402,51403,51405,51406,51407,51408,51409,51410,51411,51414,51416,51418,51419,51420,51421,51422,51423,51426,51427,51429,null,null,null,null,null,null,51430,51431,51432,51433,51434,51435,51436,51437,51438,51439,51440,51441,51442,51443,51444,51446,51447,51448,51449,51450,51451,51454,51455,51457,51458,51459,51463,51464,51465,51466,51467,51470,12288,12289,12290,183,8229,8230,168,12291,173,8213,8741,65340,8764,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,177,215,247,8800,8804,8805,8734,8756,176,8242,8243,8451,8491,65504,65505,65509,9794,9792,8736,8869,8978,8706,8711,8801,8786,167,8251,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8594,8592,8593,8595,8596,12307,8810,8811,8730,8765,8733,8757,8747,8748,8712,8715,8838,8839,8834,8835,8746,8745,8743,8744,65506,51472,51474,51475,51476,51477,51478,51479,51481,51482,51483,51484,51485,51486,51487,51488,51489,51490,51491,51492,51493,51494,51495,51496,51497,51498,51499,null,null,null,null,null,null,51501,51502,51503,51504,51505,51506,51507,51509,51510,51511,51512,51513,51514,51515,51516,51517,51518,51519,51520,51521,51522,51523,51524,51525,51526,51527,null,null,null,null,null,null,51528,51529,51530,51531,51532,51533,51534,51535,51538,51539,51541,51542,51543,51545,51546,51547,51548,51549,51550,51551,51554,51556,51557,51558,51559,51560,51561,51562,51563,51565,51566,51567,8658,8660,8704,8707,180,65374,711,728,733,730,729,184,731,161,191,720,8750,8721,8719,164,8457,8240,9665,9664,9655,9654,9828,9824,9825,9829,9831,9827,8857,9672,9635,9680,9681,9618,9636,9637,9640,9639,9638,9641,9832,9743,9742,9756,9758,182,8224,8225,8597,8599,8601,8598,8600,9837,9833,9834,9836,12927,12828,8470,13255,8482,13250,13272,8481,8364,174,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51569,51570,51571,51573,51574,51575,51576,51577,51578,51579,51581,51582,51583,51584,51585,51586,51587,51588,51589,51590,51591,51594,51595,51597,51598,51599,null,null,null,null,null,null,51601,51602,51603,51604,51605,51606,51607,51610,51612,51614,51615,51616,51617,51618,51619,51620,51621,51622,51623,51624,51625,51626,51627,51628,51629,51630,null,null,null,null,null,null,51631,51632,51633,51634,51635,51636,51637,51638,51639,51640,51641,51642,51643,51644,51645,51646,51647,51650,51651,51653,51654,51657,51659,51660,51661,51662,51663,51666,51668,51671,51672,51675,65281,65282,65283,65284,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65510,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,51678,51679,51681,51683,51685,51686,51688,51689,51690,51691,51694,51698,51699,51700,51701,51702,51703,51706,51707,51709,51710,51711,51713,51714,51715,51716,null,null,null,null,null,null,51717,51718,51719,51722,51726,51727,51728,51729,51730,51731,51733,51734,51735,51737,51738,51739,51740,51741,51742,51743,51744,51745,51746,51747,51748,51749,null,null,null,null,null,null,51750,51751,51752,51754,51755,51756,51757,51758,51759,51760,51761,51762,51763,51764,51765,51766,51767,51768,51769,51770,51771,51772,51773,51774,51775,51776,51777,51778,51779,51780,51781,51782,12593,12594,12595,12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,51783,51784,51785,51786,51787,51790,51791,51793,51794,51795,51797,51798,51799,51800,51801,51802,51803,51806,51810,51811,51812,51813,51814,51815,51817,51818,null,null,null,null,null,null,51819,51820,51821,51822,51823,51824,51825,51826,51827,51828,51829,51830,51831,51832,51833,51834,51835,51836,51838,51839,51840,51841,51842,51843,51845,51846,null,null,null,null,null,null,51847,51848,51849,51850,51851,51852,51853,51854,51855,51856,51857,51858,51859,51860,51861,51862,51863,51865,51866,51867,51868,51869,51870,51871,51872,51873,51874,51875,51876,51877,51878,51879,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,null,null,null,null,null,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,51880,51881,51882,51883,51884,51885,51886,51887,51888,51889,51890,51891,51892,51893,51894,51895,51896,51897,51898,51899,51902,51903,51905,51906,51907,51909,null,null,null,null,null,null,51910,51911,51912,51913,51914,51915,51918,51920,51922,51924,51925,51926,51927,51930,51931,51932,51933,51934,51935,51937,51938,51939,51940,51941,51942,51943,null,null,null,null,null,null,51944,51945,51946,51947,51949,51950,51951,51952,51953,51954,51955,51957,51958,51959,51960,51961,51962,51963,51964,51965,51966,51967,51968,51969,51970,51971,51972,51973,51974,51975,51977,51978,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,9490,9489,9498,9497,9494,9493,9486,9485,9502,9503,9505,9506,9510,9511,9513,9514,9517,9518,9521,9522,9525,9526,9529,9530,9533,9534,9536,9537,9539,9540,9541,9542,9543,9544,9545,9546,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51979,51980,51981,51982,51983,51985,51986,51987,51989,51990,51991,51993,51994,51995,51996,51997,51998,51999,52002,52003,52004,52005,52006,52007,52008,52009,null,null,null,null,null,null,52010,52011,52012,52013,52014,52015,52016,52017,52018,52019,52020,52021,52022,52023,52024,52025,52026,52027,52028,52029,52030,52031,52032,52034,52035,52036,null,null,null,null,null,null,52037,52038,52039,52042,52043,52045,52046,52047,52049,52050,52051,52052,52053,52054,52055,52058,52059,52060,52062,52063,52064,52065,52066,52067,52069,52070,52071,52072,52073,52074,52075,52076,13205,13206,13207,8467,13208,13252,13219,13220,13221,13222,13209,13210,13211,13212,13213,13214,13215,13216,13217,13218,13258,13197,13198,13199,13263,13192,13193,13256,13223,13224,13232,13233,13234,13235,13236,13237,13238,13239,13240,13241,13184,13185,13186,13187,13188,13242,13243,13244,13245,13246,13247,13200,13201,13202,13203,13204,8486,13248,13249,13194,13195,13196,13270,13253,13229,13230,13231,13275,13225,13226,13227,13228,13277,13264,13267,13251,13257,13276,13254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52077,52078,52079,52080,52081,52082,52083,52084,52085,52086,52087,52090,52091,52092,52093,52094,52095,52096,52097,52098,52099,52100,52101,52102,52103,52104,null,null,null,null,null,null,52105,52106,52107,52108,52109,52110,52111,52112,52113,52114,52115,52116,52117,52118,52119,52120,52121,52122,52123,52125,52126,52127,52128,52129,52130,52131,null,null,null,null,null,null,52132,52133,52134,52135,52136,52137,52138,52139,52140,52141,52142,52143,52144,52145,52146,52147,52148,52149,52150,52151,52153,52154,52155,52156,52157,52158,52159,52160,52161,52162,52163,52164,198,208,170,294,null,306,null,319,321,216,338,186,222,358,330,null,12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911,12912,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,9424,9425,9426,9427,9428,9429,9430,9431,9432,9433,9434,9435,9436,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446,9447,9448,9449,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,189,8531,8532,188,190,8539,8540,8541,8542,52165,52166,52167,52168,52169,52170,52171,52172,52173,52174,52175,52176,52177,52178,52179,52181,52182,52183,52184,52185,52186,52187,52188,52189,52190,52191,null,null,null,null,null,null,52192,52193,52194,52195,52197,52198,52200,52202,52203,52204,52205,52206,52207,52208,52209,52210,52211,52212,52213,52214,52215,52216,52217,52218,52219,52220,null,null,null,null,null,null,52221,52222,52223,52224,52225,52226,52227,52228,52229,52230,52231,52232,52233,52234,52235,52238,52239,52241,52242,52243,52245,52246,52247,52248,52249,52250,52251,52254,52255,52256,52259,52260,230,273,240,295,305,307,312,320,322,248,339,223,254,359,331,329,12800,12801,12802,12803,12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819,12820,12821,12822,12823,12824,12825,12826,12827,9372,9373,9374,9375,9376,9377,9378,9379,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389,9390,9391,9392,9393,9394,9395,9396,9397,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,185,178,179,8308,8319,8321,8322,8323,8324,52261,52262,52266,52267,52269,52271,52273,52274,52275,52276,52277,52278,52279,52282,52287,52288,52289,52290,52291,52294,52295,52297,52298,52299,52301,52302,null,null,null,null,null,null,52303,52304,52305,52306,52307,52310,52314,52315,52316,52317,52318,52319,52321,52322,52323,52325,52327,52329,52330,52331,52332,52333,52334,52335,52337,52338,null,null,null,null,null,null,52339,52340,52342,52343,52344,52345,52346,52347,52348,52349,52350,52351,52352,52353,52354,52355,52356,52357,52358,52359,52360,52361,52362,52363,52364,52365,52366,52367,52368,52369,52370,52371,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,52372,52373,52374,52375,52378,52379,52381,52382,52383,52385,52386,52387,52388,52389,52390,52391,52394,52398,52399,52400,52401,52402,52403,52406,52407,52409,null,null,null,null,null,null,52410,52411,52413,52414,52415,52416,52417,52418,52419,52422,52424,52426,52427,52428,52429,52430,52431,52433,52434,52435,52437,52438,52439,52440,52441,52442,null,null,null,null,null,null,52443,52444,52445,52446,52447,52448,52449,52450,52451,52453,52454,52455,52456,52457,52458,52459,52461,52462,52463,52465,52466,52467,52468,52469,52470,52471,52472,52473,52474,52475,52476,52477,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,52478,52479,52480,52482,52483,52484,52485,52486,52487,52490,52491,52493,52494,52495,52497,52498,52499,52500,52501,52502,52503,52506,52508,52510,52511,52512,null,null,null,null,null,null,52513,52514,52515,52517,52518,52519,52521,52522,52523,52525,52526,52527,52528,52529,52530,52531,52532,52533,52534,52535,52536,52538,52539,52540,52541,52542,null,null,null,null,null,null,52543,52544,52545,52546,52547,52548,52549,52550,52551,52552,52553,52554,52555,52556,52557,52558,52559,52560,52561,52562,52563,52564,52565,52566,52567,52568,52569,52570,52571,52573,52574,52575,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,52577,52578,52579,52581,52582,52583,52584,52585,52586,52587,52590,52592,52594,52595,52596,52597,52598,52599,52601,52602,52603,52604,52605,52606,52607,52608,null,null,null,null,null,null,52609,52610,52611,52612,52613,52614,52615,52617,52618,52619,52620,52621,52622,52623,52624,52625,52626,52627,52630,52631,52633,52634,52635,52637,52638,52639,null,null,null,null,null,null,52640,52641,52642,52643,52646,52648,52650,52651,52652,52653,52654,52655,52657,52658,52659,52660,52661,52662,52663,52664,52665,52666,52667,52668,52669,52670,52671,52672,52673,52674,52675,52677,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52678,52679,52680,52681,52682,52683,52685,52686,52687,52689,52690,52691,52692,52693,52694,52695,52696,52697,52698,52699,52700,52701,52702,52703,52704,52705,null,null,null,null,null,null,52706,52707,52708,52709,52710,52711,52713,52714,52715,52717,52718,52719,52721,52722,52723,52724,52725,52726,52727,52730,52732,52734,52735,52736,52737,52738,null,null,null,null,null,null,52739,52741,52742,52743,52745,52746,52747,52749,52750,52751,52752,52753,52754,52755,52757,52758,52759,52760,52762,52763,52764,52765,52766,52767,52770,52771,52773,52774,52775,52777,52778,52779,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52780,52781,52782,52783,52786,52788,52790,52791,52792,52793,52794,52795,52796,52797,52798,52799,52800,52801,52802,52803,52804,52805,52806,52807,52808,52809,null,null,null,null,null,null,52810,52811,52812,52813,52814,52815,52816,52817,52818,52819,52820,52821,52822,52823,52826,52827,52829,52830,52834,52835,52836,52837,52838,52839,52842,52844,null,null,null,null,null,null,52846,52847,52848,52849,52850,52851,52854,52855,52857,52858,52859,52861,52862,52863,52864,52865,52866,52867,52870,52872,52874,52875,52876,52877,52878,52879,52882,52883,52885,52886,52887,52889,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52890,52891,52892,52893,52894,52895,52898,52902,52903,52904,52905,52906,52907,52910,52911,52912,52913,52914,52915,52916,52917,52918,52919,52920,52921,52922,null,null,null,null,null,null,52923,52924,52925,52926,52927,52928,52930,52931,52932,52933,52934,52935,52936,52937,52938,52939,52940,52941,52942,52943,52944,52945,52946,52947,52948,52949,null,null,null,null,null,null,52950,52951,52952,52953,52954,52955,52956,52957,52958,52959,52960,52961,52962,52963,52966,52967,52969,52970,52973,52974,52975,52976,52977,52978,52979,52982,52986,52987,52988,52989,52990,52991,44032,44033,44036,44039,44040,44041,44042,44048,44049,44050,44051,44052,44053,44054,44055,44057,44058,44059,44060,44061,44064,44068,44076,44077,44079,44080,44081,44088,44089,44092,44096,44107,44109,44116,44120,44124,44144,44145,44148,44151,44152,44154,44160,44161,44163,44164,44165,44166,44169,44170,44171,44172,44176,44180,44188,44189,44191,44192,44193,44200,44201,44202,44204,44207,44208,44216,44217,44219,44220,44221,44225,44228,44232,44236,44245,44247,44256,44257,44260,44263,44264,44266,44268,44271,44272,44273,44275,44277,44278,44284,44285,44288,44292,44294,52994,52995,52997,52998,52999,53001,53002,53003,53004,53005,53006,53007,53010,53012,53014,53015,53016,53017,53018,53019,53021,53022,53023,53025,53026,53027,null,null,null,null,null,null,53029,53030,53031,53032,53033,53034,53035,53038,53042,53043,53044,53045,53046,53047,53049,53050,53051,53052,53053,53054,53055,53056,53057,53058,53059,53060,null,null,null,null,null,null,53061,53062,53063,53064,53065,53066,53067,53068,53069,53070,53071,53072,53073,53074,53075,53078,53079,53081,53082,53083,53085,53086,53087,53088,53089,53090,53091,53094,53096,53098,53099,53100,44300,44301,44303,44305,44312,44316,44320,44329,44332,44333,44340,44341,44344,44348,44356,44357,44359,44361,44368,44372,44376,44385,44387,44396,44397,44400,44403,44404,44405,44406,44411,44412,44413,44415,44417,44418,44424,44425,44428,44432,44444,44445,44452,44471,44480,44481,44484,44488,44496,44497,44499,44508,44512,44516,44536,44537,44540,44543,44544,44545,44552,44553,44555,44557,44564,44592,44593,44596,44599,44600,44602,44608,44609,44611,44613,44614,44618,44620,44621,44622,44624,44628,44630,44636,44637,44639,44640,44641,44645,44648,44649,44652,44656,44664,53101,53102,53103,53106,53107,53109,53110,53111,53113,53114,53115,53116,53117,53118,53119,53121,53122,53123,53124,53126,53127,53128,53129,53130,53131,53133,null,null,null,null,null,null,53134,53135,53136,53137,53138,53139,53140,53141,53142,53143,53144,53145,53146,53147,53148,53149,53150,53151,53152,53154,53155,53156,53157,53158,53159,53161,null,null,null,null,null,null,53162,53163,53164,53165,53166,53167,53169,53170,53171,53172,53173,53174,53175,53176,53177,53178,53179,53180,53181,53182,53183,53184,53185,53186,53187,53189,53190,53191,53192,53193,53194,53195,44665,44667,44668,44669,44676,44677,44684,44732,44733,44734,44736,44740,44748,44749,44751,44752,44753,44760,44761,44764,44776,44779,44781,44788,44792,44796,44807,44808,44813,44816,44844,44845,44848,44850,44852,44860,44861,44863,44865,44866,44867,44872,44873,44880,44892,44893,44900,44901,44921,44928,44932,44936,44944,44945,44949,44956,44984,44985,44988,44992,44999,45000,45001,45003,45005,45006,45012,45020,45032,45033,45040,45041,45044,45048,45056,45057,45060,45068,45072,45076,45084,45085,45096,45124,45125,45128,45130,45132,45134,45139,45140,45141,45143,45145,53196,53197,53198,53199,53200,53201,53202,53203,53204,53205,53206,53207,53208,53209,53210,53211,53212,53213,53214,53215,53218,53219,53221,53222,53223,53225,null,null,null,null,null,null,53226,53227,53228,53229,53230,53231,53234,53236,53238,53239,53240,53241,53242,53243,53245,53246,53247,53249,53250,53251,53253,53254,53255,53256,53257,53258,null,null,null,null,null,null,53259,53260,53261,53262,53263,53264,53266,53267,53268,53269,53270,53271,53273,53274,53275,53276,53277,53278,53279,53280,53281,53282,53283,53284,53285,53286,53287,53288,53289,53290,53291,53292,45149,45180,45181,45184,45188,45196,45197,45199,45201,45208,45209,45210,45212,45215,45216,45217,45218,45224,45225,45227,45228,45229,45230,45231,45233,45235,45236,45237,45240,45244,45252,45253,45255,45256,45257,45264,45265,45268,45272,45280,45285,45320,45321,45323,45324,45328,45330,45331,45336,45337,45339,45340,45341,45347,45348,45349,45352,45356,45364,45365,45367,45368,45369,45376,45377,45380,45384,45392,45393,45396,45397,45400,45404,45408,45432,45433,45436,45440,45442,45448,45449,45451,45453,45458,45459,45460,45464,45468,45480,45516,45520,45524,45532,45533,53294,53295,53296,53297,53298,53299,53302,53303,53305,53306,53307,53309,53310,53311,53312,53313,53314,53315,53318,53320,53322,53323,53324,53325,53326,53327,null,null,null,null,null,null,53329,53330,53331,53333,53334,53335,53337,53338,53339,53340,53341,53342,53343,53345,53346,53347,53348,53349,53350,53351,53352,53353,53354,53355,53358,53359,null,null,null,null,null,null,53361,53362,53363,53365,53366,53367,53368,53369,53370,53371,53374,53375,53376,53378,53379,53380,53381,53382,53383,53384,53385,53386,53387,53388,53389,53390,53391,53392,53393,53394,53395,53396,45535,45544,45545,45548,45552,45561,45563,45565,45572,45573,45576,45579,45580,45588,45589,45591,45593,45600,45620,45628,45656,45660,45664,45672,45673,45684,45685,45692,45700,45701,45705,45712,45713,45716,45720,45721,45722,45728,45729,45731,45733,45734,45738,45740,45744,45748,45768,45769,45772,45776,45778,45784,45785,45787,45789,45794,45796,45797,45798,45800,45803,45804,45805,45806,45807,45811,45812,45813,45815,45816,45817,45818,45819,45823,45824,45825,45828,45832,45840,45841,45843,45844,45845,45852,45908,45909,45910,45912,45915,45916,45918,45919,45924,45925,53397,53398,53399,53400,53401,53402,53403,53404,53405,53406,53407,53408,53409,53410,53411,53414,53415,53417,53418,53419,53421,53422,53423,53424,53425,53426,null,null,null,null,null,null,53427,53430,53432,53434,53435,53436,53437,53438,53439,53442,53443,53445,53446,53447,53450,53451,53452,53453,53454,53455,53458,53462,53463,53464,53465,53466,null,null,null,null,null,null,53467,53470,53471,53473,53474,53475,53477,53478,53479,53480,53481,53482,53483,53486,53490,53491,53492,53493,53494,53495,53497,53498,53499,53500,53501,53502,53503,53504,53505,53506,53507,53508,45927,45929,45931,45934,45936,45937,45940,45944,45952,45953,45955,45956,45957,45964,45968,45972,45984,45985,45992,45996,46020,46021,46024,46027,46028,46030,46032,46036,46037,46039,46041,46043,46045,46048,46052,46056,46076,46096,46104,46108,46112,46120,46121,46123,46132,46160,46161,46164,46168,46176,46177,46179,46181,46188,46208,46216,46237,46244,46248,46252,46261,46263,46265,46272,46276,46280,46288,46293,46300,46301,46304,46307,46308,46310,46316,46317,46319,46321,46328,46356,46357,46360,46363,46364,46372,46373,46375,46376,46377,46378,46384,46385,46388,46392,53509,53510,53511,53512,53513,53514,53515,53516,53518,53519,53520,53521,53522,53523,53524,53525,53526,53527,53528,53529,53530,53531,53532,53533,53534,53535,null,null,null,null,null,null,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,53546,53547,53548,53549,53550,53551,53554,53555,53557,53558,53559,53561,53563,53564,53565,53566,null,null,null,null,null,null,53567,53570,53574,53575,53576,53577,53578,53579,53582,53583,53585,53586,53587,53589,53590,53591,53592,53593,53594,53595,53598,53600,53602,53603,53604,53605,53606,53607,53609,53610,53611,53613,46400,46401,46403,46404,46405,46411,46412,46413,46416,46420,46428,46429,46431,46432,46433,46496,46497,46500,46504,46506,46507,46512,46513,46515,46516,46517,46523,46524,46525,46528,46532,46540,46541,46543,46544,46545,46552,46572,46608,46609,46612,46616,46629,46636,46644,46664,46692,46696,46748,46749,46752,46756,46763,46764,46769,46804,46832,46836,46840,46848,46849,46853,46888,46889,46892,46895,46896,46904,46905,46907,46916,46920,46924,46932,46933,46944,46948,46952,46960,46961,46963,46965,46972,46973,46976,46980,46988,46989,46991,46992,46993,46994,46998,46999,53614,53615,53616,53617,53618,53619,53620,53621,53622,53623,53624,53625,53626,53627,53629,53630,53631,53632,53633,53634,53635,53637,53638,53639,53641,53642,null,null,null,null,null,null,53643,53644,53645,53646,53647,53648,53649,53650,53651,53652,53653,53654,53655,53656,53657,53658,53659,53660,53661,53662,53663,53666,53667,53669,53670,53671,null,null,null,null,null,null,53673,53674,53675,53676,53677,53678,53679,53682,53684,53686,53687,53688,53689,53691,53693,53694,53695,53697,53698,53699,53700,53701,53702,53703,53704,53705,53706,53707,53708,53709,53710,53711,47000,47001,47004,47008,47016,47017,47019,47020,47021,47028,47029,47032,47047,47049,47084,47085,47088,47092,47100,47101,47103,47104,47105,47111,47112,47113,47116,47120,47128,47129,47131,47133,47140,47141,47144,47148,47156,47157,47159,47160,47161,47168,47172,47185,47187,47196,47197,47200,47204,47212,47213,47215,47217,47224,47228,47245,47272,47280,47284,47288,47296,47297,47299,47301,47308,47312,47316,47325,47327,47329,47336,47337,47340,47344,47352,47353,47355,47357,47364,47384,47392,47420,47421,47424,47428,47436,47439,47441,47448,47449,47452,47456,47464,47465,53712,53713,53714,53715,53716,53717,53718,53719,53721,53722,53723,53724,53725,53726,53727,53728,53729,53730,53731,53732,53733,53734,53735,53736,53737,53738,null,null,null,null,null,null,53739,53740,53741,53742,53743,53744,53745,53746,53747,53749,53750,53751,53753,53754,53755,53756,53757,53758,53759,53760,53761,53762,53763,53764,53765,53766,null,null,null,null,null,null,53768,53770,53771,53772,53773,53774,53775,53777,53778,53779,53780,53781,53782,53783,53784,53785,53786,53787,53788,53789,53790,53791,53792,53793,53794,53795,53796,53797,53798,53799,53800,53801,47467,47469,47476,47477,47480,47484,47492,47493,47495,47497,47498,47501,47502,47532,47533,47536,47540,47548,47549,47551,47553,47560,47561,47564,47566,47567,47568,47569,47570,47576,47577,47579,47581,47582,47585,47587,47588,47589,47592,47596,47604,47605,47607,47608,47609,47610,47616,47617,47624,47637,47672,47673,47676,47680,47682,47688,47689,47691,47693,47694,47699,47700,47701,47704,47708,47716,47717,47719,47720,47721,47728,47729,47732,47736,47747,47748,47749,47751,47756,47784,47785,47787,47788,47792,47794,47800,47801,47803,47805,47812,47816,47832,47833,47868,53802,53803,53806,53807,53809,53810,53811,53813,53814,53815,53816,53817,53818,53819,53822,53824,53826,53827,53828,53829,53830,53831,53833,53834,53835,53836,null,null,null,null,null,null,53837,53838,53839,53840,53841,53842,53843,53844,53845,53846,53847,53848,53849,53850,53851,53853,53854,53855,53856,53857,53858,53859,53861,53862,53863,53864,null,null,null,null,null,null,53865,53866,53867,53868,53869,53870,53871,53872,53873,53874,53875,53876,53877,53878,53879,53880,53881,53882,53883,53884,53885,53886,53887,53890,53891,53893,53894,53895,53897,53898,53899,53900,47872,47876,47885,47887,47889,47896,47900,47904,47913,47915,47924,47925,47926,47928,47931,47932,47933,47934,47940,47941,47943,47945,47949,47951,47952,47956,47960,47969,47971,47980,48008,48012,48016,48036,48040,48044,48052,48055,48064,48068,48072,48080,48083,48120,48121,48124,48127,48128,48130,48136,48137,48139,48140,48141,48143,48145,48148,48149,48150,48151,48152,48155,48156,48157,48158,48159,48164,48165,48167,48169,48173,48176,48177,48180,48184,48192,48193,48195,48196,48197,48201,48204,48205,48208,48221,48260,48261,48264,48267,48268,48270,48276,48277,48279,53901,53902,53903,53906,53907,53908,53910,53911,53912,53913,53914,53915,53917,53918,53919,53921,53922,53923,53925,53926,53927,53928,53929,53930,53931,53933,null,null,null,null,null,null,53934,53935,53936,53938,53939,53940,53941,53942,53943,53946,53947,53949,53950,53953,53955,53956,53957,53958,53959,53962,53964,53965,53966,53967,53968,53969,null,null,null,null,null,null,53970,53971,53973,53974,53975,53977,53978,53979,53981,53982,53983,53984,53985,53986,53987,53990,53991,53992,53993,53994,53995,53996,53997,53998,53999,54002,54003,54005,54006,54007,54009,54010,48281,48282,48288,48289,48292,48295,48296,48304,48305,48307,48308,48309,48316,48317,48320,48324,48333,48335,48336,48337,48341,48344,48348,48372,48373,48374,48376,48380,48388,48389,48391,48393,48400,48404,48420,48428,48448,48456,48457,48460,48464,48472,48473,48484,48488,48512,48513,48516,48519,48520,48521,48522,48528,48529,48531,48533,48537,48538,48540,48548,48560,48568,48596,48597,48600,48604,48617,48624,48628,48632,48640,48643,48645,48652,48653,48656,48660,48668,48669,48671,48708,48709,48712,48716,48718,48724,48725,48727,48729,48730,48731,48736,48737,48740,54011,54012,54013,54014,54015,54018,54020,54022,54023,54024,54025,54026,54027,54031,54033,54034,54035,54037,54039,54040,54041,54042,54043,54046,54050,54051,null,null,null,null,null,null,54052,54054,54055,54058,54059,54061,54062,54063,54065,54066,54067,54068,54069,54070,54071,54074,54078,54079,54080,54081,54082,54083,54086,54087,54088,54089,null,null,null,null,null,null,54090,54091,54092,54093,54094,54095,54096,54097,54098,54099,54100,54101,54102,54103,54104,54105,54106,54107,54108,54109,54110,54111,54112,54113,54114,54115,54116,54117,54118,54119,54120,54121,48744,48746,48752,48753,48755,48756,48757,48763,48764,48765,48768,48772,48780,48781,48783,48784,48785,48792,48793,48808,48848,48849,48852,48855,48856,48864,48867,48868,48869,48876,48897,48904,48905,48920,48921,48923,48924,48925,48960,48961,48964,48968,48976,48977,48981,49044,49072,49093,49100,49101,49104,49108,49116,49119,49121,49212,49233,49240,49244,49248,49256,49257,49296,49297,49300,49304,49312,49313,49315,49317,49324,49325,49327,49328,49331,49332,49333,49334,49340,49341,49343,49344,49345,49349,49352,49353,49356,49360,49368,49369,49371,49372,49373,49380,54122,54123,54124,54125,54126,54127,54128,54129,54130,54131,54132,54133,54134,54135,54136,54137,54138,54139,54142,54143,54145,54146,54147,54149,54150,54151,null,null,null,null,null,null,54152,54153,54154,54155,54158,54162,54163,54164,54165,54166,54167,54170,54171,54173,54174,54175,54177,54178,54179,54180,54181,54182,54183,54186,54188,54190,null,null,null,null,null,null,54191,54192,54193,54194,54195,54197,54198,54199,54201,54202,54203,54205,54206,54207,54208,54209,54210,54211,54214,54215,54218,54219,54220,54221,54222,54223,54225,54226,54227,54228,54229,54230,49381,49384,49388,49396,49397,49399,49401,49408,49412,49416,49424,49429,49436,49437,49438,49439,49440,49443,49444,49446,49447,49452,49453,49455,49456,49457,49462,49464,49465,49468,49472,49480,49481,49483,49484,49485,49492,49493,49496,49500,49508,49509,49511,49512,49513,49520,49524,49528,49541,49548,49549,49550,49552,49556,49558,49564,49565,49567,49569,49573,49576,49577,49580,49584,49597,49604,49608,49612,49620,49623,49624,49632,49636,49640,49648,49649,49651,49660,49661,49664,49668,49676,49677,49679,49681,49688,49689,49692,49695,49696,49704,49705,49707,49709,54231,54233,54234,54235,54236,54237,54238,54239,54240,54242,54244,54245,54246,54247,54248,54249,54250,54251,54254,54255,54257,54258,54259,54261,54262,54263,null,null,null,null,null,null,54264,54265,54266,54267,54270,54272,54274,54275,54276,54277,54278,54279,54281,54282,54283,54284,54285,54286,54287,54288,54289,54290,54291,54292,54293,54294,null,null,null,null,null,null,54295,54296,54297,54298,54299,54300,54302,54303,54304,54305,54306,54307,54308,54309,54310,54311,54312,54313,54314,54315,54316,54317,54318,54319,54320,54321,54322,54323,54324,54325,54326,54327,49711,49713,49714,49716,49736,49744,49745,49748,49752,49760,49765,49772,49773,49776,49780,49788,49789,49791,49793,49800,49801,49808,49816,49819,49821,49828,49829,49832,49836,49837,49844,49845,49847,49849,49884,49885,49888,49891,49892,49899,49900,49901,49903,49905,49910,49912,49913,49915,49916,49920,49928,49929,49932,49933,49939,49940,49941,49944,49948,49956,49957,49960,49961,49989,50024,50025,50028,50032,50034,50040,50041,50044,50045,50052,50056,50060,50112,50136,50137,50140,50143,50144,50146,50152,50153,50157,50164,50165,50168,50184,50192,50212,50220,50224,54328,54329,54330,54331,54332,54333,54334,54335,54337,54338,54339,54341,54342,54343,54344,54345,54346,54347,54348,54349,54350,54351,54352,54353,54354,54355,null,null,null,null,null,null,54356,54357,54358,54359,54360,54361,54362,54363,54365,54366,54367,54369,54370,54371,54373,54374,54375,54376,54377,54378,54379,54380,54382,54384,54385,54386,null,null,null,null,null,null,54387,54388,54389,54390,54391,54394,54395,54397,54398,54401,54403,54404,54405,54406,54407,54410,54412,54414,54415,54416,54417,54418,54419,54421,54422,54423,54424,54425,54426,54427,54428,54429,50228,50236,50237,50248,50276,50277,50280,50284,50292,50293,50297,50304,50324,50332,50360,50364,50409,50416,50417,50420,50424,50426,50431,50432,50433,50444,50448,50452,50460,50472,50473,50476,50480,50488,50489,50491,50493,50500,50501,50504,50505,50506,50508,50509,50510,50515,50516,50517,50519,50520,50521,50525,50526,50528,50529,50532,50536,50544,50545,50547,50548,50549,50556,50557,50560,50564,50567,50572,50573,50575,50577,50581,50583,50584,50588,50592,50601,50612,50613,50616,50617,50619,50620,50621,50622,50628,50629,50630,50631,50632,50633,50634,50636,50638,54430,54431,54432,54433,54434,54435,54436,54437,54438,54439,54440,54442,54443,54444,54445,54446,54447,54448,54449,54450,54451,54452,54453,54454,54455,54456,null,null,null,null,null,null,54457,54458,54459,54460,54461,54462,54463,54464,54465,54466,54467,54468,54469,54470,54471,54472,54473,54474,54475,54477,54478,54479,54481,54482,54483,54485,null,null,null,null,null,null,54486,54487,54488,54489,54490,54491,54493,54494,54496,54497,54498,54499,54500,54501,54502,54503,54505,54506,54507,54509,54510,54511,54513,54514,54515,54516,54517,54518,54519,54521,54522,54524,50640,50641,50644,50648,50656,50657,50659,50661,50668,50669,50670,50672,50676,50678,50679,50684,50685,50686,50687,50688,50689,50693,50694,50695,50696,50700,50704,50712,50713,50715,50716,50724,50725,50728,50732,50733,50734,50736,50739,50740,50741,50743,50745,50747,50752,50753,50756,50760,50768,50769,50771,50772,50773,50780,50781,50784,50796,50799,50801,50808,50809,50812,50816,50824,50825,50827,50829,50836,50837,50840,50844,50852,50853,50855,50857,50864,50865,50868,50872,50873,50874,50880,50881,50883,50885,50892,50893,50896,50900,50908,50909,50912,50913,50920,54526,54527,54528,54529,54530,54531,54533,54534,54535,54537,54538,54539,54541,54542,54543,54544,54545,54546,54547,54550,54552,54553,54554,54555,54556,54557,null,null,null,null,null,null,54558,54559,54560,54561,54562,54563,54564,54565,54566,54567,54568,54569,54570,54571,54572,54573,54574,54575,54576,54577,54578,54579,54580,54581,54582,54583,null,null,null,null,null,null,54584,54585,54586,54587,54590,54591,54593,54594,54595,54597,54598,54599,54600,54601,54602,54603,54606,54608,54610,54611,54612,54613,54614,54615,54618,54619,54621,54622,54623,54625,54626,54627,50921,50924,50928,50936,50937,50941,50948,50949,50952,50956,50964,50965,50967,50969,50976,50977,50980,50984,50992,50993,50995,50997,50999,51004,51005,51008,51012,51018,51020,51021,51023,51025,51026,51027,51028,51029,51030,51031,51032,51036,51040,51048,51051,51060,51061,51064,51068,51069,51070,51075,51076,51077,51079,51080,51081,51082,51086,51088,51089,51092,51094,51095,51096,51098,51104,51105,51107,51108,51109,51110,51116,51117,51120,51124,51132,51133,51135,51136,51137,51144,51145,51148,51150,51152,51160,51165,51172,51176,51180,51200,51201,51204,51208,51210,54628,54630,54631,54634,54636,54638,54639,54640,54641,54642,54643,54646,54647,54649,54650,54651,54653,54654,54655,54656,54657,54658,54659,54662,54666,54667,null,null,null,null,null,null,54668,54669,54670,54671,54673,54674,54675,54676,54677,54678,54679,54680,54681,54682,54683,54684,54685,54686,54687,54688,54689,54690,54691,54692,54694,54695,null,null,null,null,null,null,54696,54697,54698,54699,54700,54701,54702,54703,54704,54705,54706,54707,54708,54709,54710,54711,54712,54713,54714,54715,54716,54717,54718,54719,54720,54721,54722,54723,54724,54725,54726,54727,51216,51217,51219,51221,51222,51228,51229,51232,51236,51244,51245,51247,51249,51256,51260,51264,51272,51273,51276,51277,51284,51312,51313,51316,51320,51322,51328,51329,51331,51333,51334,51335,51339,51340,51341,51348,51357,51359,51361,51368,51388,51389,51396,51400,51404,51412,51413,51415,51417,51424,51425,51428,51445,51452,51453,51456,51460,51461,51462,51468,51469,51471,51473,51480,51500,51508,51536,51537,51540,51544,51552,51553,51555,51564,51568,51572,51580,51592,51593,51596,51600,51608,51609,51611,51613,51648,51649,51652,51655,51656,51658,51664,51665,51667,54730,54731,54733,54734,54735,54737,54739,54740,54741,54742,54743,54746,54748,54750,54751,54752,54753,54754,54755,54758,54759,54761,54762,54763,54765,54766,null,null,null,null,null,null,54767,54768,54769,54770,54771,54774,54776,54778,54779,54780,54781,54782,54783,54786,54787,54789,54790,54791,54793,54794,54795,54796,54797,54798,54799,54802,null,null,null,null,null,null,54806,54807,54808,54809,54810,54811,54813,54814,54815,54817,54818,54819,54821,54822,54823,54824,54825,54826,54827,54828,54830,54831,54832,54833,54834,54835,54836,54837,54838,54839,54842,54843,51669,51670,51673,51674,51676,51677,51680,51682,51684,51687,51692,51693,51695,51696,51697,51704,51705,51708,51712,51720,51721,51723,51724,51725,51732,51736,51753,51788,51789,51792,51796,51804,51805,51807,51808,51809,51816,51837,51844,51864,51900,51901,51904,51908,51916,51917,51919,51921,51923,51928,51929,51936,51948,51956,51976,51984,51988,51992,52000,52001,52033,52040,52041,52044,52048,52056,52057,52061,52068,52088,52089,52124,52152,52180,52196,52199,52201,52236,52237,52240,52244,52252,52253,52257,52258,52263,52264,52265,52268,52270,52272,52280,52281,52283,54845,54846,54847,54849,54850,54851,54852,54854,54855,54858,54860,54862,54863,54864,54866,54867,54870,54871,54873,54874,54875,54877,54878,54879,54880,54881,null,null,null,null,null,null,54882,54883,54884,54885,54886,54888,54890,54891,54892,54893,54894,54895,54898,54899,54901,54902,54903,54904,54905,54906,54907,54908,54909,54910,54911,54912,null,null,null,null,null,null,54913,54914,54916,54918,54919,54920,54921,54922,54923,54926,54927,54929,54930,54931,54933,54934,54935,54936,54937,54938,54939,54940,54942,54944,54946,54947,54948,54949,54950,54951,54953,54954,52284,52285,52286,52292,52293,52296,52300,52308,52309,52311,52312,52313,52320,52324,52326,52328,52336,52341,52376,52377,52380,52384,52392,52393,52395,52396,52397,52404,52405,52408,52412,52420,52421,52423,52425,52432,52436,52452,52460,52464,52481,52488,52489,52492,52496,52504,52505,52507,52509,52516,52520,52524,52537,52572,52576,52580,52588,52589,52591,52593,52600,52616,52628,52629,52632,52636,52644,52645,52647,52649,52656,52676,52684,52688,52712,52716,52720,52728,52729,52731,52733,52740,52744,52748,52756,52761,52768,52769,52772,52776,52784,52785,52787,52789,54955,54957,54958,54959,54961,54962,54963,54964,54965,54966,54967,54968,54970,54972,54973,54974,54975,54976,54977,54978,54979,54982,54983,54985,54986,54987,null,null,null,null,null,null,54989,54990,54991,54992,54994,54995,54997,54998,55000,55002,55003,55004,55005,55006,55007,55009,55010,55011,55013,55014,55015,55017,55018,55019,55020,55021,null,null,null,null,null,null,55022,55023,55025,55026,55027,55028,55030,55031,55032,55033,55034,55035,55038,55039,55041,55042,55043,55045,55046,55047,55048,55049,55050,55051,55052,55053,55054,55055,55056,55058,55059,55060,52824,52825,52828,52831,52832,52833,52840,52841,52843,52845,52852,52853,52856,52860,52868,52869,52871,52873,52880,52881,52884,52888,52896,52897,52899,52900,52901,52908,52909,52929,52964,52965,52968,52971,52972,52980,52981,52983,52984,52985,52992,52993,52996,53000,53008,53009,53011,53013,53020,53024,53028,53036,53037,53039,53040,53041,53048,53076,53077,53080,53084,53092,53093,53095,53097,53104,53105,53108,53112,53120,53125,53132,53153,53160,53168,53188,53216,53217,53220,53224,53232,53233,53235,53237,53244,53248,53252,53265,53272,53293,53300,53301,53304,53308,55061,55062,55063,55066,55067,55069,55070,55071,55073,55074,55075,55076,55077,55078,55079,55082,55084,55086,55087,55088,55089,55090,55091,55094,55095,55097,null,null,null,null,null,null,55098,55099,55101,55102,55103,55104,55105,55106,55107,55109,55110,55112,55114,55115,55116,55117,55118,55119,55122,55123,55125,55130,55131,55132,55133,55134,null,null,null,null,null,null,55135,55138,55140,55142,55143,55144,55146,55147,55149,55150,55151,55153,55154,55155,55157,55158,55159,55160,55161,55162,55163,55166,55167,55168,55170,55171,55172,55173,55174,55175,55178,55179,53316,53317,53319,53321,53328,53332,53336,53344,53356,53357,53360,53364,53372,53373,53377,53412,53413,53416,53420,53428,53429,53431,53433,53440,53441,53444,53448,53449,53456,53457,53459,53460,53461,53468,53469,53472,53476,53484,53485,53487,53488,53489,53496,53517,53552,53553,53556,53560,53562,53568,53569,53571,53572,53573,53580,53581,53584,53588,53596,53597,53599,53601,53608,53612,53628,53636,53640,53664,53665,53668,53672,53680,53681,53683,53685,53690,53692,53696,53720,53748,53752,53767,53769,53776,53804,53805,53808,53812,53820,53821,53823,53825,53832,53852,55181,55182,55183,55185,55186,55187,55188,55189,55190,55191,55194,55196,55198,55199,55200,55201,55202,55203,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,53860,53888,53889,53892,53896,53904,53905,53909,53916,53920,53924,53932,53937,53944,53945,53948,53951,53952,53954,53960,53961,53963,53972,53976,53980,53988,53989,54000,54001,54004,54008,54016,54017,54019,54021,54028,54029,54030,54032,54036,54038,54044,54045,54047,54048,54049,54053,54056,54057,54060,54064,54072,54073,54075,54076,54077,54084,54085,54140,54141,54144,54148,54156,54157,54159,54160,54161,54168,54169,54172,54176,54184,54185,54187,54189,54196,54200,54204,54212,54213,54216,54217,54224,54232,54241,54243,54252,54253,54256,54260,54268,54269,54271,54273,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54280,54301,54336,54340,54364,54368,54372,54381,54383,54392,54393,54396,54399,54400,54402,54408,54409,54411,54413,54420,54441,54476,54480,54484,54492,54495,54504,54508,54512,54520,54523,54525,54532,54536,54540,54548,54549,54551,54588,54589,54592,54596,54604,54605,54607,54609,54616,54617,54620,54624,54629,54632,54633,54635,54637,54644,54645,54648,54652,54660,54661,54663,54664,54665,54672,54693,54728,54729,54732,54736,54738,54744,54745,54747,54749,54756,54757,54760,54764,54772,54773,54775,54777,54784,54785,54788,54792,54800,54801,54803,54804,54805,54812,54816,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54820,54829,54840,54841,54844,54848,54853,54856,54857,54859,54861,54865,54868,54869,54872,54876,54887,54889,54896,54897,54900,54915,54917,54924,54925,54928,54932,54941,54943,54945,54952,54956,54960,54969,54971,54980,54981,54984,54988,54993,54996,54999,55001,55008,55012,55016,55024,55029,55036,55037,55040,55044,55057,55064,55065,55068,55072,55080,55081,55083,55085,55092,55093,55096,55100,55108,55111,55113,55120,55121,55124,55126,55127,55128,55129,55136,55137,55139,55141,55145,55148,55152,55156,55164,55165,55169,55176,55177,55180,55184,55192,55193,55195,55197,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20285,20339,20551,20729,21152,21487,21621,21733,22025,23233,23478,26247,26550,26551,26607,27468,29634,30146,31292,33499,33540,34903,34952,35382,36040,36303,36603,36838,39381,21051,21364,21508,24682,24932,27580,29647,33050,35258,35282,38307,20355,21002,22718,22904,23014,24178,24185,25031,25536,26438,26604,26751,28567,30286,30475,30965,31240,31487,31777,32925,33390,33393,35563,38291,20075,21917,26359,28212,30883,31469,33883,35088,34638,38824,21208,22350,22570,23884,24863,25022,25121,25954,26577,27204,28187,29976,30131,30435,30640,32058,37039,37969,37970,40853,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21283,23724,30002,32987,37440,38296,21083,22536,23004,23713,23831,24247,24378,24394,24951,27743,30074,30086,31968,32115,32177,32652,33108,33313,34193,35137,35611,37628,38477,40007,20171,20215,20491,20977,22607,24887,24894,24936,25913,27114,28433,30117,30342,30422,31623,33445,33995,63744,37799,38283,21888,23458,22353,63745,31923,32697,37301,20520,21435,23621,24040,25298,25454,25818,25831,28192,28844,31067,36317,36382,63746,36989,37445,37624,20094,20214,20581,24062,24314,24838,26967,33137,34388,36423,37749,39467,20062,20625,26480,26688,20745,21133,21138,27298,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30652,37392,40660,21163,24623,36850,20552,25001,25581,25802,26684,27268,28608,33160,35233,38548,22533,29309,29356,29956,32121,32365,32937,35211,35700,36963,40273,25225,27770,28500,32080,32570,35363,20860,24906,31645,35609,37463,37772,20140,20435,20510,20670,20742,21185,21197,21375,22384,22659,24218,24465,24950,25004,25806,25964,26223,26299,26356,26775,28039,28805,28913,29855,29861,29898,30169,30828,30956,31455,31478,32069,32147,32789,32831,33051,33686,35686,36629,36885,37857,38915,38968,39514,39912,20418,21843,22586,22865,23395,23622,24760,25106,26690,26800,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26856,28330,30028,30328,30926,31293,31995,32363,32380,35336,35489,35903,38542,40388,21476,21481,21578,21617,22266,22993,23396,23611,24235,25335,25911,25925,25970,26272,26543,27073,27837,30204,30352,30590,31295,32660,32771,32929,33167,33510,33533,33776,34241,34865,34996,35493,63747,36764,37678,38599,39015,39640,40723,21741,26011,26354,26767,31296,35895,40288,22256,22372,23825,26118,26801,26829,28414,29736,34974,39908,27752,63748,39592,20379,20844,20849,21151,23380,24037,24656,24685,25329,25511,25915,29657,31354,34467,36002,38799,20018,23521,25096,26524,29916,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31185,33747,35463,35506,36328,36942,37707,38982,24275,27112,34303,37101,63749,20896,23448,23532,24931,26874,27454,28748,29743,29912,31649,32592,33733,35264,36011,38364,39208,21038,24669,25324,36866,20362,20809,21281,22745,24291,26336,27960,28826,29378,29654,31568,33009,37979,21350,25499,32619,20054,20608,22602,22750,24618,24871,25296,27088,39745,23439,32024,32945,36703,20132,20689,21676,21932,23308,23968,24039,25898,25934,26657,27211,29409,30350,30703,32094,32761,33184,34126,34527,36611,36686,37066,39171,39509,39851,19992,20037,20061,20167,20465,20855,21246,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21312,21475,21477,21646,22036,22389,22434,23495,23943,24272,25084,25304,25937,26552,26601,27083,27472,27590,27628,27714,28317,28792,29399,29590,29699,30655,30697,31350,32127,32777,33276,33285,33290,33503,34914,35635,36092,36544,36881,37041,37476,37558,39378,39493,40169,40407,40860,22283,23616,33738,38816,38827,40628,21531,31384,32676,35033,36557,37089,22528,23624,25496,31391,23470,24339,31353,31406,33422,36524,20518,21048,21240,21367,22280,25331,25458,27402,28099,30519,21413,29527,34152,36470,38357,26426,27331,28528,35437,36556,39243,63750,26231,27512,36020,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,39740,63751,21483,22317,22862,25542,27131,29674,30789,31418,31429,31998,33909,35215,36211,36917,38312,21243,22343,30023,31584,33740,37406,63752,27224,20811,21067,21127,25119,26840,26997,38553,20677,21156,21220,25027,26020,26681,27135,29822,31563,33465,33771,35250,35641,36817,39241,63753,20170,22935,25810,26129,27278,29748,31105,31165,33449,34942,34943,35167,63754,37670,20235,21450,24613,25201,27762,32026,32102,20120,20834,30684,32943,20225,20238,20854,20864,21980,22120,22331,22522,22524,22804,22855,22931,23492,23696,23822,24049,24190,24524,25216,26071,26083,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26398,26399,26462,26827,26820,27231,27450,27683,27773,27778,28103,29592,29734,29738,29826,29859,30072,30079,30849,30959,31041,31047,31048,31098,31637,32000,32186,32648,32774,32813,32908,35352,35663,35912,36215,37665,37668,39138,39249,39438,39439,39525,40594,32202,20342,21513,25326,26708,37329,21931,20794,63755,63756,23068,25062,63757,25295,25343,63758,63759,63760,63761,63762,63763,37027,63764,63765,63766,63767,63768,35582,63769,63770,63771,63772,26262,63773,29014,63774,63775,38627,63776,25423,25466,21335,63777,26511,26976,28275,63778,30007,63779,63780,63781,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32013,63782,63783,34930,22218,23064,63784,63785,63786,63787,63788,20035,63789,20839,22856,26608,32784,63790,22899,24180,25754,31178,24565,24684,25288,25467,23527,23511,21162,63791,22900,24361,24594,63792,63793,63794,29785,63795,63796,63797,63798,63799,63800,39377,63801,63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,28611,63812,63813,33215,36786,24817,63814,63815,33126,63816,63817,23615,63818,63819,63820,63821,63822,63823,63824,63825,23273,35365,26491,32016,63826,63827,63828,63829,63830,63831,33021,63832,63833,23612,27877,21311,28346,22810,33590,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20025,20150,20294,21934,22296,22727,24406,26039,26086,27264,27573,28237,30701,31471,31774,32222,34507,34962,37170,37723,25787,28606,29562,30136,36948,21846,22349,25018,25812,26311,28129,28251,28525,28601,30192,32835,33213,34113,35203,35527,35674,37663,27795,30035,31572,36367,36957,21776,22530,22616,24162,25095,25758,26848,30070,31958,34739,40680,20195,22408,22382,22823,23565,23729,24118,24453,25140,25825,29619,33274,34955,36024,38538,40667,23429,24503,24755,20498,20992,21040,22294,22581,22615,23566,23648,23798,23947,24230,24466,24764,25361,25481,25623,26691,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26873,27330,28120,28193,28372,28644,29182,30428,30585,31153,31291,33796,35241,36077,36339,36424,36867,36884,36947,37117,37709,38518,38876,27602,28678,29272,29346,29544,30563,31167,31716,32411,35712,22697,24775,25958,26109,26302,27788,28958,29129,35930,38931,20077,31361,20189,20908,20941,21205,21516,24999,26481,26704,26847,27934,28540,30140,30643,31461,33012,33891,37509,20828,26007,26460,26515,30168,31431,33651,63834,35910,36887,38957,23663,33216,33434,36929,36975,37389,24471,23965,27225,29128,30331,31561,34276,35588,37159,39472,21895,25078,63835,30313,32645,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34367,34746,35064,37007,63836,27931,28889,29662,32097,33853,63837,37226,39409,63838,20098,21365,27396,27410,28734,29211,34349,40478,21068,36771,23888,25829,25900,27414,28651,31811,32412,34253,35172,35261,25289,33240,34847,24266,26391,28010,29436,29701,29807,34690,37086,20358,23821,24480,33802,20919,25504,30053,20142,20486,20841,20937,26753,27153,31918,31921,31975,33391,35538,36635,37327,20406,20791,21237,21570,24300,24942,25150,26053,27354,28670,31018,34268,34851,38317,39522,39530,40599,40654,21147,26310,27511,28701,31019,36706,38722,24976,25088,25891,28451,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29001,29833,32244,32879,34030,36646,36899,37706,20925,21015,21155,27916,28872,35010,24265,25986,27566,28610,31806,29557,20196,20278,22265,63839,23738,23994,24604,29618,31533,32666,32718,32838,36894,37428,38646,38728,38936,40801,20363,28583,31150,37300,38583,21214,63840,25736,25796,27347,28510,28696,29200,30439,32769,34310,34396,36335,36613,38706,39791,40442,40565,30860,31103,32160,33737,37636,40575,40595,35542,22751,24324,26407,28711,29903,31840,32894,20769,28712,29282,30922,36034,36058,36084,38647,20102,20698,23534,24278,26009,29134,30274,30637,32842,34044,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36988,39719,40845,22744,23105,23650,27155,28122,28431,30267,32047,32311,34078,35128,37860,38475,21129,26066,26611,27060,27969,28316,28687,29705,29792,30041,30244,30827,35628,39006,20845,25134,38520,20374,20523,23833,28138,32184,36650,24459,24900,26647,63841,38534,21202,32907,20956,20940,26974,31260,32190,33777,38517,20442,21033,21400,21519,21774,23653,24743,26446,26792,28012,29313,29432,29702,29827,63842,30178,31852,32633,32696,33673,35023,35041,37324,37328,38626,39881,21533,28542,29136,29848,34298,36522,38563,40023,40607,26519,28107,29747,33256,38678,30764,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31435,31520,31890,25705,29802,30194,30908,30952,39340,39764,40635,23518,24149,28448,33180,33707,37000,19975,21325,23081,24018,24398,24930,25405,26217,26364,28415,28459,28771,30622,33836,34067,34875,36627,39237,39995,21788,25273,26411,27819,33545,35178,38778,20129,22916,24536,24537,26395,32178,32596,33426,33579,33725,36638,37017,22475,22969,23186,23504,26151,26522,26757,27599,29028,32629,36023,36067,36993,39749,33032,35978,38476,39488,40613,23391,27667,29467,30450,30431,33804,20906,35219,20813,20885,21193,26825,27796,30468,30496,32191,32236,38754,40629,28357,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34065,20901,21517,21629,26126,26269,26919,28319,30399,30609,33559,33986,34719,37225,37528,40180,34946,20398,20882,21215,22982,24125,24917,25720,25721,26286,26576,27169,27597,27611,29279,29281,29761,30520,30683,32791,33468,33541,35584,35624,35980,26408,27792,29287,30446,30566,31302,40361,27519,27794,22818,26406,33945,21359,22675,22937,24287,25551,26164,26483,28218,29483,31447,33495,37672,21209,24043,25006,25035,25098,25287,25771,26080,26969,27494,27595,28961,29687,30045,32326,33310,33538,34154,35491,36031,38695,40289,22696,40664,20497,21006,21563,21839,25991,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27766,32010,32011,32862,34442,38272,38639,21247,27797,29289,21619,23194,23614,23883,24396,24494,26410,26806,26979,28220,28228,30473,31859,32654,34183,35598,36855,38753,40692,23735,24758,24845,25003,25935,26107,26108,27665,27887,29599,29641,32225,38292,23494,34588,35600,21085,21338,25293,25615,25778,26420,27192,27850,29632,29854,31636,31893,32283,33162,33334,34180,36843,38649,39361,20276,21322,21453,21467,25292,25644,25856,26001,27075,27886,28504,29677,30036,30242,30436,30460,30928,30971,31020,32070,33324,34784,36820,38930,39151,21187,25300,25765,28196,28497,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30332,36299,37297,37474,39662,39747,20515,20621,22346,22952,23592,24135,24439,25151,25918,26041,26049,26121,26507,27036,28354,30917,32033,32938,33152,33323,33459,33953,34444,35370,35607,37030,38450,40848,20493,20467,63843,22521,24472,25308,25490,26479,28227,28953,30403,32972,32986,35060,35061,35097,36064,36649,37197,38506,20271,20336,24091,26575,26658,30333,30334,39748,24161,27146,29033,29140,30058,63844,32321,34115,34281,39132,20240,31567,32624,38309,20961,24070,26805,27710,27726,27867,29359,31684,33539,27861,29754,20731,21128,22721,25816,27287,29863,30294,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30887,34327,38370,38713,63845,21342,24321,35722,36776,36783,37002,21029,30629,40009,40712,19993,20482,20853,23643,24183,26142,26170,26564,26821,28851,29953,30149,31177,31453,36647,39200,39432,20445,22561,22577,23542,26222,27493,27921,28282,28541,29668,29995,33769,35036,35091,35676,36628,20239,20693,21264,21340,23443,24489,26381,31119,33145,33583,34068,35079,35206,36665,36667,39333,39954,26412,20086,20472,22857,23553,23791,23792,25447,26834,28925,29090,29739,32299,34028,34562,36898,37586,40179,19981,20184,20463,20613,21078,21103,21542,21648,22496,22827,23142,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23386,23413,23500,24220,63846,25206,25975,26023,28014,28325,29238,31526,31807,32566,33104,33105,33178,33344,33433,33705,35331,36000,36070,36091,36212,36282,37096,37340,38428,38468,39385,40167,21271,20998,21545,22132,22707,22868,22894,24575,24996,25198,26128,27774,28954,30406,31881,31966,32027,33452,36033,38640,63847,20315,24343,24447,25282,23849,26379,26842,30844,32323,40300,19989,20633,21269,21290,21329,22915,23138,24199,24754,24970,25161,25209,26000,26503,27047,27604,27606,27607,27608,27832,63848,29749,30202,30738,30865,31189,31192,31875,32203,32737,32933,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,33086,33218,33778,34586,35048,35513,35692,36027,37145,38750,39131,40763,22188,23338,24428,25996,27315,27567,27996,28657,28693,29277,29613,36007,36051,38971,24977,27703,32856,39425,20045,20107,20123,20181,20282,20284,20351,20447,20735,21490,21496,21766,21987,22235,22763,22882,23057,23531,23546,23556,24051,24107,24473,24605,25448,26012,26031,26614,26619,26797,27515,27801,27863,28195,28681,29509,30722,31038,31040,31072,31169,31721,32023,32114,32902,33293,33678,34001,34503,35039,35408,35422,35613,36060,36198,36781,37034,39164,39391,40605,21066,63849,26388,63850,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20632,21034,23665,25955,27733,29642,29987,30109,31639,33948,37240,38704,20087,25746,27578,29022,34217,19977,63851,26441,26862,28183,33439,34072,34923,25591,28545,37394,39087,19978,20663,20687,20767,21830,21930,22039,23360,23577,23776,24120,24202,24224,24258,24819,26705,27233,28248,29245,29248,29376,30456,31077,31665,32724,35059,35316,35443,35937,36062,38684,22622,29885,36093,21959,63852,31329,32034,33394,29298,29983,29989,63853,31513,22661,22779,23996,24207,24246,24464,24661,25234,25471,25933,26257,26329,26360,26646,26866,29312,29790,31598,32110,32214,32626,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32997,33298,34223,35199,35475,36893,37604,40653,40736,22805,22893,24109,24796,26132,26227,26512,27728,28101,28511,30707,30889,33990,37323,37675,20185,20682,20808,21892,23307,23459,25159,25982,26059,28210,29053,29697,29764,29831,29887,30316,31146,32218,32341,32680,33146,33203,33337,34330,34796,35445,36323,36984,37521,37925,39245,39854,21352,23633,26964,27844,27945,28203,33292,34203,35131,35373,35498,38634,40807,21089,26297,27570,32406,34814,36109,38275,38493,25885,28041,29166,63854,22478,22995,23468,24615,24826,25104,26143,26207,29481,29689,30427,30465,31596,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32854,32882,33125,35488,37266,19990,21218,27506,27927,31237,31545,32048,63855,36016,21484,22063,22609,23477,23567,23569,24034,25152,25475,25620,26157,26803,27836,28040,28335,28703,28836,29138,29990,30095,30094,30233,31505,31712,31787,32032,32057,34092,34157,34311,35380,36877,36961,37045,37559,38902,39479,20439,23660,26463,28049,31903,32396,35606,36118,36895,23403,24061,25613,33984,36956,39137,29575,23435,24730,26494,28126,35359,35494,36865,38924,21047,63856,28753,30862,37782,34928,37335,20462,21463,22013,22234,22402,22781,23234,23432,23723,23744,24101,24833,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,25101,25163,25480,25628,25910,25976,27193,27530,27700,27929,28465,29159,29417,29560,29703,29874,30246,30561,31168,31319,31466,31929,32143,32172,32353,32670,33065,33585,33936,34010,34282,34966,35504,35728,36664,36930,36995,37228,37526,37561,38539,38567,38568,38614,38656,38920,39318,39635,39706,21460,22654,22809,23408,23487,28113,28506,29087,29729,29881,32901,33789,24033,24455,24490,24642,26092,26642,26991,27219,27529,27957,28147,29667,30462,30636,31565,32020,33059,33308,33600,34036,34147,35426,35524,37255,37662,38918,39348,25100,34899,36848,37477,23815,23847,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23913,29791,33181,34664,28629,25342,32722,35126,35186,19998,20056,20711,21213,21319,25215,26119,32361,34821,38494,20365,21273,22070,22987,23204,23608,23630,23629,24066,24337,24643,26045,26159,26178,26558,26612,29468,30690,31034,32709,33940,33997,35222,35430,35433,35553,35925,35962,22516,23508,24335,24687,25325,26893,27542,28252,29060,31698,34645,35672,36606,39135,39166,20280,20353,20449,21627,23072,23480,24892,26032,26216,29180,30003,31070,32051,33102,33251,33688,34218,34254,34563,35338,36523,36763,63857,36805,22833,23460,23526,24713,23529,23563,24515,27777,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63858,28145,28683,29978,33455,35574,20160,21313,63859,38617,27663,20126,20420,20818,21854,23077,23784,25105,29273,33469,33706,34558,34905,35357,38463,38597,39187,40201,40285,22538,23731,23997,24132,24801,24853,25569,27138,28197,37122,37716,38990,39952,40823,23433,23736,25353,26191,26696,30524,38593,38797,38996,39839,26017,35585,36555,38332,21813,23721,24022,24245,26263,30284,33780,38343,22739,25276,29390,40232,20208,22830,24591,26171,27523,31207,40230,21395,21696,22467,23830,24859,26326,28079,30861,33406,38552,38724,21380,25212,25494,28082,32266,33099,38989,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27387,32588,40367,40474,20063,20539,20918,22812,24825,25590,26928,29242,32822,63860,37326,24369,63861,63862,32004,33509,33903,33979,34277,36493,63863,20335,63864,63865,22756,23363,24665,25562,25880,25965,26264,63866,26954,27171,27915,28673,29036,30162,30221,31155,31344,63867,32650,63868,35140,63869,35731,37312,38525,63870,39178,22276,24481,26044,28417,30208,31142,35486,39341,39770,40812,20740,25014,25233,27277,33222,20547,22576,24422,28937,35328,35578,23420,34326,20474,20796,22196,22852,25513,28153,23978,26989,20870,20104,20313,63871,63872,63873,22914,63874,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63875,27487,27741,63876,29877,30998,63877,33287,33349,33593,36671,36701,63878,39192,63879,63880,63881,20134,63882,22495,24441,26131,63883,63884,30123,32377,35695,63885,36870,39515,22181,22567,23032,23071,23476,63886,24310,63887,63888,25424,25403,63889,26941,27783,27839,28046,28051,28149,28436,63890,28895,28982,29017,63891,29123,29141,63892,30799,30831,63893,31605,32227,63894,32303,63895,34893,36575,63896,63897,63898,37467,63899,40182,63900,63901,63902,24709,28037,63903,29105,63904,63905,38321,21421,63906,63907,63908,26579,63909,28814,28976,29744,33398,33490,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63910,38331,39653,40573,26308,63911,29121,33865,63912,63913,22603,63914,63915,23992,24433,63916,26144,26254,27001,27054,27704,27891,28214,28481,28634,28699,28719,29008,29151,29552,63917,29787,63918,29908,30408,31310,32403,63919,63920,33521,35424,36814,63921,37704,63922,38681,63923,63924,20034,20522,63925,21000,21473,26355,27757,28618,29450,30591,31330,33454,34269,34306,63926,35028,35427,35709,35947,63927,37555,63928,38675,38928,20116,20237,20425,20658,21320,21566,21555,21978,22626,22714,22887,23067,23524,24735,63929,25034,25942,26111,26212,26791,27738,28595,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28879,29100,29522,31613,34568,35492,39986,40711,23627,27779,29508,29577,37434,28331,29797,30239,31337,32277,34314,20800,22725,25793,29934,29973,30320,32705,37013,38605,39252,28198,29926,31401,31402,33253,34521,34680,35355,23113,23436,23451,26785,26880,28003,29609,29715,29740,30871,32233,32747,33048,33109,33694,35916,38446,38929,26352,24448,26106,26505,27754,29579,20525,23043,27498,30702,22806,23916,24013,29477,30031,63930,63931,20709,20985,22575,22829,22934,23002,23525,63932,63933,23970,25303,25622,25747,25854,63934,26332,63935,27208,63936,29183,29796,63937,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31368,31407,32327,32350,32768,33136,63938,34799,35201,35616,36953,63939,36992,39250,24958,27442,28020,32287,35109,36785,20433,20653,20887,21191,22471,22665,23481,24248,24898,27029,28044,28263,28342,29076,29794,29992,29996,32883,33592,33993,36362,37780,37854,63940,20110,20305,20598,20778,21448,21451,21491,23431,23507,23588,24858,24962,26100,29275,29591,29760,30402,31056,31121,31161,32006,32701,33419,34261,34398,36802,36935,37109,37354,38533,38632,38633,21206,24423,26093,26161,26671,29020,31286,37057,38922,20113,63941,27218,27550,28560,29065,32792,33464,34131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36939,38549,38642,38907,34074,39729,20112,29066,38596,20803,21407,21729,22291,22290,22435,23195,23236,23491,24616,24895,25588,27781,27961,28274,28304,29232,29503,29783,33489,34945,36677,36960,63942,38498,39000,40219,26376,36234,37470,20301,20553,20702,21361,22285,22996,23041,23561,24944,26256,28205,29234,29771,32239,32963,33806,33894,34111,34655,34907,35096,35586,36949,38859,39759,20083,20369,20754,20842,63943,21807,21929,23418,23461,24188,24189,24254,24736,24799,24840,24841,25540,25912,26377,63944,26580,26586,63945,26977,26978,27833,27943,63946,28216,63947,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28641,29494,29495,63948,29788,30001,63949,30290,63950,63951,32173,33278,33848,35029,35480,35547,35565,36400,36418,36938,36926,36986,37193,37321,37742,63952,63953,22537,63954,27603,32905,32946,63955,63956,20801,22891,23609,63957,63958,28516,29607,32996,36103,63959,37399,38287,63960,63961,63962,63963,32895,25102,28700,32104,34701,63964,22432,24681,24903,27575,35518,37504,38577,20057,21535,28139,34093,38512,38899,39150,25558,27875,37009,20957,25033,33210,40441,20381,20506,20736,23452,24847,25087,25836,26885,27589,30097,30691,32681,33380,34191,34811,34915,35516,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,35696,37291,20108,20197,20234,63965,63966,22839,23016,63967,24050,24347,24411,24609,63968,63969,63970,63971,29246,29669,63972,30064,30157,63973,31227,63974,32780,32819,32900,33505,33617,63975,63976,36029,36019,36999,63977,63978,39156,39180,63979,63980,28727,30410,32714,32716,32764,35610,20154,20161,20995,21360,63981,21693,22240,23035,23493,24341,24525,28270,63982,63983,32106,33589,63984,34451,35469,63985,38765,38775,63986,63987,19968,20314,20350,22777,26085,28322,36920,37808,39353,20219,22764,22922,23001,24641,63988,63989,31252,63990,33615,36035,20837,21316,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63991,63992,63993,20173,21097,23381,33471,20180,21050,21672,22985,23039,23376,23383,23388,24675,24904,28363,28825,29038,29574,29943,30133,30913,32043,32773,33258,33576,34071,34249,35566,36039,38604,20316,21242,22204,26027,26152,28796,28856,29237,32189,33421,37196,38592,40306,23409,26855,27544,28538,30430,23697,26283,28507,31668,31786,34870,38620,19976,20183,21280,22580,22715,22767,22892,23559,24115,24196,24373,25484,26290,26454,27167,27299,27404,28479,29254,63994,29520,29835,31456,31911,33144,33247,33255,33674,33900,34083,34196,34255,35037,36115,37292,38263,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38556,20877,21705,22312,23472,25165,26448,26685,26771,28221,28371,28797,32289,35009,36001,36617,40779,40782,29229,31631,35533,37658,20295,20302,20786,21632,22992,24213,25269,26485,26990,27159,27822,28186,29401,29482,30141,31672,32053,33511,33785,33879,34295,35419,36015,36487,36889,37048,38606,40799,21219,21514,23265,23490,25688,25973,28404,29380,63995,30340,31309,31515,31821,32318,32735,33659,35627,36042,36196,36321,36447,36842,36857,36969,37841,20291,20346,20659,20840,20856,21069,21098,22625,22652,22880,23560,23637,24283,24731,25136,26643,27583,27656,28593,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29006,29728,30000,30008,30033,30322,31564,31627,31661,31686,32399,35438,36670,36681,37439,37523,37666,37931,38651,39002,39019,39198,20999,25130,25240,27993,30308,31434,31680,32118,21344,23742,24215,28472,28857,31896,38673,39822,40670,25509,25722,34678,19969,20117,20141,20572,20597,21576,22979,23450,24128,24237,24311,24449,24773,25402,25919,25972,26060,26230,26232,26622,26984,27273,27491,27712,28096,28136,28191,28254,28702,28833,29582,29693,30010,30555,30855,31118,31243,31357,31934,32142,33351,35330,35562,35998,37165,37194,37336,37478,37580,37664,38662,38742,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38748,38914,40718,21046,21137,21884,22564,24093,24351,24716,25552,26799,28639,31085,31532,33229,34234,35069,35576,36420,37261,38500,38555,38717,38988,40778,20430,20806,20939,21161,22066,24340,24427,25514,25805,26089,26177,26362,26361,26397,26781,26839,27133,28437,28526,29031,29157,29226,29866,30522,31062,31066,31199,31264,31381,31895,31967,32068,32368,32903,34299,34468,35412,35519,36249,36481,36896,36973,37347,38459,38613,40165,26063,31751,36275,37827,23384,23562,21330,25305,29469,20519,23447,24478,24752,24939,26837,28121,29742,31278,32066,32156,32305,33131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36394,36405,37758,37912,20304,22352,24038,24231,25387,32618,20027,20303,20367,20570,23005,32964,21610,21608,22014,22863,23449,24030,24282,26205,26417,26609,26666,27880,27954,28234,28557,28855,29664,30087,31820,32002,32044,32162,33311,34523,35387,35461,36208,36490,36659,36913,37198,37202,37956,39376,31481,31909,20426,20737,20934,22472,23535,23803,26201,27197,27994,28310,28652,28940,30063,31459,34850,36897,36981,38603,39423,33537,20013,20210,34886,37325,21373,27355,26987,27713,33914,22686,24974,26366,25327,28893,29969,30151,32338,33976,35657,36104,20043,21482,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21675,22320,22336,24535,25345,25351,25711,25903,26088,26234,26525,26547,27490,27744,27802,28460,30693,30757,31049,31063,32025,32930,33026,33267,33437,33463,34584,35468,63996,36100,36286,36978,30452,31257,31287,32340,32887,21767,21972,22645,25391,25634,26185,26187,26733,27035,27524,27941,28337,29645,29800,29857,30043,30137,30433,30494,30603,31206,32265,32285,33275,34095,34967,35386,36049,36587,36784,36914,37805,38499,38515,38663,20356,21489,23018,23241,24089,26702,29894,30142,31209,31378,33187,34541,36074,36300,36845,26015,26389,63997,22519,28503,32221,36655,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37878,38598,24501,25074,28548,19988,20376,20511,21449,21983,23919,24046,27425,27492,30923,31642,63998,36425,36554,36974,25417,25662,30528,31364,37679,38015,40810,25776,28591,29158,29864,29914,31428,31762,32386,31922,32408,35738,36106,38013,39184,39244,21049,23519,25830,26413,32046,20717,21443,22649,24920,24921,25082,26028,31449,35730,35734,20489,20513,21109,21809,23100,24288,24432,24884,25950,26124,26166,26274,27085,28356,28466,29462,30241,31379,33081,33369,33750,33980,20661,22512,23488,23528,24425,25505,30758,32181,33756,34081,37319,37365,20874,26613,31574,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36012,20932,22971,24765,34389,20508,63999,21076,23610,24957,25114,25299,25842,26021,28364,30240,33034,36448,38495,38587,20191,21315,21912,22825,24029,25797,27849,28154,29588,31359,33307,34214,36068,36368,36983,37351,38369,38433,38854,20984,21746,21894,24505,25764,28552,32180,36639,36685,37941,20681,23574,27838,28155,29979,30651,31805,31844,35449,35522,22558,22974,24086,25463,29266,30090,30571,35548,36028,36626,24307,26228,28152,32893,33729,35531,38737,39894,64000,21059,26367,28053,28399,32224,35558,36910,36958,39636,21021,21119,21736,24980,25220,25307,26786,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26898,26970,27189,28818,28966,30813,30977,30990,31186,31245,32918,33400,33493,33609,34121,35970,36229,37218,37259,37294,20419,22225,29165,30679,34560,35320,23544,24534,26449,37032,21474,22618,23541,24740,24961,25696,32317,32880,34085,37507,25774,20652,23828,26368,22684,25277,25512,26894,27000,27166,28267,30394,31179,33467,33833,35535,36264,36861,37138,37195,37276,37648,37656,37786,38619,39478,39949,19985,30044,31069,31482,31569,31689,32302,33988,36441,36468,36600,36880,26149,26943,29763,20986,26414,40668,20805,24544,27798,34802,34909,34935,24756,33205,33795,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36101,21462,21561,22068,23094,23601,28810,32736,32858,33030,33261,36259,37257,39519,40434,20596,20164,21408,24827,28204,23652,20360,20516,21988,23769,24159,24677,26772,27835,28100,29118,30164,30196,30305,31258,31305,32199,32251,32622,33268,34473,36636,38601,39347,40786,21063,21189,39149,35242,19971,26578,28422,20405,23522,26517,27784,28024,29723,30759,37341,37756,34756,31204,31281,24555,20182,21668,21822,22702,22949,24816,25171,25302,26422,26965,33333,38464,39345,39389,20524,21331,21828,22396,64001,25176,64002,25826,26219,26589,28609,28655,29730,29752,35351,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37944,21585,22022,22374,24392,24986,27470,28760,28845,32187,35477,22890,33067,25506,30472,32829,36010,22612,25645,27067,23445,24081,28271,64003,34153,20812,21488,22826,24608,24907,27526,27760,27888,31518,32974,33492,36294,37040,39089,64004,25799,28580,25745,25860,20814,21520,22303,35342,24927,26742,64005,30171,31570,32113,36890,22534,27084,33151,35114,36864,38969,20600,22871,22956,25237,36879,39722,24925,29305,38358,22369,23110,24052,25226,25773,25850,26487,27874,27966,29228,29750,30772,32631,33453,36315,38935,21028,22338,26495,29256,29923,36009,36774,37393,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38442,20843,21485,25420,20329,21764,24726,25943,27803,28031,29260,29437,31255,35207,35997,24429,28558,28921,33192,24846,20415,20559,25153,29255,31687,32232,32745,36941,38829,39449,36022,22378,24179,26544,33805,35413,21536,23318,24163,24290,24330,25987,32954,34109,38281,38491,20296,21253,21261,21263,21638,21754,22275,24067,24598,25243,25265,25429,64006,27873,28006,30129,30770,32990,33071,33502,33889,33970,34957,35090,36875,37610,39165,39825,24133,26292,26333,28689,29190,64007,20469,21117,24426,24915,26451,27161,28418,29922,31080,34920,35961,39111,39108,39491,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21697,31263,26963,35575,35914,39080,39342,24444,25259,30130,30382,34987,36991,38466,21305,24380,24517,27852,29644,30050,30091,31558,33534,39325,20047,36924,19979,20309,21414,22799,24264,26160,27827,29781,33655,34662,36032,36944,38686,39957,22737,23416,34384,35604,40372,23506,24680,24717,26097,27735,28450,28579,28698,32597,32752,38289,38290,38480,38867,21106,36676,20989,21547,21688,21859,21898,27323,28085,32216,33382,37532,38519,40569,21512,21704,30418,34532,38308,38356,38492,20130,20233,23022,23270,24055,24658,25239,26477,26689,27782,28207,32568,32923,33322,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,64008,64009,38917,20133,20565,21683,22419,22874,23401,23475,25032,26999,28023,28707,34809,35299,35442,35559,36994,39405,39608,21182,26680,20502,24184,26447,33607,34892,20139,21521,22190,29670,37141,38911,39177,39255,39321,22099,22687,34395,35377,25010,27382,29563,36562,27463,38570,39511,22869,29184,36203,38761,20436,23796,24358,25080,26203,27883,28843,29572,29625,29694,30505,30541,32067,32098,32291,33335,34898,64010,36066,37449,39023,23377,31348,34880,38913,23244,20448,21332,22846,23805,25406,28025,29433,33029,33031,33698,37583,38960,20136,20804,21009,22411,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24418,27842,28366,28677,28752,28847,29074,29673,29801,33610,34722,34913,36872,37026,37795,39336,20846,24407,24800,24935,26291,34137,36426,37295,38795,20046,20114,21628,22741,22778,22909,23733,24359,25142,25160,26122,26215,27627,28009,28111,28246,28408,28564,28640,28649,28765,29392,29733,29786,29920,30355,31068,31946,32286,32993,33446,33899,33983,34382,34399,34676,35703,35946,37804,38912,39013,24785,25110,37239,23130,26127,28151,28222,29759,39746,24573,24794,31503,21700,24344,27742,27859,27946,28888,32005,34425,35340,40251,21270,21644,23301,27194,28779,30069,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31117,31166,33457,33775,35441,35649,36008,38772,64011,25844,25899,30906,30907,31339,20024,21914,22864,23462,24187,24739,25563,27489,26213,26707,28185,29029,29872,32008,36996,39529,39973,27963,28369,29502,35905,38346,20976,24140,24488,24653,24822,24880,24908,26179,26180,27045,27841,28255,28361,28514,29004,29852,30343,31681,31783,33618,34647,36945,38541,40643,21295,22238,24315,24458,24674,24724,25079,26214,26371,27292,28142,28590,28784,29546,32362,33214,33588,34516,35496,36036,21123,29554,23446,27243,37892,21742,22150,23389,25928,25989,26313,26783,28045,28102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29243,32948,37237,39501,20399,20505,21402,21518,21564,21897,21957,24127,24460,26429,29030,29661,36869,21211,21235,22628,22734,28932,29071,29179,34224,35347,26248,34216,21927,26244,29002,33841,21321,21913,27585,24409,24509,25582,26249,28999,35569,36637,40638,20241,25658,28875,30054,34407,24676,35662,40440,20807,20982,21256,27958,33016,40657,26133,27427,28824,30165,21507,23673,32007,35350,27424,27453,27462,21560,24688,27965,32725,33288,20694,20958,21916,22123,22221,23020,23305,24076,24985,24984,25137,26206,26342,29081,29113,29114,29351,31143,31232,32690,35440,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
28017 "gb18030":[19970,19972,19973,19974,19983,19986,19991,19999,20000,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,20515,20516,20519,20523,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20539,20541,20543,20544,20545,20546,20548,20549,20550,20553,20554,20555,20557,20560,20561,20562,20563,20564,20566,20567,20568,20569,20571,20573,20574,20575,20576,20577,20578,20579,20580,20582,20583,20584,20585,20586,20587,20589,20590,20591,20592,20593,20594,20595,20596,20597,20600,20601,20602,20604,20605,20609,20610,20611,20612,20614,20615,20617,20618,20619,20620,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20644,20646,20650,20651,20653,20654,20655,20656,20657,20659,20660,20661,20662,20663,20664,20665,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20688,20689,20690,20691,20692,20693,20695,20696,20697,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20712,20713,20714,20715,20719,20720,20721,20722,20724,20726,20727,20728,20729,20730,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20744,20745,20746,20748,20749,20750,20751,20752,20753,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20802,20807,20810,20812,20814,20815,20816,20818,20819,20823,20824,20825,20827,20829,20830,20831,20832,20833,20835,20836,20838,20839,20841,20842,20847,20850,20858,20862,20863,20867,20868,20870,20871,20874,20875,20878,20879,20880,20881,20883,20884,20888,20890,20893,20894,20895,20897,20899,20902,20903,20904,20905,20906,20909,20910,20916,20920,20921,20922,20926,20927,20929,20930,20931,20933,20936,20938,20941,20942,20944,20946,20947,20948,20949,20950,20951,20952,20953,20954,20956,20958,20959,20962,20963,20965,20966,20967,20968,20969,20970,20972,20974,20977,20978,20980,20983,20990,20996,20997,21001,21003,21004,21007,21008,21011,21012,21013,21020,21022,21023,21025,21026,21027,21029,21030,21031,21034,21036,21039,21041,21042,21044,21045,21052,21054,21060,21061,21062,21063,21064,21065,21067,21070,21071,21074,21075,21077,21079,21080,21081,21082,21083,21085,21087,21088,21090,21091,21092,21094,21096,21099,21100,21101,21102,21104,21105,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21118,21120,21123,21124,21125,21126,21127,21129,21130,21131,21132,21133,21134,21135,21137,21138,21140,21141,21142,21143,21144,21145,21146,21148,21156,21157,21158,21159,21166,21167,21168,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21184,21185,21186,21188,21189,21190,21192,21194,21196,21197,21198,21199,21201,21203,21204,21205,21207,21209,21210,21211,21212,21213,21214,21216,21217,21218,21219,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21233,21234,21235,21236,21237,21238,21239,21240,21243,21244,21245,21249,21250,21251,21252,21255,21257,21258,21259,21260,21262,21265,21266,21267,21268,21272,21275,21276,21278,21279,21282,21284,21285,21287,21288,21289,21291,21292,21293,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21308,21309,21312,21314,21316,21318,21323,21324,21325,21328,21332,21336,21337,21339,21341,21349,21352,21354,21356,21357,21362,21366,21369,21371,21372,21373,21374,21376,21377,21379,21383,21384,21386,21390,21391,21392,21393,21394,21395,21396,21398,21399,21401,21403,21404,21406,21408,21409,21412,21415,21418,21419,21420,21421,21423,21424,21425,21426,21427,21428,21429,21431,21432,21433,21434,21436,21437,21438,21440,21443,21444,21445,21446,21447,21454,21455,21456,21458,21459,21461,21466,21468,21469,21470,21473,21474,21479,21492,21498,21502,21503,21504,21506,21509,21511,21515,21524,21528,21529,21530,21532,21538,21540,21541,21546,21552,21555,21558,21559,21562,21565,21567,21569,21570,21572,21573,21575,21577,21580,21581,21582,21583,21585,21594,21597,21598,21599,21600,21601,21603,21605,21607,21609,21610,21611,21612,21613,21614,21615,21616,21620,21625,21626,21630,21631,21633,21635,21637,21639,21640,21641,21642,21645,21649,21651,21655,21656,21660,21662,21663,21664,21665,21666,21669,21678,21680,21682,21685,21686,21687,21689,21690,21692,21694,21699,21701,21706,21707,21718,21720,21723,21728,21729,21730,21731,21732,21739,21740,21743,21744,21745,21748,21749,21750,21751,21752,21753,21755,21758,21760,21762,21763,21764,21765,21768,21770,21771,21772,21773,21774,21778,21779,21781,21782,21783,21784,21785,21786,21788,21789,21790,21791,21793,21797,21798,21800,21801,21803,21805,21810,21812,21813,21814,21816,21817,21818,21819,21821,21824,21826,21829,21831,21832,21835,21836,21837,21838,21839,21841,21842,21843,21844,21847,21848,21849,21850,21851,21853,21854,21855,21856,21858,21859,21864,21865,21867,21871,21872,21873,21874,21875,21876,21881,21882,21885,21887,21893,21894,21900,21901,21902,21904,21906,21907,21909,21910,21911,21914,21915,21918,21920,21921,21922,21923,21924,21925,21926,21928,21929,21930,21931,21932,21933,21934,21935,21936,21938,21940,21942,21944,21946,21948,21951,21952,21953,21954,21955,21958,21959,21960,21962,21963,21966,21967,21968,21973,21975,21976,21977,21978,21979,21982,21984,21986,21991,21993,21997,21998,22000,22001,22004,22006,22008,22009,22010,22011,22012,22015,22018,22019,22020,22021,22022,22023,22026,22027,22029,22032,22033,22034,22035,22036,22037,22038,22039,22041,22042,22044,22045,22048,22049,22050,22053,22054,22056,22057,22058,22059,22062,22063,22064,22067,22069,22071,22072,22074,22076,22077,22078,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22095,22096,22097,22098,22099,22101,22102,22106,22107,22109,22110,22111,22112,22113,22115,22117,22118,22119,22125,22126,22127,22128,22130,22131,22132,22133,22135,22136,22137,22138,22141,22142,22143,22144,22145,22146,22147,22148,22151,22152,22153,22154,22155,22156,22157,22160,22161,22162,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22192,22193,22194,22195,22196,22197,22198,22200,22201,22202,22203,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22219,22220,22221,22222,22223,22224,22225,22226,22227,22229,22230,22232,22233,22236,22243,22245,22246,22247,22248,22249,22250,22252,22254,22255,22258,22259,22262,22263,22264,22267,22268,22272,22273,22274,22277,22279,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22301,22302,22304,22305,22306,22308,22309,22310,22311,22315,22321,22322,22324,22325,22326,22327,22328,22332,22333,22335,22337,22339,22340,22341,22342,22344,22345,22347,22354,22355,22356,22357,22358,22360,22361,22370,22371,22373,22375,22380,22382,22384,22385,22386,22388,22389,22392,22393,22394,22397,22398,22399,22400,22401,22407,22408,22409,22410,22413,22414,22415,22416,22417,22420,22421,22422,22423,22424,22425,22426,22428,22429,22430,22431,22437,22440,22442,22444,22447,22448,22449,22451,22453,22454,22455,22457,22458,22459,22460,22461,22462,22463,22464,22465,22468,22469,22470,22471,22472,22473,22474,22476,22477,22480,22481,22483,22486,22487,22491,22492,22494,22497,22498,22499,22501,22502,22503,22504,22505,22506,22507,22508,22510,22512,22513,22514,22515,22517,22518,22519,22523,22524,22526,22527,22529,22531,22532,22533,22536,22537,22538,22540,22542,22543,22544,22546,22547,22548,22550,22551,22552,22554,22555,22556,22557,22559,22562,22563,22565,22566,22567,22568,22569,22571,22572,22573,22574,22575,22577,22578,22579,22580,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22597,22598,22599,22600,22601,22602,22603,22606,22607,22608,22610,22611,22613,22614,22615,22617,22618,22619,22620,22621,22623,22624,22625,22626,22627,22628,22630,22631,22632,22633,22634,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22655,22658,22660,22662,22663,22664,22666,22667,22668,22669,22670,22671,22672,22673,22676,22677,22678,22679,22680,22683,22684,22685,22688,22689,22690,22691,22692,22693,22694,22695,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22717,22718,22719,22720,22722,22723,22724,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22738,22739,22740,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22757,22758,22759,22760,22761,22762,22765,22767,22769,22770,22772,22773,22775,22776,22778,22779,22780,22781,22782,22783,22784,22785,22787,22789,22790,22792,22793,22794,22795,22796,22798,22800,22801,22802,22803,22807,22808,22811,22813,22814,22816,22817,22818,22819,22822,22824,22828,22832,22834,22835,22837,22838,22843,22845,22846,22847,22848,22851,22853,22854,22858,22860,22861,22864,22866,22867,22873,22875,22876,22877,22878,22879,22881,22883,22884,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22901,22903,22906,22907,22908,22910,22911,22912,22917,22921,22923,22924,22926,22927,22928,22929,22932,22933,22936,22938,22939,22940,22941,22943,22944,22945,22946,22950,22951,22956,22957,22960,22961,22963,22964,22965,22966,22967,22968,22970,22972,22973,22975,22976,22977,22978,22979,22980,22981,22983,22984,22985,22988,22989,22990,22991,22997,22998,23001,23003,23006,23007,23008,23009,23010,23012,23014,23015,23017,23018,23019,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23034,23036,23037,23038,23040,23042,23050,23051,23053,23054,23055,23056,23058,23060,23061,23062,23063,23065,23066,23067,23069,23070,23073,23074,23076,23078,23079,23080,23082,23083,23084,23085,23086,23087,23088,23091,23093,23095,23096,23097,23098,23099,23101,23102,23103,23105,23106,23107,23108,23109,23111,23112,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23126,23127,23128,23129,23131,23132,23133,23134,23135,23136,23137,23139,23140,23141,23142,23144,23145,23147,23148,23149,23150,23151,23152,23153,23154,23155,23160,23161,23163,23164,23165,23166,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23187,23188,23189,23190,23191,23192,23193,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23211,23212,23213,23214,23215,23216,23217,23220,23222,23223,23225,23226,23227,23228,23229,23231,23232,23235,23236,23237,23238,23239,23240,23242,23243,23245,23246,23247,23248,23249,23251,23253,23255,23257,23258,23259,23261,23262,23263,23266,23268,23269,23271,23272,23274,23276,23277,23278,23279,23280,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23347,23349,23350,23352,23353,23354,23355,23356,23357,23358,23359,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23378,23382,23390,23392,23393,23399,23400,23403,23405,23406,23407,23410,23412,23414,23415,23416,23417,23419,23420,23422,23423,23426,23430,23434,23437,23438,23440,23441,23442,23444,23446,23455,23463,23464,23465,23468,23469,23470,23471,23473,23474,23479,23482,23483,23484,23488,23489,23491,23496,23497,23498,23499,23501,23502,23503,23505,23508,23509,23510,23511,23512,23513,23514,23515,23516,23520,23522,23523,23526,23527,23529,23530,23531,23532,23533,23535,23537,23538,23539,23540,23541,23542,23543,23549,23550,23552,23554,23555,23557,23559,23560,23563,23564,23565,23566,23568,23570,23571,23575,23577,23579,23582,23583,23584,23585,23587,23590,23592,23593,23594,23595,23597,23598,23599,23600,23602,23603,23605,23606,23607,23619,23620,23622,23623,23628,23629,23634,23635,23636,23638,23639,23640,23642,23643,23644,23645,23647,23650,23652,23655,23656,23657,23658,23659,23660,23661,23664,23666,23667,23668,23669,23670,23671,23672,23675,23676,23677,23678,23680,23683,23684,23685,23686,23687,23689,23690,23691,23694,23695,23698,23699,23701,23709,23710,23711,23712,23713,23716,23717,23718,23719,23720,23722,23726,23727,23728,23730,23732,23734,23737,23738,23739,23740,23742,23744,23746,23747,23749,23750,23751,23752,23753,23754,23756,23757,23758,23759,23760,23761,23763,23764,23765,23766,23767,23768,23770,23771,23772,23773,23774,23775,23776,23778,23779,23783,23785,23787,23788,23790,23791,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23804,23805,23806,23807,23808,23809,23812,23813,23816,23817,23818,23819,23820,23821,23823,23824,23825,23826,23827,23829,23831,23832,23833,23834,23836,23837,23839,23840,23841,23842,23843,23845,23848,23850,23851,23852,23855,23856,23857,23858,23859,23861,23862,23863,23864,23865,23866,23867,23868,23871,23872,23873,23874,23875,23876,23877,23878,23880,23881,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23897,23898,23900,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23914,23917,23918,23920,23921,23922,23923,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23962,23963,23964,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23992,23993,23994,23995,23996,23997,23998,23999,24000,24001,24002,24003,24004,24006,24007,24008,24009,24010,24011,24012,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24028,24031,24032,24035,24036,24042,24044,24045,24048,24053,24054,24056,24057,24058,24059,24060,24063,24064,24068,24071,24073,24074,24075,24077,24078,24082,24083,24087,24094,24095,24096,24097,24098,24099,24100,24101,24104,24105,24106,24107,24108,24111,24112,24114,24115,24116,24117,24118,24121,24122,24126,24127,24128,24129,24131,24134,24135,24136,24137,24138,24139,24141,24142,24143,24144,24145,24146,24147,24150,24151,24152,24153,24154,24156,24157,24159,24160,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24181,24183,24185,24190,24193,24194,24195,24197,24200,24201,24204,24205,24206,24210,24216,24219,24221,24225,24226,24227,24228,24232,24233,24234,24235,24236,24238,24239,24240,24241,24242,24244,24250,24251,24252,24253,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24267,24268,24269,24270,24271,24272,24276,24277,24279,24280,24281,24282,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24297,24299,24300,24301,24302,24303,24304,24305,24306,24307,24309,24312,24313,24315,24316,24317,24325,24326,24327,24329,24332,24333,24334,24336,24338,24340,24342,24345,24346,24348,24349,24350,24353,24354,24355,24356,24360,24363,24364,24366,24368,24370,24371,24372,24373,24374,24375,24376,24379,24381,24382,24383,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24401,24404,24409,24410,24411,24412,24414,24415,24416,24419,24421,24423,24424,24427,24430,24431,24434,24436,24437,24438,24440,24442,24445,24446,24447,24451,24454,24461,24462,24463,24465,24467,24468,24470,24474,24475,24477,24478,24479,24480,24482,24483,24484,24485,24486,24487,24489,24491,24492,24495,24496,24497,24498,24499,24500,24502,24504,24505,24506,24507,24510,24511,24512,24513,24514,24519,24520,24522,24523,24526,24531,24532,24533,24538,24539,24540,24542,24543,24546,24547,24549,24550,24552,24553,24556,24559,24560,24562,24563,24564,24566,24567,24569,24570,24572,24583,24584,24585,24587,24588,24592,24593,24595,24599,24600,24602,24606,24607,24610,24611,24612,24620,24621,24622,24624,24625,24626,24627,24628,24630,24631,24632,24633,24634,24637,24638,24640,24644,24645,24646,24647,24648,24649,24650,24652,24654,24655,24657,24659,24660,24662,24663,24664,24667,24668,24670,24671,24672,24673,24677,24678,24686,24689,24690,24692,24693,24695,24702,24704,24705,24706,24709,24710,24711,24712,24714,24715,24718,24719,24720,24721,24723,24725,24727,24728,24729,24732,24734,24737,24738,24740,24741,24743,24745,24746,24750,24752,24755,24757,24758,24759,24761,24762,24765,24766,24767,24768,24769,24770,24771,24772,24775,24776,24777,24780,24781,24782,24783,24784,24786,24787,24788,24790,24791,24793,24795,24798,24801,24802,24803,24804,24805,24810,24817,24818,24821,24823,24824,24827,24828,24829,24830,24831,24834,24835,24836,24837,24839,24842,24843,24844,24848,24849,24850,24851,24852,24854,24855,24856,24857,24859,24860,24861,24862,24865,24866,24869,24872,24873,24874,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24896,24897,24898,24899,24900,24901,24902,24903,24905,24907,24909,24911,24912,24914,24915,24916,24918,24919,24920,24921,24922,24923,24924,24926,24927,24928,24929,24931,24932,24933,24934,24937,24938,24939,24940,24941,24942,24943,24945,24946,24947,24948,24950,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24972,24973,24975,24976,24977,24978,24979,24981,24982,24983,24984,24985,24986,24987,24988,24990,24991,24992,24993,24994,24995,24996,24997,24998,25002,25003,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25016,25017,25018,25019,25020,25021,25023,25024,25025,25027,25028,25029,25030,25031,25033,25036,25037,25038,25039,25040,25043,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25078,25079,25080,25081,25082,25083,25084,25085,25086,25088,25089,25090,25091,25092,25093,25095,25097,25107,25108,25113,25116,25117,25118,25120,25123,25126,25127,25128,25129,25131,25133,25135,25136,25137,25138,25141,25142,25144,25145,25146,25147,25148,25154,25156,25157,25158,25162,25167,25168,25173,25174,25175,25177,25178,25180,25181,25182,25183,25184,25185,25186,25188,25189,25192,25201,25202,25204,25205,25207,25208,25210,25211,25213,25217,25218,25219,25221,25222,25223,25224,25227,25228,25229,25230,25231,25232,25236,25241,25244,25245,25246,25251,25254,25255,25257,25258,25261,25262,25263,25264,25266,25267,25268,25270,25271,25272,25274,25278,25280,25281,25283,25291,25295,25297,25301,25309,25310,25312,25313,25316,25322,25323,25328,25330,25333,25336,25337,25338,25339,25344,25347,25348,25349,25350,25354,25355,25356,25357,25359,25360,25362,25363,25364,25365,25367,25368,25369,25372,25382,25383,25385,25388,25389,25390,25392,25393,25395,25396,25397,25398,25399,25400,25403,25404,25406,25407,25408,25409,25412,25415,25416,25418,25425,25426,25427,25428,25430,25431,25432,25433,25434,25435,25436,25437,25440,25444,25445,25446,25448,25450,25451,25452,25455,25456,25458,25459,25460,25461,25464,25465,25468,25469,25470,25471,25473,25475,25476,25477,25478,25483,25485,25489,25491,25492,25493,25495,25497,25498,25499,25500,25501,25502,25503,25505,25508,25510,25515,25519,25521,25522,25525,25526,25529,25531,25533,25535,25536,25537,25538,25539,25541,25543,25544,25546,25547,25548,25553,25555,25556,25557,25559,25560,25561,25562,25563,25564,25565,25567,25570,25572,25573,25574,25575,25576,25579,25580,25582,25583,25584,25585,25587,25589,25591,25593,25594,25595,25596,25598,25603,25604,25606,25607,25608,25609,25610,25613,25614,25617,25618,25621,25622,25623,25624,25625,25626,25629,25631,25634,25635,25636,25637,25639,25640,25641,25643,25646,25647,25648,25649,25650,25651,25653,25654,25655,25656,25657,25659,25660,25662,25664,25666,25667,25673,25675,25676,25677,25678,25679,25680,25681,25683,25685,25686,25687,25689,25690,25691,25692,25693,25695,25696,25697,25698,25699,25700,25701,25702,25704,25706,25707,25708,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25723,25724,25725,25726,25727,25728,25729,25731,25734,25736,25737,25738,25739,25740,25741,25742,25743,25744,25747,25748,25751,25752,25754,25755,25756,25757,25759,25760,25761,25762,25763,25765,25766,25767,25768,25770,25771,25775,25777,25778,25779,25780,25782,25785,25787,25789,25790,25791,25793,25795,25796,25798,25799,25800,25801,25802,25803,25804,25807,25809,25811,25812,25813,25814,25817,25818,25819,25820,25821,25823,25824,25825,25827,25829,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25857,25858,25859,25860,25861,25862,25863,25864,25866,25867,25868,25869,25870,25871,25872,25873,25875,25876,25877,25878,25879,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25894,25895,25896,25897,25898,25900,25901,25904,25905,25906,25907,25911,25914,25916,25917,25920,25921,25922,25923,25924,25926,25927,25930,25931,25933,25934,25936,25938,25939,25940,25943,25944,25946,25948,25951,25952,25953,25956,25957,25959,25960,25961,25962,25965,25966,25967,25969,25971,25973,25974,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25992,25993,25994,25997,25998,25999,26002,26004,26005,26006,26008,26010,26013,26014,26016,26018,26019,26022,26024,26026,26028,26030,26033,26034,26035,26036,26037,26038,26039,26040,26042,26043,26046,26047,26048,26050,26055,26056,26057,26058,26061,26064,26065,26067,26068,26069,26072,26073,26074,26075,26076,26077,26078,26079,26081,26083,26084,26090,26091,26098,26099,26100,26101,26104,26105,26107,26108,26109,26110,26111,26113,26116,26117,26119,26120,26121,26123,26125,26128,26129,26130,26134,26135,26136,26138,26139,26140,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26162,26163,26167,26168,26169,26170,26171,26173,26175,26176,26178,26180,26181,26182,26183,26184,26185,26186,26189,26190,26192,26193,26200,26201,26203,26204,26205,26206,26208,26210,26211,26213,26215,26217,26218,26219,26220,26221,26225,26226,26227,26229,26232,26233,26235,26236,26237,26239,26240,26241,26243,26245,26246,26248,26249,26250,26251,26253,26254,26255,26256,26258,26259,26260,26261,26264,26265,26266,26267,26268,26270,26271,26272,26273,26274,26275,26276,26277,26278,26281,26282,26283,26284,26285,26287,26288,26289,26290,26291,26293,26294,26295,26296,26298,26299,26300,26301,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26330,26334,26335,26336,26337,26338,26339,26340,26341,26343,26344,26346,26347,26348,26349,26350,26351,26353,26357,26358,26360,26362,26363,26365,26369,26370,26371,26372,26373,26374,26375,26380,26382,26383,26385,26386,26387,26390,26392,26393,26394,26396,26398,26400,26401,26402,26403,26404,26405,26407,26409,26414,26416,26418,26419,26422,26423,26424,26425,26427,26428,26430,26431,26433,26436,26437,26439,26442,26443,26445,26450,26452,26453,26455,26456,26457,26458,26459,26461,26466,26467,26468,26470,26471,26475,26476,26478,26481,26484,26486,26488,26489,26490,26491,26493,26496,26498,26499,26501,26502,26504,26506,26508,26509,26510,26511,26513,26514,26515,26516,26518,26521,26523,26527,26528,26529,26532,26534,26537,26540,26542,26545,26546,26548,26553,26554,26555,26556,26557,26558,26559,26560,26562,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26581,26582,26583,26587,26591,26593,26595,26596,26598,26599,26600,26602,26603,26605,26606,26610,26613,26614,26615,26616,26617,26618,26619,26620,26622,26625,26626,26627,26628,26630,26637,26640,26642,26644,26645,26648,26649,26650,26651,26652,26654,26655,26656,26658,26659,26660,26661,26662,26663,26664,26667,26668,26669,26670,26671,26672,26673,26676,26677,26678,26682,26683,26687,26695,26699,26701,26703,26706,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26730,26732,26733,26734,26735,26736,26737,26738,26739,26741,26744,26745,26746,26747,26748,26749,26750,26751,26752,26754,26756,26759,26760,26761,26762,26763,26764,26765,26766,26768,26769,26770,26772,26773,26774,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26787,26788,26789,26793,26794,26795,26796,26798,26801,26802,26804,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26817,26819,26820,26821,26822,26823,26824,26826,26828,26830,26831,26832,26833,26835,26836,26838,26839,26841,26843,26844,26845,26846,26847,26849,26850,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26863,26866,26867,26868,26870,26871,26872,26875,26877,26878,26879,26880,26882,26883,26884,26886,26887,26888,26889,26890,26892,26895,26897,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26913,26914,26915,26917,26918,26919,26920,26921,26922,26923,26924,26926,26927,26929,26930,26931,26933,26934,26935,26936,26938,26939,26940,26942,26944,26945,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26965,26966,26968,26969,26971,26972,26975,26977,26978,26980,26981,26983,26984,26985,26986,26988,26989,26991,26992,26994,26995,26996,26997,26998,27002,27003,27005,27006,27007,27009,27011,27013,27018,27019,27020,27022,27023,27024,27025,27026,27027,27030,27031,27033,27034,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27049,27050,27052,27054,27055,27056,27058,27059,27061,27062,27064,27065,27066,27068,27069,27070,27071,27072,27074,27075,27076,27077,27078,27079,27080,27081,27083,27085,27087,27089,27090,27091,27093,27094,27095,27096,27097,27098,27100,27101,27102,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27118,27119,27120,27121,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27134,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27161,27162,27163,27164,27165,27166,27168,27170,27171,27172,27173,27174,27175,27177,27179,27180,27181,27182,27184,27186,27187,27188,27190,27191,27192,27193,27194,27195,27196,27199,27200,27201,27202,27203,27205,27206,27208,27209,27210,27211,27212,27213,27214,27215,27217,27218,27219,27220,27221,27222,27223,27226,27228,27229,27230,27231,27232,27234,27235,27236,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27250,27251,27252,27253,27254,27255,27256,27258,27259,27261,27262,27263,27265,27266,27267,27269,27270,27271,27272,27273,27274,27275,27276,27277,27279,27282,27283,27284,27285,27286,27288,27289,27290,27291,27292,27293,27294,27295,27297,27298,27299,27300,27301,27302,27303,27304,27306,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27429,27430,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27443,27444,27445,27446,27448,27451,27452,27453,27455,27456,27457,27458,27460,27461,27464,27466,27467,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27482,27483,27484,27485,27486,27487,27488,27489,27496,27497,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27514,27517,27518,27519,27520,27525,27528,27532,27534,27535,27536,27537,27540,27541,27543,27544,27545,27548,27549,27550,27551,27552,27554,27555,27556,27557,27558,27559,27560,27561,27563,27564,27565,27566,27567,27568,27569,27570,27574,27576,27577,27578,27579,27580,27581,27582,27584,27587,27588,27590,27591,27592,27593,27594,27596,27598,27600,27601,27608,27610,27612,27613,27614,27615,27616,27618,27619,27620,27621,27622,27623,27624,27625,27628,27629,27630,27632,27633,27634,27636,27638,27639,27640,27642,27643,27644,27646,27647,27648,27649,27650,27651,27652,27656,27657,27658,27659,27660,27662,27666,27671,27676,27677,27678,27680,27683,27685,27691,27692,27693,27697,27699,27702,27703,27705,27706,27707,27708,27710,27711,27715,27716,27717,27720,27723,27724,27725,27726,27727,27729,27730,27731,27734,27736,27737,27738,27746,27747,27749,27750,27751,27755,27756,27757,27758,27759,27761,27763,27765,27767,27768,27770,27771,27772,27775,27776,27780,27783,27786,27787,27789,27790,27793,27794,27797,27798,27799,27800,27802,27804,27805,27806,27808,27810,27816,27820,27823,27824,27828,27829,27830,27831,27834,27840,27841,27842,27843,27846,27847,27848,27851,27853,27854,27855,27857,27858,27864,27865,27866,27868,27869,27871,27876,27878,27879,27881,27884,27885,27890,27892,27897,27903,27904,27906,27907,27909,27910,27912,27913,27914,27917,27919,27920,27921,27923,27924,27925,27926,27928,27932,27933,27935,27936,27937,27938,27939,27940,27942,27944,27945,27948,27949,27951,27952,27956,27958,27959,27960,27962,27967,27968,27970,27972,27977,27980,27984,27989,27990,27991,27992,27995,27997,27999,28001,28002,28004,28005,28007,28008,28011,28012,28013,28016,28017,28018,28019,28021,28022,28025,28026,28027,28029,28030,28031,28032,28033,28035,28036,28038,28039,28042,28043,28045,28047,28048,28050,28054,28055,28056,28057,28058,28060,28066,28069,28076,28077,28080,28081,28083,28084,28086,28087,28089,28090,28091,28092,28093,28094,28097,28098,28099,28104,28105,28106,28109,28110,28111,28112,28114,28115,28116,28117,28119,28122,28123,28124,28127,28130,28131,28133,28135,28136,28137,28138,28141,28143,28144,28146,28148,28149,28150,28152,28154,28157,28158,28159,28160,28161,28162,28163,28164,28166,28167,28168,28169,28171,28175,28178,28179,28181,28184,28185,28187,28188,28190,28191,28194,28198,28199,28200,28202,28204,28206,28208,28209,28211,28213,28214,28215,28217,28219,28220,28221,28222,28223,28224,28225,28226,28229,28230,28231,28232,28233,28234,28235,28236,28239,28240,28241,28242,28245,28247,28249,28250,28252,28253,28254,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28268,28269,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28288,28289,28290,28292,28295,28296,28298,28299,28300,28301,28302,28305,28306,28307,28308,28309,28310,28311,28313,28314,28315,28317,28318,28320,28321,28323,28324,28326,28328,28329,28331,28332,28333,28334,28336,28339,28341,28344,28345,28348,28350,28351,28352,28355,28356,28357,28358,28360,28361,28362,28364,28365,28366,28368,28370,28374,28376,28377,28379,28380,28381,28387,28391,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28405,28406,28407,28408,28410,28411,28412,28413,28414,28415,28416,28417,28419,28420,28421,28423,28424,28426,28427,28428,28429,28430,28432,28433,28434,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28449,28450,28451,28453,28454,28455,28456,28460,28462,28464,28466,28468,28469,28471,28472,28473,28474,28475,28476,28477,28479,28480,28481,28482,28483,28484,28485,28488,28489,28490,28492,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28505,28506,28507,28509,28511,28512,28513,28515,28516,28517,28519,28520,28521,28522,28523,28524,28527,28528,28529,28531,28533,28534,28535,28537,28539,28541,28542,28543,28544,28545,28546,28547,28549,28550,28551,28554,28555,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28573,28574,28575,28576,28578,28579,28580,28581,28582,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28596,28597,28599,28600,28602,28603,28604,28605,28606,28607,28609,28611,28612,28613,28614,28615,28616,28618,28619,28620,28621,28622,28623,28624,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28639,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28690,28691,28692,28693,28694,28695,28696,28697,28700,28701,28702,28703,28704,28705,28706,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28726,28727,28728,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28749,28750,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28782,28785,28786,28787,28788,28791,28793,28794,28795,28797,28801,28802,28803,28804,28806,28807,28808,28811,28812,28813,28815,28816,28817,28819,28823,28824,28826,28827,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28848,28850,28852,28853,28854,28858,28862,28863,28868,28869,28870,28871,28873,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28890,28892,28893,28894,28896,28897,28898,28899,28901,28906,28910,28912,28913,28914,28915,28916,28917,28918,28920,28922,28923,28924,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28939,28940,28941,28942,28943,28945,28946,28948,28951,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28967,28968,28969,28970,28971,28972,28973,28974,28978,28979,28980,28981,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28998,28999,29000,29001,29003,29005,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29021,29023,29024,29025,29026,29027,29029,29033,29034,29035,29036,29037,29039,29040,29041,29044,29045,29046,29047,29049,29051,29052,29054,29055,29056,29057,29058,29059,29061,29062,29063,29064,29065,29067,29068,29069,29070,29072,29073,29074,29075,29077,29078,29079,29082,29083,29084,29085,29086,29089,29090,29091,29092,29093,29094,29095,29097,29098,29099,29101,29102,29103,29104,29105,29106,29108,29110,29111,29112,29114,29115,29116,29117,29118,29119,29120,29121,29122,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29135,29136,29137,29138,29139,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29153,29154,29155,29156,29158,29160,29161,29162,29163,29164,29165,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29225,29227,29229,29230,29231,29234,29235,29236,29242,29244,29246,29248,29249,29250,29251,29252,29253,29254,29257,29258,29259,29262,29263,29264,29265,29267,29268,29269,29271,29272,29274,29276,29278,29280,29283,29284,29285,29288,29290,29291,29292,29293,29296,29297,29299,29300,29302,29303,29304,29307,29308,29309,29314,29315,29317,29318,29319,29320,29321,29324,29326,29328,29329,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29358,29361,29362,29363,29365,29370,29371,29372,29373,29374,29375,29376,29381,29382,29383,29385,29386,29387,29388,29391,29393,29395,29396,29397,29398,29400,29402,29403,58566,58567,58568,58569,58570,58571,58572,58573,58574,58575,58576,58577,58578,58579,58580,58581,58582,58583,58584,58585,58586,58587,58588,58589,58590,58591,58592,58593,58594,58595,58596,58597,58598,58599,58600,58601,58602,58603,58604,58605,58606,58607,58608,58609,58610,58611,58612,58613,58614,58615,58616,58617,58618,58619,58620,58621,58622,58623,58624,58625,58626,58627,58628,58629,58630,58631,58632,58633,58634,58635,58636,58637,58638,58639,58640,58641,58642,58643,58644,58645,58646,58647,58648,58649,58650,58651,58652,58653,58654,58655,58656,58657,58658,58659,58660,58661,12288,12289,12290,183,713,711,168,12291,12293,8212,65374,8214,8230,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12310,12311,12304,12305,177,215,247,8758,8743,8744,8721,8719,8746,8745,8712,8759,8730,8869,8741,8736,8978,8857,8747,8750,8801,8780,8776,8765,8733,8800,8814,8815,8804,8805,8734,8757,8756,9794,9792,176,8242,8243,8451,65284,164,65504,65505,8240,167,8470,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,8251,8594,8592,8593,8595,12307,58662,58663,58664,58665,58666,58667,58668,58669,58670,58671,58672,58673,58674,58675,58676,58677,58678,58679,58680,58681,58682,58683,58684,58685,58686,58687,58688,58689,58690,58691,58692,58693,58694,58695,58696,58697,58698,58699,58700,58701,58702,58703,58704,58705,58706,58707,58708,58709,58710,58711,58712,58713,58714,58715,58716,58717,58718,58719,58720,58721,58722,58723,58724,58725,58726,58727,58728,58729,58730,58731,58732,58733,58734,58735,58736,58737,58738,58739,58740,58741,58742,58743,58744,58745,58746,58747,58748,58749,58750,58751,58752,58753,58754,58755,58756,58757,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,59238,59239,59240,59241,59242,59243,9352,9353,9354,9355,9356,9357,9358,9359,9360,9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,9347,9348,9349,9350,9351,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,8364,59245,12832,12833,12834,12835,12836,12837,12838,12839,12840,12841,59246,59247,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,59248,59249,58758,58759,58760,58761,58762,58763,58764,58765,58766,58767,58768,58769,58770,58771,58772,58773,58774,58775,58776,58777,58778,58779,58780,58781,58782,58783,58784,58785,58786,58787,58788,58789,58790,58791,58792,58793,58794,58795,58796,58797,58798,58799,58800,58801,58802,58803,58804,58805,58806,58807,58808,58809,58810,58811,58812,58813,58814,58815,58816,58817,58818,58819,58820,58821,58822,58823,58824,58825,58826,58827,58828,58829,58830,58831,58832,58833,58834,58835,58836,58837,58838,58839,58840,58841,58842,58843,58844,58845,58846,58847,58848,58849,58850,58851,58852,12288,65281,65282,65283,65509,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65340,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,58854,58855,58856,58857,58858,58859,58860,58861,58862,58863,58864,58865,58866,58867,58868,58869,58870,58871,58872,58873,58874,58875,58876,58877,58878,58879,58880,58881,58882,58883,58884,58885,58886,58887,58888,58889,58890,58891,58892,58893,58894,58895,58896,58897,58898,58899,58900,58901,58902,58903,58904,58905,58906,58907,58908,58909,58910,58911,58912,58913,58914,58915,58916,58917,58918,58919,58920,58921,58922,58923,58924,58925,58926,58927,58928,58929,58930,58931,58932,58933,58934,58935,58936,58937,58938,58939,58940,58941,58942,58943,58944,58945,58946,58947,58948,58949,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,59250,59251,59252,59253,59254,59255,59256,59257,59258,59259,59260,58950,58951,58952,58953,58954,58955,58956,58957,58958,58959,58960,58961,58962,58963,58964,58965,58966,58967,58968,58969,58970,58971,58972,58973,58974,58975,58976,58977,58978,58979,58980,58981,58982,58983,58984,58985,58986,58987,58988,58989,58990,58991,58992,58993,58994,58995,58996,58997,58998,58999,59000,59001,59002,59003,59004,59005,59006,59007,59008,59009,59010,59011,59012,59013,59014,59015,59016,59017,59018,59019,59020,59021,59022,59023,59024,59025,59026,59027,59028,59029,59030,59031,59032,59033,59034,59035,59036,59037,59038,59039,59040,59041,59042,59043,59044,59045,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,59261,59262,59263,59264,59265,59266,59267,59268,59046,59047,59048,59049,59050,59051,59052,59053,59054,59055,59056,59057,59058,59059,59060,59061,59062,59063,59064,59065,59066,59067,59068,59069,59070,59071,59072,59073,59074,59075,59076,59077,59078,59079,59080,59081,59082,59083,59084,59085,59086,59087,59088,59089,59090,59091,59092,59093,59094,59095,59096,59097,59098,59099,59100,59101,59102,59103,59104,59105,59106,59107,59108,59109,59110,59111,59112,59113,59114,59115,59116,59117,59118,59119,59120,59121,59122,59123,59124,59125,59126,59127,59128,59129,59130,59131,59132,59133,59134,59135,59136,59137,59138,59139,59140,59141,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,59269,59270,59271,59272,59273,59274,59275,59276,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,59277,59278,59279,59280,59281,59282,59283,65077,65078,65081,65082,65087,65088,65085,65086,65089,65090,65091,65092,59284,59285,65083,65084,65079,65080,65073,59286,65075,65076,59287,59288,59289,59290,59291,59292,59293,59294,59295,59142,59143,59144,59145,59146,59147,59148,59149,59150,59151,59152,59153,59154,59155,59156,59157,59158,59159,59160,59161,59162,59163,59164,59165,59166,59167,59168,59169,59170,59171,59172,59173,59174,59175,59176,59177,59178,59179,59180,59181,59182,59183,59184,59185,59186,59187,59188,59189,59190,59191,59192,59193,59194,59195,59196,59197,59198,59199,59200,59201,59202,59203,59204,59205,59206,59207,59208,59209,59210,59211,59212,59213,59214,59215,59216,59217,59218,59219,59220,59221,59222,59223,59224,59225,59226,59227,59228,59229,59230,59231,59232,59233,59234,59235,59236,59237,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,59296,59297,59298,59299,59300,59301,59302,59303,59304,59305,59306,59307,59308,59309,59310,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,59311,59312,59313,59314,59315,59316,59317,59318,59319,59320,59321,59322,59323,714,715,729,8211,8213,8229,8245,8453,8457,8598,8599,8600,8601,8725,8735,8739,8786,8806,8807,8895,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584,9585,9586,9587,9601,9602,9603,9604,9605,9606,9607,9608,9609,9610,9611,9612,9613,9614,9615,9619,9620,9621,9660,9661,9698,9699,9700,9701,9737,8853,12306,12317,12318,59324,59325,59326,59327,59328,59329,59330,59331,59332,59333,59334,257,225,462,224,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,234,593,7743,324,328,505,609,59337,59338,59339,59340,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,59341,59342,59343,59344,59345,59346,59347,59348,59349,59350,59351,59352,59353,59354,59355,59356,59357,59358,59359,59360,59361,12321,12322,12323,12324,12325,12326,12327,12328,12329,12963,13198,13199,13212,13213,13214,13217,13252,13262,13265,13266,13269,65072,65506,65508,59362,8481,12849,59363,8208,59364,59365,59366,12540,12443,12444,12541,12542,12294,12445,12446,65097,65098,65099,65100,65101,65102,65103,65104,65105,65106,65108,65109,65110,65111,65113,65114,65115,65116,65117,65118,65119,65120,65121,65122,65123,65124,65125,65126,65128,65129,65130,65131,12350,12272,12273,12274,12275,12276,12277,12278,12279,12280,12281,12282,12283,12295,59380,59381,59382,59383,59384,59385,59386,59387,59388,59389,59390,59391,59392,9472,9473,9474,9475,9476,9477,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,9489,9490,9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506,9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,9521,9522,9523,9524,9525,9526,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536,9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,59393,59394,59395,59396,59397,59398,59399,59400,59401,59402,59403,59404,59405,59406,59407,29404,29405,29407,29410,29411,29412,29413,29414,29415,29418,29419,29429,29430,29433,29437,29438,29439,29440,29442,29444,29445,29446,29447,29448,29449,29451,29452,29453,29455,29456,29457,29458,29460,29464,29465,29466,29471,29472,29475,29476,29478,29479,29480,29485,29487,29488,29490,29491,29493,29494,29498,29499,29500,29501,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29518,29519,29521,29523,29524,29525,29526,29528,29529,29530,29531,29532,29533,29534,29535,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29550,29552,29553,57344,57345,57346,57347,57348,57349,57350,57351,57352,57353,57354,57355,57356,57357,57358,57359,57360,57361,57362,57363,57364,57365,57366,57367,57368,57369,57370,57371,57372,57373,57374,57375,57376,57377,57378,57379,57380,57381,57382,57383,57384,57385,57386,57387,57388,57389,57390,57391,57392,57393,57394,57395,57396,57397,57398,57399,57400,57401,57402,57403,57404,57405,57406,57407,57408,57409,57410,57411,57412,57413,57414,57415,57416,57417,57418,57419,57420,57421,57422,57423,57424,57425,57426,57427,57428,57429,57430,57431,57432,57433,57434,57435,57436,57437,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29567,29568,29569,29570,29571,29573,29574,29576,29578,29580,29581,29583,29584,29586,29587,29588,29589,29591,29592,29593,29594,29596,29597,29598,29600,29601,29603,29604,29605,29606,29607,29608,29610,29612,29613,29617,29620,29621,29622,29624,29625,29628,29629,29630,29631,29633,29635,29636,29637,29638,29639,29643,29644,29646,29650,29651,29652,29653,29654,29655,29656,29658,29659,29660,29661,29663,29665,29666,29667,29668,29670,29672,29674,29675,29676,29678,29679,29680,29681,29683,29684,29685,29686,29687,57438,57439,57440,57441,57442,57443,57444,57445,57446,57447,57448,57449,57450,57451,57452,57453,57454,57455,57456,57457,57458,57459,57460,57461,57462,57463,57464,57465,57466,57467,57468,57469,57470,57471,57472,57473,57474,57475,57476,57477,57478,57479,57480,57481,57482,57483,57484,57485,57486,57487,57488,57489,57490,57491,57492,57493,57494,57495,57496,57497,57498,57499,57500,57501,57502,57503,57504,57505,57506,57507,57508,57509,57510,57511,57512,57513,57514,57515,57516,57517,57518,57519,57520,57521,57522,57523,57524,57525,57526,57527,57528,57529,57530,57531,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29700,29703,29704,29707,29708,29709,29710,29713,29714,29715,29716,29717,29718,29719,29720,29721,29724,29725,29726,29727,29728,29729,29731,29732,29735,29737,29739,29741,29743,29745,29746,29751,29752,29753,29754,29755,29757,29758,29759,29760,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29782,29784,29789,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29806,29807,29809,29810,29811,29812,29813,29816,29817,29818,57532,57533,57534,57535,57536,57537,57538,57539,57540,57541,57542,57543,57544,57545,57546,57547,57548,57549,57550,57551,57552,57553,57554,57555,57556,57557,57558,57559,57560,57561,57562,57563,57564,57565,57566,57567,57568,57569,57570,57571,57572,57573,57574,57575,57576,57577,57578,57579,57580,57581,57582,57583,57584,57585,57586,57587,57588,57589,57590,57591,57592,57593,57594,57595,57596,57597,57598,57599,57600,57601,57602,57603,57604,57605,57606,57607,57608,57609,57610,57611,57612,57613,57614,57615,57616,57617,57618,57619,57620,57621,57622,57623,57624,57625,29819,29820,29821,29823,29826,29828,29829,29830,29832,29833,29834,29836,29837,29839,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29853,29855,29856,29857,29858,29859,29860,29861,29862,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29907,29908,29909,29910,29911,29912,29913,29914,29915,29917,29919,29921,29925,29927,29928,29929,29930,29931,29932,29933,29936,29937,29938,57626,57627,57628,57629,57630,57631,57632,57633,57634,57635,57636,57637,57638,57639,57640,57641,57642,57643,57644,57645,57646,57647,57648,57649,57650,57651,57652,57653,57654,57655,57656,57657,57658,57659,57660,57661,57662,57663,57664,57665,57666,57667,57668,57669,57670,57671,57672,57673,57674,57675,57676,57677,57678,57679,57680,57681,57682,57683,57684,57685,57686,57687,57688,57689,57690,57691,57692,57693,57694,57695,57696,57697,57698,57699,57700,57701,57702,57703,57704,57705,57706,57707,57708,57709,57710,57711,57712,57713,57714,57715,57716,57717,57718,57719,29939,29941,29944,29945,29946,29947,29948,29949,29950,29952,29953,29954,29955,29957,29958,29959,29960,29961,29962,29963,29964,29966,29968,29970,29972,29973,29974,29975,29979,29981,29982,29984,29985,29986,29987,29988,29990,29991,29994,29998,30004,30006,30009,30012,30013,30015,30017,30018,30019,30020,30022,30023,30025,30026,30029,30032,30033,30034,30035,30037,30038,30039,30040,30045,30046,30047,30048,30049,30050,30051,30052,30055,30056,30057,30059,30060,30061,30062,30063,30064,30065,30067,30069,30070,30071,30074,30075,30076,30077,30078,30080,30081,30082,30084,30085,30087,57720,57721,57722,57723,57724,57725,57726,57727,57728,57729,57730,57731,57732,57733,57734,57735,57736,57737,57738,57739,57740,57741,57742,57743,57744,57745,57746,57747,57748,57749,57750,57751,57752,57753,57754,57755,57756,57757,57758,57759,57760,57761,57762,57763,57764,57765,57766,57767,57768,57769,57770,57771,57772,57773,57774,57775,57776,57777,57778,57779,57780,57781,57782,57783,57784,57785,57786,57787,57788,57789,57790,57791,57792,57793,57794,57795,57796,57797,57798,57799,57800,57801,57802,57803,57804,57805,57806,57807,57808,57809,57810,57811,57812,57813,30088,30089,30090,30092,30093,30094,30096,30099,30101,30104,30107,30108,30110,30114,30118,30119,30120,30121,30122,30125,30134,30135,30138,30139,30143,30144,30145,30150,30155,30156,30158,30159,30160,30161,30163,30167,30169,30170,30172,30173,30175,30176,30177,30181,30185,30188,30189,30190,30191,30194,30195,30197,30198,30199,30200,30202,30203,30205,30206,30210,30212,30214,30215,30216,30217,30219,30221,30222,30223,30225,30226,30227,30228,30230,30234,30236,30237,30238,30241,30243,30247,30248,30252,30254,30255,30257,30258,30262,30263,30265,30266,30267,30269,30273,30274,30276,57814,57815,57816,57817,57818,57819,57820,57821,57822,57823,57824,57825,57826,57827,57828,57829,57830,57831,57832,57833,57834,57835,57836,57837,57838,57839,57840,57841,57842,57843,57844,57845,57846,57847,57848,57849,57850,57851,57852,57853,57854,57855,57856,57857,57858,57859,57860,57861,57862,57863,57864,57865,57866,57867,57868,57869,57870,57871,57872,57873,57874,57875,57876,57877,57878,57879,57880,57881,57882,57883,57884,57885,57886,57887,57888,57889,57890,57891,57892,57893,57894,57895,57896,57897,57898,57899,57900,57901,57902,57903,57904,57905,57906,57907,30277,30278,30279,30280,30281,30282,30283,30286,30287,30288,30289,30290,30291,30293,30295,30296,30297,30298,30299,30301,30303,30304,30305,30306,30308,30309,30310,30311,30312,30313,30314,30316,30317,30318,30320,30321,30322,30323,30324,30325,30326,30327,30329,30330,30332,30335,30336,30337,30339,30341,30345,30346,30348,30349,30351,30352,30354,30356,30357,30359,30360,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30373,30374,30375,30376,30377,30378,30379,30380,30381,30383,30384,30387,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30400,30401,30403,21834,38463,22467,25384,21710,21769,21696,30353,30284,34108,30702,33406,30861,29233,38552,38797,27688,23433,20474,25353,26263,23736,33018,26696,32942,26114,30414,20985,25942,29100,32753,34948,20658,22885,25034,28595,33453,25420,25170,21485,21543,31494,20843,30116,24052,25300,36299,38774,25226,32793,22365,38712,32610,29240,30333,26575,30334,25670,20336,36133,25308,31255,26001,29677,25644,25203,33324,39041,26495,29256,25198,25292,20276,29923,21322,21150,32458,37030,24110,26758,27036,33152,32465,26834,30917,34444,38225,20621,35876,33502,32990,21253,35090,21093,30404,30407,30409,30411,30412,30419,30421,30425,30426,30428,30429,30430,30432,30433,30434,30435,30436,30438,30439,30440,30441,30442,30443,30444,30445,30448,30451,30453,30454,30455,30458,30459,30461,30463,30464,30466,30467,30469,30470,30474,30476,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30491,30492,30493,30494,30497,30499,30500,30501,30503,30506,30507,30508,30510,30512,30513,30514,30515,30516,30521,30523,30525,30526,30527,30530,30532,30533,30534,30536,30537,30538,30539,30540,30541,30542,30543,30546,30547,30548,30549,30550,30551,30552,30553,30556,34180,38649,20445,22561,39281,23453,25265,25253,26292,35961,40077,29190,26479,30865,24754,21329,21271,36744,32972,36125,38049,20493,29384,22791,24811,28953,34987,22868,33519,26412,31528,23849,32503,29997,27893,36454,36856,36924,40763,27604,37145,31508,24444,30887,34006,34109,27605,27609,27606,24065,24199,30201,38381,25949,24330,24517,36767,22721,33218,36991,38491,38829,36793,32534,36140,25153,20415,21464,21342,36776,36777,36779,36941,26631,24426,33176,34920,40150,24971,21035,30250,24428,25996,28626,28392,23486,25672,20853,20912,26564,19993,31177,39292,28851,30557,30558,30559,30560,30564,30567,30569,30570,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30586,30587,30588,30593,30594,30595,30598,30599,30600,30601,30602,30603,30607,30608,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30625,30627,30628,30630,30632,30635,30637,30638,30639,30641,30642,30644,30646,30647,30648,30649,30650,30652,30654,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30670,30671,30672,30673,30674,30675,30676,30677,30678,30680,30681,30682,30685,30686,30687,30688,30689,30692,30149,24182,29627,33760,25773,25320,38069,27874,21338,21187,25615,38082,31636,20271,24091,33334,33046,33162,28196,27850,39539,25429,21340,21754,34917,22496,19981,24067,27493,31807,37096,24598,25830,29468,35009,26448,25165,36130,30572,36393,37319,24425,33756,34081,39184,21442,34453,27531,24813,24808,28799,33485,33329,20179,27815,34255,25805,31961,27133,26361,33609,21397,31574,20391,20876,27979,23618,36461,25554,21449,33580,33590,26597,30900,25661,23519,23700,24046,35815,25286,26612,35962,25600,25530,34633,39307,35863,32544,38130,20135,38416,39076,26124,29462,30694,30696,30698,30703,30704,30705,30706,30708,30709,30711,30713,30714,30715,30716,30723,30724,30725,30726,30727,30728,30730,30731,30734,30735,30736,30739,30741,30745,30747,30750,30752,30753,30754,30756,30760,30762,30763,30766,30767,30769,30770,30771,30773,30774,30781,30783,30785,30786,30787,30788,30790,30792,30793,30794,30795,30797,30799,30801,30803,30804,30808,30809,30810,30811,30812,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30831,30832,30833,30834,30835,30836,30837,30838,30840,30841,30842,30843,30845,30846,30847,30848,30849,30850,30851,22330,23581,24120,38271,20607,32928,21378,25950,30021,21809,20513,36229,25220,38046,26397,22066,28526,24034,21557,28818,36710,25199,25764,25507,24443,28552,37108,33251,36784,23576,26216,24561,27785,38472,36225,34924,25745,31216,22478,27225,25104,21576,20056,31243,24809,28548,35802,25215,36894,39563,31204,21507,30196,25345,21273,27744,36831,24347,39536,32827,40831,20360,23610,36196,32709,26021,28861,20805,20914,34411,23815,23456,25277,37228,30068,36364,31264,24833,31609,20167,32504,30597,19985,33261,21021,20986,27249,21416,36487,38148,38607,28353,38500,26970,30852,30853,30854,30856,30858,30859,30863,30864,30866,30868,30869,30870,30873,30877,30878,30880,30882,30884,30886,30888,30889,30890,30891,30892,30893,30894,30895,30901,30902,30903,30904,30906,30907,30908,30909,30911,30912,30914,30915,30916,30918,30919,30920,30924,30925,30926,30927,30929,30930,30931,30934,30935,30936,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30953,30954,30955,30957,30958,30959,30960,30961,30963,30965,30966,30968,30969,30971,30972,30973,30974,30975,30976,30978,30979,30980,30982,30983,30984,30985,30986,30987,30988,30784,20648,30679,25616,35302,22788,25571,24029,31359,26941,20256,33337,21912,20018,30126,31383,24162,24202,38383,21019,21561,28810,25462,38180,22402,26149,26943,37255,21767,28147,32431,34850,25139,32496,30133,33576,30913,38604,36766,24904,29943,35789,27492,21050,36176,27425,32874,33905,22257,21254,20174,19995,20945,31895,37259,31751,20419,36479,31713,31388,25703,23828,20652,33030,30209,31929,28140,32736,26449,23384,23544,30923,25774,25619,25514,25387,38169,25645,36798,31572,30249,25171,22823,21574,27513,20643,25140,24102,27526,20195,36151,34955,24453,36910,30989,30990,30991,30992,30993,30994,30996,30997,30998,30999,31000,31001,31002,31003,31004,31005,31007,31008,31009,31010,31011,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31029,31030,31031,31032,31033,31037,31039,31042,31043,31044,31045,31047,31050,31051,31052,31053,31054,31055,31056,31057,31058,31060,31061,31064,31065,31073,31075,31076,31078,31081,31082,31083,31084,31086,31088,31089,31090,31091,31092,31093,31094,31097,31099,31100,31101,31102,31103,31106,31107,31110,31111,31112,31113,31115,31116,31117,31118,31120,31121,31122,24608,32829,25285,20025,21333,37112,25528,32966,26086,27694,20294,24814,28129,35806,24377,34507,24403,25377,20826,33633,26723,20992,25443,36424,20498,23707,31095,23548,21040,31291,24764,36947,30423,24503,24471,30340,36460,28783,30331,31561,30634,20979,37011,22564,20302,28404,36842,25932,31515,29380,28068,32735,23265,25269,24213,22320,33922,31532,24093,24351,36882,32532,39072,25474,28359,30872,28857,20856,38747,22443,30005,20291,30008,24215,24806,22880,28096,27583,30857,21500,38613,20939,20993,25481,21514,38035,35843,36300,29241,30879,34678,36845,35853,21472,31123,31124,31125,31126,31127,31128,31129,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31156,31157,31158,31159,31160,31164,31167,31170,31172,31173,31175,31176,31178,31180,31182,31183,31184,31187,31188,31190,31191,31193,31194,31195,31196,31197,31198,31200,31201,31202,31205,31208,31210,31212,31214,31217,31218,31219,31220,31221,31222,31223,31225,31226,31228,31230,31231,31233,31236,31237,31239,31240,31241,31242,31244,31247,31248,31249,31250,31251,31253,31254,31256,31257,31259,31260,19969,30447,21486,38025,39030,40718,38189,23450,35746,20002,19996,20908,33891,25026,21160,26635,20375,24683,20923,27934,20828,25238,26007,38497,35910,36887,30168,37117,30563,27602,29322,29420,35835,22581,30585,36172,26460,38208,32922,24230,28193,22930,31471,30701,38203,27573,26029,32526,22534,20817,38431,23545,22697,21544,36466,25958,39039,22244,38045,30462,36929,25479,21702,22810,22842,22427,36530,26421,36346,33333,21057,24816,22549,34558,23784,40517,20420,39069,35769,23077,24694,21380,25212,36943,37122,39295,24681,32780,20799,32819,23572,39285,27953,20108,31261,31263,31265,31266,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31284,31285,31286,31288,31290,31294,31296,31297,31298,31299,31300,31301,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31314,31315,31316,31317,31318,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31345,31346,31347,31349,31355,31356,31357,31358,31362,31365,31367,31369,31370,31371,31372,31374,31375,31376,31379,31380,31385,31386,31387,31390,31393,31394,36144,21457,32602,31567,20240,20047,38400,27861,29648,34281,24070,30058,32763,27146,30718,38034,32321,20961,28902,21453,36820,33539,36137,29359,39277,27867,22346,33459,26041,32938,25151,38450,22952,20223,35775,32442,25918,33778,38750,21857,39134,32933,21290,35837,21536,32954,24223,27832,36153,33452,37210,21545,27675,20998,32439,22367,28954,27774,31881,22859,20221,24575,24868,31914,20016,23553,26539,34562,23792,38155,39118,30127,28925,36898,20911,32541,35773,22857,20964,20315,21542,22827,25975,32932,23413,25206,25282,36752,24133,27679,31526,20239,20440,26381,31395,31396,31399,31401,31402,31403,31406,31407,31408,31409,31410,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31447,31448,31450,31451,31452,31453,31457,31458,31460,31463,31464,31465,31466,31467,31468,31470,31472,31473,31474,31475,31476,31477,31478,31479,31480,31483,31484,31486,31488,31489,31490,31493,31495,31497,31500,31501,31502,31504,31506,31507,31510,31511,31512,31514,31516,31517,31519,31521,31522,31523,31527,31529,31533,28014,28074,31119,34993,24343,29995,25242,36741,20463,37340,26023,33071,33105,24220,33104,36212,21103,35206,36171,22797,20613,20184,38428,29238,33145,36127,23500,35747,38468,22919,32538,21648,22134,22030,35813,25913,27010,38041,30422,28297,24178,29976,26438,26577,31487,32925,36214,24863,31174,25954,36195,20872,21018,38050,32568,32923,32434,23703,28207,26464,31705,30347,39640,33167,32660,31957,25630,38224,31295,21578,21733,27468,25601,25096,40509,33011,30105,21106,38761,33883,26684,34532,38401,38548,38124,20010,21508,32473,26681,36319,32789,26356,24218,32697,31535,31536,31538,31540,31541,31542,31543,31545,31547,31549,31551,31552,31553,31554,31555,31556,31558,31560,31562,31565,31566,31571,31573,31575,31577,31580,31582,31583,31585,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31599,31600,31603,31604,31606,31608,31610,31612,31613,31615,31617,31618,31619,31620,31622,31623,31624,31625,31626,31627,31628,31630,31631,31633,31634,31635,31638,31640,31641,31642,31643,31646,31647,31648,31651,31652,31653,31662,31663,31664,31666,31667,31669,31670,31671,31673,31674,31675,31676,31677,31678,31679,31680,31682,31683,31684,22466,32831,26775,24037,25915,21151,24685,40858,20379,36524,20844,23467,24339,24041,27742,25329,36129,20849,38057,21246,27807,33503,29399,22434,26500,36141,22815,36764,33735,21653,31629,20272,27837,23396,22993,40723,21476,34506,39592,35895,32929,25925,39038,22266,38599,21038,29916,21072,23521,25346,35074,20054,25296,24618,26874,20851,23448,20896,35266,31649,39302,32592,24815,28748,36143,20809,24191,36891,29808,35268,22317,30789,24402,40863,38394,36712,39740,35809,30328,26690,26588,36330,36149,21053,36746,28378,26829,38149,37101,22269,26524,35065,36807,21704,31685,31688,31689,31690,31691,31693,31694,31695,31696,31698,31700,31701,31702,31703,31704,31707,31708,31710,31711,31712,31714,31715,31716,31719,31720,31721,31723,31724,31725,31727,31728,31730,31731,31732,31733,31734,31736,31737,31738,31739,31741,31743,31744,31745,31746,31747,31748,31749,31750,31752,31753,31754,31757,31758,31760,31761,31762,31763,31764,31765,31767,31768,31769,31770,31771,31772,31773,31774,31776,31777,31778,31779,31780,31781,31784,31785,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31801,31802,31803,31804,31805,31806,31810,39608,23401,28023,27686,20133,23475,39559,37219,25000,37039,38889,21547,28085,23506,20989,21898,32597,32752,25788,25421,26097,25022,24717,28938,27735,27721,22831,26477,33322,22741,22158,35946,27627,37085,22909,32791,21495,28009,21621,21917,33655,33743,26680,31166,21644,20309,21512,30418,35977,38402,27827,28088,36203,35088,40548,36154,22079,40657,30165,24456,29408,24680,21756,20136,27178,34913,24658,36720,21700,28888,34425,40511,27946,23439,24344,32418,21897,20399,29492,21564,21402,20505,21518,21628,20046,24573,29786,22774,33899,32993,34676,29392,31946,28246,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31861,31862,31863,31864,31865,31866,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31882,31883,31884,31885,31886,31887,31888,31891,31892,31894,31897,31898,31899,31904,31905,31907,31910,31911,31912,31913,31915,31916,31917,31919,31920,31924,31925,31926,31927,31928,31930,31931,24359,34382,21804,25252,20114,27818,25143,33457,21719,21326,29502,28369,30011,21010,21270,35805,27088,24458,24576,28142,22351,27426,29615,26707,36824,32531,25442,24739,21796,30186,35938,28949,28067,23462,24187,33618,24908,40644,30970,34647,31783,30343,20976,24822,29004,26179,24140,24653,35854,28784,25381,36745,24509,24674,34516,22238,27585,24724,24935,21321,24800,26214,36159,31229,20250,28905,27719,35763,35826,32472,33636,26127,23130,39746,27985,28151,35905,27963,20249,28779,33719,25110,24785,38669,36135,31096,20987,22334,22522,26426,30072,31293,31215,31637,31935,31936,31938,31939,31940,31942,31945,31947,31950,31951,31952,31953,31954,31955,31956,31960,31962,31963,31965,31966,31969,31970,31971,31972,31973,31974,31975,31977,31978,31979,31980,31981,31982,31984,31985,31986,31987,31988,31989,31990,31991,31993,31994,31996,31997,31998,31999,32000,32001,32002,32003,32004,32005,32006,32007,32008,32009,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32035,32036,32037,32038,32040,32041,32042,32044,32045,32046,32048,32049,32050,32051,32052,32053,32054,32908,39269,36857,28608,35749,40481,23020,32489,32521,21513,26497,26840,36753,31821,38598,21450,24613,30142,27762,21363,23241,32423,25380,20960,33034,24049,34015,25216,20864,23395,20238,31085,21058,24760,27982,23492,23490,35745,35760,26082,24524,38469,22931,32487,32426,22025,26551,22841,20339,23478,21152,33626,39050,36158,30002,38078,20551,31292,20215,26550,39550,23233,27516,30417,22362,23574,31546,38388,29006,20860,32937,33392,22904,32516,33575,26816,26604,30897,30839,25315,25441,31616,20461,21098,20943,33616,27099,37492,36341,36145,35265,38190,31661,20214,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32111,32112,32113,32114,32115,32116,32117,32118,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,20581,33328,21073,39279,28176,28293,28071,24314,20725,23004,23558,27974,27743,30086,33931,26728,22870,35762,21280,37233,38477,34121,26898,30977,28966,33014,20132,37066,27975,39556,23047,22204,25605,38128,30699,20389,33050,29409,35282,39290,32564,32478,21119,25945,37237,36735,36739,21483,31382,25581,25509,30342,31224,34903,38454,25130,21163,33410,26708,26480,25463,30571,31469,27905,32467,35299,22992,25106,34249,33445,30028,20511,20171,30117,35819,23626,24062,31563,26020,37329,20170,27941,35167,32039,38182,20165,35880,36827,38771,26187,31105,36817,28908,28024,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32167,32168,32169,32170,32171,32172,32173,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,23613,21170,33606,20834,33550,30555,26230,40120,20140,24778,31934,31923,32463,20117,35686,26223,39048,38745,22659,25964,38236,24452,30153,38742,31455,31454,20928,28847,31384,25578,31350,32416,29590,38893,20037,28792,20061,37202,21417,25937,26087,33276,33285,21646,23601,30106,38816,25304,29401,30141,23621,39545,33738,23616,21632,30697,20030,27822,32858,25298,25454,24040,20855,36317,36382,38191,20465,21477,24807,28844,21095,25424,40515,23071,20518,30519,21367,32482,25733,25899,25225,25496,20500,29237,35273,20915,35776,32477,22343,33740,38055,20891,21531,23803,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32316,32317,32318,32319,32320,32322,32323,32324,32325,32326,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,20426,31459,27994,37089,39567,21888,21654,21345,21679,24320,25577,26999,20975,24936,21002,22570,21208,22350,30733,30475,24247,24951,31968,25179,25239,20130,28821,32771,25335,28900,38752,22391,33499,26607,26869,30933,39063,31185,22771,21683,21487,28212,20811,21051,23458,35838,32943,21827,22438,24691,22353,21549,31354,24656,23380,25511,25248,21475,25187,23495,26543,21741,31391,33510,37239,24211,35044,22840,22446,25358,36328,33007,22359,31607,20393,24555,23485,27454,21281,31568,29378,26694,30719,30518,26103,20917,20111,30420,23743,31397,33909,22862,39745,20608,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32412,32413,32414,32430,32436,32443,32444,32470,32484,32492,32505,32522,32528,32542,32567,32569,32571,32572,32573,32574,32575,32576,32577,32579,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32594,32595,39304,24871,28291,22372,26118,25414,22256,25324,25193,24275,38420,22403,25289,21895,34593,33098,36771,21862,33713,26469,36182,34013,23146,26639,25318,31726,38417,20848,28572,35888,25597,35272,25042,32518,28866,28389,29701,27028,29436,24266,37070,26391,28010,25438,21171,29282,32769,20332,23013,37226,28889,28061,21202,20048,38647,38253,34174,30922,32047,20769,22418,25794,32907,31867,27882,26865,26974,20919,21400,26792,29313,40654,31729,29432,31163,28435,29702,26446,37324,40100,31036,33673,33620,21519,26647,20029,21385,21169,30782,21382,21033,20616,20363,20432,32598,32601,32603,32604,32605,32606,32608,32611,32612,32613,32614,32615,32619,32620,32621,32623,32624,32627,32629,32630,32631,32632,32634,32635,32636,32637,32639,32640,32642,32643,32644,32645,32646,32647,32648,32649,32651,32653,32655,32656,32657,32658,32659,32661,32662,32663,32664,32665,32667,32668,32672,32674,32675,32677,32678,32680,32681,32682,32683,32684,32685,32686,32689,32691,32692,32693,32694,32695,32698,32699,32702,32704,32706,32707,32708,32710,32711,32712,32713,32715,32717,32719,32720,32721,32722,32723,32726,32727,32729,32730,32731,32732,32733,32734,32738,32739,30178,31435,31890,27813,38582,21147,29827,21737,20457,32852,33714,36830,38256,24265,24604,28063,24088,25947,33080,38142,24651,28860,32451,31918,20937,26753,31921,33391,20004,36742,37327,26238,20142,35845,25769,32842,20698,30103,29134,23525,36797,28518,20102,25730,38243,24278,26009,21015,35010,28872,21155,29454,29747,26519,30967,38678,20020,37051,40158,28107,20955,36161,21533,25294,29618,33777,38646,40836,38083,20278,32666,20940,28789,38517,23725,39046,21478,20196,28316,29705,27060,30827,39311,30041,21016,30244,27969,26611,20845,40857,32843,21657,31548,31423,32740,32743,32744,32746,32747,32748,32749,32751,32754,32756,32757,32758,32759,32760,32761,32762,32765,32766,32767,32770,32775,32776,32777,32778,32782,32783,32785,32787,32794,32795,32797,32798,32799,32801,32803,32804,32811,32812,32813,32814,32815,32816,32818,32820,32825,32826,32828,32830,32832,32833,32836,32837,32839,32840,32841,32846,32847,32848,32849,32851,32853,32854,32855,32857,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32875,32876,32877,32878,32879,32880,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,38534,22404,25314,38471,27004,23044,25602,31699,28431,38475,33446,21346,39045,24208,28809,25523,21348,34383,40065,40595,30860,38706,36335,36162,40575,28510,31108,24405,38470,25134,39540,21525,38109,20387,26053,23653,23649,32533,34385,27695,24459,29575,28388,32511,23782,25371,23402,28390,21365,20081,25504,30053,25249,36718,20262,20177,27814,32438,35770,33821,34746,32599,36923,38179,31657,39585,35064,33853,27931,39558,32476,22920,40635,29595,30721,34434,39532,39554,22043,21527,22475,20080,40614,21334,36808,33033,30610,39314,34542,28385,34067,26364,24930,28459,32894,32897,32898,32901,32904,32906,32909,32910,32911,32912,32913,32914,32916,32917,32919,32921,32926,32931,32934,32935,32936,32940,32944,32947,32949,32950,32952,32953,32955,32965,32967,32968,32969,32970,32971,32975,32976,32977,32978,32979,32980,32981,32984,32991,32992,32994,32995,32998,33006,33013,33015,33017,33019,33022,33023,33024,33025,33027,33028,33029,33031,33032,33035,33036,33045,33047,33049,33051,33052,33053,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33069,33070,33072,33075,33076,33077,33079,33081,33082,33083,33084,33085,33087,35881,33426,33579,30450,27667,24537,33725,29483,33541,38170,27611,30683,38086,21359,33538,20882,24125,35980,36152,20040,29611,26522,26757,37238,38665,29028,27809,30473,23186,38209,27599,32654,26151,23504,22969,23194,38376,38391,20204,33804,33945,27308,30431,38192,29467,26790,23391,30511,37274,38753,31964,36855,35868,24357,31859,31192,35269,27852,34588,23494,24130,26825,30496,32501,20885,20813,21193,23081,32517,38754,33495,25551,30596,34256,31186,28218,24217,22937,34065,28781,27665,25279,30399,25935,24751,38397,26126,34719,40483,38125,21517,21629,35884,25720,33088,33089,33090,33091,33092,33093,33095,33097,33101,33102,33103,33106,33110,33111,33112,33115,33116,33117,33118,33119,33121,33122,33123,33124,33126,33128,33130,33131,33132,33135,33138,33139,33141,33142,33143,33144,33153,33155,33156,33157,33158,33159,33161,33163,33164,33165,33166,33168,33170,33171,33172,33173,33174,33175,33177,33178,33182,33183,33184,33185,33186,33188,33189,33191,33193,33195,33196,33197,33198,33199,33200,33201,33202,33204,33205,33206,33207,33208,33209,33212,33213,33214,33215,33220,33221,33223,33224,33225,33227,33229,33230,33231,33232,33233,33234,33235,25721,34321,27169,33180,30952,25705,39764,25273,26411,33707,22696,40664,27819,28448,23518,38476,35851,29279,26576,25287,29281,20137,22982,27597,22675,26286,24149,21215,24917,26408,30446,30566,29287,31302,25343,21738,21584,38048,37027,23068,32435,27670,20035,22902,32784,22856,21335,30007,38590,22218,25376,33041,24700,38393,28118,21602,39297,20869,23273,33021,22958,38675,20522,27877,23612,25311,20320,21311,33147,36870,28346,34091,25288,24180,30910,25781,25467,24565,23064,37247,40479,23615,25423,32834,23421,21870,38218,38221,28037,24744,26592,29406,20957,23425,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33252,33253,33254,33256,33257,33259,33262,33263,33264,33265,33266,33269,33270,33271,33272,33273,33274,33277,33279,33283,33287,33288,33289,33290,33291,33294,33295,33297,33299,33301,33302,33303,33304,33305,33306,33309,33312,33316,33317,33318,33319,33321,33326,33330,33338,33340,33341,33343,33344,33345,33346,33347,33349,33350,33352,33354,33356,33357,33358,33360,33361,33362,33363,33364,33365,33366,33367,33369,33371,33372,33373,33374,33376,33377,33378,33379,33380,33381,33382,33383,33385,25319,27870,29275,25197,38062,32445,33043,27987,20892,24324,22900,21162,24594,22899,26262,34384,30111,25386,25062,31983,35834,21734,27431,40485,27572,34261,21589,20598,27812,21866,36276,29228,24085,24597,29750,25293,25490,29260,24472,28227,27966,25856,28504,30424,30928,30460,30036,21028,21467,20051,24222,26049,32810,32982,25243,21638,21032,28846,34957,36305,27873,21624,32986,22521,35060,36180,38506,37197,20329,27803,21943,30406,30768,25256,28921,28558,24429,34028,26842,30844,31735,33192,26379,40527,25447,30896,22383,30738,38713,25209,25259,21128,29749,27607,33386,33387,33388,33389,33393,33397,33398,33399,33400,33403,33404,33408,33409,33411,33413,33414,33415,33417,33420,33424,33427,33428,33429,33430,33434,33435,33438,33440,33442,33443,33447,33458,33461,33462,33466,33467,33468,33471,33472,33474,33475,33477,33478,33481,33488,33494,33497,33498,33501,33506,33511,33512,33513,33514,33516,33517,33518,33520,33522,33523,33525,33526,33528,33530,33532,33533,33534,33535,33536,33546,33547,33549,33552,33554,33555,33558,33560,33561,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33577,33578,33582,33584,33586,33591,33595,33597,21860,33086,30130,30382,21305,30174,20731,23617,35692,31687,20559,29255,39575,39128,28418,29922,31080,25735,30629,25340,39057,36139,21697,32856,20050,22378,33529,33805,24179,20973,29942,35780,23631,22369,27900,39047,23110,30772,39748,36843,31893,21078,25169,38138,20166,33670,33889,33769,33970,22484,26420,22275,26222,28006,35889,26333,28689,26399,27450,26646,25114,22971,19971,20932,28422,26578,27791,20854,26827,22855,27495,30054,23822,33040,40784,26071,31048,31041,39569,36215,23682,20062,20225,21551,22865,30732,22120,27668,36804,24323,27773,27875,35755,25488,33598,33599,33601,33602,33604,33605,33608,33610,33611,33612,33613,33614,33619,33621,33622,33623,33624,33625,33629,33634,33648,33649,33650,33651,33652,33653,33654,33657,33658,33662,33663,33664,33665,33666,33667,33668,33671,33672,33674,33675,33676,33677,33679,33680,33681,33684,33685,33686,33687,33689,33690,33693,33695,33697,33698,33699,33700,33701,33702,33703,33708,33709,33710,33711,33717,33723,33726,33727,33730,33731,33732,33734,33736,33737,33739,33741,33742,33744,33745,33746,33747,33749,33751,33753,33754,33755,33758,33762,33763,33764,33766,33767,33768,33771,33772,33773,24688,27965,29301,25190,38030,38085,21315,36801,31614,20191,35878,20094,40660,38065,38067,21069,28508,36963,27973,35892,22545,23884,27424,27465,26538,21595,33108,32652,22681,34103,24378,25250,27207,38201,25970,24708,26725,30631,20052,20392,24039,38808,25772,32728,23789,20431,31373,20999,33540,19988,24623,31363,38054,20405,20146,31206,29748,21220,33465,25810,31165,23517,27777,38738,36731,27682,20542,21375,28165,25806,26228,27696,24773,39031,35831,24198,29756,31351,31179,19992,37041,29699,27714,22234,37195,27845,36235,21306,34502,26354,36527,23624,39537,28192,33774,33775,33779,33780,33781,33782,33783,33786,33787,33788,33790,33791,33792,33794,33797,33799,33800,33801,33802,33808,33810,33811,33812,33813,33814,33815,33817,33818,33819,33822,33823,33824,33825,33826,33827,33833,33834,33835,33836,33837,33838,33839,33840,33842,33843,33844,33845,33846,33847,33849,33850,33851,33854,33855,33856,33857,33858,33859,33860,33861,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33874,33875,33876,33877,33878,33880,33885,33886,33887,33888,33890,33892,33893,33894,33895,33896,33898,33902,33903,33904,33906,33908,33911,33913,33915,33916,21462,23094,40843,36259,21435,22280,39079,26435,37275,27849,20840,30154,25331,29356,21048,21149,32570,28820,30264,21364,40522,27063,30830,38592,35033,32676,28982,29123,20873,26579,29924,22756,25880,22199,35753,39286,25200,32469,24825,28909,22764,20161,20154,24525,38887,20219,35748,20995,22922,32427,25172,20173,26085,25102,33592,33993,33635,34701,29076,28342,23481,32466,20887,25545,26580,32905,33593,34837,20754,23418,22914,36785,20083,27741,20837,35109,36719,38446,34122,29790,38160,38384,28070,33509,24369,25746,27922,33832,33134,40131,22622,36187,19977,21441,33917,33918,33919,33920,33921,33923,33924,33925,33926,33930,33933,33935,33936,33937,33938,33939,33940,33941,33942,33944,33946,33947,33949,33950,33951,33952,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33968,33969,33971,33973,33974,33975,33979,33980,33982,33984,33986,33987,33989,33990,33991,33992,33995,33996,33998,33999,34002,34004,34005,34007,34008,34009,34010,34011,34012,34014,34017,34018,34020,34023,34024,34025,34026,34027,34029,34030,34031,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34045,34046,34048,34049,34050,20254,25955,26705,21971,20007,25620,39578,25195,23234,29791,33394,28073,26862,20711,33678,30722,26432,21049,27801,32433,20667,21861,29022,31579,26194,29642,33515,26441,23665,21024,29053,34923,38378,38485,25797,36193,33203,21892,27733,25159,32558,22674,20260,21830,36175,26188,19978,23578,35059,26786,25422,31245,28903,33421,21242,38902,23569,21736,37045,32461,22882,36170,34503,33292,33293,36198,25668,23556,24913,28041,31038,35774,30775,30003,21627,20280,36523,28145,23072,32453,31070,27784,23457,23158,29978,32958,24910,28183,22768,29983,29989,29298,21319,32499,34051,34052,34053,34054,34055,34056,34057,34058,34059,34061,34062,34063,34064,34066,34068,34069,34070,34072,34073,34075,34076,34077,34078,34080,34082,34083,34084,34085,34086,34087,34088,34089,34090,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34110,34111,34112,34113,34114,34116,34117,34118,34119,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34135,34136,34138,34139,34140,34141,34143,34144,34145,34146,34147,34149,34150,34151,34153,34154,34155,34156,34157,34158,34159,34160,34161,34163,34165,34166,34167,34168,34172,34173,34175,34176,34177,30465,30427,21097,32988,22307,24072,22833,29422,26045,28287,35799,23608,34417,21313,30707,25342,26102,20160,39135,34432,23454,35782,21490,30690,20351,23630,39542,22987,24335,31034,22763,19990,26623,20107,25325,35475,36893,21183,26159,21980,22124,36866,20181,20365,37322,39280,27663,24066,24643,23460,35270,35797,25910,25163,39318,23432,23551,25480,21806,21463,30246,20861,34092,26530,26803,27530,25234,36755,21460,33298,28113,30095,20070,36174,23408,29087,34223,26257,26329,32626,34560,40653,40736,23646,26415,36848,26641,26463,25101,31446,22661,24246,25968,28465,34178,34179,34182,34184,34185,34186,34187,34188,34189,34190,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34205,34206,34207,34208,34209,34210,34211,34213,34214,34215,34217,34219,34220,34221,34225,34226,34227,34228,34229,34230,34232,34234,34235,34236,34237,34238,34239,34240,34242,34243,34244,34245,34246,34247,34248,34250,34251,34252,34253,34254,34257,34258,34260,34262,34263,34264,34265,34266,34267,34269,34270,34271,34272,34273,34274,34275,34277,34278,34279,34280,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,24661,21047,32781,25684,34928,29993,24069,26643,25332,38684,21452,29245,35841,27700,30561,31246,21550,30636,39034,33308,35828,30805,26388,28865,26031,25749,22070,24605,31169,21496,19997,27515,32902,23546,21987,22235,20282,20284,39282,24051,26494,32824,24578,39042,36865,23435,35772,35829,25628,33368,25822,22013,33487,37221,20439,32032,36895,31903,20723,22609,28335,23487,35785,32899,37240,33948,31639,34429,38539,38543,32485,39635,30862,23681,31319,36930,38567,31071,23385,25439,31499,34001,26797,21766,32553,29712,32034,38145,25152,22604,20182,23427,22905,22612,34297,34298,34300,34301,34302,34304,34305,34306,34307,34308,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34322,34323,34324,34325,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34344,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34361,34362,34363,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34386,34387,34389,34390,34391,34392,34393,34395,34396,34397,34399,34400,34401,34403,34404,34405,34406,34407,34408,34409,34410,29549,25374,36427,36367,32974,33492,25260,21488,27888,37214,22826,24577,27760,22349,25674,36138,30251,28393,22363,27264,30192,28525,35885,35848,22374,27631,34962,30899,25506,21497,28845,27748,22616,25642,22530,26848,33179,21776,31958,20504,36538,28108,36255,28907,25487,28059,28372,32486,33796,26691,36867,28120,38518,35752,22871,29305,34276,33150,30140,35466,26799,21076,36386,38161,25552,39064,36420,21884,20307,26367,22159,24789,28053,21059,23625,22825,28155,22635,30000,29980,24684,33300,33094,25361,26465,36834,30522,36339,36148,38081,24086,21381,21548,28867,34413,34415,34416,34418,34419,34420,34421,34422,34423,34424,34435,34436,34437,34438,34439,34440,34441,34446,34447,34448,34449,34450,34452,34454,34455,34456,34457,34458,34459,34462,34463,34464,34465,34466,34469,34470,34475,34477,34478,34482,34483,34487,34488,34489,34491,34492,34493,34494,34495,34497,34498,34499,34501,34504,34508,34509,34514,34515,34517,34518,34519,34522,34524,34525,34528,34529,34530,34531,34533,34534,34535,34536,34538,34539,34540,34543,34549,34550,34551,34554,34555,34556,34557,34559,34561,34564,34565,34566,34571,34572,34574,34575,34576,34577,34580,34582,27712,24311,20572,20141,24237,25402,33351,36890,26704,37230,30643,21516,38108,24420,31461,26742,25413,31570,32479,30171,20599,25237,22836,36879,20984,31171,31361,22270,24466,36884,28034,23648,22303,21520,20820,28237,22242,25512,39059,33151,34581,35114,36864,21534,23663,33216,25302,25176,33073,40501,38464,39534,39548,26925,22949,25299,21822,25366,21703,34521,27964,23043,29926,34972,27498,22806,35916,24367,28286,29609,39037,20024,28919,23436,30871,25405,26202,30358,24779,23451,23113,19975,33109,27754,29579,20129,26505,32593,24448,26106,26395,24536,22916,23041,34585,34587,34589,34591,34592,34596,34598,34599,34600,34602,34603,34604,34605,34607,34608,34610,34611,34613,34614,34616,34617,34618,34620,34621,34624,34625,34626,34627,34628,34629,34630,34634,34635,34637,34639,34640,34641,34642,34644,34645,34646,34648,34650,34651,34652,34653,34654,34655,34657,34658,34662,34663,34664,34665,34666,34667,34668,34669,34671,34673,34674,34675,34677,34679,34680,34681,34682,34687,34688,34689,34692,34694,34695,34697,34698,34700,34702,34703,34704,34705,34706,34708,34709,34710,34712,34713,34714,34715,34716,34717,34718,34720,34721,34722,34723,34724,24013,24494,21361,38886,36829,26693,22260,21807,24799,20026,28493,32500,33479,33806,22996,20255,20266,23614,32428,26410,34074,21619,30031,32963,21890,39759,20301,28205,35859,23561,24944,21355,30239,28201,34442,25991,38395,32441,21563,31283,32010,38382,21985,32705,29934,25373,34583,28065,31389,25105,26017,21351,25569,27779,24043,21596,38056,20044,27745,35820,23627,26080,33436,26791,21566,21556,27595,27494,20116,25410,21320,33310,20237,20398,22366,25098,38654,26212,29289,21247,21153,24735,35823,26132,29081,26512,35199,30802,30717,26224,22075,21560,38177,29306,34725,34726,34727,34729,34730,34734,34736,34737,34738,34740,34742,34743,34744,34745,34747,34748,34750,34751,34753,34754,34755,34756,34757,34759,34760,34761,34764,34765,34766,34767,34768,34772,34773,34774,34775,34776,34777,34778,34780,34781,34782,34783,34785,34786,34787,34788,34790,34791,34792,34793,34795,34796,34797,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34810,34811,34812,34813,34815,34816,34817,34818,34820,34821,34822,34823,34824,34825,34827,34828,34829,34830,34831,34832,34833,34834,34836,34839,34840,34841,34842,34844,34845,34846,34847,34848,34851,31232,24687,24076,24713,33181,22805,24796,29060,28911,28330,27728,29312,27268,34989,24109,20064,23219,21916,38115,27927,31995,38553,25103,32454,30606,34430,21283,38686,36758,26247,23777,20384,29421,19979,21414,22799,21523,25472,38184,20808,20185,40092,32420,21688,36132,34900,33335,38386,28046,24358,23244,26174,38505,29616,29486,21439,33146,39301,32673,23466,38519,38480,32447,30456,21410,38262,39321,31665,35140,28248,20065,32724,31077,35814,24819,21709,20139,39033,24055,27233,20687,21521,35937,33831,30813,38660,21066,21742,22179,38144,28040,23477,28102,26195,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34867,34868,34869,34870,34871,34872,34874,34875,34877,34878,34879,34881,34882,34883,34886,34887,34888,34889,34890,34891,34894,34895,34896,34897,34898,34899,34901,34902,34904,34906,34907,34908,34909,34910,34911,34912,34918,34919,34922,34925,34927,34929,34931,34932,34933,34934,34936,34937,34938,34939,34940,34944,34947,34950,34951,34953,34954,34956,34958,34959,34960,34961,34963,34964,34965,34967,34968,34969,34970,34971,34973,34974,34975,34976,34977,34979,34981,34982,34983,34984,34985,34986,23567,23389,26657,32918,21880,31505,25928,26964,20123,27463,34638,38795,21327,25375,25658,37034,26012,32961,35856,20889,26800,21368,34809,25032,27844,27899,35874,23633,34218,33455,38156,27427,36763,26032,24571,24515,20449,34885,26143,33125,29481,24826,20852,21009,22411,24418,37026,34892,37266,24184,26447,24615,22995,20804,20982,33016,21256,27769,38596,29066,20241,20462,32670,26429,21957,38152,31168,34966,32483,22687,25100,38656,34394,22040,39035,24464,35768,33988,37207,21465,26093,24207,30044,24676,32110,23167,32490,32493,36713,21927,23459,24748,26059,29572,34988,34990,34991,34992,34994,34995,34996,34997,34998,35000,35001,35002,35003,35005,35006,35007,35008,35011,35012,35015,35016,35018,35019,35020,35021,35023,35024,35025,35027,35030,35031,35034,35035,35036,35037,35038,35040,35041,35046,35047,35049,35050,35051,35052,35053,35054,35055,35058,35061,35062,35063,35066,35067,35069,35071,35072,35073,35075,35076,35077,35078,35079,35080,35081,35083,35084,35085,35086,35087,35089,35092,35093,35094,35095,35096,35100,35101,35102,35103,35104,35106,35107,35108,35110,35111,35112,35113,35116,35117,35118,35119,35121,35122,35123,35125,35127,36873,30307,30505,32474,38772,34203,23398,31348,38634,34880,21195,29071,24490,26092,35810,23547,39535,24033,27529,27739,35757,35759,36874,36805,21387,25276,40486,40493,21568,20011,33469,29273,34460,23830,34905,28079,38597,21713,20122,35766,28937,21693,38409,28895,28153,30416,20005,30740,34578,23721,24310,35328,39068,38414,28814,27839,22852,25513,30524,34893,28436,33395,22576,29141,21388,30746,38593,21761,24422,28976,23476,35866,39564,27523,22830,40495,31207,26472,25196,20335,30113,32650,27915,38451,27687,20208,30162,20859,26679,28478,36992,33136,22934,29814,35128,35129,35130,35131,35132,35133,35134,35135,35136,35138,35139,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35168,35169,35170,35171,35172,35173,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35196,35197,35198,35200,35202,35204,35205,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,25671,23591,36965,31377,35875,23002,21676,33280,33647,35201,32768,26928,22094,32822,29239,37326,20918,20063,39029,25494,19994,21494,26355,33099,22812,28082,19968,22777,21307,25558,38129,20381,20234,34915,39056,22839,36951,31227,20202,33008,30097,27778,23452,23016,24413,26885,34433,20506,24050,20057,30691,20197,33402,25233,26131,37009,23673,20159,24441,33222,36920,32900,30123,20134,35028,24847,27589,24518,20041,30410,28322,35811,35758,35850,35793,24322,32764,32716,32462,33589,33643,22240,27575,38899,38452,23035,21535,38134,28139,23493,39278,23609,24341,38544,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35267,35277,35283,35284,35285,35287,35288,35289,35291,35293,35295,35296,35297,35298,35300,35303,35304,35305,35306,35308,35309,35310,35312,35313,35314,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35329,35330,35331,35332,35333,35334,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,21360,33521,27185,23156,40560,24212,32552,33721,33828,33829,33639,34631,36814,36194,30408,24433,39062,30828,26144,21727,25317,20323,33219,30152,24248,38605,36362,34553,21647,27891,28044,27704,24703,21191,29992,24189,20248,24736,24551,23588,30001,37038,38080,29369,27833,28216,37193,26377,21451,21491,20305,37321,35825,21448,24188,36802,28132,20110,30402,27014,34398,24858,33286,20313,20446,36926,40060,24841,28189,28180,38533,20104,23089,38632,19982,23679,31161,23431,35821,32701,29577,22495,33419,37057,21505,36935,21947,23786,24481,24840,27442,29425,32946,35465,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35391,35392,35393,35394,35395,35396,35397,35398,35399,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35450,35451,35452,35453,35454,35455,35456,28020,23507,35029,39044,35947,39533,40499,28170,20900,20803,22435,34945,21407,25588,36757,22253,21592,22278,29503,28304,32536,36828,33489,24895,24616,38498,26352,32422,36234,36291,38053,23731,31908,26376,24742,38405,32792,20113,37095,21248,38504,20801,36816,34164,37213,26197,38901,23381,21277,30776,26434,26685,21705,28798,23472,36733,20877,22312,21681,25874,26242,36190,36163,33039,33900,36973,31967,20991,34299,26531,26089,28577,34468,36481,22122,36896,30338,28790,29157,36131,25321,21017,27901,36156,24590,22686,24974,26366,36192,25166,21939,28195,26413,36711,35457,35458,35459,35460,35461,35462,35463,35464,35467,35468,35469,35470,35471,35472,35473,35474,35476,35477,35478,35479,35480,35481,35482,35483,35484,35485,35486,35487,35488,35489,35490,35491,35492,35493,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,35515,35516,35517,35518,35519,35520,35521,35522,35523,35524,35525,35526,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544,35545,35546,35547,35548,35549,35550,35551,35552,35553,35554,35555,38113,38392,30504,26629,27048,21643,20045,28856,35784,25688,25995,23429,31364,20538,23528,30651,27617,35449,31896,27838,30415,26025,36759,23853,23637,34360,26632,21344,25112,31449,28251,32509,27167,31456,24432,28467,24352,25484,28072,26454,19976,24080,36134,20183,32960,30260,38556,25307,26157,25214,27836,36213,29031,32617,20806,32903,21484,36974,25240,21746,34544,36761,32773,38167,34071,36825,27993,29645,26015,30495,29956,30759,33275,36126,38024,20390,26517,30137,35786,38663,25391,38215,38453,33976,25379,30529,24449,29424,20105,24596,25972,25327,27491,25919,35556,35557,35558,35559,35560,35561,35562,35563,35564,35565,35566,35567,35568,35569,35570,35571,35572,35573,35574,35575,35576,35577,35578,35579,35580,35581,35582,35583,35584,35585,35586,35587,35588,35589,35590,35592,35593,35594,35595,35596,35597,35598,35599,35600,35601,35602,35603,35604,35605,35606,35607,35608,35609,35610,35611,35612,35613,35614,35615,35616,35617,35618,35619,35620,35621,35623,35624,35625,35626,35627,35628,35629,35630,35631,35632,35633,35634,35635,35636,35637,35638,35639,35640,35641,35642,35643,35644,35645,35646,35647,35648,35649,35650,35651,35652,35653,24103,30151,37073,35777,33437,26525,25903,21553,34584,30693,32930,33026,27713,20043,32455,32844,30452,26893,27542,25191,20540,20356,22336,25351,27490,36286,21482,26088,32440,24535,25370,25527,33267,33268,32622,24092,23769,21046,26234,31209,31258,36136,28825,30164,28382,27835,31378,20013,30405,24544,38047,34935,32456,31181,32959,37325,20210,20247,33311,21608,24030,27954,35788,31909,36724,32920,24090,21650,30385,23449,26172,39588,29664,26666,34523,26417,29482,35832,35803,36880,31481,28891,29038,25284,30633,22065,20027,33879,26609,21161,34496,36142,38136,31569,35654,35655,35656,35657,35658,35659,35660,35661,35662,35663,35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35687,35688,35689,35690,35691,35693,35694,35695,35696,35697,35698,35699,35700,35701,35702,35703,35704,35705,35706,35707,35708,35709,35710,35711,35712,35713,35714,35715,35716,35717,35718,35719,35720,35721,35722,35723,35724,35725,35726,35727,35728,35729,35730,35731,35732,35733,35734,35735,35736,35737,35738,35739,35740,35741,35742,35743,35756,35761,35771,35783,35792,35818,35849,35870,20303,27880,31069,39547,25235,29226,25341,19987,30742,36716,25776,36186,31686,26729,24196,35013,22918,25758,22766,29366,26894,38181,36861,36184,22368,32512,35846,20934,25417,25305,21331,26700,29730,33537,37196,21828,30528,28796,27978,20857,21672,36164,23039,28363,28100,23388,32043,20180,31869,28371,23376,33258,28173,23383,39683,26837,36394,23447,32508,24635,32437,37049,36208,22863,25549,31199,36275,21330,26063,31062,35781,38459,32452,38075,32386,22068,37257,26368,32618,23562,36981,26152,24038,20304,26590,20570,20316,22352,24231,59408,59409,59410,59411,59412,35896,35897,35898,35899,35900,35901,35902,35903,35904,35906,35907,35908,35909,35912,35914,35915,35917,35918,35919,35920,35921,35922,35923,35924,35926,35927,35928,35929,35931,35932,35933,35934,35935,35936,35939,35940,35941,35942,35943,35944,35945,35948,35949,35950,35951,35952,35953,35954,35956,35957,35958,35959,35963,35964,35965,35966,35967,35968,35969,35971,35972,35974,35975,35976,35979,35981,35982,35983,35984,35985,35986,35987,35989,35990,35991,35993,35994,35995,35996,35997,35998,35999,36000,36001,36002,36003,36004,36005,36006,36007,36008,36009,36010,36011,36012,36013,20109,19980,20800,19984,24319,21317,19989,20120,19998,39730,23404,22121,20008,31162,20031,21269,20039,22829,29243,21358,27664,22239,32996,39319,27603,30590,40727,20022,20127,40720,20060,20073,20115,33416,23387,21868,22031,20164,21389,21405,21411,21413,21422,38757,36189,21274,21493,21286,21294,21310,36188,21350,21347,20994,21000,21006,21037,21043,21055,21056,21068,21086,21089,21084,33967,21117,21122,21121,21136,21139,20866,32596,20155,20163,20169,20162,20200,20193,20203,20190,20251,20211,20258,20324,20213,20261,20263,20233,20267,20318,20327,25912,20314,20317,36014,36015,36016,36017,36018,36019,36020,36021,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,36032,36033,36034,36035,36036,36037,36038,36039,36040,36041,36042,36043,36044,36045,36046,36047,36048,36049,36050,36051,36052,36053,36054,36055,36056,36057,36058,36059,36060,36061,36062,36063,36064,36065,36066,36067,36068,36069,36070,36071,36072,36073,36074,36075,36076,36077,36078,36079,36080,36081,36082,36083,36084,36085,36086,36087,36088,36089,36090,36091,36092,36093,36094,36095,36096,36097,36098,36099,36100,36101,36102,36103,36104,36105,36106,36107,36108,36109,20319,20311,20274,20285,20342,20340,20369,20361,20355,20367,20350,20347,20394,20348,20396,20372,20454,20456,20458,20421,20442,20451,20444,20433,20447,20472,20521,20556,20467,20524,20495,20526,20525,20478,20508,20492,20517,20520,20606,20547,20565,20552,20558,20588,20603,20645,20647,20649,20666,20694,20742,20717,20716,20710,20718,20743,20747,20189,27709,20312,20325,20430,40864,27718,31860,20846,24061,40649,39320,20865,22804,21241,21261,35335,21264,20971,22809,20821,20128,20822,20147,34926,34980,20149,33044,35026,31104,23348,34819,32696,20907,20913,20925,20924,36110,36111,36112,36113,36114,36115,36116,36117,36118,36119,36120,36121,36122,36123,36124,36128,36177,36178,36183,36191,36197,36200,36201,36202,36204,36206,36207,36209,36210,36216,36217,36218,36219,36220,36221,36222,36223,36224,36226,36227,36230,36231,36232,36233,36236,36237,36238,36239,36240,36242,36243,36245,36246,36247,36248,36249,36250,36251,36252,36253,36254,36256,36257,36258,36260,36261,36262,36263,36264,36265,36266,36267,36268,36269,36270,36271,36272,36274,36278,36279,36281,36283,36285,36288,36289,36290,36293,36295,36296,36297,36298,36301,36304,36306,36307,36308,20935,20886,20898,20901,35744,35750,35751,35754,35764,35765,35767,35778,35779,35787,35791,35790,35794,35795,35796,35798,35800,35801,35804,35807,35808,35812,35816,35817,35822,35824,35827,35830,35833,35836,35839,35840,35842,35844,35847,35852,35855,35857,35858,35860,35861,35862,35865,35867,35864,35869,35871,35872,35873,35877,35879,35882,35883,35886,35887,35890,35891,35893,35894,21353,21370,38429,38434,38433,38449,38442,38461,38460,38466,38473,38484,38495,38503,38508,38514,38516,38536,38541,38551,38576,37015,37019,37021,37017,37036,37025,37044,37043,37046,37050,36309,36312,36313,36316,36320,36321,36322,36325,36326,36327,36329,36333,36334,36336,36337,36338,36340,36342,36348,36350,36351,36352,36353,36354,36355,36356,36358,36359,36360,36363,36365,36366,36368,36369,36370,36371,36373,36374,36375,36376,36377,36378,36379,36380,36384,36385,36388,36389,36390,36391,36392,36395,36397,36400,36402,36403,36404,36406,36407,36408,36411,36412,36414,36415,36419,36421,36422,36428,36429,36430,36431,36432,36435,36436,36437,36438,36439,36440,36442,36443,36444,36445,36446,36447,36448,36449,36450,36451,36452,36453,36455,36456,36458,36459,36462,36465,37048,37040,37071,37061,37054,37072,37060,37063,37075,37094,37090,37084,37079,37083,37099,37103,37118,37124,37154,37150,37155,37169,37167,37177,37187,37190,21005,22850,21154,21164,21165,21182,21759,21200,21206,21232,21471,29166,30669,24308,20981,20988,39727,21430,24321,30042,24047,22348,22441,22433,22654,22716,22725,22737,22313,22316,22314,22323,22329,22318,22319,22364,22331,22338,22377,22405,22379,22406,22396,22395,22376,22381,22390,22387,22445,22436,22412,22450,22479,22439,22452,22419,22432,22485,22488,22490,22489,22482,22456,22516,22511,22520,22500,22493,36467,36469,36471,36472,36473,36474,36475,36477,36478,36480,36482,36483,36484,36486,36488,36489,36490,36491,36492,36493,36494,36497,36498,36499,36501,36502,36503,36504,36505,36506,36507,36509,36511,36512,36513,36514,36515,36516,36517,36518,36519,36520,36521,36522,36525,36526,36528,36529,36531,36532,36533,36534,36535,36536,36537,36539,36540,36541,36542,36543,36544,36545,36546,36547,36548,36549,36550,36551,36552,36553,36554,36555,36556,36557,36559,36560,36561,36562,36563,36564,36565,36566,36567,36568,36569,36570,36571,36572,36573,36574,36575,36576,36577,36578,36579,36580,22539,22541,22525,22509,22528,22558,22553,22596,22560,22629,22636,22657,22665,22682,22656,39336,40729,25087,33401,33405,33407,33423,33418,33448,33412,33422,33425,33431,33433,33451,33464,33470,33456,33480,33482,33507,33432,33463,33454,33483,33484,33473,33449,33460,33441,33450,33439,33476,33486,33444,33505,33545,33527,33508,33551,33543,33500,33524,33490,33496,33548,33531,33491,33553,33562,33542,33556,33557,33504,33493,33564,33617,33627,33628,33544,33682,33596,33588,33585,33691,33630,33583,33615,33607,33603,33631,33600,33559,33632,33581,33594,33587,33638,33637,36581,36582,36583,36584,36585,36586,36587,36588,36589,36590,36591,36592,36593,36594,36595,36596,36597,36598,36599,36600,36601,36602,36603,36604,36605,36606,36607,36608,36609,36610,36611,36612,36613,36614,36615,36616,36617,36618,36619,36620,36621,36622,36623,36624,36625,36626,36627,36628,36629,36630,36631,36632,36633,36634,36635,36636,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36648,36649,36650,36651,36652,36653,36654,36655,36656,36657,36658,36659,36660,36661,36662,36663,36664,36665,36666,36667,36668,36669,36670,36671,36672,36673,36674,36675,36676,33640,33563,33641,33644,33642,33645,33646,33712,33656,33715,33716,33696,33706,33683,33692,33669,33660,33718,33705,33661,33720,33659,33688,33694,33704,33722,33724,33729,33793,33765,33752,22535,33816,33803,33757,33789,33750,33820,33848,33809,33798,33748,33759,33807,33795,33784,33785,33770,33733,33728,33830,33776,33761,33884,33873,33882,33881,33907,33927,33928,33914,33929,33912,33852,33862,33897,33910,33932,33934,33841,33901,33985,33997,34000,34022,33981,34003,33994,33983,33978,34016,33953,33977,33972,33943,34021,34019,34060,29965,34104,34032,34105,34079,34106,36677,36678,36679,36680,36681,36682,36683,36684,36685,36686,36687,36688,36689,36690,36691,36692,36693,36694,36695,36696,36697,36698,36699,36700,36701,36702,36703,36704,36705,36706,36707,36708,36709,36714,36736,36748,36754,36765,36768,36769,36770,36772,36773,36774,36775,36778,36780,36781,36782,36783,36786,36787,36788,36789,36791,36792,36794,36795,36796,36799,36800,36803,36806,36809,36810,36811,36812,36813,36815,36818,36822,36823,36826,36832,36833,36835,36839,36844,36847,36849,36850,36852,36853,36854,36858,36859,36860,36862,36863,36871,36872,36876,36878,36883,36885,36888,34134,34107,34047,34044,34137,34120,34152,34148,34142,34170,30626,34115,34162,34171,34212,34216,34183,34191,34169,34222,34204,34181,34233,34231,34224,34259,34241,34268,34303,34343,34309,34345,34326,34364,24318,24328,22844,22849,32823,22869,22874,22872,21263,23586,23589,23596,23604,25164,25194,25247,25275,25290,25306,25303,25326,25378,25334,25401,25419,25411,25517,25590,25457,25466,25486,25524,25453,25516,25482,25449,25518,25532,25586,25592,25568,25599,25540,25566,25550,25682,25542,25534,25669,25665,25611,25627,25632,25612,25638,25633,25694,25732,25709,25750,36889,36892,36899,36900,36901,36903,36904,36905,36906,36907,36908,36912,36913,36914,36915,36916,36919,36921,36922,36925,36927,36928,36931,36933,36934,36936,36937,36938,36939,36940,36942,36948,36949,36950,36953,36954,36956,36957,36958,36959,36960,36961,36964,36966,36967,36969,36970,36971,36972,36975,36976,36977,36978,36979,36982,36983,36984,36985,36986,36987,36988,36990,36993,36996,36997,36998,36999,37001,37002,37004,37005,37006,37007,37008,37010,37012,37014,37016,37018,37020,37022,37023,37024,37028,37029,37031,37032,37033,37035,37037,37042,37047,37052,37053,37055,37056,25722,25783,25784,25753,25786,25792,25808,25815,25828,25826,25865,25893,25902,24331,24530,29977,24337,21343,21489,21501,21481,21480,21499,21522,21526,21510,21579,21586,21587,21588,21590,21571,21537,21591,21593,21539,21554,21634,21652,21623,21617,21604,21658,21659,21636,21622,21606,21661,21712,21677,21698,21684,21714,21671,21670,21715,21716,21618,21667,21717,21691,21695,21708,21721,21722,21724,21673,21674,21668,21725,21711,21726,21787,21735,21792,21757,21780,21747,21794,21795,21775,21777,21799,21802,21863,21903,21941,21833,21869,21825,21845,21823,21840,21820,37058,37059,37062,37064,37065,37067,37068,37069,37074,37076,37077,37078,37080,37081,37082,37086,37087,37088,37091,37092,37093,37097,37098,37100,37102,37104,37105,37106,37107,37109,37110,37111,37113,37114,37115,37116,37119,37120,37121,37123,37125,37126,37127,37128,37129,37130,37131,37132,37133,37134,37135,37136,37137,37138,37139,37140,37141,37142,37143,37144,37146,37147,37148,37149,37151,37152,37153,37156,37157,37158,37159,37160,37161,37162,37163,37164,37165,37166,37168,37170,37171,37172,37173,37174,37175,37176,37178,37179,37180,37181,37182,37183,37184,37185,37186,37188,21815,21846,21877,21878,21879,21811,21808,21852,21899,21970,21891,21937,21945,21896,21889,21919,21886,21974,21905,21883,21983,21949,21950,21908,21913,21994,22007,21961,22047,21969,21995,21996,21972,21990,21981,21956,21999,21989,22002,22003,21964,21965,21992,22005,21988,36756,22046,22024,22028,22017,22052,22051,22014,22016,22055,22061,22104,22073,22103,22060,22093,22114,22105,22108,22092,22100,22150,22116,22129,22123,22139,22140,22149,22163,22191,22228,22231,22237,22241,22261,22251,22265,22271,22276,22282,22281,22300,24079,24089,24084,24081,24113,24123,24124,37189,37191,37192,37201,37203,37204,37205,37206,37208,37209,37211,37212,37215,37216,37222,37223,37224,37227,37229,37235,37242,37243,37244,37248,37249,37250,37251,37252,37254,37256,37258,37262,37263,37267,37268,37269,37270,37271,37272,37273,37276,37277,37278,37279,37280,37281,37284,37285,37286,37287,37288,37289,37291,37292,37296,37297,37298,37299,37302,37303,37304,37305,37307,37308,37309,37310,37311,37312,37313,37314,37315,37316,37317,37318,37320,37323,37328,37330,37331,37332,37333,37334,37335,37336,37337,37338,37339,37341,37342,37343,37344,37345,37346,37347,37348,37349,24119,24132,24148,24155,24158,24161,23692,23674,23693,23696,23702,23688,23704,23705,23697,23706,23708,23733,23714,23741,23724,23723,23729,23715,23745,23735,23748,23762,23780,23755,23781,23810,23811,23847,23846,23854,23844,23838,23814,23835,23896,23870,23860,23869,23916,23899,23919,23901,23915,23883,23882,23913,23924,23938,23961,23965,35955,23991,24005,24435,24439,24450,24455,24457,24460,24469,24473,24476,24488,24493,24501,24508,34914,24417,29357,29360,29364,29367,29368,29379,29377,29390,29389,29394,29416,29423,29417,29426,29428,29431,29441,29427,29443,29434,37350,37351,37352,37353,37354,37355,37356,37357,37358,37359,37360,37361,37362,37363,37364,37365,37366,37367,37368,37369,37370,37371,37372,37373,37374,37375,37376,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37387,37388,37389,37390,37391,37392,37393,37394,37395,37396,37397,37398,37399,37400,37401,37402,37403,37404,37405,37406,37407,37408,37409,37410,37411,37412,37413,37414,37415,37416,37417,37418,37419,37420,37421,37422,37423,37424,37425,37426,37427,37428,37429,37430,37431,37432,37433,37434,37435,37436,37437,37438,37439,37440,37441,37442,37443,37444,37445,29435,29463,29459,29473,29450,29470,29469,29461,29474,29497,29477,29484,29496,29489,29520,29517,29527,29536,29548,29551,29566,33307,22821,39143,22820,22786,39267,39271,39272,39273,39274,39275,39276,39284,39287,39293,39296,39300,39303,39306,39309,39312,39313,39315,39316,39317,24192,24209,24203,24214,24229,24224,24249,24245,24254,24243,36179,24274,24273,24283,24296,24298,33210,24516,24521,24534,24527,24579,24558,24580,24545,24548,24574,24581,24582,24554,24557,24568,24601,24629,24614,24603,24591,24589,24617,24619,24586,24639,24609,24696,24697,24699,24698,24642,37446,37447,37448,37449,37450,37451,37452,37453,37454,37455,37456,37457,37458,37459,37460,37461,37462,37463,37464,37465,37466,37467,37468,37469,37470,37471,37472,37473,37474,37475,37476,37477,37478,37479,37480,37481,37482,37483,37484,37485,37486,37487,37488,37489,37490,37491,37493,37494,37495,37496,37497,37498,37499,37500,37501,37502,37503,37504,37505,37506,37507,37508,37509,37510,37511,37512,37513,37514,37515,37516,37517,37519,37520,37521,37522,37523,37524,37525,37526,37527,37528,37529,37530,37531,37532,37533,37534,37535,37536,37537,37538,37539,37540,37541,37542,37543,24682,24701,24726,24730,24749,24733,24707,24722,24716,24731,24812,24763,24753,24797,24792,24774,24794,24756,24864,24870,24853,24867,24820,24832,24846,24875,24906,24949,25004,24980,24999,25015,25044,25077,24541,38579,38377,38379,38385,38387,38389,38390,38396,38398,38403,38404,38406,38408,38410,38411,38412,38413,38415,38418,38421,38422,38423,38425,38426,20012,29247,25109,27701,27732,27740,27722,27811,27781,27792,27796,27788,27752,27753,27764,27766,27782,27817,27856,27860,27821,27895,27896,27889,27863,27826,27872,27862,27898,27883,27886,27825,27859,27887,27902,37544,37545,37546,37547,37548,37549,37551,37552,37553,37554,37555,37556,37557,37558,37559,37560,37561,37562,37563,37564,37565,37566,37567,37568,37569,37570,37571,37572,37573,37574,37575,37577,37578,37579,37580,37581,37582,37583,37584,37585,37586,37587,37588,37589,37590,37591,37592,37593,37594,37595,37596,37597,37598,37599,37600,37601,37602,37603,37604,37605,37606,37607,37608,37609,37610,37611,37612,37613,37614,37615,37616,37617,37618,37619,37620,37621,37622,37623,37624,37625,37626,37627,37628,37629,37630,37631,37632,37633,37634,37635,37636,37637,37638,37639,37640,37641,27961,27943,27916,27971,27976,27911,27908,27929,27918,27947,27981,27950,27957,27930,27983,27986,27988,27955,28049,28015,28062,28064,27998,28051,28052,27996,28000,28028,28003,28186,28103,28101,28126,28174,28095,28128,28177,28134,28125,28121,28182,28075,28172,28078,28203,28270,28238,28267,28338,28255,28294,28243,28244,28210,28197,28228,28383,28337,28312,28384,28461,28386,28325,28327,28349,28347,28343,28375,28340,28367,28303,28354,28319,28514,28486,28487,28452,28437,28409,28463,28470,28491,28532,28458,28425,28457,28553,28557,28556,28536,28530,28540,28538,28625,37642,37643,37644,37645,37646,37647,37648,37649,37650,37651,37652,37653,37654,37655,37656,37657,37658,37659,37660,37661,37662,37663,37664,37665,37666,37667,37668,37669,37670,37671,37672,37673,37674,37675,37676,37677,37678,37679,37680,37681,37682,37683,37684,37685,37686,37687,37688,37689,37690,37691,37692,37693,37695,37696,37697,37698,37699,37700,37701,37702,37703,37704,37705,37706,37707,37708,37709,37710,37711,37712,37713,37714,37715,37716,37717,37718,37719,37720,37721,37722,37723,37724,37725,37726,37727,37728,37729,37730,37731,37732,37733,37734,37735,37736,37737,37739,28617,28583,28601,28598,28610,28641,28654,28638,28640,28655,28698,28707,28699,28729,28725,28751,28766,23424,23428,23445,23443,23461,23480,29999,39582,25652,23524,23534,35120,23536,36423,35591,36790,36819,36821,36837,36846,36836,36841,36838,36851,36840,36869,36868,36875,36902,36881,36877,36886,36897,36917,36918,36909,36911,36932,36945,36946,36944,36968,36952,36962,36955,26297,36980,36989,36994,37000,36995,37003,24400,24407,24406,24408,23611,21675,23632,23641,23409,23651,23654,32700,24362,24361,24365,33396,24380,39739,23662,22913,22915,22925,22953,22954,22947,37740,37741,37742,37743,37744,37745,37746,37747,37748,37749,37750,37751,37752,37753,37754,37755,37756,37757,37758,37759,37760,37761,37762,37763,37764,37765,37766,37767,37768,37769,37770,37771,37772,37773,37774,37776,37777,37778,37779,37780,37781,37782,37783,37784,37785,37786,37787,37788,37789,37790,37791,37792,37793,37794,37795,37796,37797,37798,37799,37800,37801,37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814,37815,37816,37817,37818,37819,37820,37821,37822,37823,37824,37825,37826,37827,37828,37829,37830,37831,37832,37833,37835,37836,37837,22935,22986,22955,22942,22948,22994,22962,22959,22999,22974,23045,23046,23005,23048,23011,23000,23033,23052,23049,23090,23092,23057,23075,23059,23104,23143,23114,23125,23100,23138,23157,33004,23210,23195,23159,23162,23230,23275,23218,23250,23252,23224,23264,23267,23281,23254,23270,23256,23260,23305,23319,23318,23346,23351,23360,23573,23580,23386,23397,23411,23377,23379,23394,39541,39543,39544,39546,39551,39549,39552,39553,39557,39560,39562,39568,39570,39571,39574,39576,39579,39580,39581,39583,39584,39586,39587,39589,39591,32415,32417,32419,32421,32424,32425,37838,37839,37840,37841,37842,37843,37844,37845,37847,37848,37849,37850,37851,37852,37853,37854,37855,37856,37857,37858,37859,37860,37861,37862,37863,37864,37865,37866,37867,37868,37869,37870,37871,37872,37873,37874,37875,37876,37877,37878,37879,37880,37881,37882,37883,37884,37885,37886,37887,37888,37889,37890,37891,37892,37893,37894,37895,37896,37897,37898,37899,37900,37901,37902,37903,37904,37905,37906,37907,37908,37909,37910,37911,37912,37913,37914,37915,37916,37917,37918,37919,37920,37921,37922,37923,37924,37925,37926,37927,37928,37929,37930,37931,37932,37933,37934,32429,32432,32446,32448,32449,32450,32457,32459,32460,32464,32468,32471,32475,32480,32481,32488,32491,32494,32495,32497,32498,32525,32502,32506,32507,32510,32513,32514,32515,32519,32520,32523,32524,32527,32529,32530,32535,32537,32540,32539,32543,32545,32546,32547,32548,32549,32550,32551,32554,32555,32556,32557,32559,32560,32561,32562,32563,32565,24186,30079,24027,30014,37013,29582,29585,29614,29602,29599,29647,29634,29649,29623,29619,29632,29641,29640,29669,29657,39036,29706,29673,29671,29662,29626,29682,29711,29738,29787,29734,29733,29736,29744,29742,29740,37935,37936,37937,37938,37939,37940,37941,37942,37943,37944,37945,37946,37947,37948,37949,37951,37952,37953,37954,37955,37956,37957,37958,37959,37960,37961,37962,37963,37964,37965,37966,37967,37968,37969,37970,37971,37972,37973,37974,37975,37976,37977,37978,37979,37980,37981,37982,37983,37984,37985,37986,37987,37988,37989,37990,37991,37992,37993,37994,37996,37997,37998,37999,38000,38001,38002,38003,38004,38005,38006,38007,38008,38009,38010,38011,38012,38013,38014,38015,38016,38017,38018,38019,38020,38033,38038,38040,38087,38095,38099,38100,38106,38118,38139,38172,38176,29723,29722,29761,29788,29783,29781,29785,29815,29805,29822,29852,29838,29824,29825,29831,29835,29854,29864,29865,29840,29863,29906,29882,38890,38891,38892,26444,26451,26462,26440,26473,26533,26503,26474,26483,26520,26535,26485,26536,26526,26541,26507,26487,26492,26608,26633,26584,26634,26601,26544,26636,26585,26549,26586,26547,26589,26624,26563,26552,26594,26638,26561,26621,26674,26675,26720,26721,26702,26722,26692,26724,26755,26653,26709,26726,26689,26727,26688,26686,26698,26697,26665,26805,26767,26740,26743,26771,26731,26818,26990,26876,26911,26912,26873,38183,38195,38205,38211,38216,38219,38229,38234,38240,38254,38260,38261,38263,38264,38265,38266,38267,38268,38269,38270,38272,38273,38274,38275,38276,38277,38278,38279,38280,38281,38282,38283,38284,38285,38286,38287,38288,38289,38290,38291,38292,38293,38294,38295,38296,38297,38298,38299,38300,38301,38302,38303,38304,38305,38306,38307,38308,38309,38310,38311,38312,38313,38314,38315,38316,38317,38318,38319,38320,38321,38322,38323,38324,38325,38326,38327,38328,38329,38330,38331,38332,38333,38334,38335,38336,38337,38338,38339,38340,38341,38342,38343,38344,38345,38346,38347,26916,26864,26891,26881,26967,26851,26896,26993,26937,26976,26946,26973,27012,26987,27008,27032,27000,26932,27084,27015,27016,27086,27017,26982,26979,27001,27035,27047,27067,27051,27053,27092,27057,27073,27082,27103,27029,27104,27021,27135,27183,27117,27159,27160,27237,27122,27204,27198,27296,27216,27227,27189,27278,27257,27197,27176,27224,27260,27281,27280,27305,27287,27307,29495,29522,27521,27522,27527,27524,27538,27539,27533,27546,27547,27553,27562,36715,36717,36721,36722,36723,36725,36726,36728,36727,36729,36730,36732,36734,36737,36738,36740,36743,36747,38348,38349,38350,38351,38352,38353,38354,38355,38356,38357,38358,38359,38360,38361,38362,38363,38364,38365,38366,38367,38368,38369,38370,38371,38372,38373,38374,38375,38380,38399,38407,38419,38424,38427,38430,38432,38435,38436,38437,38438,38439,38440,38441,38443,38444,38445,38447,38448,38455,38456,38457,38458,38462,38465,38467,38474,38478,38479,38481,38482,38483,38486,38487,38488,38489,38490,38492,38493,38494,38496,38499,38501,38502,38507,38509,38510,38511,38512,38513,38515,38520,38521,38522,38523,38524,38525,38526,38527,38528,38529,38530,38531,38532,38535,38537,38538,36749,36750,36751,36760,36762,36558,25099,25111,25115,25119,25122,25121,25125,25124,25132,33255,29935,29940,29951,29967,29969,29971,25908,26094,26095,26096,26122,26137,26482,26115,26133,26112,28805,26359,26141,26164,26161,26166,26165,32774,26207,26196,26177,26191,26198,26209,26199,26231,26244,26252,26279,26269,26302,26331,26332,26342,26345,36146,36147,36150,36155,36157,36160,36165,36166,36168,36169,36167,36173,36181,36185,35271,35274,35275,35276,35278,35279,35280,35281,29294,29343,29277,29286,29295,29310,29311,29316,29323,29325,29327,29330,25352,25394,25520,38540,38542,38545,38546,38547,38549,38550,38554,38555,38557,38558,38559,38560,38561,38562,38563,38564,38565,38566,38568,38569,38570,38571,38572,38573,38574,38575,38577,38578,38580,38581,38583,38584,38586,38587,38591,38594,38595,38600,38602,38603,38608,38609,38611,38612,38614,38615,38616,38617,38618,38619,38620,38621,38622,38623,38625,38626,38627,38628,38629,38630,38631,38635,38636,38637,38638,38640,38641,38642,38644,38645,38648,38650,38651,38652,38653,38655,38658,38659,38661,38666,38667,38668,38672,38673,38674,38676,38677,38679,38680,38681,38682,38683,38685,38687,38688,25663,25816,32772,27626,27635,27645,27637,27641,27653,27655,27654,27661,27669,27672,27673,27674,27681,27689,27684,27690,27698,25909,25941,25963,29261,29266,29270,29232,34402,21014,32927,32924,32915,32956,26378,32957,32945,32939,32941,32948,32951,32999,33000,33001,33002,32987,32962,32964,32985,32973,32983,26384,32989,33003,33009,33012,33005,33037,33038,33010,33020,26389,33042,35930,33078,33054,33068,33048,33074,33096,33100,33107,33140,33113,33114,33137,33120,33129,33148,33149,33133,33127,22605,23221,33160,33154,33169,28373,33187,33194,33228,26406,33226,33211,38689,38690,38691,38692,38693,38694,38695,38696,38697,38699,38700,38702,38703,38705,38707,38708,38709,38710,38711,38714,38715,38716,38717,38719,38720,38721,38722,38723,38724,38725,38726,38727,38728,38729,38730,38731,38732,38733,38734,38735,38736,38737,38740,38741,38743,38744,38746,38748,38749,38751,38755,38756,38758,38759,38760,38762,38763,38764,38765,38766,38767,38768,38769,38770,38773,38775,38776,38777,38778,38779,38781,38782,38783,38784,38785,38786,38787,38788,38790,38791,38792,38793,38794,38796,38798,38799,38800,38803,38805,38806,38807,38809,38810,38811,38812,38813,33217,33190,27428,27447,27449,27459,27462,27481,39121,39122,39123,39125,39129,39130,27571,24384,27586,35315,26000,40785,26003,26044,26054,26052,26051,26060,26062,26066,26070,28800,28828,28822,28829,28859,28864,28855,28843,28849,28904,28874,28944,28947,28950,28975,28977,29043,29020,29032,28997,29042,29002,29048,29050,29080,29107,29109,29096,29088,29152,29140,29159,29177,29213,29224,28780,28952,29030,29113,25150,25149,25155,25160,25161,31035,31040,31046,31049,31067,31068,31059,31066,31074,31063,31072,31087,31079,31098,31109,31114,31130,31143,31155,24529,24528,38814,38815,38817,38818,38820,38821,38822,38823,38824,38825,38826,38828,38830,38832,38833,38835,38837,38838,38839,38840,38841,38842,38843,38844,38845,38846,38847,38848,38849,38850,38851,38852,38853,38854,38855,38856,38857,38858,38859,38860,38861,38862,38863,38864,38865,38866,38867,38868,38869,38870,38871,38872,38873,38874,38875,38876,38877,38878,38879,38880,38881,38882,38883,38884,38885,38888,38894,38895,38896,38897,38898,38900,38903,38904,38905,38906,38907,38908,38909,38910,38911,38912,38913,38914,38915,38916,38917,38918,38919,38920,38921,38922,38923,38924,38925,38926,24636,24669,24666,24679,24641,24665,24675,24747,24838,24845,24925,25001,24989,25035,25041,25094,32896,32895,27795,27894,28156,30710,30712,30720,30729,30743,30744,30737,26027,30765,30748,30749,30777,30778,30779,30751,30780,30757,30764,30755,30761,30798,30829,30806,30807,30758,30800,30791,30796,30826,30875,30867,30874,30855,30876,30881,30883,30898,30905,30885,30932,30937,30921,30956,30962,30981,30964,30995,31012,31006,31028,40859,40697,40699,40700,30449,30468,30477,30457,30471,30472,30490,30498,30489,30509,30502,30517,30520,30544,30545,30535,30531,30554,30568,38927,38928,38929,38930,38931,38932,38933,38934,38935,38936,38937,38938,38939,38940,38941,38942,38943,38944,38945,38946,38947,38948,38949,38950,38951,38952,38953,38954,38955,38956,38957,38958,38959,38960,38961,38962,38963,38964,38965,38966,38967,38968,38969,38970,38971,38972,38973,38974,38975,38976,38977,38978,38979,38980,38981,38982,38983,38984,38985,38986,38987,38988,38989,38990,38991,38992,38993,38994,38995,38996,38997,38998,38999,39000,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39017,39018,39019,39020,39021,39022,30562,30565,30591,30605,30589,30592,30604,30609,30623,30624,30640,30645,30653,30010,30016,30030,30027,30024,30043,30066,30073,30083,32600,32609,32607,35400,32616,32628,32625,32633,32641,32638,30413,30437,34866,38021,38022,38023,38027,38026,38028,38029,38031,38032,38036,38039,38037,38042,38043,38044,38051,38052,38059,38058,38061,38060,38063,38064,38066,38068,38070,38071,38072,38073,38074,38076,38077,38079,38084,38088,38089,38090,38091,38092,38093,38094,38096,38097,38098,38101,38102,38103,38105,38104,38107,38110,38111,38112,38114,38116,38117,38119,38120,38122,39023,39024,39025,39026,39027,39028,39051,39054,39058,39061,39065,39075,39080,39081,39082,39083,39084,39085,39086,39087,39088,39089,39090,39091,39092,39093,39094,39095,39096,39097,39098,39099,39100,39101,39102,39103,39104,39105,39106,39107,39108,39109,39110,39111,39112,39113,39114,39115,39116,39117,39119,39120,39124,39126,39127,39131,39132,39133,39136,39137,39138,39139,39140,39141,39142,39145,39146,39147,39148,39149,39150,39151,39152,39153,39154,39155,39156,39157,39158,39159,39160,39161,39162,39163,39164,39165,39166,39167,39168,39169,39170,39171,39172,39173,39174,39175,38121,38123,38126,38127,38131,38132,38133,38135,38137,38140,38141,38143,38147,38146,38150,38151,38153,38154,38157,38158,38159,38162,38163,38164,38165,38166,38168,38171,38173,38174,38175,38178,38186,38187,38185,38188,38193,38194,38196,38198,38199,38200,38204,38206,38207,38210,38197,38212,38213,38214,38217,38220,38222,38223,38226,38227,38228,38230,38231,38232,38233,38235,38238,38239,38237,38241,38242,38244,38245,38246,38247,38248,38249,38250,38251,38252,38255,38257,38258,38259,38202,30695,30700,38601,31189,31213,31203,31211,31238,23879,31235,31234,31262,31252,39176,39177,39178,39179,39180,39182,39183,39185,39186,39187,39188,39189,39190,39191,39192,39193,39194,39195,39196,39197,39198,39199,39200,39201,39202,39203,39204,39205,39206,39207,39208,39209,39210,39211,39212,39213,39215,39216,39217,39218,39219,39220,39221,39222,39223,39224,39225,39226,39227,39228,39229,39230,39231,39232,39233,39234,39235,39236,39237,39238,39239,39240,39241,39242,39243,39244,39245,39246,39247,39248,39249,39250,39251,39254,39255,39256,39257,39258,39259,39260,39261,39262,39263,39264,39265,39266,39268,39270,39283,39288,39289,39291,39294,39298,39299,39305,31289,31287,31313,40655,39333,31344,30344,30350,30355,30361,30372,29918,29920,29996,40480,40482,40488,40489,40490,40491,40492,40498,40497,40502,40504,40503,40505,40506,40510,40513,40514,40516,40518,40519,40520,40521,40523,40524,40526,40529,40533,40535,40538,40539,40540,40542,40547,40550,40551,40552,40553,40554,40555,40556,40561,40557,40563,30098,30100,30102,30112,30109,30124,30115,30131,30132,30136,30148,30129,30128,30147,30146,30166,30157,30179,30184,30182,30180,30187,30183,30211,30193,30204,30207,30224,30208,30213,30220,30231,30218,30245,30232,30229,30233,39308,39310,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39334,39335,39337,39338,39339,39340,39341,39342,39343,39344,39345,39346,39347,39348,39349,39350,39351,39352,39353,39354,39355,39356,39357,39358,39359,39360,39361,39362,39363,39364,39365,39366,39367,39368,39369,39370,39371,39372,39373,39374,39375,39376,39377,39378,39379,39380,39381,39382,39383,39384,39385,39386,39387,39388,39389,39390,39391,39392,39393,39394,39395,39396,39397,39398,39399,39400,39401,39402,39403,39404,39405,39406,39407,39408,39409,39410,39411,39412,39413,39414,39415,39416,39417,30235,30268,30242,30240,30272,30253,30256,30271,30261,30275,30270,30259,30285,30302,30292,30300,30294,30315,30319,32714,31462,31352,31353,31360,31366,31368,31381,31398,31392,31404,31400,31405,31411,34916,34921,34930,34941,34943,34946,34978,35014,34999,35004,35017,35042,35022,35043,35045,35057,35098,35068,35048,35070,35056,35105,35097,35091,35099,35082,35124,35115,35126,35137,35174,35195,30091,32997,30386,30388,30684,32786,32788,32790,32796,32800,32802,32805,32806,32807,32809,32808,32817,32779,32821,32835,32838,32845,32850,32873,32881,35203,39032,39040,39043,39418,39419,39420,39421,39422,39423,39424,39425,39426,39427,39428,39429,39430,39431,39432,39433,39434,39435,39436,39437,39438,39439,39440,39441,39442,39443,39444,39445,39446,39447,39448,39449,39450,39451,39452,39453,39454,39455,39456,39457,39458,39459,39460,39461,39462,39463,39464,39465,39466,39467,39468,39469,39470,39471,39472,39473,39474,39475,39476,39477,39478,39479,39480,39481,39482,39483,39484,39485,39486,39487,39488,39489,39490,39491,39492,39493,39494,39495,39496,39497,39498,39499,39500,39501,39502,39503,39504,39505,39506,39507,39508,39509,39510,39511,39512,39513,39049,39052,39053,39055,39060,39066,39067,39070,39071,39073,39074,39077,39078,34381,34388,34412,34414,34431,34426,34428,34427,34472,34445,34443,34476,34461,34471,34467,34474,34451,34473,34486,34500,34485,34510,34480,34490,34481,34479,34505,34511,34484,34537,34545,34546,34541,34547,34512,34579,34526,34548,34527,34520,34513,34563,34567,34552,34568,34570,34573,34569,34595,34619,34590,34597,34606,34586,34622,34632,34612,34609,34601,34615,34623,34690,34594,34685,34686,34683,34656,34672,34636,34670,34699,34643,34659,34684,34660,34649,34661,34707,34735,34728,34770,39514,39515,39516,39517,39518,39519,39520,39521,39522,39523,39524,39525,39526,39527,39528,39529,39530,39531,39538,39555,39561,39565,39566,39572,39573,39577,39590,39593,39594,39595,39596,39597,39598,39599,39602,39603,39604,39605,39609,39611,39613,39614,39615,39619,39620,39622,39623,39624,39625,39626,39629,39630,39631,39632,39634,39636,39637,39638,39639,39641,39642,39643,39644,39645,39646,39648,39650,39651,39652,39653,39655,39656,39657,39658,39660,39662,39664,39665,39666,39667,39668,39669,39670,39671,39672,39674,39676,39677,39678,39679,39680,39681,39682,39684,39685,39686,34758,34696,34693,34733,34711,34691,34731,34789,34732,34741,34739,34763,34771,34749,34769,34752,34762,34779,34794,34784,34798,34838,34835,34814,34826,34843,34849,34873,34876,32566,32578,32580,32581,33296,31482,31485,31496,31491,31492,31509,31498,31531,31503,31559,31544,31530,31513,31534,31537,31520,31525,31524,31539,31550,31518,31576,31578,31557,31605,31564,31581,31584,31598,31611,31586,31602,31601,31632,31654,31655,31672,31660,31645,31656,31621,31658,31644,31650,31659,31668,31697,31681,31692,31709,31706,31717,31718,31722,31756,31742,31740,31759,31766,31755,39687,39689,39690,39691,39692,39693,39694,39696,39697,39698,39700,39701,39702,39703,39704,39705,39706,39707,39708,39709,39710,39712,39713,39714,39716,39717,39718,39719,39720,39721,39722,39723,39724,39725,39726,39728,39729,39731,39732,39733,39734,39735,39736,39737,39738,39741,39742,39743,39744,39750,39754,39755,39756,39758,39760,39762,39763,39765,39766,39767,39768,39769,39770,39771,39772,39773,39774,39775,39776,39777,39778,39779,39780,39781,39782,39783,39784,39785,39786,39787,39788,39789,39790,39791,39792,39793,39794,39795,39796,39797,39798,39799,39800,39801,39802,39803,31775,31786,31782,31800,31809,31808,33278,33281,33282,33284,33260,34884,33313,33314,33315,33325,33327,33320,33323,33336,33339,33331,33332,33342,33348,33353,33355,33359,33370,33375,33384,34942,34949,34952,35032,35039,35166,32669,32671,32679,32687,32688,32690,31868,25929,31889,31901,31900,31902,31906,31922,31932,31933,31937,31943,31948,31949,31944,31941,31959,31976,33390,26280,32703,32718,32725,32741,32737,32742,32745,32750,32755,31992,32119,32166,32174,32327,32411,40632,40628,36211,36228,36244,36241,36273,36199,36205,35911,35913,37194,37200,37198,37199,37220,39804,39805,39806,39807,39808,39809,39810,39811,39812,39813,39814,39815,39816,39817,39818,39819,39820,39821,39822,39823,39824,39825,39826,39827,39828,39829,39830,39831,39832,39833,39834,39835,39836,39837,39838,39839,39840,39841,39842,39843,39844,39845,39846,39847,39848,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39859,39860,39861,39862,39863,39864,39865,39866,39867,39868,39869,39870,39871,39872,39873,39874,39875,39876,39877,39878,39879,39880,39881,39882,39883,39884,39885,39886,39887,39888,39889,39890,39891,39892,39893,39894,39895,39896,39897,39898,39899,37218,37217,37232,37225,37231,37245,37246,37234,37236,37241,37260,37253,37264,37261,37265,37282,37283,37290,37293,37294,37295,37301,37300,37306,35925,40574,36280,36331,36357,36441,36457,36277,36287,36284,36282,36292,36310,36311,36314,36318,36302,36303,36315,36294,36332,36343,36344,36323,36345,36347,36324,36361,36349,36372,36381,36383,36396,36398,36387,36399,36410,36416,36409,36405,36413,36401,36425,36417,36418,36433,36434,36426,36464,36470,36476,36463,36468,36485,36495,36500,36496,36508,36510,35960,35970,35978,35973,35992,35988,26011,35286,35294,35290,35292,39900,39901,39902,39903,39904,39905,39906,39907,39908,39909,39910,39911,39912,39913,39914,39915,39916,39917,39918,39919,39920,39921,39922,39923,39924,39925,39926,39927,39928,39929,39930,39931,39932,39933,39934,39935,39936,39937,39938,39939,39940,39941,39942,39943,39944,39945,39946,39947,39948,39949,39950,39951,39952,39953,39954,39955,39956,39957,39958,39959,39960,39961,39962,39963,39964,39965,39966,39967,39968,39969,39970,39971,39972,39973,39974,39975,39976,39977,39978,39979,39980,39981,39982,39983,39984,39985,39986,39987,39988,39989,39990,39991,39992,39993,39994,39995,35301,35307,35311,35390,35622,38739,38633,38643,38639,38662,38657,38664,38671,38670,38698,38701,38704,38718,40832,40835,40837,40838,40839,40840,40841,40842,40844,40702,40715,40717,38585,38588,38589,38606,38610,30655,38624,37518,37550,37576,37694,37738,37834,37775,37950,37995,40063,40066,40069,40070,40071,40072,31267,40075,40078,40080,40081,40082,40084,40085,40090,40091,40094,40095,40096,40097,40098,40099,40101,40102,40103,40104,40105,40107,40109,40110,40112,40113,40114,40115,40116,40117,40118,40119,40122,40123,40124,40125,40132,40133,40134,40135,40138,40139,39996,39997,39998,39999,40000,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011,40012,40013,40014,40015,40016,40017,40018,40019,40020,40021,40022,40023,40024,40025,40026,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40039,40040,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40059,40061,40062,40064,40067,40068,40073,40074,40076,40079,40083,40086,40087,40088,40089,40093,40106,40108,40111,40121,40126,40127,40128,40129,40130,40136,40137,40145,40146,40154,40155,40160,40161,40140,40141,40142,40143,40144,40147,40148,40149,40151,40152,40153,40156,40157,40159,40162,38780,38789,38801,38802,38804,38831,38827,38819,38834,38836,39601,39600,39607,40536,39606,39610,39612,39617,39616,39621,39618,39627,39628,39633,39749,39747,39751,39753,39752,39757,39761,39144,39181,39214,39253,39252,39647,39649,39654,39663,39659,39675,39661,39673,39688,39695,39699,39711,39715,40637,40638,32315,40578,40583,40584,40587,40594,37846,40605,40607,40667,40668,40669,40672,40671,40674,40681,40679,40677,40682,40687,40738,40748,40751,40761,40759,40765,40766,40772,40163,40164,40165,40166,40167,40168,40169,40170,40171,40172,40173,40174,40175,40176,40177,40178,40179,40180,40181,40182,40183,40184,40185,40186,40187,40188,40189,40190,40191,40192,40193,40194,40195,40196,40197,40198,40199,40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40226,40227,40228,40229,40230,40231,40232,40233,40234,40235,40236,40237,40238,40239,40240,40241,40242,40243,40244,40245,40246,40247,40248,40249,40250,40251,40252,40253,40254,40255,40256,40257,40258,57908,57909,57910,57911,57912,57913,57914,57915,57916,57917,57918,57919,57920,57921,57922,57923,57924,57925,57926,57927,57928,57929,57930,57931,57932,57933,57934,57935,57936,57937,57938,57939,57940,57941,57942,57943,57944,57945,57946,57947,57948,57949,57950,57951,57952,57953,57954,57955,57956,57957,57958,57959,57960,57961,57962,57963,57964,57965,57966,57967,57968,57969,57970,57971,57972,57973,57974,57975,57976,57977,57978,57979,57980,57981,57982,57983,57984,57985,57986,57987,57988,57989,57990,57991,57992,57993,57994,57995,57996,57997,57998,57999,58000,58001,40259,40260,40261,40262,40263,40264,40265,40266,40267,40268,40269,40270,40271,40272,40273,40274,40275,40276,40277,40278,40279,40280,40281,40282,40283,40284,40285,40286,40287,40288,40289,40290,40291,40292,40293,40294,40295,40296,40297,40298,40299,40300,40301,40302,40303,40304,40305,40306,40307,40308,40309,40310,40311,40312,40313,40314,40315,40316,40317,40318,40319,40320,40321,40322,40323,40324,40325,40326,40327,40328,40329,40330,40331,40332,40333,40334,40335,40336,40337,40338,40339,40340,40341,40342,40343,40344,40345,40346,40347,40348,40349,40350,40351,40352,40353,40354,58002,58003,58004,58005,58006,58007,58008,58009,58010,58011,58012,58013,58014,58015,58016,58017,58018,58019,58020,58021,58022,58023,58024,58025,58026,58027,58028,58029,58030,58031,58032,58033,58034,58035,58036,58037,58038,58039,58040,58041,58042,58043,58044,58045,58046,58047,58048,58049,58050,58051,58052,58053,58054,58055,58056,58057,58058,58059,58060,58061,58062,58063,58064,58065,58066,58067,58068,58069,58070,58071,58072,58073,58074,58075,58076,58077,58078,58079,58080,58081,58082,58083,58084,58085,58086,58087,58088,58089,58090,58091,58092,58093,58094,58095,40355,40356,40357,40358,40359,40360,40361,40362,40363,40364,40365,40366,40367,40368,40369,40370,40371,40372,40373,40374,40375,40376,40377,40378,40379,40380,40381,40382,40383,40384,40385,40386,40387,40388,40389,40390,40391,40392,40393,40394,40395,40396,40397,40398,40399,40400,40401,40402,40403,40404,40405,40406,40407,40408,40409,40410,40411,40412,40413,40414,40415,40416,40417,40418,40419,40420,40421,40422,40423,40424,40425,40426,40427,40428,40429,40430,40431,40432,40433,40434,40435,40436,40437,40438,40439,40440,40441,40442,40443,40444,40445,40446,40447,40448,40449,40450,58096,58097,58098,58099,58100,58101,58102,58103,58104,58105,58106,58107,58108,58109,58110,58111,58112,58113,58114,58115,58116,58117,58118,58119,58120,58121,58122,58123,58124,58125,58126,58127,58128,58129,58130,58131,58132,58133,58134,58135,58136,58137,58138,58139,58140,58141,58142,58143,58144,58145,58146,58147,58148,58149,58150,58151,58152,58153,58154,58155,58156,58157,58158,58159,58160,58161,58162,58163,58164,58165,58166,58167,58168,58169,58170,58171,58172,58173,58174,58175,58176,58177,58178,58179,58180,58181,58182,58183,58184,58185,58186,58187,58188,58189,40451,40452,40453,40454,40455,40456,40457,40458,40459,40460,40461,40462,40463,40464,40465,40466,40467,40468,40469,40470,40471,40472,40473,40474,40475,40476,40477,40478,40484,40487,40494,40496,40500,40507,40508,40512,40525,40528,40530,40531,40532,40534,40537,40541,40543,40544,40545,40546,40549,40558,40559,40562,40564,40565,40566,40567,40568,40569,40570,40571,40572,40573,40576,40577,40579,40580,40581,40582,40585,40586,40588,40589,40590,40591,40592,40593,40596,40597,40598,40599,40600,40601,40602,40603,40604,40606,40608,40609,40610,40611,40612,40613,40615,40616,40617,40618,58190,58191,58192,58193,58194,58195,58196,58197,58198,58199,58200,58201,58202,58203,58204,58205,58206,58207,58208,58209,58210,58211,58212,58213,58214,58215,58216,58217,58218,58219,58220,58221,58222,58223,58224,58225,58226,58227,58228,58229,58230,58231,58232,58233,58234,58235,58236,58237,58238,58239,58240,58241,58242,58243,58244,58245,58246,58247,58248,58249,58250,58251,58252,58253,58254,58255,58256,58257,58258,58259,58260,58261,58262,58263,58264,58265,58266,58267,58268,58269,58270,58271,58272,58273,58274,58275,58276,58277,58278,58279,58280,58281,58282,58283,40619,40620,40621,40622,40623,40624,40625,40626,40627,40629,40630,40631,40633,40634,40636,40639,40640,40641,40642,40643,40645,40646,40647,40648,40650,40651,40652,40656,40658,40659,40661,40662,40663,40665,40666,40670,40673,40675,40676,40678,40680,40683,40684,40685,40686,40688,40689,40690,40691,40692,40693,40694,40695,40696,40698,40701,40703,40704,40705,40706,40707,40708,40709,40710,40711,40712,40713,40714,40716,40719,40721,40722,40724,40725,40726,40728,40730,40731,40732,40733,40734,40735,40737,40739,40740,40741,40742,40743,40744,40745,40746,40747,40749,40750,40752,40753,58284,58285,58286,58287,58288,58289,58290,58291,58292,58293,58294,58295,58296,58297,58298,58299,58300,58301,58302,58303,58304,58305,58306,58307,58308,58309,58310,58311,58312,58313,58314,58315,58316,58317,58318,58319,58320,58321,58322,58323,58324,58325,58326,58327,58328,58329,58330,58331,58332,58333,58334,58335,58336,58337,58338,58339,58340,58341,58342,58343,58344,58345,58346,58347,58348,58349,58350,58351,58352,58353,58354,58355,58356,58357,58358,58359,58360,58361,58362,58363,58364,58365,58366,58367,58368,58369,58370,58371,58372,58373,58374,58375,58376,58377,40754,40755,40756,40757,40758,40760,40762,40764,40767,40768,40769,40770,40771,40773,40774,40775,40776,40777,40778,40779,40780,40781,40782,40783,40786,40787,40788,40789,40790,40791,40792,40793,40794,40795,40796,40797,40798,40799,40800,40801,40802,40803,40804,40805,40806,40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,40827,40828,40829,40830,40833,40834,40845,40846,40847,40848,40849,40850,40851,40852,40853,40854,40855,40856,40860,40861,40862,40865,40866,40867,40868,40869,63788,63865,63893,63975,63985,58378,58379,58380,58381,58382,58383,58384,58385,58386,58387,58388,58389,58390,58391,58392,58393,58394,58395,58396,58397,58398,58399,58400,58401,58402,58403,58404,58405,58406,58407,58408,58409,58410,58411,58412,58413,58414,58415,58416,58417,58418,58419,58420,58421,58422,58423,58424,58425,58426,58427,58428,58429,58430,58431,58432,58433,58434,58435,58436,58437,58438,58439,58440,58441,58442,58443,58444,58445,58446,58447,58448,58449,58450,58451,58452,58453,58454,58455,58456,58457,58458,58459,58460,58461,58462,58463,58464,58465,58466,58467,58468,58469,58470,58471,64012,64013,64014,64015,64017,64019,64020,64024,64031,64032,64033,64035,64036,64039,64040,64041,11905,59414,59415,59416,11908,13427,13383,11912,11915,59422,13726,13850,13838,11916,11927,14702,14616,59430,14799,14815,14963,14800,59435,59436,15182,15470,15584,11943,59441,59442,11946,16470,16735,11950,17207,11955,11958,11959,59451,17329,17324,11963,17373,17622,18017,17996,59459,18211,18217,18300,18317,11978,18759,18810,18813,18818,18819,18821,18822,18847,18843,18871,18870,59476,59477,19619,19615,19616,19617,19575,19618,19731,19732,19733,19734,19735,19736,19737,19886,59492,58472,58473,58474,58475,58476,58477,58478,58479,58480,58481,58482,58483,58484,58485,58486,58487,58488,58489,58490,58491,58492,58493,58494,58495,58496,58497,58498,58499,58500,58501,58502,58503,58504,58505,58506,58507,58508,58509,58510,58511,58512,58513,58514,58515,58516,58517,58518,58519,58520,58521,58522,58523,58524,58525,58526,58527,58528,58529,58530,58531,58532,58533,58534,58535,58536,58537,58538,58539,58540,58541,58542,58543,58544,58545,58546,58547,58548,58549,58550,58551,58552,58553,58554,58555,58556,58557,58558,58559,58560,58561,58562,58563,58564,58565],
28018 "gb18030-ranges":[[0,128],[36,165],[38,169],[45,178],[50,184],[81,216],[89,226],[95,235],[96,238],[100,244],[103,248],[104,251],[105,253],[109,258],[126,276],[133,284],[148,300],[172,325],[175,329],[179,334],[208,364],[306,463],[307,465],[308,467],[309,469],[310,471],[311,473],[312,475],[313,477],[341,506],[428,594],[443,610],[544,712],[545,716],[558,730],[741,930],[742,938],[749,962],[750,970],[805,1026],[819,1104],[820,1106],[7922,8209],[7924,8215],[7925,8218],[7927,8222],[7934,8231],[7943,8241],[7944,8244],[7945,8246],[7950,8252],[8062,8365],[8148,8452],[8149,8454],[8152,8458],[8164,8471],[8174,8482],[8236,8556],[8240,8570],[8262,8596],[8264,8602],[8374,8713],[8380,8720],[8381,8722],[8384,8726],[8388,8731],[8390,8737],[8392,8740],[8393,8742],[8394,8748],[8396,8751],[8401,8760],[8406,8766],[8416,8777],[8419,8781],[8424,8787],[8437,8802],[8439,8808],[8445,8816],[8482,8854],[8485,8858],[8496,8870],[8521,8896],[8603,8979],[8936,9322],[8946,9372],[9046,9548],[9050,9588],[9063,9616],[9066,9622],[9076,9634],[9092,9652],[9100,9662],[9108,9672],[9111,9676],[9113,9680],[9131,9702],[9162,9735],[9164,9738],[9218,9793],[9219,9795],[11329,11906],[11331,11909],[11334,11913],[11336,11917],[11346,11928],[11361,11944],[11363,11947],[11366,11951],[11370,11956],[11372,11960],[11375,11964],[11389,11979],[11682,12284],[11686,12292],[11687,12312],[11692,12319],[11694,12330],[11714,12351],[11716,12436],[11723,12447],[11725,12535],[11730,12543],[11736,12586],[11982,12842],[11989,12850],[12102,12964],[12336,13200],[12348,13215],[12350,13218],[12384,13253],[12393,13263],[12395,13267],[12397,13270],[12510,13384],[12553,13428],[12851,13727],[12962,13839],[12973,13851],[13738,14617],[13823,14703],[13919,14801],[13933,14816],[14080,14964],[14298,15183],[14585,15471],[14698,15585],[15583,16471],[15847,16736],[16318,17208],[16434,17325],[16438,17330],[16481,17374],[16729,17623],[17102,17997],[17122,18018],[17315,18212],[17320,18218],[17402,18301],[17418,18318],[17859,18760],[17909,18811],[17911,18814],[17915,18820],[17916,18823],[17936,18844],[17939,18848],[17961,18872],[18664,19576],[18703,19620],[18814,19738],[18962,19887],[19043,40870],[33469,59244],[33470,59336],[33471,59367],[33484,59413],[33485,59417],[33490,59423],[33497,59431],[33501,59437],[33505,59443],[33513,59452],[33520,59460],[33536,59478],[33550,59493],[37845,63789],[37921,63866],[37948,63894],[38029,63976],[38038,63986],[38064,64016],[38065,64018],[38066,64021],[38069,64025],[38075,64034],[38076,64037],[38078,64042],[39108,65074],[39109,65093],[39113,65107],[39114,65112],[39115,65127],[39116,65132],[39265,65375],[39394,65510],[189000,65536]],
28019 "jis0208":[12288,12289,12290,65292,65294,12539,65306,65307,65311,65281,12443,12444,180,65344,168,65342,65507,65343,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,8213,8208,65295,65340,65374,8741,65372,8230,8229,8216,8217,8220,8221,65288,65289,12308,12309,65339,65341,65371,65373,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,65291,65293,177,215,247,65309,8800,65308,65310,8806,8807,8734,8756,9794,9792,176,8242,8243,8451,65509,65284,65504,65505,65285,65283,65286,65290,65312,167,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8251,12306,8594,8592,8593,8595,12307,null,null,null,null,null,null,null,null,null,null,null,8712,8715,8838,8839,8834,8835,8746,8745,null,null,null,null,null,null,null,null,8743,8744,65506,8658,8660,8704,8707,null,null,null,null,null,null,null,null,null,null,null,8736,8869,8978,8706,8711,8801,8786,8810,8811,8730,8765,8733,8757,8747,8748,null,null,null,null,null,null,null,8491,8240,9839,9837,9834,8224,8225,182,null,null,null,null,9711,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,null,null,null,null,null,null,null,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,null,null,null,null,null,null,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,null,null,null,null,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,13129,13076,13090,13133,13080,13095,13059,13110,13137,13143,13069,13094,13091,13099,13130,13115,13212,13213,13214,13198,13199,13252,13217,null,null,null,null,null,null,null,null,13179,12317,12319,8470,13261,8481,12964,12965,12966,12967,12968,12849,12850,12857,13182,13181,13180,8786,8801,8747,8750,8721,8730,8869,8736,8735,8895,8757,8745,8746,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20124,21782,23043,38463,21696,24859,25384,23030,36898,33909,33564,31312,24746,25569,28197,26093,33894,33446,39925,26771,22311,26017,25201,23451,22992,34427,39156,32098,32190,39822,25110,31903,34999,23433,24245,25353,26263,26696,38343,38797,26447,20197,20234,20301,20381,20553,22258,22839,22996,23041,23561,24799,24847,24944,26131,26885,28858,30031,30064,31227,32173,32239,32963,33806,34915,35586,36949,36986,21307,20117,20133,22495,32946,37057,30959,19968,22769,28322,36920,31282,33576,33419,39983,20801,21360,21693,21729,22240,23035,24341,39154,28139,32996,34093,38498,38512,38560,38907,21515,21491,23431,28879,32701,36802,38632,21359,40284,31418,19985,30867,33276,28198,22040,21764,27421,34074,39995,23013,21417,28006,29916,38287,22082,20113,36939,38642,33615,39180,21473,21942,23344,24433,26144,26355,26628,27704,27891,27945,29787,30408,31310,38964,33521,34907,35424,37613,28082,30123,30410,39365,24742,35585,36234,38322,27022,21421,20870,22290,22576,22852,23476,24310,24616,25513,25588,27839,28436,28814,28948,29017,29141,29503,32257,33398,33489,34199,36960,37467,40219,22633,26044,27738,29989,20985,22830,22885,24448,24540,25276,26106,27178,27431,27572,29579,32705,35158,40236,40206,40644,23713,27798,33659,20740,23627,25014,33222,26742,29281,20057,20474,21368,24681,28201,31311,38899,19979,21270,20206,20309,20285,20385,20339,21152,21487,22025,22799,23233,23478,23521,31185,26247,26524,26550,27468,27827,28779,29634,31117,31166,31292,31623,33457,33499,33540,33655,33775,33747,34662,35506,22057,36008,36838,36942,38686,34442,20420,23784,25105,29273,30011,33253,33469,34558,36032,38597,39187,39381,20171,20250,35299,22238,22602,22730,24315,24555,24618,24724,24674,25040,25106,25296,25913,39745,26214,26800,28023,28784,30028,30342,32117,33445,34809,38283,38542,35997,20977,21182,22806,21683,23475,23830,24936,27010,28079,30861,33995,34903,35442,37799,39608,28012,39336,34521,22435,26623,34510,37390,21123,22151,21508,24275,25313,25785,26684,26680,27579,29554,30906,31339,35226,35282,36203,36611,37101,38307,38548,38761,23398,23731,27005,38989,38990,25499,31520,27179,27263,26806,39949,28511,21106,21917,24688,25324,27963,28167,28369,33883,35088,36676,19988,39993,21494,26907,27194,38788,26666,20828,31427,33970,37340,37772,22107,40232,26658,33541,33841,31909,21000,33477,29926,20094,20355,20896,23506,21002,21208,21223,24059,21914,22570,23014,23436,23448,23515,24178,24185,24739,24863,24931,25022,25563,25954,26577,26707,26874,27454,27475,27735,28450,28567,28485,29872,29976,30435,30475,31487,31649,31777,32233,32566,32752,32925,33382,33694,35251,35532,36011,36996,37969,38291,38289,38306,38501,38867,39208,33304,20024,21547,23736,24012,29609,30284,30524,23721,32747,36107,38593,38929,38996,39000,20225,20238,21361,21916,22120,22522,22855,23305,23492,23696,24076,24190,24524,25582,26426,26071,26082,26399,26827,26820,27231,24112,27589,27671,27773,30079,31048,23395,31232,32000,24509,35215,35352,36020,36215,36556,36637,39138,39438,39740,20096,20605,20736,22931,23452,25135,25216,25836,27450,29344,30097,31047,32681,34811,35516,35696,25516,33738,38816,21513,21507,21931,26708,27224,35440,30759,26485,40653,21364,23458,33050,34384,36870,19992,20037,20167,20241,21450,21560,23470,24339,24613,25937,26429,27714,27762,27875,28792,29699,31350,31406,31496,32026,31998,32102,26087,29275,21435,23621,24040,25298,25312,25369,28192,34394,35377,36317,37624,28417,31142,39770,20136,20139,20140,20379,20384,20689,20807,31478,20849,20982,21332,21281,21375,21483,21932,22659,23777,24375,24394,24623,24656,24685,25375,25945,27211,27841,29378,29421,30703,33016,33029,33288,34126,37111,37857,38911,39255,39514,20208,20957,23597,26241,26989,23616,26354,26997,29577,26704,31873,20677,21220,22343,24062,37670,26020,27427,27453,29748,31105,31165,31563,32202,33465,33740,34943,35167,35641,36817,37329,21535,37504,20061,20534,21477,21306,29399,29590,30697,33510,36527,39366,39368,39378,20855,24858,34398,21936,31354,20598,23507,36935,38533,20018,27355,37351,23633,23624,25496,31391,27795,38772,36705,31402,29066,38536,31874,26647,32368,26705,37740,21234,21531,34219,35347,32676,36557,37089,21350,34952,31041,20418,20670,21009,20804,21843,22317,29674,22411,22865,24418,24452,24693,24950,24935,25001,25522,25658,25964,26223,26690,28179,30054,31293,31995,32076,32153,32331,32619,33550,33610,34509,35336,35427,35686,36605,38938,40335,33464,36814,39912,21127,25119,25731,28608,38553,26689,20625,27424,27770,28500,31348,32080,34880,35363,26376,20214,20537,20518,20581,20860,21048,21091,21927,22287,22533,23244,24314,25010,25080,25331,25458,26908,27177,29309,29356,29486,30740,30831,32121,30476,32937,35211,35609,36066,36562,36963,37749,38522,38997,39443,40568,20803,21407,21427,24187,24358,28187,28304,29572,29694,32067,33335,35328,35578,38480,20046,20491,21476,21628,22266,22993,23396,24049,24235,24359,25144,25925,26543,28246,29392,31946,34996,32929,32993,33776,34382,35463,36328,37431,38599,39015,40723,20116,20114,20237,21320,21577,21566,23087,24460,24481,24735,26791,27278,29786,30849,35486,35492,35703,37264,20062,39881,20132,20348,20399,20505,20502,20809,20844,21151,21177,21246,21402,21475,21521,21518,21897,22353,22434,22909,23380,23389,23439,24037,24039,24055,24184,24195,24218,24247,24344,24658,24908,25239,25304,25511,25915,26114,26179,26356,26477,26657,26775,27083,27743,27946,28009,28207,28317,30002,30343,30828,31295,31968,32005,32024,32094,32177,32789,32771,32943,32945,33108,33167,33322,33618,34892,34913,35611,36002,36092,37066,37237,37489,30783,37628,38308,38477,38917,39321,39640,40251,21083,21163,21495,21512,22741,25335,28640,35946,36703,40633,20811,21051,21578,22269,31296,37239,40288,40658,29508,28425,33136,29969,24573,24794,39592,29403,36796,27492,38915,20170,22256,22372,22718,23130,24680,25031,26127,26118,26681,26801,28151,30165,32058,33390,39746,20123,20304,21449,21766,23919,24038,24046,26619,27801,29811,30722,35408,37782,35039,22352,24231,25387,20661,20652,20877,26368,21705,22622,22971,23472,24425,25165,25505,26685,27507,28168,28797,37319,29312,30741,30758,31085,25998,32048,33756,35009,36617,38555,21092,22312,26448,32618,36001,20916,22338,38442,22586,27018,32948,21682,23822,22524,30869,40442,20316,21066,21643,25662,26152,26388,26613,31364,31574,32034,37679,26716,39853,31545,21273,20874,21047,23519,25334,25774,25830,26413,27578,34217,38609,30352,39894,25420,37638,39851,30399,26194,19977,20632,21442,23665,24808,25746,25955,26719,29158,29642,29987,31639,32386,34453,35715,36059,37240,39184,26028,26283,27531,20181,20180,20282,20351,21050,21496,21490,21987,22235,22763,22987,22985,23039,23376,23629,24066,24107,24535,24605,25351,25903,23388,26031,26045,26088,26525,27490,27515,27663,29509,31049,31169,31992,32025,32043,32930,33026,33267,35222,35422,35433,35430,35468,35566,36039,36060,38604,39164,27503,20107,20284,20365,20816,23383,23546,24904,25345,26178,27425,28363,27835,29246,29885,30164,30913,31034,32780,32819,33258,33940,36766,27728,40575,24335,35672,40235,31482,36600,23437,38635,19971,21489,22519,22833,23241,23460,24713,28287,28422,30142,36074,23455,34048,31712,20594,26612,33437,23649,34122,32286,33294,20889,23556,25448,36198,26012,29038,31038,32023,32773,35613,36554,36974,34503,37034,20511,21242,23610,26451,28796,29237,37196,37320,37675,33509,23490,24369,24825,20027,21462,23432,25163,26417,27530,29417,29664,31278,33131,36259,37202,39318,20754,21463,21610,23551,25480,27193,32172,38656,22234,21454,21608,23447,23601,24030,20462,24833,25342,27954,31168,31179,32066,32333,32722,33261,33311,33936,34886,35186,35728,36468,36655,36913,37195,37228,38598,37276,20160,20303,20805,21313,24467,25102,26580,27713,28171,29539,32294,37325,37507,21460,22809,23487,28113,31069,32302,31899,22654,29087,20986,34899,36848,20426,23803,26149,30636,31459,33308,39423,20934,24490,26092,26991,27529,28147,28310,28516,30462,32020,24033,36981,37255,38918,20966,21021,25152,26257,26329,28186,24246,32210,32626,26360,34223,34295,35576,21161,21465,22899,24207,24464,24661,37604,38500,20663,20767,21213,21280,21319,21484,21736,21830,21809,22039,22888,22974,23100,23477,23558,23567,23569,23578,24196,24202,24288,24432,25215,25220,25307,25484,25463,26119,26124,26157,26230,26494,26786,27167,27189,27836,28040,28169,28248,28988,28966,29031,30151,30465,30813,30977,31077,31216,31456,31505,31911,32057,32918,33750,33931,34121,34909,35059,35359,35388,35412,35443,35937,36062,37284,37478,37758,37912,38556,38808,19978,19976,19998,20055,20887,21104,22478,22580,22732,23330,24120,24773,25854,26465,26454,27972,29366,30067,31331,33976,35698,37304,37664,22065,22516,39166,25325,26893,27542,29165,32340,32887,33394,35302,39135,34645,36785,23611,20280,20449,20405,21767,23072,23517,23529,24515,24910,25391,26032,26187,26862,27035,28024,28145,30003,30137,30495,31070,31206,32051,33251,33455,34218,35242,35386,36523,36763,36914,37341,38663,20154,20161,20995,22645,22764,23563,29978,23613,33102,35338,36805,38499,38765,31525,35535,38920,37218,22259,21416,36887,21561,22402,24101,25512,27700,28810,30561,31883,32736,34928,36930,37204,37648,37656,38543,29790,39620,23815,23913,25968,26530,36264,38619,25454,26441,26905,33733,38935,38592,35070,28548,25722,23544,19990,28716,30045,26159,20932,21046,21218,22995,24449,24615,25104,25919,25972,26143,26228,26866,26646,27491,28165,29298,29983,30427,31934,32854,22768,35069,35199,35488,35475,35531,36893,37266,38738,38745,25993,31246,33030,38587,24109,24796,25114,26021,26132,26512,30707,31309,31821,32318,33034,36012,36196,36321,36447,30889,20999,25305,25509,25666,25240,35373,31363,31680,35500,38634,32118,33292,34633,20185,20808,21315,21344,23459,23554,23574,24029,25126,25159,25776,26643,26676,27849,27973,27927,26579,28508,29006,29053,26059,31359,31661,32218,32330,32680,33146,33307,33337,34214,35438,36046,36341,36984,36983,37549,37521,38275,39854,21069,21892,28472,28982,20840,31109,32341,33203,31950,22092,22609,23720,25514,26366,26365,26970,29401,30095,30094,30990,31062,31199,31895,32032,32068,34311,35380,38459,36961,40736,20711,21109,21452,21474,20489,21930,22766,22863,29245,23435,23652,21277,24803,24819,25436,25475,25407,25531,25805,26089,26361,24035,27085,27133,28437,29157,20105,30185,30456,31379,31967,32207,32156,32865,33609,33624,33900,33980,34299,35013,36208,36865,36973,37783,38684,39442,20687,22679,24974,33235,34101,36104,36896,20419,20596,21063,21363,24687,25417,26463,28204,36275,36895,20439,23646,36042,26063,32154,21330,34966,20854,25539,23384,23403,23562,25613,26449,36956,20182,22810,22826,27760,35409,21822,22549,22949,24816,25171,26561,33333,26965,38464,39364,39464,20307,22534,23550,32784,23729,24111,24453,24608,24907,25140,26367,27888,28382,32974,33151,33492,34955,36024,36864,36910,38538,40667,39899,20195,21488,22823,31532,37261,38988,40441,28381,28711,21331,21828,23429,25176,25246,25299,27810,28655,29730,35351,37944,28609,35582,33592,20967,34552,21482,21481,20294,36948,36784,22890,33073,24061,31466,36799,26842,35895,29432,40008,27197,35504,20025,21336,22022,22374,25285,25506,26086,27470,28129,28251,28845,30701,31471,31658,32187,32829,32966,34507,35477,37723,22243,22727,24382,26029,26262,27264,27573,30007,35527,20516,30693,22320,24347,24677,26234,27744,30196,31258,32622,33268,34584,36933,39347,31689,30044,31481,31569,33988,36880,31209,31378,33590,23265,30528,20013,20210,23449,24544,25277,26172,26609,27880,34411,34935,35387,37198,37619,39376,27159,28710,29482,33511,33879,36015,19969,20806,20939,21899,23541,24086,24115,24193,24340,24373,24427,24500,25074,25361,26274,26397,28526,29266,30010,30522,32884,33081,33144,34678,35519,35548,36229,36339,37530,38263,38914,40165,21189,25431,30452,26389,27784,29645,36035,37806,38515,27941,22684,26894,27084,36861,37786,30171,36890,22618,26626,25524,27131,20291,28460,26584,36795,34086,32180,37716,26943,28528,22378,22775,23340,32044,29226,21514,37347,40372,20141,20302,20572,20597,21059,35998,21576,22564,23450,24093,24213,24237,24311,24351,24716,25269,25402,25552,26799,27712,30855,31118,31243,32224,33351,35330,35558,36420,36883,37048,37165,37336,40718,27877,25688,25826,25973,28404,30340,31515,36969,37841,28346,21746,24505,25764,36685,36845,37444,20856,22635,22825,23637,24215,28155,32399,29980,36028,36578,39003,28857,20253,27583,28593,30000,38651,20814,21520,22581,22615,22956,23648,24466,26007,26460,28193,30331,33759,36077,36884,37117,37709,30757,30778,21162,24230,22303,22900,24594,20498,20826,20908,20941,20992,21776,22612,22616,22871,23445,23798,23947,24764,25237,25645,26481,26691,26812,26847,30423,28120,28271,28059,28783,29128,24403,30168,31095,31561,31572,31570,31958,32113,21040,33891,34153,34276,35342,35588,35910,36367,36867,36879,37913,38518,38957,39472,38360,20685,21205,21516,22530,23566,24999,25758,27934,30643,31461,33012,33796,36947,37509,23776,40199,21311,24471,24499,28060,29305,30563,31167,31716,27602,29420,35501,26627,27233,20984,31361,26932,23626,40182,33515,23493,37193,28702,22136,23663,24775,25958,27788,35930,36929,38931,21585,26311,37389,22856,37027,20869,20045,20970,34201,35598,28760,25466,37707,26978,39348,32260,30071,21335,26976,36575,38627,27741,20108,23612,24336,36841,21250,36049,32905,34425,24319,26085,20083,20837,22914,23615,38894,20219,22922,24525,35469,28641,31152,31074,23527,33905,29483,29105,24180,24565,25467,25754,29123,31896,20035,24316,20043,22492,22178,24745,28611,32013,33021,33075,33215,36786,35223,34468,24052,25226,25773,35207,26487,27874,27966,29750,30772,23110,32629,33453,39340,20467,24259,25309,25490,25943,26479,30403,29260,32972,32954,36649,37197,20493,22521,23186,26757,26995,29028,29437,36023,22770,36064,38506,36889,34687,31204,30695,33833,20271,21093,21338,25293,26575,27850,30333,31636,31893,33334,34180,36843,26333,28448,29190,32283,33707,39361,40614,20989,31665,30834,31672,32903,31560,27368,24161,32908,30033,30048,20843,37474,28300,30330,37271,39658,20240,32624,25244,31567,38309,40169,22138,22617,34532,38588,20276,21028,21322,21453,21467,24070,25644,26001,26495,27710,27726,29256,29359,29677,30036,32321,33324,34281,36009,31684,37318,29033,38930,39151,25405,26217,30058,30436,30928,34115,34542,21290,21329,21542,22915,24199,24444,24754,25161,25209,25259,26000,27604,27852,30130,30382,30865,31192,32203,32631,32933,34987,35513,36027,36991,38750,39131,27147,31800,20633,23614,24494,26503,27608,29749,30473,32654,40763,26570,31255,21305,30091,39661,24422,33181,33777,32920,24380,24517,30050,31558,36924,26727,23019,23195,32016,30334,35628,20469,24426,27161,27703,28418,29922,31080,34920,35413,35961,24287,25551,30149,31186,33495,37672,37618,33948,34541,39981,21697,24428,25996,27996,28693,36007,36051,38971,25935,29942,19981,20184,22496,22827,23142,23500,20904,24067,24220,24598,25206,25975,26023,26222,28014,29238,31526,33104,33178,33433,35676,36000,36070,36212,38428,38468,20398,25771,27494,33310,33889,34154,37096,23553,26963,39080,33914,34135,20239,21103,24489,24133,26381,31119,33145,35079,35206,28149,24343,25173,27832,20175,29289,39826,20998,21563,22132,22707,24996,25198,28954,22894,31881,31966,32027,38640,25991,32862,19993,20341,20853,22592,24163,24179,24330,26564,20006,34109,38281,38491,31859,38913,20731,22721,30294,30887,21029,30629,34065,31622,20559,22793,29255,31687,32232,36794,36820,36941,20415,21193,23081,24321,38829,20445,33303,37610,22275,25429,27497,29995,35036,36628,31298,21215,22675,24917,25098,26286,27597,31807,33769,20515,20472,21253,21574,22577,22857,23453,23792,23791,23849,24214,25265,25447,25918,26041,26379,27861,27873,28921,30770,32299,32990,33459,33804,34028,34562,35090,35370,35914,37030,37586,39165,40179,40300,20047,20129,20621,21078,22346,22952,24125,24536,24537,25151,26292,26395,26576,26834,20882,32033,32938,33192,35584,35980,36031,37502,38450,21536,38956,21271,20693,21340,22696,25778,26420,29287,30566,31302,37350,21187,27809,27526,22528,24140,22868,26412,32763,20961,30406,25705,30952,39764,40635,22475,22969,26151,26522,27598,21737,27097,24149,33180,26517,39850,26622,40018,26717,20134,20451,21448,25273,26411,27819,36804,20397,32365,40639,19975,24930,28288,28459,34067,21619,26410,39749,24051,31637,23724,23494,34588,28234,34001,31252,33032,22937,31885,27665,30496,21209,22818,28961,29279,30683,38695,40289,26891,23167,23064,20901,21517,21629,26126,30431,36855,37528,40180,23018,29277,28357,20813,26825,32191,32236,38754,40634,25720,27169,33538,22916,23391,27611,29467,30450,32178,32791,33945,20786,26408,40665,30446,26466,21247,39173,23588,25147,31870,36016,21839,24758,32011,38272,21249,20063,20918,22812,29242,32822,37326,24357,30690,21380,24441,32004,34220,35379,36493,38742,26611,34222,37971,24841,24840,27833,30290,35565,36664,21807,20305,20778,21191,21451,23461,24189,24736,24962,25558,26377,26586,28263,28044,29494,29495,30001,31056,35029,35480,36938,37009,37109,38596,34701,22805,20104,20313,19982,35465,36671,38928,20653,24188,22934,23481,24248,25562,25594,25793,26332,26954,27096,27915,28342,29076,29992,31407,32650,32768,33865,33993,35201,35617,36362,36965,38525,39178,24958,25233,27442,27779,28020,32716,32764,28096,32645,34746,35064,26469,33713,38972,38647,27931,32097,33853,37226,20081,21365,23888,27396,28651,34253,34349,35239,21033,21519,23653,26446,26792,29702,29827,30178,35023,35041,37324,38626,38520,24459,29575,31435,33870,25504,30053,21129,27969,28316,29705,30041,30827,31890,38534,31452,40845,20406,24942,26053,34396,20102,20142,20698,20001,20940,23534,26009,26753,28092,29471,30274,30637,31260,31975,33391,35538,36988,37327,38517,38936,21147,32209,20523,21400,26519,28107,29136,29747,33256,36650,38563,40023,40607,29792,22593,28057,32047,39006,20196,20278,20363,20919,21169,23994,24604,29618,31036,33491,37428,38583,38646,38666,40599,40802,26278,27508,21015,21155,28872,35010,24265,24651,24976,28451,29001,31806,32244,32879,34030,36899,37676,21570,39791,27347,28809,36034,36335,38706,21172,23105,24266,24324,26391,27004,27028,28010,28431,29282,29436,31725,32769,32894,34635,37070,20845,40595,31108,32907,37682,35542,20525,21644,35441,27498,36036,33031,24785,26528,40434,20121,20120,39952,35435,34241,34152,26880,28286,30871,33109,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24332,19984,19989,20010,20017,20022,20028,20031,20034,20054,20056,20098,20101,35947,20106,33298,24333,20110,20126,20127,20128,20130,20144,20147,20150,20174,20173,20164,20166,20162,20183,20190,20205,20191,20215,20233,20314,20272,20315,20317,20311,20295,20342,20360,20367,20376,20347,20329,20336,20369,20335,20358,20374,20760,20436,20447,20430,20440,20443,20433,20442,20432,20452,20453,20506,20520,20500,20522,20517,20485,20252,20470,20513,20521,20524,20478,20463,20497,20486,20547,20551,26371,20565,20560,20552,20570,20566,20588,20600,20608,20634,20613,20660,20658,20681,20682,20659,20674,20694,20702,20709,20717,20707,20718,20729,20725,20745,20737,20738,20758,20757,20756,20762,20769,20794,20791,20796,20795,20799,20800,20818,20812,20820,20834,31480,20841,20842,20846,20864,20866,22232,20876,20873,20879,20881,20883,20885,20886,20900,20902,20898,20905,20906,20907,20915,20913,20914,20912,20917,20925,20933,20937,20955,20960,34389,20969,20973,20976,20981,20990,20996,21003,21012,21006,21031,21034,21038,21043,21049,21071,21060,21067,21068,21086,21076,21098,21108,21097,21107,21119,21117,21133,21140,21138,21105,21128,21137,36776,36775,21164,21165,21180,21173,21185,21197,21207,21214,21219,21222,39149,21216,21235,21237,21240,21241,21254,21256,30008,21261,21264,21263,21269,21274,21283,21295,21297,21299,21304,21312,21318,21317,19991,21321,21325,20950,21342,21353,21358,22808,21371,21367,21378,21398,21408,21414,21413,21422,21424,21430,21443,31762,38617,21471,26364,29166,21486,21480,21485,21498,21505,21565,21568,21548,21549,21564,21550,21558,21545,21533,21582,21647,21621,21646,21599,21617,21623,21616,21650,21627,21632,21622,21636,21648,21638,21703,21666,21688,21669,21676,21700,21704,21672,21675,21698,21668,21694,21692,21720,21733,21734,21775,21780,21757,21742,21741,21754,21730,21817,21824,21859,21836,21806,21852,21829,21846,21847,21816,21811,21853,21913,21888,21679,21898,21919,21883,21886,21912,21918,21934,21884,21891,21929,21895,21928,21978,21957,21983,21956,21980,21988,21972,22036,22007,22038,22014,22013,22043,22009,22094,22096,29151,22068,22070,22066,22072,22123,22116,22063,22124,22122,22150,22144,22154,22176,22164,22159,22181,22190,22198,22196,22210,22204,22209,22211,22208,22216,22222,22225,22227,22231,22254,22265,22272,22271,22276,22281,22280,22283,22285,22291,22296,22294,21959,22300,22310,22327,22328,22350,22331,22336,22351,22377,22464,22408,22369,22399,22409,22419,22432,22451,22436,22442,22448,22467,22470,22484,22482,22483,22538,22486,22499,22539,22553,22557,22642,22561,22626,22603,22640,27584,22610,22589,22649,22661,22713,22687,22699,22714,22750,22715,22712,22702,22725,22739,22737,22743,22745,22744,22757,22748,22756,22751,22767,22778,22777,22779,22780,22781,22786,22794,22800,22811,26790,22821,22828,22829,22834,22840,22846,31442,22869,22864,22862,22874,22872,22882,22880,22887,22892,22889,22904,22913,22941,20318,20395,22947,22962,22982,23016,23004,22925,23001,23002,23077,23071,23057,23068,23049,23066,23104,23148,23113,23093,23094,23138,23146,23194,23228,23230,23243,23234,23229,23267,23255,23270,23273,23254,23290,23291,23308,23307,23318,23346,23248,23338,23350,23358,23363,23365,23360,23377,23381,23386,23387,23397,23401,23408,23411,23413,23416,25992,23418,23424,23427,23462,23480,23491,23495,23497,23508,23504,23524,23526,23522,23518,23525,23531,23536,23542,23539,23557,23559,23560,23565,23571,23584,23586,23592,23608,23609,23617,23622,23630,23635,23632,23631,23409,23660,23662,20066,23670,23673,23692,23697,23700,22939,23723,23739,23734,23740,23735,23749,23742,23751,23769,23785,23805,23802,23789,23948,23786,23819,23829,23831,23900,23839,23835,23825,23828,23842,23834,23833,23832,23884,23890,23886,23883,23916,23923,23926,23943,23940,23938,23970,23965,23980,23982,23997,23952,23991,23996,24009,24013,24019,24018,24022,24027,24043,24050,24053,24075,24090,24089,24081,24091,24118,24119,24132,24131,24128,24142,24151,24148,24159,24162,24164,24135,24181,24182,24186,40636,24191,24224,24257,24258,24264,24272,24271,24278,24291,24285,24282,24283,24290,24289,24296,24297,24300,24305,24307,24304,24308,24312,24318,24323,24329,24413,24412,24331,24337,24342,24361,24365,24376,24385,24392,24396,24398,24367,24401,24406,24407,24409,24417,24429,24435,24439,24451,24450,24447,24458,24456,24465,24455,24478,24473,24472,24480,24488,24493,24508,24534,24571,24548,24568,24561,24541,24755,24575,24609,24672,24601,24592,24617,24590,24625,24603,24597,24619,24614,24591,24634,24666,24641,24682,24695,24671,24650,24646,24653,24675,24643,24676,24642,24684,24683,24665,24705,24717,24807,24707,24730,24708,24731,24726,24727,24722,24743,24715,24801,24760,24800,24787,24756,24560,24765,24774,24757,24792,24909,24853,24838,24822,24823,24832,24820,24826,24835,24865,24827,24817,24845,24846,24903,24894,24872,24871,24906,24895,24892,24876,24884,24893,24898,24900,24947,24951,24920,24921,24922,24939,24948,24943,24933,24945,24927,24925,24915,24949,24985,24982,24967,25004,24980,24986,24970,24977,25003,25006,25036,25034,25033,25079,25032,25027,25030,25018,25035,32633,25037,25062,25059,25078,25082,25076,25087,25085,25084,25086,25088,25096,25097,25101,25100,25108,25115,25118,25121,25130,25134,25136,25138,25139,25153,25166,25182,25187,25179,25184,25192,25212,25218,25225,25214,25234,25235,25238,25300,25219,25236,25303,25297,25275,25295,25343,25286,25812,25288,25308,25292,25290,25282,25287,25243,25289,25356,25326,25329,25383,25346,25352,25327,25333,25424,25406,25421,25628,25423,25494,25486,25472,25515,25462,25507,25487,25481,25503,25525,25451,25449,25534,25577,25536,25542,25571,25545,25554,25590,25540,25622,25652,25606,25619,25638,25654,25885,25623,25640,25615,25703,25711,25718,25678,25898,25749,25747,25765,25769,25736,25788,25818,25810,25797,25799,25787,25816,25794,25841,25831,33289,25824,25825,25260,25827,25839,25900,25846,25844,25842,25850,25856,25853,25880,25884,25861,25892,25891,25899,25908,25909,25911,25910,25912,30027,25928,25942,25941,25933,25944,25950,25949,25970,25976,25986,25987,35722,26011,26015,26027,26039,26051,26054,26049,26052,26060,26066,26075,26073,26080,26081,26097,26482,26122,26115,26107,26483,26165,26166,26164,26140,26191,26180,26185,26177,26206,26205,26212,26215,26216,26207,26210,26224,26243,26248,26254,26249,26244,26264,26269,26305,26297,26313,26302,26300,26308,26296,26326,26330,26336,26175,26342,26345,26352,26357,26359,26383,26390,26398,26406,26407,38712,26414,26431,26422,26433,26424,26423,26438,26462,26464,26457,26467,26468,26505,26480,26537,26492,26474,26508,26507,26534,26529,26501,26551,26607,26548,26604,26547,26601,26552,26596,26590,26589,26594,26606,26553,26574,26566,26599,27292,26654,26694,26665,26688,26701,26674,26702,26803,26667,26713,26723,26743,26751,26783,26767,26797,26772,26781,26779,26755,27310,26809,26740,26805,26784,26810,26895,26765,26750,26881,26826,26888,26840,26914,26918,26849,26892,26829,26836,26855,26837,26934,26898,26884,26839,26851,26917,26873,26848,26863,26920,26922,26906,26915,26913,26822,27001,26999,26972,27000,26987,26964,27006,26990,26937,26996,26941,26969,26928,26977,26974,26973,27009,26986,27058,27054,27088,27071,27073,27091,27070,27086,23528,27082,27101,27067,27075,27047,27182,27025,27040,27036,27029,27060,27102,27112,27138,27163,27135,27402,27129,27122,27111,27141,27057,27166,27117,27156,27115,27146,27154,27329,27171,27155,27204,27148,27250,27190,27256,27207,27234,27225,27238,27208,27192,27170,27280,27277,27296,27268,27298,27299,27287,34327,27323,27331,27330,27320,27315,27308,27358,27345,27359,27306,27354,27370,27387,27397,34326,27386,27410,27414,39729,27423,27448,27447,30428,27449,39150,27463,27459,27465,27472,27481,27476,27483,27487,27489,27512,27513,27519,27520,27524,27523,27533,27544,27541,27550,27556,27562,27563,27567,27570,27569,27571,27575,27580,27590,27595,27603,27615,27628,27627,27635,27631,40638,27656,27667,27668,27675,27684,27683,27742,27733,27746,27754,27778,27789,27802,27777,27803,27774,27752,27763,27794,27792,27844,27889,27859,27837,27863,27845,27869,27822,27825,27838,27834,27867,27887,27865,27882,27935,34893,27958,27947,27965,27960,27929,27957,27955,27922,27916,28003,28051,28004,27994,28025,27993,28046,28053,28644,28037,28153,28181,28170,28085,28103,28134,28088,28102,28140,28126,28108,28136,28114,28101,28154,28121,28132,28117,28138,28142,28205,28270,28206,28185,28274,28255,28222,28195,28267,28203,28278,28237,28191,28227,28218,28238,28196,28415,28189,28216,28290,28330,28312,28361,28343,28371,28349,28335,28356,28338,28372,28373,28303,28325,28354,28319,28481,28433,28748,28396,28408,28414,28479,28402,28465,28399,28466,28364,28478,28435,28407,28550,28538,28536,28545,28544,28527,28507,28659,28525,28546,28540,28504,28558,28561,28610,28518,28595,28579,28577,28580,28601,28614,28586,28639,28629,28652,28628,28632,28657,28654,28635,28681,28683,28666,28689,28673,28687,28670,28699,28698,28532,28701,28696,28703,28720,28734,28722,28753,28771,28825,28818,28847,28913,28844,28856,28851,28846,28895,28875,28893,28889,28937,28925,28956,28953,29029,29013,29064,29030,29026,29004,29014,29036,29071,29179,29060,29077,29096,29100,29143,29113,29118,29138,29129,29140,29134,29152,29164,29159,29173,29180,29177,29183,29197,29200,29211,29224,29229,29228,29232,29234,29243,29244,29247,29248,29254,29259,29272,29300,29310,29314,29313,29319,29330,29334,29346,29351,29369,29362,29379,29382,29380,29390,29394,29410,29408,29409,29433,29431,20495,29463,29450,29468,29462,29469,29492,29487,29481,29477,29502,29518,29519,40664,29527,29546,29544,29552,29560,29557,29563,29562,29640,29619,29646,29627,29632,29669,29678,29662,29858,29701,29807,29733,29688,29746,29754,29781,29759,29791,29785,29761,29788,29801,29808,29795,29802,29814,29822,29835,29854,29863,29898,29903,29908,29681,29920,29923,29927,29929,29934,29938,29936,29937,29944,29943,29956,29955,29957,29964,29966,29965,29973,29971,29982,29990,29996,30012,30020,30029,30026,30025,30043,30022,30042,30057,30052,30055,30059,30061,30072,30070,30086,30087,30068,30090,30089,30082,30100,30106,30109,30117,30115,30146,30131,30147,30133,30141,30136,30140,30129,30157,30154,30162,30169,30179,30174,30206,30207,30204,30209,30192,30202,30194,30195,30219,30221,30217,30239,30247,30240,30241,30242,30244,30260,30256,30267,30279,30280,30278,30300,30296,30305,30306,30312,30313,30314,30311,30316,30320,30322,30326,30328,30332,30336,30339,30344,30347,30350,30358,30355,30361,30362,30384,30388,30392,30393,30394,30402,30413,30422,30418,30430,30433,30437,30439,30442,34351,30459,30472,30471,30468,30505,30500,30494,30501,30502,30491,30519,30520,30535,30554,30568,30571,30555,30565,30591,30590,30585,30606,30603,30609,30624,30622,30640,30646,30649,30655,30652,30653,30651,30663,30669,30679,30682,30684,30691,30702,30716,30732,30738,31014,30752,31018,30789,30862,30836,30854,30844,30874,30860,30883,30901,30890,30895,30929,30918,30923,30932,30910,30908,30917,30922,30956,30951,30938,30973,30964,30983,30994,30993,31001,31020,31019,31040,31072,31063,31071,31066,31061,31059,31098,31103,31114,31133,31143,40779,31146,31150,31155,31161,31162,31177,31189,31207,31212,31201,31203,31240,31245,31256,31257,31264,31263,31104,31281,31291,31294,31287,31299,31319,31305,31329,31330,31337,40861,31344,31353,31357,31368,31383,31381,31384,31382,31401,31432,31408,31414,31429,31428,31423,36995,31431,31434,31437,31439,31445,31443,31449,31450,31453,31457,31458,31462,31469,31472,31490,31503,31498,31494,31539,31512,31513,31518,31541,31528,31542,31568,31610,31492,31565,31499,31564,31557,31605,31589,31604,31591,31600,31601,31596,31598,31645,31640,31647,31629,31644,31642,31627,31634,31631,31581,31641,31691,31681,31692,31695,31668,31686,31709,31721,31761,31764,31718,31717,31840,31744,31751,31763,31731,31735,31767,31757,31734,31779,31783,31786,31775,31799,31787,31805,31820,31811,31828,31823,31808,31824,31832,31839,31844,31830,31845,31852,31861,31875,31888,31908,31917,31906,31915,31905,31912,31923,31922,31921,31918,31929,31933,31936,31941,31938,31960,31954,31964,31970,39739,31983,31986,31988,31990,31994,32006,32002,32028,32021,32010,32069,32075,32046,32050,32063,32053,32070,32115,32086,32078,32114,32104,32110,32079,32099,32147,32137,32091,32143,32125,32155,32186,32174,32163,32181,32199,32189,32171,32317,32162,32175,32220,32184,32159,32176,32216,32221,32228,32222,32251,32242,32225,32261,32266,32291,32289,32274,32305,32287,32265,32267,32290,32326,32358,32315,32309,32313,32323,32311,32306,32314,32359,32349,32342,32350,32345,32346,32377,32362,32361,32380,32379,32387,32213,32381,36782,32383,32392,32393,32396,32402,32400,32403,32404,32406,32398,32411,32412,32568,32570,32581,32588,32589,32590,32592,32593,32597,32596,32600,32607,32608,32616,32617,32615,32632,32642,32646,32643,32648,32647,32652,32660,32670,32669,32666,32675,32687,32690,32697,32686,32694,32696,35697,32709,32710,32714,32725,32724,32737,32742,32745,32755,32761,39132,32774,32772,32779,32786,32792,32793,32796,32801,32808,32831,32827,32842,32838,32850,32856,32858,32863,32866,32872,32883,32882,32880,32886,32889,32893,32895,32900,32902,32901,32923,32915,32922,32941,20880,32940,32987,32997,32985,32989,32964,32986,32982,33033,33007,33009,33051,33065,33059,33071,33099,38539,33094,33086,33107,33105,33020,33137,33134,33125,33126,33140,33155,33160,33162,33152,33154,33184,33173,33188,33187,33119,33171,33193,33200,33205,33214,33208,33213,33216,33218,33210,33225,33229,33233,33241,33240,33224,33242,33247,33248,33255,33274,33275,33278,33281,33282,33285,33287,33290,33293,33296,33302,33321,33323,33336,33331,33344,33369,33368,33373,33370,33375,33380,33378,33384,33386,33387,33326,33393,33399,33400,33406,33421,33426,33451,33439,33467,33452,33505,33507,33503,33490,33524,33523,33530,33683,33539,33531,33529,33502,33542,33500,33545,33497,33589,33588,33558,33586,33585,33600,33593,33616,33605,33583,33579,33559,33560,33669,33690,33706,33695,33698,33686,33571,33678,33671,33674,33660,33717,33651,33653,33696,33673,33704,33780,33811,33771,33742,33789,33795,33752,33803,33729,33783,33799,33760,33778,33805,33826,33824,33725,33848,34054,33787,33901,33834,33852,34138,33924,33911,33899,33965,33902,33922,33897,33862,33836,33903,33913,33845,33994,33890,33977,33983,33951,34009,33997,33979,34010,34000,33985,33990,34006,33953,34081,34047,34036,34071,34072,34092,34079,34069,34068,34044,34112,34147,34136,34120,34113,34306,34123,34133,34176,34212,34184,34193,34186,34216,34157,34196,34203,34282,34183,34204,34167,34174,34192,34249,34234,34255,34233,34256,34261,34269,34277,34268,34297,34314,34323,34315,34302,34298,34310,34338,34330,34352,34367,34381,20053,34388,34399,34407,34417,34451,34467,34473,34474,34443,34444,34486,34479,34500,34502,34480,34505,34851,34475,34516,34526,34537,34540,34527,34523,34543,34578,34566,34568,34560,34563,34555,34577,34569,34573,34553,34570,34612,34623,34615,34619,34597,34601,34586,34656,34655,34680,34636,34638,34676,34647,34664,34670,34649,34643,34659,34666,34821,34722,34719,34690,34735,34763,34749,34752,34768,38614,34731,34756,34739,34759,34758,34747,34799,34802,34784,34831,34829,34814,34806,34807,34830,34770,34833,34838,34837,34850,34849,34865,34870,34873,34855,34875,34884,34882,34898,34905,34910,34914,34923,34945,34942,34974,34933,34941,34997,34930,34946,34967,34962,34990,34969,34978,34957,34980,34992,35007,34993,35011,35012,35028,35032,35033,35037,35065,35074,35068,35060,35048,35058,35076,35084,35082,35091,35139,35102,35109,35114,35115,35137,35140,35131,35126,35128,35148,35101,35168,35166,35174,35172,35181,35178,35183,35188,35191,35198,35203,35208,35210,35219,35224,35233,35241,35238,35244,35247,35250,35258,35261,35263,35264,35290,35292,35293,35303,35316,35320,35331,35350,35344,35340,35355,35357,35365,35382,35393,35419,35410,35398,35400,35452,35437,35436,35426,35461,35458,35460,35496,35489,35473,35493,35494,35482,35491,35524,35533,35522,35546,35563,35571,35559,35556,35569,35604,35552,35554,35575,35550,35547,35596,35591,35610,35553,35606,35600,35607,35616,35635,38827,35622,35627,35646,35624,35649,35660,35663,35662,35657,35670,35675,35674,35691,35679,35692,35695,35700,35709,35712,35724,35726,35730,35731,35734,35737,35738,35898,35905,35903,35912,35916,35918,35920,35925,35938,35948,35960,35962,35970,35977,35973,35978,35981,35982,35988,35964,35992,25117,36013,36010,36029,36018,36019,36014,36022,36040,36033,36068,36067,36058,36093,36090,36091,36100,36101,36106,36103,36111,36109,36112,40782,36115,36045,36116,36118,36199,36205,36209,36211,36225,36249,36290,36286,36282,36303,36314,36310,36300,36315,36299,36330,36331,36319,36323,36348,36360,36361,36351,36381,36382,36368,36383,36418,36405,36400,36404,36426,36423,36425,36428,36432,36424,36441,36452,36448,36394,36451,36437,36470,36466,36476,36481,36487,36485,36484,36491,36490,36499,36497,36500,36505,36522,36513,36524,36528,36550,36529,36542,36549,36552,36555,36571,36579,36604,36603,36587,36606,36618,36613,36629,36626,36633,36627,36636,36639,36635,36620,36646,36659,36667,36665,36677,36674,36670,36684,36681,36678,36686,36695,36700,36706,36707,36708,36764,36767,36771,36781,36783,36791,36826,36837,36834,36842,36847,36999,36852,36869,36857,36858,36881,36885,36897,36877,36894,36886,36875,36903,36918,36917,36921,36856,36943,36944,36945,36946,36878,36937,36926,36950,36952,36958,36968,36975,36982,38568,36978,36994,36989,36993,36992,37002,37001,37007,37032,37039,37041,37045,37090,37092,25160,37083,37122,37138,37145,37170,37168,37194,37206,37208,37219,37221,37225,37235,37234,37259,37257,37250,37282,37291,37295,37290,37301,37300,37306,37312,37313,37321,37323,37328,37334,37343,37345,37339,37372,37365,37366,37406,37375,37396,37420,37397,37393,37470,37463,37445,37449,37476,37448,37525,37439,37451,37456,37532,37526,37523,37531,37466,37583,37561,37559,37609,37647,37626,37700,37678,37657,37666,37658,37667,37690,37685,37691,37724,37728,37756,37742,37718,37808,37804,37805,37780,37817,37846,37847,37864,37861,37848,37827,37853,37840,37832,37860,37914,37908,37907,37891,37895,37904,37942,37931,37941,37921,37946,37953,37970,37956,37979,37984,37986,37982,37994,37417,38000,38005,38007,38013,37978,38012,38014,38017,38015,38274,38279,38282,38292,38294,38296,38297,38304,38312,38311,38317,38332,38331,38329,38334,38346,28662,38339,38349,38348,38357,38356,38358,38364,38369,38373,38370,38433,38440,38446,38447,38466,38476,38479,38475,38519,38492,38494,38493,38495,38502,38514,38508,38541,38552,38549,38551,38570,38567,38577,38578,38576,38580,38582,38584,38585,38606,38603,38601,38605,35149,38620,38669,38613,38649,38660,38662,38664,38675,38670,38673,38671,38678,38681,38692,38698,38704,38713,38717,38718,38724,38726,38728,38722,38729,38748,38752,38756,38758,38760,21202,38763,38769,38777,38789,38780,38785,38778,38790,38795,38799,38800,38812,38824,38822,38819,38835,38836,38851,38854,38856,38859,38876,38893,40783,38898,31455,38902,38901,38927,38924,38968,38948,38945,38967,38973,38982,38991,38987,39019,39023,39024,39025,39028,39027,39082,39087,39089,39094,39108,39107,39110,39145,39147,39171,39177,39186,39188,39192,39201,39197,39198,39204,39200,39212,39214,39229,39230,39234,39241,39237,39248,39243,39249,39250,39244,39253,39319,39320,39333,39341,39342,39356,39391,39387,39389,39384,39377,39405,39406,39409,39410,39419,39416,39425,39439,39429,39394,39449,39467,39479,39493,39490,39488,39491,39486,39509,39501,39515,39511,39519,39522,39525,39524,39529,39531,39530,39597,39600,39612,39616,39631,39633,39635,39636,39646,39647,39650,39651,39654,39663,39659,39662,39668,39665,39671,39675,39686,39704,39706,39711,39714,39715,39717,39719,39720,39721,39722,39726,39727,39730,39748,39747,39759,39757,39758,39761,39768,39796,39827,39811,39825,39830,39831,39839,39840,39848,39860,39872,39882,39865,39878,39887,39889,39890,39907,39906,39908,39892,39905,39994,39922,39921,39920,39957,39956,39945,39955,39948,39942,39944,39954,39946,39940,39982,39963,39973,39972,39969,39984,40007,39986,40006,39998,40026,40032,40039,40054,40056,40167,40172,40176,40201,40200,40171,40195,40198,40234,40230,40367,40227,40223,40260,40213,40210,40257,40255,40254,40262,40264,40285,40286,40292,40273,40272,40281,40306,40329,40327,40363,40303,40314,40346,40356,40361,40370,40388,40385,40379,40376,40378,40390,40399,40386,40409,40403,40440,40422,40429,40431,40445,40474,40475,40478,40565,40569,40573,40577,40584,40587,40588,40594,40597,40593,40605,40613,40617,40632,40618,40621,38753,40652,40654,40655,40656,40660,40668,40670,40669,40672,40677,40680,40687,40692,40694,40695,40697,40699,40700,40701,40711,40712,30391,40725,40737,40748,40766,40778,40786,40788,40803,40799,40800,40801,40806,40807,40812,40810,40823,40818,40822,40853,40860,40864,22575,27079,36953,29796,20956,29081,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,65506,65508,65287,65282,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,65506,65508,65287,65282,12849,8470,8481,8757,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
28020 "jis0212":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,728,711,184,729,733,175,731,730,65374,900,901,null,null,null,null,null,null,null,null,161,166,191,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,186,170,169,174,8482,164,8470,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,902,904,905,906,938,null,908,null,910,939,null,911,null,null,null,null,940,941,942,943,970,912,972,962,973,971,944,974,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038,1039,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1118,1119,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,198,272,null,294,null,306,null,321,319,null,330,216,338,null,358,222,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,230,273,240,295,305,307,312,322,320,329,331,248,339,223,359,254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,193,192,196,194,258,461,256,260,197,195,262,264,268,199,266,270,201,200,203,202,282,278,274,280,null,284,286,290,288,292,205,204,207,206,463,304,298,302,296,308,310,313,317,315,323,327,325,209,211,210,214,212,465,336,332,213,340,344,342,346,348,352,350,356,354,218,217,220,219,364,467,368,362,370,366,360,471,475,473,469,372,221,376,374,377,381,379,null,null,null,null,null,null,null,225,224,228,226,259,462,257,261,229,227,263,265,269,231,267,271,233,232,235,234,283,279,275,281,501,285,287,null,289,293,237,236,239,238,464,null,299,303,297,309,311,314,318,316,324,328,326,241,243,242,246,244,466,337,333,245,341,345,343,347,349,353,351,357,355,250,249,252,251,365,468,369,363,371,367,361,472,476,474,470,373,253,255,375,378,382,380,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19970,19972,19973,19980,19986,19999,20003,20004,20008,20011,20014,20015,20016,20021,20032,20033,20036,20039,20049,20058,20060,20067,20072,20073,20084,20085,20089,20095,20109,20118,20119,20125,20143,20153,20163,20176,20186,20187,20192,20193,20194,20200,20207,20209,20211,20213,20221,20222,20223,20224,20226,20227,20232,20235,20236,20242,20245,20246,20247,20249,20270,20273,20320,20275,20277,20279,20281,20283,20286,20288,20290,20296,20297,20299,20300,20306,20308,20310,20312,20319,20323,20330,20332,20334,20337,20343,20344,20345,20346,20349,20350,20353,20354,20356,20357,20361,20362,20364,20366,20368,20370,20371,20372,20375,20377,20378,20382,20383,20402,20407,20409,20411,20412,20413,20414,20416,20417,20421,20422,20424,20425,20427,20428,20429,20431,20434,20444,20448,20450,20464,20466,20476,20477,20479,20480,20481,20484,20487,20490,20492,20494,20496,20499,20503,20504,20507,20508,20509,20510,20514,20519,20526,20528,20530,20531,20533,20544,20545,20546,20549,20550,20554,20556,20558,20561,20562,20563,20567,20569,20575,20576,20578,20579,20582,20583,20586,20589,20592,20593,20539,20609,20611,20612,20614,20618,20622,20623,20624,20626,20627,20628,20630,20635,20636,20638,20639,20640,20641,20642,20650,20655,20656,20665,20666,20669,20672,20675,20676,20679,20684,20686,20688,20691,20692,20696,20700,20701,20703,20706,20708,20710,20712,20713,20719,20721,20726,20730,20734,20739,20742,20743,20744,20747,20748,20749,20750,20722,20752,20759,20761,20763,20764,20765,20766,20771,20775,20776,20780,20781,20783,20785,20787,20788,20789,20792,20793,20802,20810,20815,20819,20821,20823,20824,20831,20836,20838,20862,20867,20868,20875,20878,20888,20893,20897,20899,20909,20920,20922,20924,20926,20927,20930,20936,20943,20945,20946,20947,20949,20952,20958,20962,20965,20974,20978,20979,20980,20983,20993,20994,20997,21010,21011,21013,21014,21016,21026,21032,21041,21042,21045,21052,21061,21065,21077,21079,21080,21082,21084,21087,21088,21089,21094,21102,21111,21112,21113,21120,21122,21125,21130,21132,21139,21141,21142,21143,21144,21146,21148,21156,21157,21158,21159,21167,21168,21174,21175,21176,21178,21179,21181,21184,21188,21190,21192,21196,21199,21201,21204,21206,21211,21212,21217,21221,21224,21225,21226,21228,21232,21233,21236,21238,21239,21248,21251,21258,21259,21260,21265,21267,21272,21275,21276,21278,21279,21285,21287,21288,21289,21291,21292,21293,21296,21298,21301,21308,21309,21310,21314,21324,21323,21337,21339,21345,21347,21349,21356,21357,21362,21369,21374,21379,21383,21384,21390,21395,21396,21401,21405,21409,21412,21418,21419,21423,21426,21428,21429,21431,21432,21434,21437,21440,21445,21455,21458,21459,21461,21466,21469,21470,21472,21478,21479,21493,21506,21523,21530,21537,21543,21544,21546,21551,21553,21556,21557,21571,21572,21575,21581,21583,21598,21602,21604,21606,21607,21609,21611,21613,21614,21620,21631,21633,21635,21637,21640,21641,21645,21649,21653,21654,21660,21663,21665,21670,21671,21673,21674,21677,21678,21681,21687,21689,21690,21691,21695,21702,21706,21709,21710,21728,21738,21740,21743,21750,21756,21758,21759,21760,21761,21765,21768,21769,21772,21773,21774,21781,21802,21803,21810,21813,21814,21819,21820,21821,21825,21831,21833,21834,21837,21840,21841,21848,21850,21851,21854,21856,21857,21860,21862,21887,21889,21890,21894,21896,21902,21903,21905,21906,21907,21908,21911,21923,21924,21933,21938,21951,21953,21955,21958,21961,21963,21964,21966,21969,21970,21971,21975,21976,21979,21982,21986,21993,22006,22015,22021,22024,22026,22029,22030,22031,22032,22033,22034,22041,22060,22064,22067,22069,22071,22073,22075,22076,22077,22079,22080,22081,22083,22084,22086,22089,22091,22093,22095,22100,22110,22112,22113,22114,22115,22118,22121,22125,22127,22129,22130,22133,22148,22149,22152,22155,22156,22165,22169,22170,22173,22174,22175,22182,22183,22184,22185,22187,22188,22189,22193,22195,22199,22206,22213,22217,22218,22219,22223,22224,22220,22221,22233,22236,22237,22239,22241,22244,22245,22246,22247,22248,22257,22251,22253,22262,22263,22273,22274,22279,22282,22284,22289,22293,22298,22299,22301,22304,22306,22307,22308,22309,22313,22314,22316,22318,22319,22323,22324,22333,22334,22335,22341,22342,22348,22349,22354,22370,22373,22375,22376,22379,22381,22382,22383,22384,22385,22387,22388,22389,22391,22393,22394,22395,22396,22398,22401,22403,22412,22420,22423,22425,22426,22428,22429,22430,22431,22433,22421,22439,22440,22441,22444,22456,22461,22471,22472,22476,22479,22485,22493,22494,22500,22502,22503,22505,22509,22512,22517,22518,22520,22525,22526,22527,22531,22532,22536,22537,22497,22540,22541,22555,22558,22559,22560,22566,22567,22573,22578,22585,22591,22601,22604,22605,22607,22608,22613,22623,22625,22628,22631,22632,22648,22652,22655,22656,22657,22663,22664,22665,22666,22668,22669,22671,22672,22676,22678,22685,22688,22689,22690,22694,22697,22705,22706,22724,22716,22722,22728,22733,22734,22736,22738,22740,22742,22746,22749,22753,22754,22761,22771,22789,22790,22795,22796,22802,22803,22804,34369,22813,22817,22819,22820,22824,22831,22832,22835,22837,22838,22847,22851,22854,22866,22867,22873,22875,22877,22878,22879,22881,22883,22891,22893,22895,22898,22901,22902,22905,22907,22908,22923,22924,22926,22930,22933,22935,22943,22948,22951,22957,22958,22959,22960,22963,22967,22970,22972,22977,22979,22980,22984,22986,22989,22994,23005,23006,23007,23011,23012,23015,23022,23023,23025,23026,23028,23031,23040,23044,23052,23053,23054,23058,23059,23070,23075,23076,23079,23080,23082,23085,23088,23108,23109,23111,23112,23116,23120,23125,23134,23139,23141,23143,23149,23159,23162,23163,23166,23179,23184,23187,23190,23193,23196,23198,23199,23200,23202,23207,23212,23217,23218,23219,23221,23224,23226,23227,23231,23236,23238,23240,23247,23258,23260,23264,23269,23274,23278,23285,23286,23293,23296,23297,23304,23319,23348,23321,23323,23325,23329,23333,23341,23352,23361,23371,23372,23378,23382,23390,23400,23406,23407,23420,23421,23422,23423,23425,23428,23430,23434,23438,23440,23441,23443,23444,23446,23464,23465,23468,23469,23471,23473,23474,23479,23482,23484,23488,23489,23501,23503,23510,23511,23512,23513,23514,23520,23535,23537,23540,23549,23564,23575,23582,23583,23587,23590,23593,23595,23596,23598,23600,23602,23605,23606,23641,23642,23644,23650,23651,23655,23656,23657,23661,23664,23668,23669,23674,23675,23676,23677,23687,23688,23690,23695,23698,23709,23711,23712,23714,23715,23718,23722,23730,23732,23733,23738,23753,23755,23762,23773,23767,23790,23793,23794,23796,23809,23814,23821,23826,23851,23843,23844,23846,23847,23857,23860,23865,23869,23871,23874,23875,23878,23880,23893,23889,23897,23882,23903,23904,23905,23906,23908,23914,23917,23920,23929,23930,23934,23935,23937,23939,23944,23946,23954,23955,23956,23957,23961,23963,23967,23968,23975,23979,23984,23988,23992,23993,24003,24007,24011,24016,24014,24024,24025,24032,24036,24041,24056,24057,24064,24071,24077,24082,24084,24085,24088,24095,24096,24110,24104,24114,24117,24126,24139,24144,24137,24145,24150,24152,24155,24156,24158,24168,24170,24171,24172,24173,24174,24176,24192,24203,24206,24226,24228,24229,24232,24234,24236,24241,24243,24253,24254,24255,24262,24268,24267,24270,24273,24274,24276,24277,24284,24286,24293,24299,24322,24326,24327,24328,24334,24345,24348,24349,24353,24354,24355,24356,24360,24363,24364,24366,24368,24372,24374,24379,24381,24383,24384,24388,24389,24391,24397,24400,24404,24408,24411,24416,24419,24420,24423,24431,24434,24436,24437,24440,24442,24445,24446,24457,24461,24463,24470,24476,24477,24482,24487,24491,24484,24492,24495,24496,24497,24504,24516,24519,24520,24521,24523,24528,24529,24530,24531,24532,24542,24545,24546,24552,24553,24554,24556,24557,24558,24559,24562,24563,24566,24570,24572,24583,24586,24589,24595,24596,24599,24600,24602,24607,24612,24621,24627,24629,24640,24647,24648,24649,24652,24657,24660,24662,24663,24669,24673,24679,24689,24702,24703,24706,24710,24712,24714,24718,24721,24723,24725,24728,24733,24734,24738,24740,24741,24744,24752,24753,24759,24763,24766,24770,24772,24776,24777,24778,24779,24782,24783,24788,24789,24793,24795,24797,24798,24802,24805,24818,24821,24824,24828,24829,24834,24839,24842,24844,24848,24849,24850,24851,24852,24854,24855,24857,24860,24862,24866,24874,24875,24880,24881,24885,24886,24887,24889,24897,24901,24902,24905,24926,24928,24940,24946,24952,24955,24956,24959,24960,24961,24963,24964,24971,24973,24978,24979,24983,24984,24988,24989,24991,24992,24997,25000,25002,25005,25016,25017,25020,25024,25025,25026,25038,25039,25045,25052,25053,25054,25055,25057,25058,25063,25065,25061,25068,25069,25071,25089,25091,25092,25095,25107,25109,25116,25120,25122,25123,25127,25129,25131,25145,25149,25154,25155,25156,25158,25164,25168,25169,25170,25172,25174,25178,25180,25188,25197,25199,25203,25210,25213,25229,25230,25231,25232,25254,25256,25267,25270,25271,25274,25278,25279,25284,25294,25301,25302,25306,25322,25330,25332,25340,25341,25347,25348,25354,25355,25357,25360,25363,25366,25368,25385,25386,25389,25397,25398,25401,25404,25409,25410,25411,25412,25414,25418,25419,25422,25426,25427,25428,25432,25435,25445,25446,25452,25453,25457,25460,25461,25464,25468,25469,25471,25474,25476,25479,25482,25488,25492,25493,25497,25498,25502,25508,25510,25517,25518,25519,25533,25537,25541,25544,25550,25553,25555,25556,25557,25564,25568,25573,25578,25580,25586,25587,25589,25592,25593,25609,25610,25616,25618,25620,25624,25630,25632,25634,25636,25637,25641,25642,25647,25648,25653,25661,25663,25675,25679,25681,25682,25683,25684,25690,25691,25692,25693,25695,25696,25697,25699,25709,25715,25716,25723,25725,25733,25735,25743,25744,25745,25752,25753,25755,25757,25759,25761,25763,25766,25768,25772,25779,25789,25790,25791,25796,25801,25802,25803,25804,25806,25808,25809,25813,25815,25828,25829,25833,25834,25837,25840,25845,25847,25851,25855,25857,25860,25864,25865,25866,25871,25875,25876,25878,25881,25883,25886,25887,25890,25894,25897,25902,25905,25914,25916,25917,25923,25927,25929,25936,25938,25940,25951,25952,25959,25963,25978,25981,25985,25989,25994,26002,26005,26008,26013,26016,26019,26022,26030,26034,26035,26036,26047,26050,26056,26057,26062,26064,26068,26070,26072,26079,26096,26098,26100,26101,26105,26110,26111,26112,26116,26120,26121,26125,26129,26130,26133,26134,26141,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26161,26163,26169,26167,26176,26181,26182,26186,26188,26193,26190,26199,26200,26201,26203,26204,26208,26209,26363,26218,26219,26220,26238,26227,26229,26239,26231,26232,26233,26235,26240,26236,26251,26252,26253,26256,26258,26265,26266,26267,26268,26271,26272,26276,26285,26289,26290,26293,26299,26303,26304,26306,26307,26312,26316,26318,26319,26324,26331,26335,26344,26347,26348,26350,26362,26373,26375,26382,26387,26393,26396,26400,26402,26419,26430,26437,26439,26440,26444,26452,26453,26461,26470,26476,26478,26484,26486,26491,26497,26500,26510,26511,26513,26515,26518,26520,26521,26523,26544,26545,26546,26549,26555,26556,26557,26617,26560,26562,26563,26565,26568,26569,26578,26583,26585,26588,26593,26598,26608,26610,26614,26615,26706,26644,26649,26653,26655,26664,26663,26668,26669,26671,26672,26673,26675,26683,26687,26692,26693,26698,26700,26709,26711,26712,26715,26731,26734,26735,26736,26737,26738,26741,26745,26746,26747,26748,26754,26756,26758,26760,26774,26776,26778,26780,26785,26787,26789,26793,26794,26798,26802,26811,26821,26824,26828,26831,26832,26833,26835,26838,26841,26844,26845,26853,26856,26858,26859,26860,26861,26864,26865,26869,26870,26875,26876,26877,26886,26889,26890,26896,26897,26899,26902,26903,26929,26931,26933,26936,26939,26946,26949,26953,26958,26967,26971,26979,26980,26981,26982,26984,26985,26988,26992,26993,26994,27002,27003,27007,27008,27021,27026,27030,27032,27041,27045,27046,27048,27051,27053,27055,27063,27064,27066,27068,27077,27080,27089,27094,27095,27106,27109,27118,27119,27121,27123,27125,27134,27136,27137,27139,27151,27153,27157,27162,27165,27168,27172,27176,27184,27186,27188,27191,27195,27198,27199,27205,27206,27209,27210,27214,27216,27217,27218,27221,27222,27227,27236,27239,27242,27249,27251,27262,27265,27267,27270,27271,27273,27275,27281,27291,27293,27294,27295,27301,27307,27311,27312,27313,27316,27325,27326,27327,27334,27337,27336,27340,27344,27348,27349,27350,27356,27357,27364,27367,27372,27376,27377,27378,27388,27389,27394,27395,27398,27399,27401,27407,27408,27409,27415,27419,27422,27428,27432,27435,27436,27439,27445,27446,27451,27455,27462,27466,27469,27474,27478,27480,27485,27488,27495,27499,27502,27504,27509,27517,27518,27522,27525,27543,27547,27551,27552,27554,27555,27560,27561,27564,27565,27566,27568,27576,27577,27581,27582,27587,27588,27593,27596,27606,27610,27617,27619,27622,27623,27630,27633,27639,27641,27647,27650,27652,27653,27657,27661,27662,27664,27666,27673,27679,27686,27687,27688,27692,27694,27699,27701,27702,27706,27707,27711,27722,27723,27725,27727,27730,27732,27737,27739,27740,27755,27757,27759,27764,27766,27768,27769,27771,27781,27782,27783,27785,27796,27797,27799,27800,27804,27807,27824,27826,27828,27842,27846,27853,27855,27856,27857,27858,27860,27862,27866,27868,27872,27879,27881,27883,27884,27886,27890,27892,27908,27911,27914,27918,27919,27921,27923,27930,27942,27943,27944,27751,27950,27951,27953,27961,27964,27967,27991,27998,27999,28001,28005,28007,28015,28016,28028,28034,28039,28049,28050,28052,28054,28055,28056,28074,28076,28084,28087,28089,28093,28095,28100,28104,28106,28110,28111,28118,28123,28125,28127,28128,28130,28133,28137,28143,28144,28148,28150,28156,28160,28164,28190,28194,28199,28210,28214,28217,28219,28220,28228,28229,28232,28233,28235,28239,28241,28242,28243,28244,28247,28252,28253,28254,28258,28259,28264,28275,28283,28285,28301,28307,28313,28320,28327,28333,28334,28337,28339,28347,28351,28352,28353,28355,28359,28360,28362,28365,28366,28367,28395,28397,28398,28409,28411,28413,28420,28424,28426,28428,28429,28438,28440,28442,28443,28454,28457,28458,28463,28464,28467,28470,28475,28476,28461,28495,28497,28498,28499,28503,28505,28506,28509,28510,28513,28514,28520,28524,28541,28542,28547,28551,28552,28555,28556,28557,28560,28562,28563,28564,28566,28570,28575,28576,28581,28582,28583,28584,28590,28591,28592,28597,28598,28604,28613,28615,28616,28618,28634,28638,28648,28649,28656,28661,28665,28668,28669,28672,28677,28678,28679,28685,28695,28704,28707,28719,28724,28727,28729,28732,28739,28740,28744,28745,28746,28747,28756,28757,28765,28766,28750,28772,28773,28780,28782,28789,28790,28798,28801,28805,28806,28820,28821,28822,28823,28824,28827,28836,28843,28848,28849,28852,28855,28874,28881,28883,28884,28885,28886,28888,28892,28900,28922,28931,28932,28933,28934,28935,28939,28940,28943,28958,28960,28971,28973,28975,28976,28977,28984,28993,28997,28998,28999,29002,29003,29008,29010,29015,29018,29020,29022,29024,29032,29049,29056,29061,29063,29068,29074,29082,29083,29088,29090,29103,29104,29106,29107,29114,29119,29120,29121,29124,29131,29132,29139,29142,29145,29146,29148,29176,29182,29184,29191,29192,29193,29203,29207,29210,29213,29215,29220,29227,29231,29236,29240,29241,29249,29250,29251,29253,29262,29263,29264,29267,29269,29270,29274,29276,29278,29280,29283,29288,29291,29294,29295,29297,29303,29304,29307,29308,29311,29316,29321,29325,29326,29331,29339,29352,29357,29358,29361,29364,29374,29377,29383,29385,29388,29397,29398,29400,29407,29413,29427,29428,29434,29435,29438,29442,29444,29445,29447,29451,29453,29458,29459,29464,29465,29470,29474,29476,29479,29480,29484,29489,29490,29493,29498,29499,29501,29507,29517,29520,29522,29526,29528,29533,29534,29535,29536,29542,29543,29545,29547,29548,29550,29551,29553,29559,29561,29564,29568,29569,29571,29573,29574,29582,29584,29587,29589,29591,29592,29596,29598,29599,29600,29602,29605,29606,29610,29611,29613,29621,29623,29625,29628,29629,29631,29637,29638,29641,29643,29644,29647,29650,29651,29654,29657,29661,29665,29667,29670,29671,29673,29684,29685,29687,29689,29690,29691,29693,29695,29696,29697,29700,29703,29706,29713,29722,29723,29732,29734,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29753,29760,29763,29764,29766,29767,29771,29773,29777,29778,29783,29789,29794,29798,29799,29800,29803,29805,29806,29809,29810,29824,29825,29829,29830,29831,29833,29839,29840,29841,29842,29848,29849,29850,29852,29855,29856,29857,29859,29862,29864,29865,29866,29867,29870,29871,29873,29874,29877,29881,29883,29887,29896,29897,29900,29904,29907,29912,29914,29915,29918,29919,29924,29928,29930,29931,29935,29940,29946,29947,29948,29951,29958,29970,29974,29975,29984,29985,29988,29991,29993,29994,29999,30006,30009,30013,30014,30015,30016,30019,30023,30024,30030,30032,30034,30039,30046,30047,30049,30063,30065,30073,30074,30075,30076,30077,30078,30081,30085,30096,30098,30099,30101,30105,30108,30114,30116,30132,30138,30143,30144,30145,30148,30150,30156,30158,30159,30167,30172,30175,30176,30177,30180,30183,30188,30190,30191,30193,30201,30208,30210,30211,30212,30215,30216,30218,30220,30223,30226,30227,30229,30230,30233,30235,30236,30237,30238,30243,30245,30246,30249,30253,30258,30259,30261,30264,30265,30266,30268,30282,30272,30273,30275,30276,30277,30281,30283,30293,30297,30303,30308,30309,30317,30318,30319,30321,30324,30337,30341,30348,30349,30357,30363,30364,30365,30367,30368,30370,30371,30372,30373,30374,30375,30376,30378,30381,30397,30401,30405,30409,30411,30412,30414,30420,30425,30432,30438,30440,30444,30448,30449,30454,30457,30460,30464,30470,30474,30478,30482,30484,30485,30487,30489,30490,30492,30498,30504,30509,30510,30511,30516,30517,30518,30521,30525,30526,30530,30533,30534,30538,30541,30542,30543,30546,30550,30551,30556,30558,30559,30560,30562,30564,30567,30570,30572,30576,30578,30579,30580,30586,30589,30592,30596,30604,30605,30612,30613,30614,30618,30623,30626,30631,30634,30638,30639,30641,30645,30654,30659,30665,30673,30674,30677,30681,30686,30687,30688,30692,30694,30698,30700,30704,30705,30708,30712,30715,30725,30726,30729,30733,30734,30737,30749,30753,30754,30755,30765,30766,30768,30773,30775,30787,30788,30791,30792,30796,30798,30802,30812,30814,30816,30817,30819,30820,30824,30826,30830,30842,30846,30858,30863,30868,30872,30881,30877,30878,30879,30884,30888,30892,30893,30896,30897,30898,30899,30907,30909,30911,30919,30920,30921,30924,30926,30930,30931,30933,30934,30948,30939,30943,30944,30945,30950,30954,30962,30963,30976,30966,30967,30970,30971,30975,30982,30988,30992,31002,31004,31006,31007,31008,31013,31015,31017,31021,31025,31028,31029,31035,31037,31039,31044,31045,31046,31050,31051,31055,31057,31060,31064,31067,31068,31079,31081,31083,31090,31097,31099,31100,31102,31115,31116,31121,31123,31124,31125,31126,31128,31131,31132,31137,31144,31145,31147,31151,31153,31156,31160,31163,31170,31172,31175,31176,31178,31183,31188,31190,31194,31197,31198,31200,31202,31205,31210,31211,31213,31217,31224,31228,31234,31235,31239,31241,31242,31244,31249,31253,31259,31262,31265,31271,31275,31277,31279,31280,31284,31285,31288,31289,31290,31300,31301,31303,31304,31308,31317,31318,31321,31324,31325,31327,31328,31333,31335,31338,31341,31349,31352,31358,31360,31362,31365,31366,31370,31371,31376,31377,31380,31390,31392,31395,31404,31411,31413,31417,31419,31420,31430,31433,31436,31438,31441,31451,31464,31465,31467,31468,31473,31476,31483,31485,31486,31495,31508,31519,31523,31527,31529,31530,31531,31533,31534,31535,31536,31537,31540,31549,31551,31552,31553,31559,31566,31573,31584,31588,31590,31593,31594,31597,31599,31602,31603,31607,31620,31625,31630,31632,31633,31638,31643,31646,31648,31653,31660,31663,31664,31666,31669,31670,31674,31675,31676,31677,31682,31685,31688,31690,31700,31702,31703,31705,31706,31707,31720,31722,31730,31732,31733,31736,31737,31738,31740,31742,31745,31746,31747,31748,31750,31753,31755,31756,31758,31759,31769,31771,31776,31781,31782,31784,31788,31793,31795,31796,31798,31801,31802,31814,31818,31829,31825,31826,31827,31833,31834,31835,31836,31837,31838,31841,31843,31847,31849,31853,31854,31856,31858,31865,31868,31869,31878,31879,31887,31892,31902,31904,31910,31920,31926,31927,31930,31931,31932,31935,31940,31943,31944,31945,31949,31951,31955,31956,31957,31959,31961,31962,31965,31974,31977,31979,31989,32003,32007,32008,32009,32015,32017,32018,32019,32022,32029,32030,32035,32038,32042,32045,32049,32060,32061,32062,32064,32065,32071,32072,32077,32081,32083,32087,32089,32090,32092,32093,32101,32103,32106,32112,32120,32122,32123,32127,32129,32130,32131,32133,32134,32136,32139,32140,32141,32145,32150,32151,32157,32158,32166,32167,32170,32179,32182,32183,32185,32194,32195,32196,32197,32198,32204,32205,32206,32215,32217,32256,32226,32229,32230,32234,32235,32237,32241,32245,32246,32249,32250,32264,32272,32273,32277,32279,32284,32285,32288,32295,32296,32300,32301,32303,32307,32310,32319,32324,32325,32327,32334,32336,32338,32344,32351,32353,32354,32357,32363,32366,32367,32371,32376,32382,32385,32390,32391,32394,32397,32401,32405,32408,32410,32413,32414,32572,32571,32573,32574,32575,32579,32580,32583,32591,32594,32595,32603,32604,32605,32609,32611,32612,32613,32614,32621,32625,32637,32638,32639,32640,32651,32653,32655,32656,32657,32662,32663,32668,32673,32674,32678,32682,32685,32692,32700,32703,32704,32707,32712,32718,32719,32731,32735,32739,32741,32744,32748,32750,32751,32754,32762,32765,32766,32767,32775,32776,32778,32781,32782,32783,32785,32787,32788,32790,32797,32798,32799,32800,32804,32806,32812,32814,32816,32820,32821,32823,32825,32826,32828,32830,32832,32836,32864,32868,32870,32877,32881,32885,32897,32904,32910,32924,32926,32934,32935,32939,32952,32953,32968,32973,32975,32978,32980,32981,32983,32984,32992,33005,33006,33008,33010,33011,33014,33017,33018,33022,33027,33035,33046,33047,33048,33052,33054,33056,33060,33063,33068,33072,33077,33082,33084,33093,33095,33098,33100,33106,33111,33120,33121,33127,33128,33129,33133,33135,33143,33153,33168,33156,33157,33158,33163,33166,33174,33176,33179,33182,33186,33198,33202,33204,33211,33227,33219,33221,33226,33230,33231,33237,33239,33243,33245,33246,33249,33252,33259,33260,33264,33265,33266,33269,33270,33272,33273,33277,33279,33280,33283,33295,33299,33300,33305,33306,33309,33313,33314,33320,33330,33332,33338,33347,33348,33349,33350,33355,33358,33359,33361,33366,33372,33376,33379,33383,33389,33396,33403,33405,33407,33408,33409,33411,33412,33415,33417,33418,33422,33425,33428,33430,33432,33434,33435,33440,33441,33443,33444,33447,33448,33449,33450,33454,33456,33458,33460,33463,33466,33468,33470,33471,33478,33488,33493,33498,33504,33506,33508,33512,33514,33517,33519,33526,33527,33533,33534,33536,33537,33543,33544,33546,33547,33620,33563,33565,33566,33567,33569,33570,33580,33581,33582,33584,33587,33591,33594,33596,33597,33602,33603,33604,33607,33613,33614,33617,33621,33622,33623,33648,33656,33661,33663,33664,33666,33668,33670,33677,33682,33684,33685,33688,33689,33691,33692,33693,33702,33703,33705,33708,33726,33727,33728,33735,33737,33743,33744,33745,33748,33757,33619,33768,33770,33782,33784,33785,33788,33793,33798,33802,33807,33809,33813,33817,33709,33839,33849,33861,33863,33864,33866,33869,33871,33873,33874,33878,33880,33881,33882,33884,33888,33892,33893,33895,33898,33904,33907,33908,33910,33912,33916,33917,33921,33925,33938,33939,33941,33950,33958,33960,33961,33962,33967,33969,33972,33978,33981,33982,33984,33986,33991,33992,33996,33999,34003,34012,34023,34026,34031,34032,34033,34034,34039,34098,34042,34043,34045,34050,34051,34055,34060,34062,34064,34076,34078,34082,34083,34084,34085,34087,34090,34091,34095,34099,34100,34102,34111,34118,34127,34128,34129,34130,34131,34134,34137,34140,34141,34142,34143,34144,34145,34146,34148,34155,34159,34169,34170,34171,34173,34175,34177,34181,34182,34185,34187,34188,34191,34195,34200,34205,34207,34208,34210,34213,34215,34228,34230,34231,34232,34236,34237,34238,34239,34242,34247,34250,34251,34254,34221,34264,34266,34271,34272,34278,34280,34285,34291,34294,34300,34303,34304,34308,34309,34317,34318,34320,34321,34322,34328,34329,34331,34334,34337,34343,34345,34358,34360,34362,34364,34365,34368,34370,34374,34386,34387,34390,34391,34392,34393,34397,34400,34401,34402,34403,34404,34409,34412,34415,34421,34422,34423,34426,34445,34449,34454,34456,34458,34460,34465,34470,34471,34472,34477,34481,34483,34484,34485,34487,34488,34489,34495,34496,34497,34499,34501,34513,34514,34517,34519,34522,34524,34528,34531,34533,34535,34440,34554,34556,34557,34564,34565,34567,34571,34574,34575,34576,34579,34580,34585,34590,34591,34593,34595,34600,34606,34607,34609,34610,34617,34618,34620,34621,34622,34624,34627,34629,34637,34648,34653,34657,34660,34661,34671,34673,34674,34683,34691,34692,34693,34694,34695,34696,34697,34699,34700,34704,34707,34709,34711,34712,34713,34718,34720,34723,34727,34732,34733,34734,34737,34741,34750,34751,34753,34760,34761,34762,34766,34773,34774,34777,34778,34780,34783,34786,34787,34788,34794,34795,34797,34801,34803,34808,34810,34815,34817,34819,34822,34825,34826,34827,34832,34841,34834,34835,34836,34840,34842,34843,34844,34846,34847,34856,34861,34862,34864,34866,34869,34874,34876,34881,34883,34885,34888,34889,34890,34891,34894,34897,34901,34902,34904,34906,34908,34911,34912,34916,34921,34929,34937,34939,34944,34968,34970,34971,34972,34975,34976,34984,34986,35002,35005,35006,35008,35018,35019,35020,35021,35022,35025,35026,35027,35035,35038,35047,35055,35056,35057,35061,35063,35073,35078,35085,35086,35087,35093,35094,35096,35097,35098,35100,35104,35110,35111,35112,35120,35121,35122,35125,35129,35130,35134,35136,35138,35141,35142,35145,35151,35154,35159,35162,35163,35164,35169,35170,35171,35179,35182,35184,35187,35189,35194,35195,35196,35197,35209,35213,35216,35220,35221,35227,35228,35231,35232,35237,35248,35252,35253,35254,35255,35260,35284,35285,35286,35287,35288,35301,35305,35307,35309,35313,35315,35318,35321,35325,35327,35332,35333,35335,35343,35345,35346,35348,35349,35358,35360,35362,35364,35366,35371,35372,35375,35381,35383,35389,35390,35392,35395,35397,35399,35401,35405,35406,35411,35414,35415,35416,35420,35421,35425,35429,35431,35445,35446,35447,35449,35450,35451,35454,35455,35456,35459,35462,35467,35471,35472,35474,35478,35479,35481,35487,35495,35497,35502,35503,35507,35510,35511,35515,35518,35523,35526,35528,35529,35530,35537,35539,35540,35541,35543,35549,35551,35564,35568,35572,35573,35574,35580,35583,35589,35590,35595,35601,35612,35614,35615,35594,35629,35632,35639,35644,35650,35651,35652,35653,35654,35656,35666,35667,35668,35673,35661,35678,35683,35693,35702,35704,35705,35708,35710,35713,35716,35717,35723,35725,35727,35732,35733,35740,35742,35743,35896,35897,35901,35902,35909,35911,35913,35915,35919,35921,35923,35924,35927,35928,35931,35933,35929,35939,35940,35942,35944,35945,35949,35955,35957,35958,35963,35966,35974,35975,35979,35984,35986,35987,35993,35995,35996,36004,36025,36026,36037,36038,36041,36043,36047,36054,36053,36057,36061,36065,36072,36076,36079,36080,36082,36085,36087,36088,36094,36095,36097,36099,36105,36114,36119,36123,36197,36201,36204,36206,36223,36226,36228,36232,36237,36240,36241,36245,36254,36255,36256,36262,36267,36268,36271,36274,36277,36279,36281,36283,36288,36293,36294,36295,36296,36298,36302,36305,36308,36309,36311,36313,36324,36325,36327,36332,36336,36284,36337,36338,36340,36349,36353,36356,36357,36358,36363,36369,36372,36374,36384,36385,36386,36387,36390,36391,36401,36403,36406,36407,36408,36409,36413,36416,36417,36427,36429,36430,36431,36436,36443,36444,36445,36446,36449,36450,36457,36460,36461,36463,36464,36465,36473,36474,36475,36482,36483,36489,36496,36498,36501,36506,36507,36509,36510,36514,36519,36521,36525,36526,36531,36533,36538,36539,36544,36545,36547,36548,36551,36559,36561,36564,36572,36584,36590,36592,36593,36599,36601,36602,36589,36608,36610,36615,36616,36623,36624,36630,36631,36632,36638,36640,36641,36643,36645,36647,36648,36652,36653,36654,36660,36661,36662,36663,36666,36672,36673,36675,36679,36687,36689,36690,36691,36692,36693,36696,36701,36702,36709,36765,36768,36769,36772,36773,36774,36789,36790,36792,36798,36800,36801,36806,36810,36811,36813,36816,36818,36819,36821,36832,36835,36836,36840,36846,36849,36853,36854,36859,36862,36866,36868,36872,36876,36888,36891,36904,36905,36911,36906,36908,36909,36915,36916,36919,36927,36931,36932,36940,36955,36957,36962,36966,36967,36972,36976,36980,36985,36997,37000,37003,37004,37006,37008,37013,37015,37016,37017,37019,37024,37025,37026,37029,37040,37042,37043,37044,37046,37053,37068,37054,37059,37060,37061,37063,37064,37077,37079,37080,37081,37084,37085,37087,37093,37074,37110,37099,37103,37104,37108,37118,37119,37120,37124,37125,37126,37128,37133,37136,37140,37142,37143,37144,37146,37148,37150,37152,37157,37154,37155,37159,37161,37166,37167,37169,37172,37174,37175,37177,37178,37180,37181,37187,37191,37192,37199,37203,37207,37209,37210,37211,37217,37220,37223,37229,37236,37241,37242,37243,37249,37251,37253,37254,37258,37262,37265,37267,37268,37269,37272,37278,37281,37286,37288,37292,37293,37294,37296,37297,37298,37299,37302,37307,37308,37309,37311,37314,37315,37317,37331,37332,37335,37337,37338,37342,37348,37349,37353,37354,37356,37357,37358,37359,37360,37361,37367,37369,37371,37373,37376,37377,37380,37381,37382,37383,37385,37386,37388,37392,37394,37395,37398,37400,37404,37405,37411,37412,37413,37414,37416,37422,37423,37424,37427,37429,37430,37432,37433,37434,37436,37438,37440,37442,37443,37446,37447,37450,37453,37454,37455,37457,37464,37465,37468,37469,37472,37473,37477,37479,37480,37481,37486,37487,37488,37493,37494,37495,37496,37497,37499,37500,37501,37503,37512,37513,37514,37517,37518,37522,37527,37529,37535,37536,37540,37541,37543,37544,37547,37551,37554,37558,37560,37562,37563,37564,37565,37567,37568,37569,37570,37571,37573,37574,37575,37576,37579,37580,37581,37582,37584,37587,37589,37591,37592,37593,37596,37597,37599,37600,37601,37603,37605,37607,37608,37612,37614,37616,37625,37627,37631,37632,37634,37640,37645,37649,37652,37653,37660,37661,37662,37663,37665,37668,37669,37671,37673,37674,37683,37684,37686,37687,37703,37704,37705,37712,37713,37714,37717,37719,37720,37722,37726,37732,37733,37735,37737,37738,37741,37743,37744,37745,37747,37748,37750,37754,37757,37759,37760,37761,37762,37768,37770,37771,37773,37775,37778,37781,37784,37787,37790,37793,37795,37796,37798,37800,37803,37812,37813,37814,37818,37801,37825,37828,37829,37830,37831,37833,37834,37835,37836,37837,37843,37849,37852,37854,37855,37858,37862,37863,37881,37879,37880,37882,37883,37885,37889,37890,37892,37896,37897,37901,37902,37903,37909,37910,37911,37919,37934,37935,37937,37938,37939,37940,37947,37951,37949,37955,37957,37960,37962,37964,37973,37977,37980,37983,37985,37987,37992,37995,37997,37998,37999,38001,38002,38020,38019,38264,38265,38270,38276,38280,38284,38285,38286,38301,38302,38303,38305,38310,38313,38315,38316,38324,38326,38330,38333,38335,38342,38344,38345,38347,38352,38353,38354,38355,38361,38362,38365,38366,38367,38368,38372,38374,38429,38430,38434,38436,38437,38438,38444,38449,38451,38455,38456,38457,38458,38460,38461,38465,38482,38484,38486,38487,38488,38497,38510,38516,38523,38524,38526,38527,38529,38530,38531,38532,38537,38545,38550,38554,38557,38559,38564,38565,38566,38569,38574,38575,38579,38586,38602,38610,23986,38616,38618,38621,38622,38623,38633,38639,38641,38650,38658,38659,38661,38665,38682,38683,38685,38689,38690,38691,38696,38705,38707,38721,38723,38730,38734,38735,38741,38743,38744,38746,38747,38755,38759,38762,38766,38771,38774,38775,38776,38779,38781,38783,38784,38793,38805,38806,38807,38809,38810,38814,38815,38818,38828,38830,38833,38834,38837,38838,38840,38841,38842,38844,38846,38847,38849,38852,38853,38855,38857,38858,38860,38861,38862,38864,38865,38868,38871,38872,38873,38877,38878,38880,38875,38881,38884,38895,38897,38900,38903,38904,38906,38919,38922,38937,38925,38926,38932,38934,38940,38942,38944,38947,38950,38955,38958,38959,38960,38962,38963,38965,38949,38974,38980,38983,38986,38993,38994,38995,38998,38999,39001,39002,39010,39011,39013,39014,39018,39020,39083,39085,39086,39088,39092,39095,39096,39098,39099,39103,39106,39109,39112,39116,39137,39139,39141,39142,39143,39146,39155,39158,39170,39175,39176,39185,39189,39190,39191,39194,39195,39196,39199,39202,39206,39207,39211,39217,39218,39219,39220,39221,39225,39226,39227,39228,39232,39233,39238,39239,39240,39245,39246,39252,39256,39257,39259,39260,39262,39263,39264,39323,39325,39327,39334,39344,39345,39346,39349,39353,39354,39357,39359,39363,39369,39379,39380,39385,39386,39388,39390,39399,39402,39403,39404,39408,39412,39413,39417,39421,39422,39426,39427,39428,39435,39436,39440,39441,39446,39454,39456,39458,39459,39460,39463,39469,39470,39475,39477,39478,39480,39495,39489,39492,39498,39499,39500,39502,39505,39508,39510,39517,39594,39596,39598,39599,39602,39604,39605,39606,39609,39611,39614,39615,39617,39619,39622,39624,39630,39632,39634,39637,39638,39639,39643,39644,39648,39652,39653,39655,39657,39660,39666,39667,39669,39673,39674,39677,39679,39680,39681,39682,39683,39684,39685,39688,39689,39691,39692,39693,39694,39696,39698,39702,39705,39707,39708,39712,39718,39723,39725,39731,39732,39733,39735,39737,39738,39741,39752,39755,39756,39765,39766,39767,39771,39774,39777,39779,39781,39782,39784,39786,39787,39788,39789,39790,39795,39797,39799,39800,39801,39807,39808,39812,39813,39814,39815,39817,39818,39819,39821,39823,39824,39828,39834,39837,39838,39846,39847,39849,39852,39856,39857,39858,39863,39864,39867,39868,39870,39871,39873,39879,39880,39886,39888,39895,39896,39901,39903,39909,39911,39914,39915,39919,39923,39927,39928,39929,39930,39933,39935,39936,39938,39947,39951,39953,39958,39960,39961,39962,39964,39966,39970,39971,39974,39975,39976,39977,39978,39985,39989,39990,39991,39997,40001,40003,40004,40005,40009,40010,40014,40015,40016,40019,40020,40022,40024,40027,40029,40030,40031,40035,40041,40042,40028,40043,40040,40046,40048,40050,40053,40055,40059,40166,40178,40183,40185,40203,40194,40209,40215,40216,40220,40221,40222,40239,40240,40242,40243,40244,40250,40252,40261,40253,40258,40259,40263,40266,40275,40276,40287,40291,40290,40293,40297,40298,40299,40304,40310,40311,40315,40316,40318,40323,40324,40326,40330,40333,40334,40338,40339,40341,40342,40343,40344,40353,40362,40364,40366,40369,40373,40377,40380,40383,40387,40391,40393,40394,40404,40405,40406,40407,40410,40414,40415,40416,40421,40423,40425,40427,40430,40432,40435,40436,40446,40458,40450,40455,40462,40464,40465,40466,40469,40470,40473,40476,40477,40570,40571,40572,40576,40578,40579,40580,40581,40583,40590,40591,40598,40600,40603,40606,40612,40616,40620,40622,40623,40624,40627,40628,40629,40646,40648,40651,40661,40671,40676,40679,40684,40685,40686,40688,40689,40690,40693,40696,40703,40706,40707,40713,40719,40720,40721,40722,40724,40726,40727,40729,40730,40731,40735,40738,40742,40746,40747,40751,40753,40754,40756,40759,40761,40762,40764,40765,40767,40769,40771,40772,40773,40774,40775,40787,40789,40790,40791,40792,40794,40797,40798,40808,40809,40813,40814,40815,40816,40817,40819,40821,40826,40829,40847,40848,40849,40850,40852,40854,40855,40862,40865,40866,40867,40869,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
28021 "ibm866":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],
28022 "iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],
28023 "iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],
28024 "iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],
28025 "iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],
28026 "iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],
28027 "iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],
28028 "iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],
28029 "iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],
28030 "iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],
28031 "iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],
28032 "iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],
28033 "iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],
28034 "koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],
28035 "koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],
28036 "macintosh":[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],
28037 "windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],
28038 "windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],
28039 "windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],
28040 "windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],
28041 "windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],
28042 "windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],
28043 "windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],
28044 "windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],
28045 "windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],
28046 "windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],
28047 "x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]
28048};
28049
28050// For strict environments where `this` inside the global scope
28051// is `undefined`, take a pure object instead
28052}(this || {}));
28053},{}],43:[function(require,module,exports){
28054// This is free and unencumbered software released into the public domain.
28055// See LICENSE.md for more information.
28056
28057/**
28058 * @fileoverview Global |this| required for resolving indexes in node.
28059 * @suppress {globalThis}
28060 */
28061(function(global) {
28062
28063 // If we're in node require encoding-indexes and attach it to the global.
28064 if (typeof module !== "undefined" && module.exports &&
28065 !global["encoding-indexes"]) {
28066 global["encoding-indexes"] =
28067 require("./encoding-indexes.js")["encoding-indexes"];
28068 }
28069
28070 //
28071 // Utilities
28072 //
28073
28074 /**
28075 * @param {number} a The number to test.
28076 * @param {number} min The minimum value in the range, inclusive.
28077 * @param {number} max The maximum value in the range, inclusive.
28078 * @return {boolean} True if a >= min and a <= max.
28079 */
28080 function inRange(a, min, max) {
28081 return min <= a && a <= max;
28082 }
28083
28084 /**
28085 * @param {!Array.<*>} array The array to check.
28086 * @param {*} item The item to look for in the array.
28087 * @return {boolean} True if the item appears in the array.
28088 */
28089 function includes(array, item) {
28090 return array.indexOf(item) !== -1;
28091 }
28092
28093 var floor = Math.floor;
28094
28095 /**
28096 * @param {*} o
28097 * @return {Object}
28098 */
28099 function ToDictionary(o) {
28100 if (o === undefined) return {};
28101 if (o === Object(o)) return o;
28102 throw TypeError('Could not convert argument to dictionary');
28103 }
28104
28105 /**
28106 * @param {string} string Input string of UTF-16 code units.
28107 * @return {!Array.<number>} Code points.
28108 */
28109 function stringToCodePoints(string) {
28110 // https://heycam.github.io/webidl/#dfn-obtain-unicode
28111
28112 // 1. Let S be the DOMString value.
28113 var s = String(string);
28114
28115 // 2. Let n be the length of S.
28116 var n = s.length;
28117
28118 // 3. Initialize i to 0.
28119 var i = 0;
28120
28121 // 4. Initialize U to be an empty sequence of Unicode characters.
28122 var u = [];
28123
28124 // 5. While i < n:
28125 while (i < n) {
28126
28127 // 1. Let c be the code unit in S at index i.
28128 var c = s.charCodeAt(i);
28129
28130 // 2. Depending on the value of c:
28131
28132 // c < 0xD800 or c > 0xDFFF
28133 if (c < 0xD800 || c > 0xDFFF) {
28134 // Append to U the Unicode character with code point c.
28135 u.push(c);
28136 }
28137
28138 // 0xDC00 ≤ c ≤ 0xDFFF
28139 else if (0xDC00 <= c && c <= 0xDFFF) {
28140 // Append to U a U+FFFD REPLACEMENT CHARACTER.
28141 u.push(0xFFFD);
28142 }
28143
28144 // 0xD800 ≤ c ≤ 0xDBFF
28145 else if (0xD800 <= c && c <= 0xDBFF) {
28146 // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT
28147 // CHARACTER.
28148 if (i === n - 1) {
28149 u.push(0xFFFD);
28150 }
28151 // 2. Otherwise, i < n−1:
28152 else {
28153 // 1. Let d be the code unit in S at index i+1.
28154 var d = s.charCodeAt(i + 1);
28155
28156 // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:
28157 if (0xDC00 <= d && d <= 0xDFFF) {
28158 // 1. Let a be c & 0x3FF.
28159 var a = c & 0x3FF;
28160
28161 // 2. Let b be d & 0x3FF.
28162 var b = d & 0x3FF;
28163
28164 // 3. Append to U the Unicode character with code point
28165 // 2^16+2^10*a+b.
28166 u.push(0x10000 + (a << 10) + b);
28167
28168 // 4. Set i to i+1.
28169 i += 1;
28170 }
28171
28172 // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a
28173 // U+FFFD REPLACEMENT CHARACTER.
28174 else {
28175 u.push(0xFFFD);
28176 }
28177 }
28178 }
28179
28180 // 3. Set i to i+1.
28181 i += 1;
28182 }
28183
28184 // 6. Return U.
28185 return u;
28186 }
28187
28188 /**
28189 * @param {!Array.<number>} code_points Array of code points.
28190 * @return {string} string String of UTF-16 code units.
28191 */
28192 function codePointsToString(code_points) {
28193 var s = '';
28194 for (var i = 0; i < code_points.length; ++i) {
28195 var cp = code_points[i];
28196 if (cp <= 0xFFFF) {
28197 s += String.fromCharCode(cp);
28198 } else {
28199 cp -= 0x10000;
28200 s += String.fromCharCode((cp >> 10) + 0xD800,
28201 (cp & 0x3FF) + 0xDC00);
28202 }
28203 }
28204 return s;
28205 }
28206
28207
28208 //
28209 // Implementation of Encoding specification
28210 // https://encoding.spec.whatwg.org/
28211 //
28212
28213 //
28214 // 4. Terminology
28215 //
28216
28217 /**
28218 * An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
28219 * @param {number} a The number to test.
28220 * @return {boolean} True if a is in the range 0x00 to 0x7F, inclusive.
28221 */
28222 function isASCIIByte(a) {
28223 return 0x00 <= a && a <= 0x7F;
28224 }
28225
28226 /**
28227 * An ASCII code point is a code point in the range U+0000 to
28228 * U+007F, inclusive.
28229 */
28230 var isASCIICodePoint = isASCIIByte;
28231
28232
28233 /**
28234 * End-of-stream is a special token that signifies no more tokens
28235 * are in the stream.
28236 * @const
28237 */ var end_of_stream = -1;
28238
28239 /**
28240 * A stream represents an ordered sequence of tokens.
28241 *
28242 * @constructor
28243 * @param {!(Array.<number>|Uint8Array)} tokens Array of tokens that provide
28244 * the stream.
28245 */
28246 function Stream(tokens) {
28247 /** @type {!Array.<number>} */
28248 this.tokens = [].slice.call(tokens);
28249 // Reversed as push/pop is more efficient than shift/unshift.
28250 this.tokens.reverse();
28251 }
28252
28253 Stream.prototype = {
28254 /**
28255 * @return {boolean} True if end-of-stream has been hit.
28256 */
28257 endOfStream: function() {
28258 return !this.tokens.length;
28259 },
28260
28261 /**
28262 * When a token is read from a stream, the first token in the
28263 * stream must be returned and subsequently removed, and
28264 * end-of-stream must be returned otherwise.
28265 *
28266 * @return {number} Get the next token from the stream, or
28267 * end_of_stream.
28268 */
28269 read: function() {
28270 if (!this.tokens.length)
28271 return end_of_stream;
28272 return this.tokens.pop();
28273 },
28274
28275 /**
28276 * When one or more tokens are prepended to a stream, those tokens
28277 * must be inserted, in given order, before the first token in the
28278 * stream.
28279 *
28280 * @param {(number|!Array.<number>)} token The token(s) to prepend to the
28281 * stream.
28282 */
28283 prepend: function(token) {
28284 if (Array.isArray(token)) {
28285 var tokens = /**@type {!Array.<number>}*/(token);
28286 while (tokens.length)
28287 this.tokens.push(tokens.pop());
28288 } else {
28289 this.tokens.push(token);
28290 }
28291 },
28292
28293 /**
28294 * When one or more tokens are pushed to a stream, those tokens
28295 * must be inserted, in given order, after the last token in the
28296 * stream.
28297 *
28298 * @param {(number|!Array.<number>)} token The tokens(s) to push to the
28299 * stream.
28300 */
28301 push: function(token) {
28302 if (Array.isArray(token)) {
28303 var tokens = /**@type {!Array.<number>}*/(token);
28304 while (tokens.length)
28305 this.tokens.unshift(tokens.shift());
28306 } else {
28307 this.tokens.unshift(token);
28308 }
28309 }
28310 };
28311
28312 //
28313 // 5. Encodings
28314 //
28315
28316 // 5.1 Encoders and decoders
28317
28318 /** @const */
28319 var finished = -1;
28320
28321 /**
28322 * @param {boolean} fatal If true, decoding errors raise an exception.
28323 * @param {number=} opt_code_point Override the standard fallback code point.
28324 * @return {number} The code point to insert on a decoding error.
28325 */
28326 function decoderError(fatal, opt_code_point) {
28327 if (fatal)
28328 throw TypeError('Decoder error');
28329 return opt_code_point || 0xFFFD;
28330 }
28331
28332 /**
28333 * @param {number} code_point The code point that could not be encoded.
28334 * @return {number} Always throws, no value is actually returned.
28335 */
28336 function encoderError(code_point) {
28337 throw TypeError('The code point ' + code_point + ' could not be encoded.');
28338 }
28339
28340 // 5.2 Names and labels
28341
28342 // TODO: Define @typedef for Encoding: {name:string,labels:Array.<string>}
28343 // https://github.com/google/closure-compiler/issues/247
28344
28345 /**
28346 * @param {string} label The encoding label.
28347 * @return {?{name:string,labels:Array.<string>}}
28348 */
28349 function getEncoding(label) {
28350 // 1. Remove any leading and trailing ASCII whitespace from label.
28351 label = String(label).trim().toLowerCase();
28352
28353 // 2. If label is an ASCII case-insensitive match for any of the
28354 // labels listed in the table below, return the corresponding
28355 // encoding, and failure otherwise.
28356 if (Object.prototype.hasOwnProperty.call(label_to_encoding, label)) {
28357 return label_to_encoding[label];
28358 }
28359 return null;
28360 }
28361
28362 /**
28363 * Encodings table: https://encoding.spec.whatwg.org/encodings.json
28364 * @const
28365 * @type {!Array.<{
28366 * heading: string,
28367 * encodings: Array.<{name:string,labels:Array.<string>}>
28368 * }>}
28369 */
28370 var encodings = [
28371 {
28372 "encodings": [
28373 {
28374 "labels": [
28375 "unicode-1-1-utf-8",
28376 "utf-8",
28377 "utf8"
28378 ],
28379 "name": "UTF-8"
28380 }
28381 ],
28382 "heading": "The Encoding"
28383 },
28384 {
28385 "encodings": [
28386 {
28387 "labels": [
28388 "866",
28389 "cp866",
28390 "csibm866",
28391 "ibm866"
28392 ],
28393 "name": "IBM866"
28394 },
28395 {
28396 "labels": [
28397 "csisolatin2",
28398 "iso-8859-2",
28399 "iso-ir-101",
28400 "iso8859-2",
28401 "iso88592",
28402 "iso_8859-2",
28403 "iso_8859-2:1987",
28404 "l2",
28405 "latin2"
28406 ],
28407 "name": "ISO-8859-2"
28408 },
28409 {
28410 "labels": [
28411 "csisolatin3",
28412 "iso-8859-3",
28413 "iso-ir-109",
28414 "iso8859-3",
28415 "iso88593",
28416 "iso_8859-3",
28417 "iso_8859-3:1988",
28418 "l3",
28419 "latin3"
28420 ],
28421 "name": "ISO-8859-3"
28422 },
28423 {
28424 "labels": [
28425 "csisolatin4",
28426 "iso-8859-4",
28427 "iso-ir-110",
28428 "iso8859-4",
28429 "iso88594",
28430 "iso_8859-4",
28431 "iso_8859-4:1988",
28432 "l4",
28433 "latin4"
28434 ],
28435 "name": "ISO-8859-4"
28436 },
28437 {
28438 "labels": [
28439 "csisolatincyrillic",
28440 "cyrillic",
28441 "iso-8859-5",
28442 "iso-ir-144",
28443 "iso8859-5",
28444 "iso88595",
28445 "iso_8859-5",
28446 "iso_8859-5:1988"
28447 ],
28448 "name": "ISO-8859-5"
28449 },
28450 {
28451 "labels": [
28452 "arabic",
28453 "asmo-708",
28454 "csiso88596e",
28455 "csiso88596i",
28456 "csisolatinarabic",
28457 "ecma-114",
28458 "iso-8859-6",
28459 "iso-8859-6-e",
28460 "iso-8859-6-i",
28461 "iso-ir-127",
28462 "iso8859-6",
28463 "iso88596",
28464 "iso_8859-6",
28465 "iso_8859-6:1987"
28466 ],
28467 "name": "ISO-8859-6"
28468 },
28469 {
28470 "labels": [
28471 "csisolatingreek",
28472 "ecma-118",
28473 "elot_928",
28474 "greek",
28475 "greek8",
28476 "iso-8859-7",
28477 "iso-ir-126",
28478 "iso8859-7",
28479 "iso88597",
28480 "iso_8859-7",
28481 "iso_8859-7:1987",
28482 "sun_eu_greek"
28483 ],
28484 "name": "ISO-8859-7"
28485 },
28486 {
28487 "labels": [
28488 "csiso88598e",
28489 "csisolatinhebrew",
28490 "hebrew",
28491 "iso-8859-8",
28492 "iso-8859-8-e",
28493 "iso-ir-138",
28494 "iso8859-8",
28495 "iso88598",
28496 "iso_8859-8",
28497 "iso_8859-8:1988",
28498 "visual"
28499 ],
28500 "name": "ISO-8859-8"
28501 },
28502 {
28503 "labels": [
28504 "csiso88598i",
28505 "iso-8859-8-i",
28506 "logical"
28507 ],
28508 "name": "ISO-8859-8-I"
28509 },
28510 {
28511 "labels": [
28512 "csisolatin6",
28513 "iso-8859-10",
28514 "iso-ir-157",
28515 "iso8859-10",
28516 "iso885910",
28517 "l6",
28518 "latin6"
28519 ],
28520 "name": "ISO-8859-10"
28521 },
28522 {
28523 "labels": [
28524 "iso-8859-13",
28525 "iso8859-13",
28526 "iso885913"
28527 ],
28528 "name": "ISO-8859-13"
28529 },
28530 {
28531 "labels": [
28532 "iso-8859-14",
28533 "iso8859-14",
28534 "iso885914"
28535 ],
28536 "name": "ISO-8859-14"
28537 },
28538 {
28539 "labels": [
28540 "csisolatin9",
28541 "iso-8859-15",
28542 "iso8859-15",
28543 "iso885915",
28544 "iso_8859-15",
28545 "l9"
28546 ],
28547 "name": "ISO-8859-15"
28548 },
28549 {
28550 "labels": [
28551 "iso-8859-16"
28552 ],
28553 "name": "ISO-8859-16"
28554 },
28555 {
28556 "labels": [
28557 "cskoi8r",
28558 "koi",
28559 "koi8",
28560 "koi8-r",
28561 "koi8_r"
28562 ],
28563 "name": "KOI8-R"
28564 },
28565 {
28566 "labels": [
28567 "koi8-ru",
28568 "koi8-u"
28569 ],
28570 "name": "KOI8-U"
28571 },
28572 {
28573 "labels": [
28574 "csmacintosh",
28575 "mac",
28576 "macintosh",
28577 "x-mac-roman"
28578 ],
28579 "name": "macintosh"
28580 },
28581 {
28582 "labels": [
28583 "dos-874",
28584 "iso-8859-11",
28585 "iso8859-11",
28586 "iso885911",
28587 "tis-620",
28588 "windows-874"
28589 ],
28590 "name": "windows-874"
28591 },
28592 {
28593 "labels": [
28594 "cp1250",
28595 "windows-1250",
28596 "x-cp1250"
28597 ],
28598 "name": "windows-1250"
28599 },
28600 {
28601 "labels": [
28602 "cp1251",
28603 "windows-1251",
28604 "x-cp1251"
28605 ],
28606 "name": "windows-1251"
28607 },
28608 {
28609 "labels": [
28610 "ansi_x3.4-1968",
28611 "ascii",
28612 "cp1252",
28613 "cp819",
28614 "csisolatin1",
28615 "ibm819",
28616 "iso-8859-1",
28617 "iso-ir-100",
28618 "iso8859-1",
28619 "iso88591",
28620 "iso_8859-1",
28621 "iso_8859-1:1987",
28622 "l1",
28623 "latin1",
28624 "us-ascii",
28625 "windows-1252",
28626 "x-cp1252"
28627 ],
28628 "name": "windows-1252"
28629 },
28630 {
28631 "labels": [
28632 "cp1253",
28633 "windows-1253",
28634 "x-cp1253"
28635 ],
28636 "name": "windows-1253"
28637 },
28638 {
28639 "labels": [
28640 "cp1254",
28641 "csisolatin5",
28642 "iso-8859-9",
28643 "iso-ir-148",
28644 "iso8859-9",
28645 "iso88599",
28646 "iso_8859-9",
28647 "iso_8859-9:1989",
28648 "l5",
28649 "latin5",
28650 "windows-1254",
28651 "x-cp1254"
28652 ],
28653 "name": "windows-1254"
28654 },
28655 {
28656 "labels": [
28657 "cp1255",
28658 "windows-1255",
28659 "x-cp1255"
28660 ],
28661 "name": "windows-1255"
28662 },
28663 {
28664 "labels": [
28665 "cp1256",
28666 "windows-1256",
28667 "x-cp1256"
28668 ],
28669 "name": "windows-1256"
28670 },
28671 {
28672 "labels": [
28673 "cp1257",
28674 "windows-1257",
28675 "x-cp1257"
28676 ],
28677 "name": "windows-1257"
28678 },
28679 {
28680 "labels": [
28681 "cp1258",
28682 "windows-1258",
28683 "x-cp1258"
28684 ],
28685 "name": "windows-1258"
28686 },
28687 {
28688 "labels": [
28689 "x-mac-cyrillic",
28690 "x-mac-ukrainian"
28691 ],
28692 "name": "x-mac-cyrillic"
28693 }
28694 ],
28695 "heading": "Legacy single-byte encodings"
28696 },
28697 {
28698 "encodings": [
28699 {
28700 "labels": [
28701 "chinese",
28702 "csgb2312",
28703 "csiso58gb231280",
28704 "gb2312",
28705 "gb_2312",
28706 "gb_2312-80",
28707 "gbk",
28708 "iso-ir-58",
28709 "x-gbk"
28710 ],
28711 "name": "GBK"
28712 },
28713 {
28714 "labels": [
28715 "gb18030"
28716 ],
28717 "name": "gb18030"
28718 }
28719 ],
28720 "heading": "Legacy multi-byte Chinese (simplified) encodings"
28721 },
28722 {
28723 "encodings": [
28724 {
28725 "labels": [
28726 "big5",
28727 "big5-hkscs",
28728 "cn-big5",
28729 "csbig5",
28730 "x-x-big5"
28731 ],
28732 "name": "Big5"
28733 }
28734 ],
28735 "heading": "Legacy multi-byte Chinese (traditional) encodings"
28736 },
28737 {
28738 "encodings": [
28739 {
28740 "labels": [
28741 "cseucpkdfmtjapanese",
28742 "euc-jp",
28743 "x-euc-jp"
28744 ],
28745 "name": "EUC-JP"
28746 },
28747 {
28748 "labels": [
28749 "csiso2022jp",
28750 "iso-2022-jp"
28751 ],
28752 "name": "ISO-2022-JP"
28753 },
28754 {
28755 "labels": [
28756 "csshiftjis",
28757 "ms932",
28758 "ms_kanji",
28759 "shift-jis",
28760 "shift_jis",
28761 "sjis",
28762 "windows-31j",
28763 "x-sjis"
28764 ],
28765 "name": "Shift_JIS"
28766 }
28767 ],
28768 "heading": "Legacy multi-byte Japanese encodings"
28769 },
28770 {
28771 "encodings": [
28772 {
28773 "labels": [
28774 "cseuckr",
28775 "csksc56011987",
28776 "euc-kr",
28777 "iso-ir-149",
28778 "korean",
28779 "ks_c_5601-1987",
28780 "ks_c_5601-1989",
28781 "ksc5601",
28782 "ksc_5601",
28783 "windows-949"
28784 ],
28785 "name": "EUC-KR"
28786 }
28787 ],
28788 "heading": "Legacy multi-byte Korean encodings"
28789 },
28790 {
28791 "encodings": [
28792 {
28793 "labels": [
28794 "csiso2022kr",
28795 "hz-gb-2312",
28796 "iso-2022-cn",
28797 "iso-2022-cn-ext",
28798 "iso-2022-kr"
28799 ],
28800 "name": "replacement"
28801 },
28802 {
28803 "labels": [
28804 "utf-16be"
28805 ],
28806 "name": "UTF-16BE"
28807 },
28808 {
28809 "labels": [
28810 "utf-16",
28811 "utf-16le"
28812 ],
28813 "name": "UTF-16LE"
28814 },
28815 {
28816 "labels": [
28817 "x-user-defined"
28818 ],
28819 "name": "x-user-defined"
28820 }
28821 ],
28822 "heading": "Legacy miscellaneous encodings"
28823 }
28824 ];
28825
28826 // Label to encoding registry.
28827 /** @type {Object.<string,{name:string,labels:Array.<string>}>} */
28828 var label_to_encoding = {};
28829 encodings.forEach(function(category) {
28830 category.encodings.forEach(function(encoding) {
28831 encoding.labels.forEach(function(label) {
28832 label_to_encoding[label] = encoding;
28833 });
28834 });
28835 });
28836
28837 // Registry of of encoder/decoder factories, by encoding name.
28838 /** @type {Object.<string, function({fatal:boolean}): Encoder>} */
28839 var encoders = {};
28840 /** @type {Object.<string, function({fatal:boolean}): Decoder>} */
28841 var decoders = {};
28842
28843 //
28844 // 6. Indexes
28845 //
28846
28847 /**
28848 * @param {number} pointer The |pointer| to search for.
28849 * @param {(!Array.<?number>|undefined)} index The |index| to search within.
28850 * @return {?number} The code point corresponding to |pointer| in |index|,
28851 * or null if |code point| is not in |index|.
28852 */
28853 function indexCodePointFor(pointer, index) {
28854 if (!index) return null;
28855 return index[pointer] || null;
28856 }
28857
28858 /**
28859 * @param {number} code_point The |code point| to search for.
28860 * @param {!Array.<?number>} index The |index| to search within.
28861 * @return {?number} The first pointer corresponding to |code point| in
28862 * |index|, or null if |code point| is not in |index|.
28863 */
28864 function indexPointerFor(code_point, index) {
28865 var pointer = index.indexOf(code_point);
28866 return pointer === -1 ? null : pointer;
28867 }
28868
28869 /**
28870 * @param {string} name Name of the index.
28871 * @return {(!Array.<number>|!Array.<Array.<number>>)}
28872 * */
28873 function index(name) {
28874 if (!('encoding-indexes' in global)) {
28875 throw Error("Indexes missing." +
28876 " Did you forget to include encoding-indexes.js first?");
28877 }
28878 return global['encoding-indexes'][name];
28879 }
28880
28881 /**
28882 * @param {number} pointer The |pointer| to search for in the gb18030 index.
28883 * @return {?number} The code point corresponding to |pointer| in |index|,
28884 * or null if |code point| is not in the gb18030 index.
28885 */
28886 function indexGB18030RangesCodePointFor(pointer) {
28887 // 1. If pointer is greater than 39419 and less than 189000, or
28888 // pointer is greater than 1237575, return null.
28889 if ((pointer > 39419 && pointer < 189000) || (pointer > 1237575))
28890 return null;
28891
28892 // 2. If pointer is 7457, return code point U+E7C7.
28893 if (pointer === 7457) return 0xE7C7;
28894
28895 // 3. Let offset be the last pointer in index gb18030 ranges that
28896 // is equal to or less than pointer and let code point offset be
28897 // its corresponding code point.
28898 var offset = 0;
28899 var code_point_offset = 0;
28900 var idx = index('gb18030-ranges');
28901 var i;
28902 for (i = 0; i < idx.length; ++i) {
28903 /** @type {!Array.<number>} */
28904 var entry = idx[i];
28905 if (entry[0] <= pointer) {
28906 offset = entry[0];
28907 code_point_offset = entry[1];
28908 } else {
28909 break;
28910 }
28911 }
28912
28913 // 4. Return a code point whose value is code point offset +
28914 // pointer − offset.
28915 return code_point_offset + pointer - offset;
28916 }
28917
28918 /**
28919 * @param {number} code_point The |code point| to locate in the gb18030 index.
28920 * @return {number} The first pointer corresponding to |code point| in the
28921 * gb18030 index.
28922 */
28923 function indexGB18030RangesPointerFor(code_point) {
28924 // 1. If code point is U+E7C7, return pointer 7457.
28925 if (code_point === 0xE7C7) return 7457;
28926
28927 // 2. Let offset be the last code point in index gb18030 ranges
28928 // that is equal to or less than code point and let pointer offset
28929 // be its corresponding pointer.
28930 var offset = 0;
28931 var pointer_offset = 0;
28932 var idx = index('gb18030-ranges');
28933 var i;
28934 for (i = 0; i < idx.length; ++i) {
28935 /** @type {!Array.<number>} */
28936 var entry = idx[i];
28937 if (entry[1] <= code_point) {
28938 offset = entry[1];
28939 pointer_offset = entry[0];
28940 } else {
28941 break;
28942 }
28943 }
28944
28945 // 3. Return a pointer whose value is pointer offset + code point
28946 // − offset.
28947 return pointer_offset + code_point - offset;
28948 }
28949
28950 /**
28951 * @param {number} code_point The |code_point| to search for in the Shift_JIS
28952 * index.
28953 * @return {?number} The code point corresponding to |pointer| in |index|,
28954 * or null if |code point| is not in the Shift_JIS index.
28955 */
28956 function indexShiftJISPointerFor(code_point) {
28957 // 1. Let index be index jis0208 excluding all entries whose
28958 // pointer is in the range 8272 to 8835, inclusive.
28959 shift_jis_index = shift_jis_index ||
28960 index('jis0208').map(function(code_point, pointer) {
28961 return inRange(pointer, 8272, 8835) ? null : code_point;
28962 });
28963 var index_ = shift_jis_index;
28964
28965 // 2. Return the index pointer for code point in index.
28966 return index_.indexOf(code_point);
28967 }
28968 var shift_jis_index;
28969
28970 /**
28971 * @param {number} code_point The |code_point| to search for in the big5
28972 * index.
28973 * @return {?number} The code point corresponding to |pointer| in |index|,
28974 * or null if |code point| is not in the big5 index.
28975 */
28976 function indexBig5PointerFor(code_point) {
28977 // 1. Let index be index Big5 excluding all entries whose pointer
28978 big5_index_no_hkscs = big5_index_no_hkscs ||
28979 index('big5').map(function(code_point, pointer) {
28980 return (pointer < (0xA1 - 0x81) * 157) ? null : code_point;
28981 });
28982 var index_ = big5_index_no_hkscs;
28983
28984 // 2. If code point is U+2550, U+255E, U+2561, U+256A, U+5341, or
28985 // U+5345, return the last pointer corresponding to code point in
28986 // index.
28987 if (code_point === 0x2550 || code_point === 0x255E ||
28988 code_point === 0x2561 || code_point === 0x256A ||
28989 code_point === 0x5341 || code_point === 0x5345) {
28990 return index_.lastIndexOf(code_point);
28991 }
28992
28993 // 3. Return the index pointer for code point in index.
28994 return indexPointerFor(code_point, index_);
28995 }
28996 var big5_index_no_hkscs;
28997
28998 //
28999 // 8. API
29000 //
29001
29002 /** @const */ var DEFAULT_ENCODING = 'utf-8';
29003
29004 // 8.1 Interface TextDecoder
29005
29006 /**
29007 * @constructor
29008 * @param {string=} label The label of the encoding;
29009 * defaults to 'utf-8'.
29010 * @param {Object=} options
29011 */
29012 function TextDecoder(label, options) {
29013 // Web IDL conventions
29014 if (!(this instanceof TextDecoder))
29015 throw TypeError('Called as a function. Did you forget \'new\'?');
29016 label = label !== undefined ? String(label) : DEFAULT_ENCODING;
29017 options = ToDictionary(options);
29018
29019 // A TextDecoder object has an associated encoding, decoder,
29020 // stream, ignore BOM flag (initially unset), BOM seen flag
29021 // (initially unset), error mode (initially replacement), and do
29022 // not flush flag (initially unset).
29023
29024 /** @private */
29025 this._encoding = null;
29026 /** @private @type {?Decoder} */
29027 this._decoder = null;
29028 /** @private @type {boolean} */
29029 this._ignoreBOM = false;
29030 /** @private @type {boolean} */
29031 this._BOMseen = false;
29032 /** @private @type {string} */
29033 this._error_mode = 'replacement';
29034 /** @private @type {boolean} */
29035 this._do_not_flush = false;
29036
29037
29038 // 1. Let encoding be the result of getting an encoding from
29039 // label.
29040 var encoding = getEncoding(label);
29041
29042 // 2. If encoding is failure or replacement, throw a RangeError.
29043 if (encoding === null || encoding.name === 'replacement')
29044 throw RangeError('Unknown encoding: ' + label);
29045 if (!decoders[encoding.name]) {
29046 throw Error('Decoder not present.' +
29047 ' Did you forget to include encoding-indexes.js first?');
29048 }
29049
29050 // 3. Let dec be a new TextDecoder object.
29051 var dec = this;
29052
29053 // 4. Set dec's encoding to encoding.
29054 dec._encoding = encoding;
29055
29056 // 5. If options's fatal member is true, set dec's error mode to
29057 // fatal.
29058 if (Boolean(options['fatal']))
29059 dec._error_mode = 'fatal';
29060
29061 // 6. If options's ignoreBOM member is true, set dec's ignore BOM
29062 // flag.
29063 if (Boolean(options['ignoreBOM']))
29064 dec._ignoreBOM = true;
29065
29066 // For pre-ES5 runtimes:
29067 if (!Object.defineProperty) {
29068 this.encoding = dec._encoding.name.toLowerCase();
29069 this.fatal = dec._error_mode === 'fatal';
29070 this.ignoreBOM = dec._ignoreBOM;
29071 }
29072
29073 // 7. Return dec.
29074 return dec;
29075 }
29076
29077 if (Object.defineProperty) {
29078 // The encoding attribute's getter must return encoding's name.
29079 Object.defineProperty(TextDecoder.prototype, 'encoding', {
29080 /** @this {TextDecoder} */
29081 get: function() { return this._encoding.name.toLowerCase(); }
29082 });
29083
29084 // The fatal attribute's getter must return true if error mode
29085 // is fatal, and false otherwise.
29086 Object.defineProperty(TextDecoder.prototype, 'fatal', {
29087 /** @this {TextDecoder} */
29088 get: function() { return this._error_mode === 'fatal'; }
29089 });
29090
29091 // The ignoreBOM attribute's getter must return true if ignore
29092 // BOM flag is set, and false otherwise.
29093 Object.defineProperty(TextDecoder.prototype, 'ignoreBOM', {
29094 /** @this {TextDecoder} */
29095 get: function() { return this._ignoreBOM; }
29096 });
29097 }
29098
29099 /**
29100 * @param {BufferSource=} input The buffer of bytes to decode.
29101 * @param {Object=} options
29102 * @return {string} The decoded string.
29103 */
29104 TextDecoder.prototype.decode = function decode(input, options) {
29105 var bytes;
29106 if (typeof input === 'object' && input instanceof ArrayBuffer) {
29107 bytes = new Uint8Array(input);
29108 } else if (typeof input === 'object' && 'buffer' in input &&
29109 input.buffer instanceof ArrayBuffer) {
29110 bytes = new Uint8Array(input.buffer,
29111 input.byteOffset,
29112 input.byteLength);
29113 } else {
29114 bytes = new Uint8Array(0);
29115 }
29116
29117 options = ToDictionary(options);
29118
29119 // 1. If the do not flush flag is unset, set decoder to a new
29120 // encoding's decoder, set stream to a new stream, and unset the
29121 // BOM seen flag.
29122 if (!this._do_not_flush) {
29123 this._decoder = decoders[this._encoding.name]({
29124 fatal: this._error_mode === 'fatal'});
29125 this._BOMseen = false;
29126 }
29127
29128 // 2. If options's stream is true, set the do not flush flag, and
29129 // unset the do not flush flag otherwise.
29130 this._do_not_flush = Boolean(options['stream']);
29131
29132 // 3. If input is given, push a copy of input to stream.
29133 // TODO: Align with spec algorithm - maintain stream on instance.
29134 var input_stream = new Stream(bytes);
29135
29136 // 4. Let output be a new stream.
29137 var output = [];
29138
29139 /** @type {?(number|!Array.<number>)} */
29140 var result;
29141
29142 // 5. While true:
29143 while (true) {
29144 // 1. Let token be the result of reading from stream.
29145 var token = input_stream.read();
29146
29147 // 2. If token is end-of-stream and the do not flush flag is
29148 // set, return output, serialized.
29149 // TODO: Align with spec algorithm.
29150 if (token === end_of_stream)
29151 break;
29152
29153 // 3. Otherwise, run these subsubsteps:
29154
29155 // 1. Let result be the result of processing token for decoder,
29156 // stream, output, and error mode.
29157 result = this._decoder.handler(input_stream, token);
29158
29159 // 2. If result is finished, return output, serialized.
29160 if (result === finished)
29161 break;
29162
29163 if (result !== null) {
29164 if (Array.isArray(result))
29165 output.push.apply(output, /**@type {!Array.<number>}*/(result));
29166 else
29167 output.push(result);
29168 }
29169
29170 // 3. Otherwise, if result is error, throw a TypeError.
29171 // (Thrown in handler)
29172
29173 // 4. Otherwise, do nothing.
29174 }
29175 // TODO: Align with spec algorithm.
29176 if (!this._do_not_flush) {
29177 do {
29178 result = this._decoder.handler(input_stream, input_stream.read());
29179 if (result === finished)
29180 break;
29181 if (result === null)
29182 continue;
29183 if (Array.isArray(result))
29184 output.push.apply(output, /**@type {!Array.<number>}*/(result));
29185 else
29186 output.push(result);
29187 } while (!input_stream.endOfStream());
29188 this._decoder = null;
29189 }
29190
29191 // A TextDecoder object also has an associated serialize stream
29192 // algorithm...
29193 /**
29194 * @param {!Array.<number>} stream
29195 * @return {string}
29196 * @this {TextDecoder}
29197 */
29198 function serializeStream(stream) {
29199 // 1. Let token be the result of reading from stream.
29200 // (Done in-place on array, rather than as a stream)
29201
29202 // 2. If encoding is UTF-8, UTF-16BE, or UTF-16LE, and ignore
29203 // BOM flag and BOM seen flag are unset, run these subsubsteps:
29204 if (includes(['UTF-8', 'UTF-16LE', 'UTF-16BE'], this._encoding.name) &&
29205 !this._ignoreBOM && !this._BOMseen) {
29206 if (stream.length > 0 && stream[0] === 0xFEFF) {
29207 // 1. If token is U+FEFF, set BOM seen flag.
29208 this._BOMseen = true;
29209 stream.shift();
29210 } else if (stream.length > 0) {
29211 // 2. Otherwise, if token is not end-of-stream, set BOM seen
29212 // flag and append token to stream.
29213 this._BOMseen = true;
29214 }
29215 }
29216 // 4. Otherwise, return output.
29217 return codePointsToString(stream);
29218 }
29219
29220 return serializeStream.call(this, output);
29221 };
29222
29223 // 8.2 Interface TextEncoder
29224
29225 /**
29226 * @constructor
29227 * @param {string=} label The label of the encoding. NONSTANDARD.
29228 * @param {Object=} options NONSTANDARD.
29229 */
29230 function TextEncoder(label, options) {
29231 // Web IDL conventions
29232 if (!(this instanceof TextEncoder))
29233 throw TypeError('Called as a function. Did you forget \'new\'?');
29234 options = ToDictionary(options);
29235
29236 // A TextEncoder object has an associated encoding and encoder.
29237
29238 /** @private */
29239 this._encoding = null;
29240 /** @private @type {?Encoder} */
29241 this._encoder = null;
29242
29243 // Non-standard
29244 /** @private @type {boolean} */
29245 this._do_not_flush = false;
29246 /** @private @type {string} */
29247 this._fatal = Boolean(options['fatal']) ? 'fatal' : 'replacement';
29248
29249 // 1. Let enc be a new TextEncoder object.
29250 var enc = this;
29251
29252 // 2. Set enc's encoding to UTF-8's encoder.
29253 if (Boolean(options['NONSTANDARD_allowLegacyEncoding'])) {
29254 // NONSTANDARD behavior.
29255 label = label !== undefined ? String(label) : DEFAULT_ENCODING;
29256 var encoding = getEncoding(label);
29257 if (encoding === null || encoding.name === 'replacement')
29258 throw RangeError('Unknown encoding: ' + label);
29259 if (!encoders[encoding.name]) {
29260 throw Error('Encoder not present.' +
29261 ' Did you forget to include encoding-indexes.js first?');
29262 }
29263 enc._encoding = encoding;
29264 } else {
29265 // Standard behavior.
29266 enc._encoding = getEncoding('utf-8');
29267
29268 if (label !== undefined && 'console' in global) {
29269 console.warn('TextEncoder constructor called with encoding label, '
29270 + 'which is ignored.');
29271 }
29272 }
29273
29274 // For pre-ES5 runtimes:
29275 if (!Object.defineProperty)
29276 this.encoding = enc._encoding.name.toLowerCase();
29277
29278 // 3. Return enc.
29279 return enc;
29280 }
29281
29282 if (Object.defineProperty) {
29283 // The encoding attribute's getter must return encoding's name.
29284 Object.defineProperty(TextEncoder.prototype, 'encoding', {
29285 /** @this {TextEncoder} */
29286 get: function() { return this._encoding.name.toLowerCase(); }
29287 });
29288 }
29289
29290 /**
29291 * @param {string=} opt_string The string to encode.
29292 * @param {Object=} options
29293 * @return {!Uint8Array} Encoded bytes, as a Uint8Array.
29294 */
29295 TextEncoder.prototype.encode = function encode(opt_string, options) {
29296 opt_string = opt_string === undefined ? '' : String(opt_string);
29297 options = ToDictionary(options);
29298
29299 // NOTE: This option is nonstandard. None of the encodings
29300 // permitted for encoding (i.e. UTF-8, UTF-16) are stateful when
29301 // the input is a USVString so streaming is not necessary.
29302 if (!this._do_not_flush)
29303 this._encoder = encoders[this._encoding.name]({
29304 fatal: this._fatal === 'fatal'});
29305 this._do_not_flush = Boolean(options['stream']);
29306
29307 // 1. Convert input to a stream.
29308 var input = new Stream(stringToCodePoints(opt_string));
29309
29310 // 2. Let output be a new stream
29311 var output = [];
29312
29313 /** @type {?(number|!Array.<number>)} */
29314 var result;
29315 // 3. While true, run these substeps:
29316 while (true) {
29317 // 1. Let token be the result of reading from input.
29318 var token = input.read();
29319 if (token === end_of_stream)
29320 break;
29321 // 2. Let result be the result of processing token for encoder,
29322 // input, output.
29323 result = this._encoder.handler(input, token);
29324 if (result === finished)
29325 break;
29326 if (Array.isArray(result))
29327 output.push.apply(output, /**@type {!Array.<number>}*/(result));
29328 else
29329 output.push(result);
29330 }
29331 // TODO: Align with spec algorithm.
29332 if (!this._do_not_flush) {
29333 while (true) {
29334 result = this._encoder.handler(input, input.read());
29335 if (result === finished)
29336 break;
29337 if (Array.isArray(result))
29338 output.push.apply(output, /**@type {!Array.<number>}*/(result));
29339 else
29340 output.push(result);
29341 }
29342 this._encoder = null;
29343 }
29344 // 3. If result is finished, convert output into a byte sequence,
29345 // and then return a Uint8Array object wrapping an ArrayBuffer
29346 // containing output.
29347 return new Uint8Array(output);
29348 };
29349
29350
29351 //
29352 // 9. The encoding
29353 //
29354
29355 // 9.1 utf-8
29356
29357 // 9.1.1 utf-8 decoder
29358 /**
29359 * @constructor
29360 * @implements {Decoder}
29361 * @param {{fatal: boolean}} options
29362 */
29363 function UTF8Decoder(options) {
29364 var fatal = options.fatal;
29365
29366 // utf-8's decoder's has an associated utf-8 code point, utf-8
29367 // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8
29368 // lower boundary (initially 0x80), and a utf-8 upper boundary
29369 // (initially 0xBF).
29370 var /** @type {number} */ utf8_code_point = 0,
29371 /** @type {number} */ utf8_bytes_seen = 0,
29372 /** @type {number} */ utf8_bytes_needed = 0,
29373 /** @type {number} */ utf8_lower_boundary = 0x80,
29374 /** @type {number} */ utf8_upper_boundary = 0xBF;
29375
29376 /**
29377 * @param {Stream} stream The stream of bytes being decoded.
29378 * @param {number} bite The next byte read from the stream.
29379 * @return {?(number|!Array.<number>)} The next code point(s)
29380 * decoded, or null if not enough data exists in the input
29381 * stream to decode a complete code point.
29382 */
29383 this.handler = function(stream, bite) {
29384 // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,
29385 // set utf-8 bytes needed to 0 and return error.
29386 if (bite === end_of_stream && utf8_bytes_needed !== 0) {
29387 utf8_bytes_needed = 0;
29388 return decoderError(fatal);
29389 }
29390
29391 // 2. If byte is end-of-stream, return finished.
29392 if (bite === end_of_stream)
29393 return finished;
29394
29395 // 3. If utf-8 bytes needed is 0, based on byte:
29396 if (utf8_bytes_needed === 0) {
29397
29398 // 0x00 to 0x7F
29399 if (inRange(bite, 0x00, 0x7F)) {
29400 // Return a code point whose value is byte.
29401 return bite;
29402 }
29403
29404 // 0xC2 to 0xDF
29405 else if (inRange(bite, 0xC2, 0xDF)) {
29406 // 1. Set utf-8 bytes needed to 1.
29407 utf8_bytes_needed = 1;
29408
29409 // 2. Set UTF-8 code point to byte & 0x1F.
29410 utf8_code_point = bite & 0x1F;
29411 }
29412
29413 // 0xE0 to 0xEF
29414 else if (inRange(bite, 0xE0, 0xEF)) {
29415 // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.
29416 if (bite === 0xE0)
29417 utf8_lower_boundary = 0xA0;
29418 // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.
29419 if (bite === 0xED)
29420 utf8_upper_boundary = 0x9F;
29421 // 3. Set utf-8 bytes needed to 2.
29422 utf8_bytes_needed = 2;
29423 // 4. Set UTF-8 code point to byte & 0xF.
29424 utf8_code_point = bite & 0xF;
29425 }
29426
29427 // 0xF0 to 0xF4
29428 else if (inRange(bite, 0xF0, 0xF4)) {
29429 // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.
29430 if (bite === 0xF0)
29431 utf8_lower_boundary = 0x90;
29432 // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.
29433 if (bite === 0xF4)
29434 utf8_upper_boundary = 0x8F;
29435 // 3. Set utf-8 bytes needed to 3.
29436 utf8_bytes_needed = 3;
29437 // 4. Set UTF-8 code point to byte & 0x7.
29438 utf8_code_point = bite & 0x7;
29439 }
29440
29441 // Otherwise
29442 else {
29443 // Return error.
29444 return decoderError(fatal);
29445 }
29446
29447 // Return continue.
29448 return null;
29449 }
29450
29451 // 4. If byte is not in the range utf-8 lower boundary to utf-8
29452 // upper boundary, inclusive, run these substeps:
29453 if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {
29454
29455 // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8
29456 // bytes seen to 0, set utf-8 lower boundary to 0x80, and set
29457 // utf-8 upper boundary to 0xBF.
29458 utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
29459 utf8_lower_boundary = 0x80;
29460 utf8_upper_boundary = 0xBF;
29461
29462 // 2. Prepend byte to stream.
29463 stream.prepend(bite);
29464
29465 // 3. Return error.
29466 return decoderError(fatal);
29467 }
29468
29469 // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary
29470 // to 0xBF.
29471 utf8_lower_boundary = 0x80;
29472 utf8_upper_boundary = 0xBF;
29473
29474 // 6. Set UTF-8 code point to (UTF-8 code point << 6) | (byte &
29475 // 0x3F)
29476 utf8_code_point = (utf8_code_point << 6) | (bite & 0x3F);
29477
29478 // 7. Increase utf-8 bytes seen by one.
29479 utf8_bytes_seen += 1;
29480
29481 // 8. If utf-8 bytes seen is not equal to utf-8 bytes needed,
29482 // continue.
29483 if (utf8_bytes_seen !== utf8_bytes_needed)
29484 return null;
29485
29486 // 9. Let code point be utf-8 code point.
29487 var code_point = utf8_code_point;
29488
29489 // 10. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes
29490 // seen to 0.
29491 utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
29492
29493 // 11. Return a code point whose value is code point.
29494 return code_point;
29495 };
29496 }
29497
29498 // 9.1.2 utf-8 encoder
29499 /**
29500 * @constructor
29501 * @implements {Encoder}
29502 * @param {{fatal: boolean}} options
29503 */
29504 function UTF8Encoder(options) {
29505 var fatal = options.fatal;
29506 /**
29507 * @param {Stream} stream Input stream.
29508 * @param {number} code_point Next code point read from the stream.
29509 * @return {(number|!Array.<number>)} Byte(s) to emit.
29510 */
29511 this.handler = function(stream, code_point) {
29512 // 1. If code point is end-of-stream, return finished.
29513 if (code_point === end_of_stream)
29514 return finished;
29515
29516 // 2. If code point is an ASCII code point, return a byte whose
29517 // value is code point.
29518 if (isASCIICodePoint(code_point))
29519 return code_point;
29520
29521 // 3. Set count and offset based on the range code point is in:
29522 var count, offset;
29523 // U+0080 to U+07FF, inclusive:
29524 if (inRange(code_point, 0x0080, 0x07FF)) {
29525 // 1 and 0xC0
29526 count = 1;
29527 offset = 0xC0;
29528 }
29529 // U+0800 to U+FFFF, inclusive:
29530 else if (inRange(code_point, 0x0800, 0xFFFF)) {
29531 // 2 and 0xE0
29532 count = 2;
29533 offset = 0xE0;
29534 }
29535 // U+10000 to U+10FFFF, inclusive:
29536 else if (inRange(code_point, 0x10000, 0x10FFFF)) {
29537 // 3 and 0xF0
29538 count = 3;
29539 offset = 0xF0;
29540 }
29541
29542 // 4. Let bytes be a byte sequence whose first byte is (code
29543 // point >> (6 × count)) + offset.
29544 var bytes = [(code_point >> (6 * count)) + offset];
29545
29546 // 5. Run these substeps while count is greater than 0:
29547 while (count > 0) {
29548
29549 // 1. Set temp to code point >> (6 × (count − 1)).
29550 var temp = code_point >> (6 * (count - 1));
29551
29552 // 2. Append to bytes 0x80 | (temp & 0x3F).
29553 bytes.push(0x80 | (temp & 0x3F));
29554
29555 // 3. Decrease count by one.
29556 count -= 1;
29557 }
29558
29559 // 6. Return bytes bytes, in order.
29560 return bytes;
29561 };
29562 }
29563
29564 /** @param {{fatal: boolean}} options */
29565 encoders['UTF-8'] = function(options) {
29566 return new UTF8Encoder(options);
29567 };
29568 /** @param {{fatal: boolean}} options */
29569 decoders['UTF-8'] = function(options) {
29570 return new UTF8Decoder(options);
29571 };
29572
29573 //
29574 // 10. Legacy single-byte encodings
29575 //
29576
29577 // 10.1 single-byte decoder
29578 /**
29579 * @constructor
29580 * @implements {Decoder}
29581 * @param {!Array.<number>} index The encoding index.
29582 * @param {{fatal: boolean}} options
29583 */
29584 function SingleByteDecoder(index, options) {
29585 var fatal = options.fatal;
29586 /**
29587 * @param {Stream} stream The stream of bytes being decoded.
29588 * @param {number} bite The next byte read from the stream.
29589 * @return {?(number|!Array.<number>)} The next code point(s)
29590 * decoded, or null if not enough data exists in the input
29591 * stream to decode a complete code point.
29592 */
29593 this.handler = function(stream, bite) {
29594 // 1. If byte is end-of-stream, return finished.
29595 if (bite === end_of_stream)
29596 return finished;
29597
29598 // 2. If byte is an ASCII byte, return a code point whose value
29599 // is byte.
29600 if (isASCIIByte(bite))
29601 return bite;
29602
29603 // 3. Let code point be the index code point for byte − 0x80 in
29604 // index single-byte.
29605 var code_point = index[bite - 0x80];
29606
29607 // 4. If code point is null, return error.
29608 if (code_point === null)
29609 return decoderError(fatal);
29610
29611 // 5. Return a code point whose value is code point.
29612 return code_point;
29613 };
29614 }
29615
29616 // 10.2 single-byte encoder
29617 /**
29618 * @constructor
29619 * @implements {Encoder}
29620 * @param {!Array.<?number>} index The encoding index.
29621 * @param {{fatal: boolean}} options
29622 */
29623 function SingleByteEncoder(index, options) {
29624 var fatal = options.fatal;
29625 /**
29626 * @param {Stream} stream Input stream.
29627 * @param {number} code_point Next code point read from the stream.
29628 * @return {(number|!Array.<number>)} Byte(s) to emit.
29629 */
29630 this.handler = function(stream, code_point) {
29631 // 1. If code point is end-of-stream, return finished.
29632 if (code_point === end_of_stream)
29633 return finished;
29634
29635 // 2. If code point is an ASCII code point, return a byte whose
29636 // value is code point.
29637 if (isASCIICodePoint(code_point))
29638 return code_point;
29639
29640 // 3. Let pointer be the index pointer for code point in index
29641 // single-byte.
29642 var pointer = indexPointerFor(code_point, index);
29643
29644 // 4. If pointer is null, return error with code point.
29645 if (pointer === null)
29646 encoderError(code_point);
29647
29648 // 5. Return a byte whose value is pointer + 0x80.
29649 return pointer + 0x80;
29650 };
29651 }
29652
29653 (function() {
29654 if (!('encoding-indexes' in global))
29655 return;
29656 encodings.forEach(function(category) {
29657 if (category.heading !== 'Legacy single-byte encodings')
29658 return;
29659 category.encodings.forEach(function(encoding) {
29660 var name = encoding.name;
29661 var idx = index(name.toLowerCase());
29662 /** @param {{fatal: boolean}} options */
29663 decoders[name] = function(options) {
29664 return new SingleByteDecoder(idx, options);
29665 };
29666 /** @param {{fatal: boolean}} options */
29667 encoders[name] = function(options) {
29668 return new SingleByteEncoder(idx, options);
29669 };
29670 });
29671 });
29672 }());
29673
29674 //
29675 // 11. Legacy multi-byte Chinese (simplified) encodings
29676 //
29677
29678 // 11.1 gbk
29679
29680 // 11.1.1 gbk decoder
29681 // gbk's decoder is gb18030's decoder.
29682 /** @param {{fatal: boolean}} options */
29683 decoders['GBK'] = function(options) {
29684 return new GB18030Decoder(options);
29685 };
29686
29687 // 11.1.2 gbk encoder
29688 // gbk's encoder is gb18030's encoder with its gbk flag set.
29689 /** @param {{fatal: boolean}} options */
29690 encoders['GBK'] = function(options) {
29691 return new GB18030Encoder(options, true);
29692 };
29693
29694 // 11.2 gb18030
29695
29696 // 11.2.1 gb18030 decoder
29697 /**
29698 * @constructor
29699 * @implements {Decoder}
29700 * @param {{fatal: boolean}} options
29701 */
29702 function GB18030Decoder(options) {
29703 var fatal = options.fatal;
29704 // gb18030's decoder has an associated gb18030 first, gb18030
29705 // second, and gb18030 third (all initially 0x00).
29706 var /** @type {number} */ gb18030_first = 0x00,
29707 /** @type {number} */ gb18030_second = 0x00,
29708 /** @type {number} */ gb18030_third = 0x00;
29709 /**
29710 * @param {Stream} stream The stream of bytes being decoded.
29711 * @param {number} bite The next byte read from the stream.
29712 * @return {?(number|!Array.<number>)} The next code point(s)
29713 * decoded, or null if not enough data exists in the input
29714 * stream to decode a complete code point.
29715 */
29716 this.handler = function(stream, bite) {
29717 // 1. If byte is end-of-stream and gb18030 first, gb18030
29718 // second, and gb18030 third are 0x00, return finished.
29719 if (bite === end_of_stream && gb18030_first === 0x00 &&
29720 gb18030_second === 0x00 && gb18030_third === 0x00) {
29721 return finished;
29722 }
29723 // 2. If byte is end-of-stream, and gb18030 first, gb18030
29724 // second, or gb18030 third is not 0x00, set gb18030 first,
29725 // gb18030 second, and gb18030 third to 0x00, and return error.
29726 if (bite === end_of_stream &&
29727 (gb18030_first !== 0x00 || gb18030_second !== 0x00 ||
29728 gb18030_third !== 0x00)) {
29729 gb18030_first = 0x00;
29730 gb18030_second = 0x00;
29731 gb18030_third = 0x00;
29732 decoderError(fatal);
29733 }
29734 var code_point;
29735 // 3. If gb18030 third is not 0x00, run these substeps:
29736 if (gb18030_third !== 0x00) {
29737 // 1. Let code point be null.
29738 code_point = null;
29739 // 2. If byte is in the range 0x30 to 0x39, inclusive, set
29740 // code point to the index gb18030 ranges code point for
29741 // (((gb18030 first − 0x81) × 10 + gb18030 second − 0x30) ×
29742 // 126 + gb18030 third − 0x81) × 10 + byte − 0x30.
29743 if (inRange(bite, 0x30, 0x39)) {
29744 code_point = indexGB18030RangesCodePointFor(
29745 (((gb18030_first - 0x81) * 10 + gb18030_second - 0x30) * 126 +
29746 gb18030_third - 0x81) * 10 + bite - 0x30);
29747 }
29748
29749 // 3. Let buffer be a byte sequence consisting of gb18030
29750 // second, gb18030 third, and byte, in order.
29751 var buffer = [gb18030_second, gb18030_third, bite];
29752
29753 // 4. Set gb18030 first, gb18030 second, and gb18030 third to
29754 // 0x00.
29755 gb18030_first = 0x00;
29756 gb18030_second = 0x00;
29757 gb18030_third = 0x00;
29758
29759 // 5. If code point is null, prepend buffer to stream and
29760 // return error.
29761 if (code_point === null) {
29762 stream.prepend(buffer);
29763 return decoderError(fatal);
29764 }
29765
29766 // 6. Return a code point whose value is code point.
29767 return code_point;
29768 }
29769
29770 // 4. If gb18030 second is not 0x00, run these substeps:
29771 if (gb18030_second !== 0x00) {
29772
29773 // 1. If byte is in the range 0x81 to 0xFE, inclusive, set
29774 // gb18030 third to byte and return continue.
29775 if (inRange(bite, 0x81, 0xFE)) {
29776 gb18030_third = bite;
29777 return null;
29778 }
29779
29780 // 2. Prepend gb18030 second followed by byte to stream, set
29781 // gb18030 first and gb18030 second to 0x00, and return error.
29782 stream.prepend([gb18030_second, bite]);
29783 gb18030_first = 0x00;
29784 gb18030_second = 0x00;
29785 return decoderError(fatal);
29786 }
29787
29788 // 5. If gb18030 first is not 0x00, run these substeps:
29789 if (gb18030_first !== 0x00) {
29790
29791 // 1. If byte is in the range 0x30 to 0x39, inclusive, set
29792 // gb18030 second to byte and return continue.
29793 if (inRange(bite, 0x30, 0x39)) {
29794 gb18030_second = bite;
29795 return null;
29796 }
29797
29798 // 2. Let lead be gb18030 first, let pointer be null, and set
29799 // gb18030 first to 0x00.
29800 var lead = gb18030_first;
29801 var pointer = null;
29802 gb18030_first = 0x00;
29803
29804 // 3. Let offset be 0x40 if byte is less than 0x7F and 0x41
29805 // otherwise.
29806 var offset = bite < 0x7F ? 0x40 : 0x41;
29807
29808 // 4. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
29809 // to 0xFE, inclusive, set pointer to (lead − 0x81) × 190 +
29810 // (byte − offset).
29811 if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFE))
29812 pointer = (lead - 0x81) * 190 + (bite - offset);
29813
29814 // 5. Let code point be null if pointer is null and the index
29815 // code point for pointer in index gb18030 otherwise.
29816 code_point = pointer === null ? null :
29817 indexCodePointFor(pointer, index('gb18030'));
29818
29819 // 6. If code point is null and byte is an ASCII byte, prepend
29820 // byte to stream.
29821 if (code_point === null && isASCIIByte(bite))
29822 stream.prepend(bite);
29823
29824 // 7. If code point is null, return error.
29825 if (code_point === null)
29826 return decoderError(fatal);
29827
29828 // 8. Return a code point whose value is code point.
29829 return code_point;
29830 }
29831
29832 // 6. If byte is an ASCII byte, return a code point whose value
29833 // is byte.
29834 if (isASCIIByte(bite))
29835 return bite;
29836
29837 // 7. If byte is 0x80, return code point U+20AC.
29838 if (bite === 0x80)
29839 return 0x20AC;
29840
29841 // 8. If byte is in the range 0x81 to 0xFE, inclusive, set
29842 // gb18030 first to byte and return continue.
29843 if (inRange(bite, 0x81, 0xFE)) {
29844 gb18030_first = bite;
29845 return null;
29846 }
29847
29848 // 9. Return error.
29849 return decoderError(fatal);
29850 };
29851 }
29852
29853 // 11.2.2 gb18030 encoder
29854 /**
29855 * @constructor
29856 * @implements {Encoder}
29857 * @param {{fatal: boolean}} options
29858 * @param {boolean=} gbk_flag
29859 */
29860 function GB18030Encoder(options, gbk_flag) {
29861 var fatal = options.fatal;
29862 // gb18030's decoder has an associated gbk flag (initially unset).
29863 /**
29864 * @param {Stream} stream Input stream.
29865 * @param {number} code_point Next code point read from the stream.
29866 * @return {(number|!Array.<number>)} Byte(s) to emit.
29867 */
29868 this.handler = function(stream, code_point) {
29869 // 1. If code point is end-of-stream, return finished.
29870 if (code_point === end_of_stream)
29871 return finished;
29872
29873 // 2. If code point is an ASCII code point, return a byte whose
29874 // value is code point.
29875 if (isASCIICodePoint(code_point))
29876 return code_point;
29877
29878 // 3. If code point is U+E5E5, return error with code point.
29879 if (code_point === 0xE5E5)
29880 return encoderError(code_point);
29881
29882 // 4. If the gbk flag is set and code point is U+20AC, return
29883 // byte 0x80.
29884 if (gbk_flag && code_point === 0x20AC)
29885 return 0x80;
29886
29887 // 5. Let pointer be the index pointer for code point in index
29888 // gb18030.
29889 var pointer = indexPointerFor(code_point, index('gb18030'));
29890
29891 // 6. If pointer is not null, run these substeps:
29892 if (pointer !== null) {
29893
29894 // 1. Let lead be floor(pointer / 190) + 0x81.
29895 var lead = floor(pointer / 190) + 0x81;
29896
29897 // 2. Let trail be pointer % 190.
29898 var trail = pointer % 190;
29899
29900 // 3. Let offset be 0x40 if trail is less than 0x3F and 0x41 otherwise.
29901 var offset = trail < 0x3F ? 0x40 : 0x41;
29902
29903 // 4. Return two bytes whose values are lead and trail + offset.
29904 return [lead, trail + offset];
29905 }
29906
29907 // 7. If gbk flag is set, return error with code point.
29908 if (gbk_flag)
29909 return encoderError(code_point);
29910
29911 // 8. Set pointer to the index gb18030 ranges pointer for code
29912 // point.
29913 pointer = indexGB18030RangesPointerFor(code_point);
29914
29915 // 9. Let byte1 be floor(pointer / 10 / 126 / 10).
29916 var byte1 = floor(pointer / 10 / 126 / 10);
29917
29918 // 10. Set pointer to pointer − byte1 × 10 × 126 × 10.
29919 pointer = pointer - byte1 * 10 * 126 * 10;
29920
29921 // 11. Let byte2 be floor(pointer / 10 / 126).
29922 var byte2 = floor(pointer / 10 / 126);
29923
29924 // 12. Set pointer to pointer − byte2 × 10 × 126.
29925 pointer = pointer - byte2 * 10 * 126;
29926
29927 // 13. Let byte3 be floor(pointer / 10).
29928 var byte3 = floor(pointer / 10);
29929
29930 // 14. Let byte4 be pointer − byte3 × 10.
29931 var byte4 = pointer - byte3 * 10;
29932
29933 // 15. Return four bytes whose values are byte1 + 0x81, byte2 +
29934 // 0x30, byte3 + 0x81, byte4 + 0x30.
29935 return [byte1 + 0x81,
29936 byte2 + 0x30,
29937 byte3 + 0x81,
29938 byte4 + 0x30];
29939 };
29940 }
29941
29942 /** @param {{fatal: boolean}} options */
29943 encoders['gb18030'] = function(options) {
29944 return new GB18030Encoder(options);
29945 };
29946 /** @param {{fatal: boolean}} options */
29947 decoders['gb18030'] = function(options) {
29948 return new GB18030Decoder(options);
29949 };
29950
29951
29952 //
29953 // 12. Legacy multi-byte Chinese (traditional) encodings
29954 //
29955
29956 // 12.1 Big5
29957
29958 // 12.1.1 Big5 decoder
29959 /**
29960 * @constructor
29961 * @implements {Decoder}
29962 * @param {{fatal: boolean}} options
29963 */
29964 function Big5Decoder(options) {
29965 var fatal = options.fatal;
29966 // Big5's decoder has an associated Big5 lead (initially 0x00).
29967 var /** @type {number} */ Big5_lead = 0x00;
29968
29969 /**
29970 * @param {Stream} stream The stream of bytes being decoded.
29971 * @param {number} bite The next byte read from the stream.
29972 * @return {?(number|!Array.<number>)} The next code point(s)
29973 * decoded, or null if not enough data exists in the input
29974 * stream to decode a complete code point.
29975 */
29976 this.handler = function(stream, bite) {
29977 // 1. If byte is end-of-stream and Big5 lead is not 0x00, set
29978 // Big5 lead to 0x00 and return error.
29979 if (bite === end_of_stream && Big5_lead !== 0x00) {
29980 Big5_lead = 0x00;
29981 return decoderError(fatal);
29982 }
29983
29984 // 2. If byte is end-of-stream and Big5 lead is 0x00, return
29985 // finished.
29986 if (bite === end_of_stream && Big5_lead === 0x00)
29987 return finished;
29988
29989 // 3. If Big5 lead is not 0x00, let lead be Big5 lead, let
29990 // pointer be null, set Big5 lead to 0x00, and then run these
29991 // substeps:
29992 if (Big5_lead !== 0x00) {
29993 var lead = Big5_lead;
29994 var pointer = null;
29995 Big5_lead = 0x00;
29996
29997 // 1. Let offset be 0x40 if byte is less than 0x7F and 0x62
29998 // otherwise.
29999 var offset = bite < 0x7F ? 0x40 : 0x62;
30000
30001 // 2. If byte is in the range 0x40 to 0x7E, inclusive, or 0xA1
30002 // to 0xFE, inclusive, set pointer to (lead − 0x81) × 157 +
30003 // (byte − offset).
30004 if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0xA1, 0xFE))
30005 pointer = (lead - 0x81) * 157 + (bite - offset);
30006
30007 // 3. If there is a row in the table below whose first column
30008 // is pointer, return the two code points listed in its second
30009 // column
30010 // Pointer | Code points
30011 // --------+--------------
30012 // 1133 | U+00CA U+0304
30013 // 1135 | U+00CA U+030C
30014 // 1164 | U+00EA U+0304
30015 // 1166 | U+00EA U+030C
30016 switch (pointer) {
30017 case 1133: return [0x00CA, 0x0304];
30018 case 1135: return [0x00CA, 0x030C];
30019 case 1164: return [0x00EA, 0x0304];
30020 case 1166: return [0x00EA, 0x030C];
30021 }
30022
30023 // 4. Let code point be null if pointer is null and the index
30024 // code point for pointer in index Big5 otherwise.
30025 var code_point = (pointer === null) ? null :
30026 indexCodePointFor(pointer, index('big5'));
30027
30028 // 5. If code point is null and byte is an ASCII byte, prepend
30029 // byte to stream.
30030 if (code_point === null && isASCIIByte(bite))
30031 stream.prepend(bite);
30032
30033 // 6. If code point is null, return error.
30034 if (code_point === null)
30035 return decoderError(fatal);
30036
30037 // 7. Return a code point whose value is code point.
30038 return code_point;
30039 }
30040
30041 // 4. If byte is an ASCII byte, return a code point whose value
30042 // is byte.
30043 if (isASCIIByte(bite))
30044 return bite;
30045
30046 // 5. If byte is in the range 0x81 to 0xFE, inclusive, set Big5
30047 // lead to byte and return continue.
30048 if (inRange(bite, 0x81, 0xFE)) {
30049 Big5_lead = bite;
30050 return null;
30051 }
30052
30053 // 6. Return error.
30054 return decoderError(fatal);
30055 };
30056 }
30057
30058 // 12.1.2 Big5 encoder
30059 /**
30060 * @constructor
30061 * @implements {Encoder}
30062 * @param {{fatal: boolean}} options
30063 */
30064 function Big5Encoder(options) {
30065 var fatal = options.fatal;
30066 /**
30067 * @param {Stream} stream Input stream.
30068 * @param {number} code_point Next code point read from the stream.
30069 * @return {(number|!Array.<number>)} Byte(s) to emit.
30070 */
30071 this.handler = function(stream, code_point) {
30072 // 1. If code point is end-of-stream, return finished.
30073 if (code_point === end_of_stream)
30074 return finished;
30075
30076 // 2. If code point is an ASCII code point, return a byte whose
30077 // value is code point.
30078 if (isASCIICodePoint(code_point))
30079 return code_point;
30080
30081 // 3. Let pointer be the index Big5 pointer for code point.
30082 var pointer = indexBig5PointerFor(code_point);
30083
30084 // 4. If pointer is null, return error with code point.
30085 if (pointer === null)
30086 return encoderError(code_point);
30087
30088 // 5. Let lead be floor(pointer / 157) + 0x81.
30089 var lead = floor(pointer / 157) + 0x81;
30090
30091 // 6. If lead is less than 0xA1, return error with code point.
30092 if (lead < 0xA1)
30093 return encoderError(code_point);
30094
30095 // 7. Let trail be pointer % 157.
30096 var trail = pointer % 157;
30097
30098 // 8. Let offset be 0x40 if trail is less than 0x3F and 0x62
30099 // otherwise.
30100 var offset = trail < 0x3F ? 0x40 : 0x62;
30101
30102 // Return two bytes whose values are lead and trail + offset.
30103 return [lead, trail + offset];
30104 };
30105 }
30106
30107 /** @param {{fatal: boolean}} options */
30108 encoders['Big5'] = function(options) {
30109 return new Big5Encoder(options);
30110 };
30111 /** @param {{fatal: boolean}} options */
30112 decoders['Big5'] = function(options) {
30113 return new Big5Decoder(options);
30114 };
30115
30116
30117 //
30118 // 13. Legacy multi-byte Japanese encodings
30119 //
30120
30121 // 13.1 euc-jp
30122
30123 // 13.1.1 euc-jp decoder
30124 /**
30125 * @constructor
30126 * @implements {Decoder}
30127 * @param {{fatal: boolean}} options
30128 */
30129 function EUCJPDecoder(options) {
30130 var fatal = options.fatal;
30131
30132 // euc-jp's decoder has an associated euc-jp jis0212 flag
30133 // (initially unset) and euc-jp lead (initially 0x00).
30134 var /** @type {boolean} */ eucjp_jis0212_flag = false,
30135 /** @type {number} */ eucjp_lead = 0x00;
30136
30137 /**
30138 * @param {Stream} stream The stream of bytes being decoded.
30139 * @param {number} bite The next byte read from the stream.
30140 * @return {?(number|!Array.<number>)} The next code point(s)
30141 * decoded, or null if not enough data exists in the input
30142 * stream to decode a complete code point.
30143 */
30144 this.handler = function(stream, bite) {
30145 // 1. If byte is end-of-stream and euc-jp lead is not 0x00, set
30146 // euc-jp lead to 0x00, and return error.
30147 if (bite === end_of_stream && eucjp_lead !== 0x00) {
30148 eucjp_lead = 0x00;
30149 return decoderError(fatal);
30150 }
30151
30152 // 2. If byte is end-of-stream and euc-jp lead is 0x00, return
30153 // finished.
30154 if (bite === end_of_stream && eucjp_lead === 0x00)
30155 return finished;
30156
30157 // 3. If euc-jp lead is 0x8E and byte is in the range 0xA1 to
30158 // 0xDF, inclusive, set euc-jp lead to 0x00 and return a code
30159 // point whose value is 0xFF61 − 0xA1 + byte.
30160 if (eucjp_lead === 0x8E && inRange(bite, 0xA1, 0xDF)) {
30161 eucjp_lead = 0x00;
30162 return 0xFF61 - 0xA1 + bite;
30163 }
30164
30165 // 4. If euc-jp lead is 0x8F and byte is in the range 0xA1 to
30166 // 0xFE, inclusive, set the euc-jp jis0212 flag, set euc-jp lead
30167 // to byte, and return continue.
30168 if (eucjp_lead === 0x8F && inRange(bite, 0xA1, 0xFE)) {
30169 eucjp_jis0212_flag = true;
30170 eucjp_lead = bite;
30171 return null;
30172 }
30173
30174 // 5. If euc-jp lead is not 0x00, let lead be euc-jp lead, set
30175 // euc-jp lead to 0x00, and run these substeps:
30176 if (eucjp_lead !== 0x00) {
30177 var lead = eucjp_lead;
30178 eucjp_lead = 0x00;
30179
30180 // 1. Let code point be null.
30181 var code_point = null;
30182
30183 // 2. If lead and byte are both in the range 0xA1 to 0xFE,
30184 // inclusive, set code point to the index code point for (lead
30185 // − 0xA1) × 94 + byte − 0xA1 in index jis0208 if the euc-jp
30186 // jis0212 flag is unset and in index jis0212 otherwise.
30187 if (inRange(lead, 0xA1, 0xFE) && inRange(bite, 0xA1, 0xFE)) {
30188 code_point = indexCodePointFor(
30189 (lead - 0xA1) * 94 + (bite - 0xA1),
30190 index(!eucjp_jis0212_flag ? 'jis0208' : 'jis0212'));
30191 }
30192
30193 // 3. Unset the euc-jp jis0212 flag.
30194 eucjp_jis0212_flag = false;
30195
30196 // 4. If byte is not in the range 0xA1 to 0xFE, inclusive,
30197 // prepend byte to stream.
30198 if (!inRange(bite, 0xA1, 0xFE))
30199 stream.prepend(bite);
30200
30201 // 5. If code point is null, return error.
30202 if (code_point === null)
30203 return decoderError(fatal);
30204
30205 // 6. Return a code point whose value is code point.
30206 return code_point;
30207 }
30208
30209 // 6. If byte is an ASCII byte, return a code point whose value
30210 // is byte.
30211 if (isASCIIByte(bite))
30212 return bite;
30213
30214 // 7. If byte is 0x8E, 0x8F, or in the range 0xA1 to 0xFE,
30215 // inclusive, set euc-jp lead to byte and return continue.
30216 if (bite === 0x8E || bite === 0x8F || inRange(bite, 0xA1, 0xFE)) {
30217 eucjp_lead = bite;
30218 return null;
30219 }
30220
30221 // 8. Return error.
30222 return decoderError(fatal);
30223 };
30224 }
30225
30226 // 13.1.2 euc-jp encoder
30227 /**
30228 * @constructor
30229 * @implements {Encoder}
30230 * @param {{fatal: boolean}} options
30231 */
30232 function EUCJPEncoder(options) {
30233 var fatal = options.fatal;
30234 /**
30235 * @param {Stream} stream Input stream.
30236 * @param {number} code_point Next code point read from the stream.
30237 * @return {(number|!Array.<number>)} Byte(s) to emit.
30238 */
30239 this.handler = function(stream, code_point) {
30240 // 1. If code point is end-of-stream, return finished.
30241 if (code_point === end_of_stream)
30242 return finished;
30243
30244 // 2. If code point is an ASCII code point, return a byte whose
30245 // value is code point.
30246 if (isASCIICodePoint(code_point))
30247 return code_point;
30248
30249 // 3. If code point is U+00A5, return byte 0x5C.
30250 if (code_point === 0x00A5)
30251 return 0x5C;
30252
30253 // 4. If code point is U+203E, return byte 0x7E.
30254 if (code_point === 0x203E)
30255 return 0x7E;
30256
30257 // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
30258 // return two bytes whose values are 0x8E and code point −
30259 // 0xFF61 + 0xA1.
30260 if (inRange(code_point, 0xFF61, 0xFF9F))
30261 return [0x8E, code_point - 0xFF61 + 0xA1];
30262
30263 // 6. If code point is U+2212, set it to U+FF0D.
30264 if (code_point === 0x2212)
30265 code_point = 0xFF0D;
30266
30267 // 7. Let pointer be the index pointer for code point in index
30268 // jis0208.
30269 var pointer = indexPointerFor(code_point, index('jis0208'));
30270
30271 // 8. If pointer is null, return error with code point.
30272 if (pointer === null)
30273 return encoderError(code_point);
30274
30275 // 9. Let lead be floor(pointer / 94) + 0xA1.
30276 var lead = floor(pointer / 94) + 0xA1;
30277
30278 // 10. Let trail be pointer % 94 + 0xA1.
30279 var trail = pointer % 94 + 0xA1;
30280
30281 // 11. Return two bytes whose values are lead and trail.
30282 return [lead, trail];
30283 };
30284 }
30285
30286 /** @param {{fatal: boolean}} options */
30287 encoders['EUC-JP'] = function(options) {
30288 return new EUCJPEncoder(options);
30289 };
30290 /** @param {{fatal: boolean}} options */
30291 decoders['EUC-JP'] = function(options) {
30292 return new EUCJPDecoder(options);
30293 };
30294
30295 // 13.2 iso-2022-jp
30296
30297 // 13.2.1 iso-2022-jp decoder
30298 /**
30299 * @constructor
30300 * @implements {Decoder}
30301 * @param {{fatal: boolean}} options
30302 */
30303 function ISO2022JPDecoder(options) {
30304 var fatal = options.fatal;
30305 /** @enum */
30306 var states = {
30307 ASCII: 0,
30308 Roman: 1,
30309 Katakana: 2,
30310 LeadByte: 3,
30311 TrailByte: 4,
30312 EscapeStart: 5,
30313 Escape: 6
30314 };
30315 // iso-2022-jp's decoder has an associated iso-2022-jp decoder
30316 // state (initially ASCII), iso-2022-jp decoder output state
30317 // (initially ASCII), iso-2022-jp lead (initially 0x00), and
30318 // iso-2022-jp output flag (initially unset).
30319 var /** @type {number} */ iso2022jp_decoder_state = states.ASCII,
30320 /** @type {number} */ iso2022jp_decoder_output_state = states.ASCII,
30321 /** @type {number} */ iso2022jp_lead = 0x00,
30322 /** @type {boolean} */ iso2022jp_output_flag = false;
30323 /**
30324 * @param {Stream} stream The stream of bytes being decoded.
30325 * @param {number} bite The next byte read from the stream.
30326 * @return {?(number|!Array.<number>)} The next code point(s)
30327 * decoded, or null if not enough data exists in the input
30328 * stream to decode a complete code point.
30329 */
30330 this.handler = function(stream, bite) {
30331 // switching on iso-2022-jp decoder state:
30332 switch (iso2022jp_decoder_state) {
30333 default:
30334 case states.ASCII:
30335 // ASCII
30336 // Based on byte:
30337
30338 // 0x1B
30339 if (bite === 0x1B) {
30340 // Set iso-2022-jp decoder state to escape start and return
30341 // continue.
30342 iso2022jp_decoder_state = states.EscapeStart;
30343 return null;
30344 }
30345
30346 // 0x00 to 0x7F, excluding 0x0E, 0x0F, and 0x1B
30347 if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E
30348 && bite !== 0x0F && bite !== 0x1B) {
30349 // Unset the iso-2022-jp output flag and return a code point
30350 // whose value is byte.
30351 iso2022jp_output_flag = false;
30352 return bite;
30353 }
30354
30355 // end-of-stream
30356 if (bite === end_of_stream) {
30357 // Return finished.
30358 return finished;
30359 }
30360
30361 // Otherwise
30362 // Unset the iso-2022-jp output flag and return error.
30363 iso2022jp_output_flag = false;
30364 return decoderError(fatal);
30365
30366 case states.Roman:
30367 // Roman
30368 // Based on byte:
30369
30370 // 0x1B
30371 if (bite === 0x1B) {
30372 // Set iso-2022-jp decoder state to escape start and return
30373 // continue.
30374 iso2022jp_decoder_state = states.EscapeStart;
30375 return null;
30376 }
30377
30378 // 0x5C
30379 if (bite === 0x5C) {
30380 // Unset the iso-2022-jp output flag and return code point
30381 // U+00A5.
30382 iso2022jp_output_flag = false;
30383 return 0x00A5;
30384 }
30385
30386 // 0x7E
30387 if (bite === 0x7E) {
30388 // Unset the iso-2022-jp output flag and return code point
30389 // U+203E.
30390 iso2022jp_output_flag = false;
30391 return 0x203E;
30392 }
30393
30394 // 0x00 to 0x7F, excluding 0x0E, 0x0F, 0x1B, 0x5C, and 0x7E
30395 if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E && bite !== 0x0F
30396 && bite !== 0x1B && bite !== 0x5C && bite !== 0x7E) {
30397 // Unset the iso-2022-jp output flag and return a code point
30398 // whose value is byte.
30399 iso2022jp_output_flag = false;
30400 return bite;
30401 }
30402
30403 // end-of-stream
30404 if (bite === end_of_stream) {
30405 // Return finished.
30406 return finished;
30407 }
30408
30409 // Otherwise
30410 // Unset the iso-2022-jp output flag and return error.
30411 iso2022jp_output_flag = false;
30412 return decoderError(fatal);
30413
30414 case states.Katakana:
30415 // Katakana
30416 // Based on byte:
30417
30418 // 0x1B
30419 if (bite === 0x1B) {
30420 // Set iso-2022-jp decoder state to escape start and return
30421 // continue.
30422 iso2022jp_decoder_state = states.EscapeStart;
30423 return null;
30424 }
30425
30426 // 0x21 to 0x5F
30427 if (inRange(bite, 0x21, 0x5F)) {
30428 // Unset the iso-2022-jp output flag and return a code point
30429 // whose value is 0xFF61 − 0x21 + byte.
30430 iso2022jp_output_flag = false;
30431 return 0xFF61 - 0x21 + bite;
30432 }
30433
30434 // end-of-stream
30435 if (bite === end_of_stream) {
30436 // Return finished.
30437 return finished;
30438 }
30439
30440 // Otherwise
30441 // Unset the iso-2022-jp output flag and return error.
30442 iso2022jp_output_flag = false;
30443 return decoderError(fatal);
30444
30445 case states.LeadByte:
30446 // Lead byte
30447 // Based on byte:
30448
30449 // 0x1B
30450 if (bite === 0x1B) {
30451 // Set iso-2022-jp decoder state to escape start and return
30452 // continue.
30453 iso2022jp_decoder_state = states.EscapeStart;
30454 return null;
30455 }
30456
30457 // 0x21 to 0x7E
30458 if (inRange(bite, 0x21, 0x7E)) {
30459 // Unset the iso-2022-jp output flag, set iso-2022-jp lead
30460 // to byte, iso-2022-jp decoder state to trail byte, and
30461 // return continue.
30462 iso2022jp_output_flag = false;
30463 iso2022jp_lead = bite;
30464 iso2022jp_decoder_state = states.TrailByte;
30465 return null;
30466 }
30467
30468 // end-of-stream
30469 if (bite === end_of_stream) {
30470 // Return finished.
30471 return finished;
30472 }
30473
30474 // Otherwise
30475 // Unset the iso-2022-jp output flag and return error.
30476 iso2022jp_output_flag = false;
30477 return decoderError(fatal);
30478
30479 case states.TrailByte:
30480 // Trail byte
30481 // Based on byte:
30482
30483 // 0x1B
30484 if (bite === 0x1B) {
30485 // Set iso-2022-jp decoder state to escape start and return
30486 // continue.
30487 iso2022jp_decoder_state = states.EscapeStart;
30488 return decoderError(fatal);
30489 }
30490
30491 // 0x21 to 0x7E
30492 if (inRange(bite, 0x21, 0x7E)) {
30493 // 1. Set the iso-2022-jp decoder state to lead byte.
30494 iso2022jp_decoder_state = states.LeadByte;
30495
30496 // 2. Let pointer be (iso-2022-jp lead − 0x21) × 94 + byte − 0x21.
30497 var pointer = (iso2022jp_lead - 0x21) * 94 + bite - 0x21;
30498
30499 // 3. Let code point be the index code point for pointer in
30500 // index jis0208.
30501 var code_point = indexCodePointFor(pointer, index('jis0208'));
30502
30503 // 4. If code point is null, return error.
30504 if (code_point === null)
30505 return decoderError(fatal);
30506
30507 // 5. Return a code point whose value is code point.
30508 return code_point;
30509 }
30510
30511 // end-of-stream
30512 if (bite === end_of_stream) {
30513 // Set the iso-2022-jp decoder state to lead byte, prepend
30514 // byte to stream, and return error.
30515 iso2022jp_decoder_state = states.LeadByte;
30516 stream.prepend(bite);
30517 return decoderError(fatal);
30518 }
30519
30520 // Otherwise
30521 // Set iso-2022-jp decoder state to lead byte and return
30522 // error.
30523 iso2022jp_decoder_state = states.LeadByte;
30524 return decoderError(fatal);
30525
30526 case states.EscapeStart:
30527 // Escape start
30528
30529 // 1. If byte is either 0x24 or 0x28, set iso-2022-jp lead to
30530 // byte, iso-2022-jp decoder state to escape, and return
30531 // continue.
30532 if (bite === 0x24 || bite === 0x28) {
30533 iso2022jp_lead = bite;
30534 iso2022jp_decoder_state = states.Escape;
30535 return null;
30536 }
30537
30538 // 2. Prepend byte to stream.
30539 stream.prepend(bite);
30540
30541 // 3. Unset the iso-2022-jp output flag, set iso-2022-jp
30542 // decoder state to iso-2022-jp decoder output state, and
30543 // return error.
30544 iso2022jp_output_flag = false;
30545 iso2022jp_decoder_state = iso2022jp_decoder_output_state;
30546 return decoderError(fatal);
30547
30548 case states.Escape:
30549 // Escape
30550
30551 // 1. Let lead be iso-2022-jp lead and set iso-2022-jp lead to
30552 // 0x00.
30553 var lead = iso2022jp_lead;
30554 iso2022jp_lead = 0x00;
30555
30556 // 2. Let state be null.
30557 var state = null;
30558
30559 // 3. If lead is 0x28 and byte is 0x42, set state to ASCII.
30560 if (lead === 0x28 && bite === 0x42)
30561 state = states.ASCII;
30562
30563 // 4. If lead is 0x28 and byte is 0x4A, set state to Roman.
30564 if (lead === 0x28 && bite === 0x4A)
30565 state = states.Roman;
30566
30567 // 5. If lead is 0x28 and byte is 0x49, set state to Katakana.
30568 if (lead === 0x28 && bite === 0x49)
30569 state = states.Katakana;
30570
30571 // 6. If lead is 0x24 and byte is either 0x40 or 0x42, set
30572 // state to lead byte.
30573 if (lead === 0x24 && (bite === 0x40 || bite === 0x42))
30574 state = states.LeadByte;
30575
30576 // 7. If state is non-null, run these substeps:
30577 if (state !== null) {
30578 // 1. Set iso-2022-jp decoder state and iso-2022-jp decoder
30579 // output state to states.
30580 iso2022jp_decoder_state = iso2022jp_decoder_state = state;
30581
30582 // 2. Let output flag be the iso-2022-jp output flag.
30583 var output_flag = iso2022jp_output_flag;
30584
30585 // 3. Set the iso-2022-jp output flag.
30586 iso2022jp_output_flag = true;
30587
30588 // 4. Return continue, if output flag is unset, and error
30589 // otherwise.
30590 return !output_flag ? null : decoderError(fatal);
30591 }
30592
30593 // 8. Prepend lead and byte to stream.
30594 stream.prepend([lead, bite]);
30595
30596 // 9. Unset the iso-2022-jp output flag, set iso-2022-jp
30597 // decoder state to iso-2022-jp decoder output state and
30598 // return error.
30599 iso2022jp_output_flag = false;
30600 iso2022jp_decoder_state = iso2022jp_decoder_output_state;
30601 return decoderError(fatal);
30602 }
30603 };
30604 }
30605
30606 // 13.2.2 iso-2022-jp encoder
30607 /**
30608 * @constructor
30609 * @implements {Encoder}
30610 * @param {{fatal: boolean}} options
30611 */
30612 function ISO2022JPEncoder(options) {
30613 var fatal = options.fatal;
30614 // iso-2022-jp's encoder has an associated iso-2022-jp encoder
30615 // state which is one of ASCII, Roman, and jis0208 (initially
30616 // ASCII).
30617 /** @enum */
30618 var states = {
30619 ASCII: 0,
30620 Roman: 1,
30621 jis0208: 2
30622 };
30623 var /** @type {number} */ iso2022jp_state = states.ASCII;
30624 /**
30625 * @param {Stream} stream Input stream.
30626 * @param {number} code_point Next code point read from the stream.
30627 * @return {(number|!Array.<number>)} Byte(s) to emit.
30628 */
30629 this.handler = function(stream, code_point) {
30630 // 1. If code point is end-of-stream and iso-2022-jp encoder
30631 // state is not ASCII, prepend code point to stream, set
30632 // iso-2022-jp encoder state to ASCII, and return three bytes
30633 // 0x1B 0x28 0x42.
30634 if (code_point === end_of_stream &&
30635 iso2022jp_state !== states.ASCII) {
30636 stream.prepend(code_point);
30637 iso2022jp_state = states.ASCII;
30638 return [0x1B, 0x28, 0x42];
30639 }
30640
30641 // 2. If code point is end-of-stream and iso-2022-jp encoder
30642 // state is ASCII, return finished.
30643 if (code_point === end_of_stream && iso2022jp_state === states.ASCII)
30644 return finished;
30645
30646 // 3. If ISO-2022-JP encoder state is ASCII or Roman, and code
30647 // point is U+000E, U+000F, or U+001B, return error with U+FFFD.
30648 if ((iso2022jp_state === states.ASCII ||
30649 iso2022jp_state === states.Roman) &&
30650 (code_point === 0x000E || code_point === 0x000F ||
30651 code_point === 0x001B)) {
30652 return encoderError(0xFFFD);
30653 }
30654
30655 // 4. If iso-2022-jp encoder state is ASCII and code point is an
30656 // ASCII code point, return a byte whose value is code point.
30657 if (iso2022jp_state === states.ASCII &&
30658 isASCIICodePoint(code_point))
30659 return code_point;
30660
30661 // 5. If iso-2022-jp encoder state is Roman and code point is an
30662 // ASCII code point, excluding U+005C and U+007E, or is U+00A5
30663 // or U+203E, run these substeps:
30664 if (iso2022jp_state === states.Roman &&
30665 ((isASCIICodePoint(code_point) &&
30666 code_point !== 0x005C && code_point !== 0x007E) ||
30667 (code_point == 0x00A5 || code_point == 0x203E))) {
30668
30669 // 1. If code point is an ASCII code point, return a byte
30670 // whose value is code point.
30671 if (isASCIICodePoint(code_point))
30672 return code_point;
30673
30674 // 2. If code point is U+00A5, return byte 0x5C.
30675 if (code_point === 0x00A5)
30676 return 0x5C;
30677
30678 // 3. If code point is U+203E, return byte 0x7E.
30679 if (code_point === 0x203E)
30680 return 0x7E;
30681 }
30682
30683 // 6. If code point is an ASCII code point, and iso-2022-jp
30684 // encoder state is not ASCII, prepend code point to stream, set
30685 // iso-2022-jp encoder state to ASCII, and return three bytes
30686 // 0x1B 0x28 0x42.
30687 if (isASCIICodePoint(code_point) &&
30688 iso2022jp_state !== states.ASCII) {
30689 stream.prepend(code_point);
30690 iso2022jp_state = states.ASCII;
30691 return [0x1B, 0x28, 0x42];
30692 }
30693
30694 // 7. If code point is either U+00A5 or U+203E, and iso-2022-jp
30695 // encoder state is not Roman, prepend code point to stream, set
30696 // iso-2022-jp encoder state to Roman, and return three bytes
30697 // 0x1B 0x28 0x4A.
30698 if ((code_point === 0x00A5 || code_point === 0x203E) &&
30699 iso2022jp_state !== states.Roman) {
30700 stream.prepend(code_point);
30701 iso2022jp_state = states.Roman;
30702 return [0x1B, 0x28, 0x4A];
30703 }
30704
30705 // 8. If code point is U+2212, set it to U+FF0D.
30706 if (code_point === 0x2212)
30707 code_point = 0xFF0D;
30708
30709 // 9. Let pointer be the index pointer for code point in index
30710 // jis0208.
30711 var pointer = indexPointerFor(code_point, index('jis0208'));
30712
30713 // 10. If pointer is null, return error with code point.
30714 if (pointer === null)
30715 return encoderError(code_point);
30716
30717 // 11. If iso-2022-jp encoder state is not jis0208, prepend code
30718 // point to stream, set iso-2022-jp encoder state to jis0208,
30719 // and return three bytes 0x1B 0x24 0x42.
30720 if (iso2022jp_state !== states.jis0208) {
30721 stream.prepend(code_point);
30722 iso2022jp_state = states.jis0208;
30723 return [0x1B, 0x24, 0x42];
30724 }
30725
30726 // 12. Let lead be floor(pointer / 94) + 0x21.
30727 var lead = floor(pointer / 94) + 0x21;
30728
30729 // 13. Let trail be pointer % 94 + 0x21.
30730 var trail = pointer % 94 + 0x21;
30731
30732 // 14. Return two bytes whose values are lead and trail.
30733 return [lead, trail];
30734 };
30735 }
30736
30737 /** @param {{fatal: boolean}} options */
30738 encoders['ISO-2022-JP'] = function(options) {
30739 return new ISO2022JPEncoder(options);
30740 };
30741 /** @param {{fatal: boolean}} options */
30742 decoders['ISO-2022-JP'] = function(options) {
30743 return new ISO2022JPDecoder(options);
30744 };
30745
30746 // 13.3 Shift_JIS
30747
30748 // 13.3.1 Shift_JIS decoder
30749 /**
30750 * @constructor
30751 * @implements {Decoder}
30752 * @param {{fatal: boolean}} options
30753 */
30754 function ShiftJISDecoder(options) {
30755 var fatal = options.fatal;
30756 // Shift_JIS's decoder has an associated Shift_JIS lead (initially
30757 // 0x00).
30758 var /** @type {number} */ Shift_JIS_lead = 0x00;
30759 /**
30760 * @param {Stream} stream The stream of bytes being decoded.
30761 * @param {number} bite The next byte read from the stream.
30762 * @return {?(number|!Array.<number>)} The next code point(s)
30763 * decoded, or null if not enough data exists in the input
30764 * stream to decode a complete code point.
30765 */
30766 this.handler = function(stream, bite) {
30767 // 1. If byte is end-of-stream and Shift_JIS lead is not 0x00,
30768 // set Shift_JIS lead to 0x00 and return error.
30769 if (bite === end_of_stream && Shift_JIS_lead !== 0x00) {
30770 Shift_JIS_lead = 0x00;
30771 return decoderError(fatal);
30772 }
30773
30774 // 2. If byte is end-of-stream and Shift_JIS lead is 0x00,
30775 // return finished.
30776 if (bite === end_of_stream && Shift_JIS_lead === 0x00)
30777 return finished;
30778
30779 // 3. If Shift_JIS lead is not 0x00, let lead be Shift_JIS lead,
30780 // let pointer be null, set Shift_JIS lead to 0x00, and then run
30781 // these substeps:
30782 if (Shift_JIS_lead !== 0x00) {
30783 var lead = Shift_JIS_lead;
30784 var pointer = null;
30785 Shift_JIS_lead = 0x00;
30786
30787 // 1. Let offset be 0x40, if byte is less than 0x7F, and 0x41
30788 // otherwise.
30789 var offset = (bite < 0x7F) ? 0x40 : 0x41;
30790
30791 // 2. Let lead offset be 0x81, if lead is less than 0xA0, and
30792 // 0xC1 otherwise.
30793 var lead_offset = (lead < 0xA0) ? 0x81 : 0xC1;
30794
30795 // 3. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
30796 // to 0xFC, inclusive, set pointer to (lead − lead offset) ×
30797 // 188 + byte − offset.
30798 if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFC))
30799 pointer = (lead - lead_offset) * 188 + bite - offset;
30800
30801 // 4. If pointer is in the range 8836 to 10715, inclusive,
30802 // return a code point whose value is 0xE000 − 8836 + pointer.
30803 if (inRange(pointer, 8836, 10715))
30804 return 0xE000 - 8836 + pointer;
30805
30806 // 5. Let code point be null, if pointer is null, and the
30807 // index code point for pointer in index jis0208 otherwise.
30808 var code_point = (pointer === null) ? null :
30809 indexCodePointFor(pointer, index('jis0208'));
30810
30811 // 6. If code point is null and byte is an ASCII byte, prepend
30812 // byte to stream.
30813 if (code_point === null && isASCIIByte(bite))
30814 stream.prepend(bite);
30815
30816 // 7. If code point is null, return error.
30817 if (code_point === null)
30818 return decoderError(fatal);
30819
30820 // 8. Return a code point whose value is code point.
30821 return code_point;
30822 }
30823
30824 // 4. If byte is an ASCII byte or 0x80, return a code point
30825 // whose value is byte.
30826 if (isASCIIByte(bite) || bite === 0x80)
30827 return bite;
30828
30829 // 5. If byte is in the range 0xA1 to 0xDF, inclusive, return a
30830 // code point whose value is 0xFF61 − 0xA1 + byte.
30831 if (inRange(bite, 0xA1, 0xDF))
30832 return 0xFF61 - 0xA1 + bite;
30833
30834 // 6. If byte is in the range 0x81 to 0x9F, inclusive, or 0xE0
30835 // to 0xFC, inclusive, set Shift_JIS lead to byte and return
30836 // continue.
30837 if (inRange(bite, 0x81, 0x9F) || inRange(bite, 0xE0, 0xFC)) {
30838 Shift_JIS_lead = bite;
30839 return null;
30840 }
30841
30842 // 7. Return error.
30843 return decoderError(fatal);
30844 };
30845 }
30846
30847 // 13.3.2 Shift_JIS encoder
30848 /**
30849 * @constructor
30850 * @implements {Encoder}
30851 * @param {{fatal: boolean}} options
30852 */
30853 function ShiftJISEncoder(options) {
30854 var fatal = options.fatal;
30855 /**
30856 * @param {Stream} stream Input stream.
30857 * @param {number} code_point Next code point read from the stream.
30858 * @return {(number|!Array.<number>)} Byte(s) to emit.
30859 */
30860 this.handler = function(stream, code_point) {
30861 // 1. If code point is end-of-stream, return finished.
30862 if (code_point === end_of_stream)
30863 return finished;
30864
30865 // 2. If code point is an ASCII code point or U+0080, return a
30866 // byte whose value is code point.
30867 if (isASCIICodePoint(code_point) || code_point === 0x0080)
30868 return code_point;
30869
30870 // 3. If code point is U+00A5, return byte 0x5C.
30871 if (code_point === 0x00A5)
30872 return 0x5C;
30873
30874 // 4. If code point is U+203E, return byte 0x7E.
30875 if (code_point === 0x203E)
30876 return 0x7E;
30877
30878 // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
30879 // return a byte whose value is code point − 0xFF61 + 0xA1.
30880 if (inRange(code_point, 0xFF61, 0xFF9F))
30881 return code_point - 0xFF61 + 0xA1;
30882
30883 // 6. If code point is U+2212, set it to U+FF0D.
30884 if (code_point === 0x2212)
30885 code_point = 0xFF0D;
30886
30887 // 7. Let pointer be the index Shift_JIS pointer for code point.
30888 var pointer = indexShiftJISPointerFor(code_point);
30889
30890 // 8. If pointer is null, return error with code point.
30891 if (pointer === null)
30892 return encoderError(code_point);
30893
30894 // 9. Let lead be floor(pointer / 188).
30895 var lead = floor(pointer / 188);
30896
30897 // 10. Let lead offset be 0x81, if lead is less than 0x1F, and
30898 // 0xC1 otherwise.
30899 var lead_offset = (lead < 0x1F) ? 0x81 : 0xC1;
30900
30901 // 11. Let trail be pointer % 188.
30902 var trail = pointer % 188;
30903
30904 // 12. Let offset be 0x40, if trail is less than 0x3F, and 0x41
30905 // otherwise.
30906 var offset = (trail < 0x3F) ? 0x40 : 0x41;
30907
30908 // 13. Return two bytes whose values are lead + lead offset and
30909 // trail + offset.
30910 return [lead + lead_offset, trail + offset];
30911 };
30912 }
30913
30914 /** @param {{fatal: boolean}} options */
30915 encoders['Shift_JIS'] = function(options) {
30916 return new ShiftJISEncoder(options);
30917 };
30918 /** @param {{fatal: boolean}} options */
30919 decoders['Shift_JIS'] = function(options) {
30920 return new ShiftJISDecoder(options);
30921 };
30922
30923 //
30924 // 14. Legacy multi-byte Korean encodings
30925 //
30926
30927 // 14.1 euc-kr
30928
30929 // 14.1.1 euc-kr decoder
30930 /**
30931 * @constructor
30932 * @implements {Decoder}
30933 * @param {{fatal: boolean}} options
30934 */
30935 function EUCKRDecoder(options) {
30936 var fatal = options.fatal;
30937
30938 // euc-kr's decoder has an associated euc-kr lead (initially 0x00).
30939 var /** @type {number} */ euckr_lead = 0x00;
30940 /**
30941 * @param {Stream} stream The stream of bytes being decoded.
30942 * @param {number} bite The next byte read from the stream.
30943 * @return {?(number|!Array.<number>)} The next code point(s)
30944 * decoded, or null if not enough data exists in the input
30945 * stream to decode a complete code point.
30946 */
30947 this.handler = function(stream, bite) {
30948 // 1. If byte is end-of-stream and euc-kr lead is not 0x00, set
30949 // euc-kr lead to 0x00 and return error.
30950 if (bite === end_of_stream && euckr_lead !== 0) {
30951 euckr_lead = 0x00;
30952 return decoderError(fatal);
30953 }
30954
30955 // 2. If byte is end-of-stream and euc-kr lead is 0x00, return
30956 // finished.
30957 if (bite === end_of_stream && euckr_lead === 0)
30958 return finished;
30959
30960 // 3. If euc-kr lead is not 0x00, let lead be euc-kr lead, let
30961 // pointer be null, set euc-kr lead to 0x00, and then run these
30962 // substeps:
30963 if (euckr_lead !== 0x00) {
30964 var lead = euckr_lead;
30965 var pointer = null;
30966 euckr_lead = 0x00;
30967
30968 // 1. If byte is in the range 0x41 to 0xFE, inclusive, set
30969 // pointer to (lead − 0x81) × 190 + (byte − 0x41).
30970 if (inRange(bite, 0x41, 0xFE))
30971 pointer = (lead - 0x81) * 190 + (bite - 0x41);
30972
30973 // 2. Let code point be null, if pointer is null, and the
30974 // index code point for pointer in index euc-kr otherwise.
30975 var code_point = (pointer === null)
30976 ? null : indexCodePointFor(pointer, index('euc-kr'));
30977
30978 // 3. If code point is null and byte is an ASCII byte, prepend
30979 // byte to stream.
30980 if (pointer === null && isASCIIByte(bite))
30981 stream.prepend(bite);
30982
30983 // 4. If code point is null, return error.
30984 if (code_point === null)
30985 return decoderError(fatal);
30986
30987 // 5. Return a code point whose value is code point.
30988 return code_point;
30989 }
30990
30991 // 4. If byte is an ASCII byte, return a code point whose value
30992 // is byte.
30993 if (isASCIIByte(bite))
30994 return bite;
30995
30996 // 5. If byte is in the range 0x81 to 0xFE, inclusive, set
30997 // euc-kr lead to byte and return continue.
30998 if (inRange(bite, 0x81, 0xFE)) {
30999 euckr_lead = bite;
31000 return null;
31001 }
31002
31003 // 6. Return error.
31004 return decoderError(fatal);
31005 };
31006 }
31007
31008 // 14.1.2 euc-kr encoder
31009 /**
31010 * @constructor
31011 * @implements {Encoder}
31012 * @param {{fatal: boolean}} options
31013 */
31014 function EUCKREncoder(options) {
31015 var fatal = options.fatal;
31016 /**
31017 * @param {Stream} stream Input stream.
31018 * @param {number} code_point Next code point read from the stream.
31019 * @return {(number|!Array.<number>)} Byte(s) to emit.
31020 */
31021 this.handler = function(stream, code_point) {
31022 // 1. If code point is end-of-stream, return finished.
31023 if (code_point === end_of_stream)
31024 return finished;
31025
31026 // 2. If code point is an ASCII code point, return a byte whose
31027 // value is code point.
31028 if (isASCIICodePoint(code_point))
31029 return code_point;
31030
31031 // 3. Let pointer be the index pointer for code point in index
31032 // euc-kr.
31033 var pointer = indexPointerFor(code_point, index('euc-kr'));
31034
31035 // 4. If pointer is null, return error with code point.
31036 if (pointer === null)
31037 return encoderError(code_point);
31038
31039 // 5. Let lead be floor(pointer / 190) + 0x81.
31040 var lead = floor(pointer / 190) + 0x81;
31041
31042 // 6. Let trail be pointer % 190 + 0x41.
31043 var trail = (pointer % 190) + 0x41;
31044
31045 // 7. Return two bytes whose values are lead and trail.
31046 return [lead, trail];
31047 };
31048 }
31049
31050 /** @param {{fatal: boolean}} options */
31051 encoders['EUC-KR'] = function(options) {
31052 return new EUCKREncoder(options);
31053 };
31054 /** @param {{fatal: boolean}} options */
31055 decoders['EUC-KR'] = function(options) {
31056 return new EUCKRDecoder(options);
31057 };
31058
31059
31060 //
31061 // 15. Legacy miscellaneous encodings
31062 //
31063
31064 // 15.1 replacement
31065
31066 // Not needed - API throws RangeError
31067
31068 // 15.2 Common infrastructure for utf-16be and utf-16le
31069
31070 /**
31071 * @param {number} code_unit
31072 * @param {boolean} utf16be
31073 * @return {!Array.<number>} bytes
31074 */
31075 function convertCodeUnitToBytes(code_unit, utf16be) {
31076 // 1. Let byte1 be code unit >> 8.
31077 var byte1 = code_unit >> 8;
31078
31079 // 2. Let byte2 be code unit & 0x00FF.
31080 var byte2 = code_unit & 0x00FF;
31081
31082 // 3. Then return the bytes in order:
31083 // utf-16be flag is set: byte1, then byte2.
31084 if (utf16be)
31085 return [byte1, byte2];
31086 // utf-16be flag is unset: byte2, then byte1.
31087 return [byte2, byte1];
31088 }
31089
31090 // 15.2.1 shared utf-16 decoder
31091 /**
31092 * @constructor
31093 * @implements {Decoder}
31094 * @param {boolean} utf16_be True if big-endian, false if little-endian.
31095 * @param {{fatal: boolean}} options
31096 */
31097 function UTF16Decoder(utf16_be, options) {
31098 var fatal = options.fatal;
31099 var /** @type {?number} */ utf16_lead_byte = null,
31100 /** @type {?number} */ utf16_lead_surrogate = null;
31101 /**
31102 * @param {Stream} stream The stream of bytes being decoded.
31103 * @param {number} bite The next byte read from the stream.
31104 * @return {?(number|!Array.<number>)} The next code point(s)
31105 * decoded, or null if not enough data exists in the input
31106 * stream to decode a complete code point.
31107 */
31108 this.handler = function(stream, bite) {
31109 // 1. If byte is end-of-stream and either utf-16 lead byte or
31110 // utf-16 lead surrogate is not null, set utf-16 lead byte and
31111 // utf-16 lead surrogate to null, and return error.
31112 if (bite === end_of_stream && (utf16_lead_byte !== null ||
31113 utf16_lead_surrogate !== null)) {
31114 return decoderError(fatal);
31115 }
31116
31117 // 2. If byte is end-of-stream and utf-16 lead byte and utf-16
31118 // lead surrogate are null, return finished.
31119 if (bite === end_of_stream && utf16_lead_byte === null &&
31120 utf16_lead_surrogate === null) {
31121 return finished;
31122 }
31123
31124 // 3. If utf-16 lead byte is null, set utf-16 lead byte to byte
31125 // and return continue.
31126 if (utf16_lead_byte === null) {
31127 utf16_lead_byte = bite;
31128 return null;
31129 }
31130
31131 // 4. Let code unit be the result of:
31132 var code_unit;
31133 if (utf16_be) {
31134 // utf-16be decoder flag is set
31135 // (utf-16 lead byte << 8) + byte.
31136 code_unit = (utf16_lead_byte << 8) + bite;
31137 } else {
31138 // utf-16be decoder flag is unset
31139 // (byte << 8) + utf-16 lead byte.
31140 code_unit = (bite << 8) + utf16_lead_byte;
31141 }
31142 // Then set utf-16 lead byte to null.
31143 utf16_lead_byte = null;
31144
31145 // 5. If utf-16 lead surrogate is not null, let lead surrogate
31146 // be utf-16 lead surrogate, set utf-16 lead surrogate to null,
31147 // and then run these substeps:
31148 if (utf16_lead_surrogate !== null) {
31149 var lead_surrogate = utf16_lead_surrogate;
31150 utf16_lead_surrogate = null;
31151
31152 // 1. If code unit is in the range U+DC00 to U+DFFF,
31153 // inclusive, return a code point whose value is 0x10000 +
31154 // ((lead surrogate − 0xD800) << 10) + (code unit − 0xDC00).
31155 if (inRange(code_unit, 0xDC00, 0xDFFF)) {
31156 return 0x10000 + (lead_surrogate - 0xD800) * 0x400 +
31157 (code_unit - 0xDC00);
31158 }
31159
31160 // 2. Prepend the sequence resulting of converting code unit
31161 // to bytes using utf-16be decoder flag to stream and return
31162 // error.
31163 stream.prepend(convertCodeUnitToBytes(code_unit, utf16_be));
31164 return decoderError(fatal);
31165 }
31166
31167 // 6. If code unit is in the range U+D800 to U+DBFF, inclusive,
31168 // set utf-16 lead surrogate to code unit and return continue.
31169 if (inRange(code_unit, 0xD800, 0xDBFF)) {
31170 utf16_lead_surrogate = code_unit;
31171 return null;
31172 }
31173
31174 // 7. If code unit is in the range U+DC00 to U+DFFF, inclusive,
31175 // return error.
31176 if (inRange(code_unit, 0xDC00, 0xDFFF))
31177 return decoderError(fatal);
31178
31179 // 8. Return code point code unit.
31180 return code_unit;
31181 };
31182 }
31183
31184 // 15.2.2 shared utf-16 encoder
31185 /**
31186 * @constructor
31187 * @implements {Encoder}
31188 * @param {boolean} utf16_be True if big-endian, false if little-endian.
31189 * @param {{fatal: boolean}} options
31190 */
31191 function UTF16Encoder(utf16_be, options) {
31192 var fatal = options.fatal;
31193 /**
31194 * @param {Stream} stream Input stream.
31195 * @param {number} code_point Next code point read from the stream.
31196 * @return {(number|!Array.<number>)} Byte(s) to emit.
31197 */
31198 this.handler = function(stream, code_point) {
31199 // 1. If code point is end-of-stream, return finished.
31200 if (code_point === end_of_stream)
31201 return finished;
31202
31203 // 2. If code point is in the range U+0000 to U+FFFF, inclusive,
31204 // return the sequence resulting of converting code point to
31205 // bytes using utf-16be encoder flag.
31206 if (inRange(code_point, 0x0000, 0xFFFF))
31207 return convertCodeUnitToBytes(code_point, utf16_be);
31208
31209 // 3. Let lead be ((code point − 0x10000) >> 10) + 0xD800,
31210 // converted to bytes using utf-16be encoder flag.
31211 var lead = convertCodeUnitToBytes(
31212 ((code_point - 0x10000) >> 10) + 0xD800, utf16_be);
31213
31214 // 4. Let trail be ((code point − 0x10000) & 0x3FF) + 0xDC00,
31215 // converted to bytes using utf-16be encoder flag.
31216 var trail = convertCodeUnitToBytes(
31217 ((code_point - 0x10000) & 0x3FF) + 0xDC00, utf16_be);
31218
31219 // 5. Return a byte sequence of lead followed by trail.
31220 return lead.concat(trail);
31221 };
31222 }
31223
31224 // 15.3 utf-16be
31225 // 15.3.1 utf-16be decoder
31226 /** @param {{fatal: boolean}} options */
31227 encoders['UTF-16BE'] = function(options) {
31228 return new UTF16Encoder(true, options);
31229 };
31230 // 15.3.2 utf-16be encoder
31231 /** @param {{fatal: boolean}} options */
31232 decoders['UTF-16BE'] = function(options) {
31233 return new UTF16Decoder(true, options);
31234 };
31235
31236 // 15.4 utf-16le
31237 // 15.4.1 utf-16le decoder
31238 /** @param {{fatal: boolean}} options */
31239 encoders['UTF-16LE'] = function(options) {
31240 return new UTF16Encoder(false, options);
31241 };
31242 // 15.4.2 utf-16le encoder
31243 /** @param {{fatal: boolean}} options */
31244 decoders['UTF-16LE'] = function(options) {
31245 return new UTF16Decoder(false, options);
31246 };
31247
31248 // 15.5 x-user-defined
31249
31250 // 15.5.1 x-user-defined decoder
31251 /**
31252 * @constructor
31253 * @implements {Decoder}
31254 * @param {{fatal: boolean}} options
31255 */
31256 function XUserDefinedDecoder(options) {
31257 var fatal = options.fatal;
31258 /**
31259 * @param {Stream} stream The stream of bytes being decoded.
31260 * @param {number} bite The next byte read from the stream.
31261 * @return {?(number|!Array.<number>)} The next code point(s)
31262 * decoded, or null if not enough data exists in the input
31263 * stream to decode a complete code point.
31264 */
31265 this.handler = function(stream, bite) {
31266 // 1. If byte is end-of-stream, return finished.
31267 if (bite === end_of_stream)
31268 return finished;
31269
31270 // 2. If byte is an ASCII byte, return a code point whose value
31271 // is byte.
31272 if (isASCIIByte(bite))
31273 return bite;
31274
31275 // 3. Return a code point whose value is 0xF780 + byte − 0x80.
31276 return 0xF780 + bite - 0x80;
31277 };
31278 }
31279
31280 // 15.5.2 x-user-defined encoder
31281 /**
31282 * @constructor
31283 * @implements {Encoder}
31284 * @param {{fatal: boolean}} options
31285 */
31286 function XUserDefinedEncoder(options) {
31287 var fatal = options.fatal;
31288 /**
31289 * @param {Stream} stream Input stream.
31290 * @param {number} code_point Next code point read from the stream.
31291 * @return {(number|!Array.<number>)} Byte(s) to emit.
31292 */
31293 this.handler = function(stream, code_point) {
31294 // 1.If code point is end-of-stream, return finished.
31295 if (code_point === end_of_stream)
31296 return finished;
31297
31298 // 2. If code point is an ASCII code point, return a byte whose
31299 // value is code point.
31300 if (isASCIICodePoint(code_point))
31301 return code_point;
31302
31303 // 3. If code point is in the range U+F780 to U+F7FF, inclusive,
31304 // return a byte whose value is code point − 0xF780 + 0x80.
31305 if (inRange(code_point, 0xF780, 0xF7FF))
31306 return code_point - 0xF780 + 0x80;
31307
31308 // 4. Return error with code point.
31309 return encoderError(code_point);
31310 };
31311 }
31312
31313 /** @param {{fatal: boolean}} options */
31314 encoders['x-user-defined'] = function(options) {
31315 return new XUserDefinedEncoder(options);
31316 };
31317 /** @param {{fatal: boolean}} options */
31318 decoders['x-user-defined'] = function(options) {
31319 return new XUserDefinedDecoder(options);
31320 };
31321
31322 if (!global['TextEncoder'])
31323 global['TextEncoder'] = TextEncoder;
31324 if (!global['TextDecoder'])
31325 global['TextDecoder'] = TextDecoder;
31326
31327 if (typeof module !== "undefined" && module.exports) {
31328 module.exports = {
31329 TextEncoder: global['TextEncoder'],
31330 TextDecoder: global['TextDecoder'],
31331 EncodingIndexes: global["encoding-indexes"]
31332 };
31333 }
31334
31335// For strict environments where `this` inside the global scope
31336// is `undefined`, take a pure object instead
31337}(this || {}));
31338},{"./encoding-indexes.js":42}],44:[function(require,module,exports){
31339module.exports = Array.isArray || function (arr) {
31340 return Object.prototype.toString.call(arr) == '[object Array]';
31341};
31342
31343},{}],45:[function(require,module,exports){
31344module.exports = extend;
31345
31346/*
31347 var obj = {a: 3, b: 5};
31348 extend(obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}
31349 obj; // {a: 4, b: 5, c: 8}
31350
31351 var obj = {a: 3, b: 5};
31352 extend({}, obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}
31353 obj; // {a: 3, b: 5}
31354
31355 var arr = [1, 2, 3];
31356 var obj = {a: 3, b: 5};
31357 extend(obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}
31358 arr.push(4);
31359 obj; // {a: 3, b: 5, c: [1, 2, 3, 4]}
31360
31361 var arr = [1, 2, 3];
31362 var obj = {a: 3, b: 5};
31363 extend(true, obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}
31364 arr.push(4);
31365 obj; // {a: 3, b: 5, c: [1, 2, 3]}
31366
31367 extend({a: 4, b: 5}); // {a: 4, b: 5}
31368 extend({a: 4, b: 5}, 3); {a: 4, b: 5}
31369 extend({a: 4, b: 5}, true); {a: 4, b: 5}
31370 extend('hello', {a: 4, b: 5}); // throws
31371 extend(3, {a: 4, b: 5}); // throws
31372*/
31373
31374function extend(/* [deep], obj1, obj2, [objn] */) {
31375 var args = [].slice.call(arguments);
31376 var deep = false;
31377 if (typeof args[0] == 'boolean') {
31378 deep = args.shift();
31379 }
31380 var result = args[0];
31381 if (!result || (typeof result != 'object' && typeof result != 'function')) {
31382 throw new Error('extendee must be an object');
31383 }
31384 var extenders = args.slice(1);
31385 var len = extenders.length;
31386 for (var i = 0; i < len; i++) {
31387 var extender = extenders[i];
31388 for (var key in extender) {
31389 if (extender.hasOwnProperty(key)) {
31390 var value = extender[key];
31391 if (deep && isCloneable(value)) {
31392 var base = Array.isArray(value) ? [] : {};
31393 result[key] = extend(true, result.hasOwnProperty(key) ? result[key] : base, value);
31394 } else {
31395 result[key] = value;
31396 }
31397 }
31398 }
31399 }
31400 return result;
31401}
31402
31403function isCloneable(obj) {
31404 return Array.isArray(obj) || {}.toString.call(obj) == '[object Object]';
31405}
31406
31407},{}],46:[function(require,module,exports){
31408(function (global){
31409/**
31410 * lodash (Custom Build) <https://lodash.com/>
31411 * Build: `lodash modularize exports="npm" -o ./`
31412 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
31413 * Released under MIT license <https://lodash.com/license>
31414 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
31415 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
31416 */
31417
31418/** Used as the `TypeError` message for "Functions" methods. */
31419var FUNC_ERROR_TEXT = 'Expected a function';
31420
31421/** Used to stand-in for `undefined` hash values. */
31422var HASH_UNDEFINED = '__lodash_hash_undefined__';
31423
31424/** Used as references for various `Number` constants. */
31425var INFINITY = 1 / 0;
31426
31427/** `Object#toString` result references. */
31428var funcTag = '[object Function]',
31429 genTag = '[object GeneratorFunction]',
31430 symbolTag = '[object Symbol]';
31431
31432/** Used to match property names within property paths. */
31433var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
31434 reIsPlainProp = /^\w*$/,
31435 reLeadingDot = /^\./,
31436 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
31437
31438/**
31439 * Used to match `RegExp`
31440 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
31441 */
31442var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
31443
31444/** Used to match backslashes in property paths. */
31445var reEscapeChar = /\\(\\)?/g;
31446
31447/** Used to detect host constructors (Safari). */
31448var reIsHostCtor = /^\[object .+?Constructor\]$/;
31449
31450/** Detect free variable `global` from Node.js. */
31451var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
31452
31453/** Detect free variable `self`. */
31454var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
31455
31456/** Used as a reference to the global object. */
31457var root = freeGlobal || freeSelf || Function('return this')();
31458
31459/**
31460 * Gets the value at `key` of `object`.
31461 *
31462 * @private
31463 * @param {Object} [object] The object to query.
31464 * @param {string} key The key of the property to get.
31465 * @returns {*} Returns the property value.
31466 */
31467function getValue(object, key) {
31468 return object == null ? undefined : object[key];
31469}
31470
31471/**
31472 * Checks if `value` is a host object in IE < 9.
31473 *
31474 * @private
31475 * @param {*} value The value to check.
31476 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
31477 */
31478function isHostObject(value) {
31479 // Many host objects are `Object` objects that can coerce to strings
31480 // despite having improperly defined `toString` methods.
31481 var result = false;
31482 if (value != null && typeof value.toString != 'function') {
31483 try {
31484 result = !!(value + '');
31485 } catch (e) {}
31486 }
31487 return result;
31488}
31489
31490/** Used for built-in method references. */
31491var arrayProto = Array.prototype,
31492 funcProto = Function.prototype,
31493 objectProto = Object.prototype;
31494
31495/** Used to detect overreaching core-js shims. */
31496var coreJsData = root['__core-js_shared__'];
31497
31498/** Used to detect methods masquerading as native. */
31499var maskSrcKey = (function() {
31500 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
31501 return uid ? ('Symbol(src)_1.' + uid) : '';
31502}());
31503
31504/** Used to resolve the decompiled source of functions. */
31505var funcToString = funcProto.toString;
31506
31507/** Used to check objects for own properties. */
31508var hasOwnProperty = objectProto.hasOwnProperty;
31509
31510/**
31511 * Used to resolve the
31512 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
31513 * of values.
31514 */
31515var objectToString = objectProto.toString;
31516
31517/** Used to detect if a method is native. */
31518var reIsNative = RegExp('^' +
31519 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
31520 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
31521);
31522
31523/** Built-in value references. */
31524var Symbol = root.Symbol,
31525 splice = arrayProto.splice;
31526
31527/* Built-in method references that are verified to be native. */
31528var Map = getNative(root, 'Map'),
31529 nativeCreate = getNative(Object, 'create');
31530
31531/** Used to convert symbols to primitives and strings. */
31532var symbolProto = Symbol ? Symbol.prototype : undefined,
31533 symbolToString = symbolProto ? symbolProto.toString : undefined;
31534
31535/**
31536 * Creates a hash object.
31537 *
31538 * @private
31539 * @constructor
31540 * @param {Array} [entries] The key-value pairs to cache.
31541 */
31542function Hash(entries) {
31543 var index = -1,
31544 length = entries ? entries.length : 0;
31545
31546 this.clear();
31547 while (++index < length) {
31548 var entry = entries[index];
31549 this.set(entry[0], entry[1]);
31550 }
31551}
31552
31553/**
31554 * Removes all key-value entries from the hash.
31555 *
31556 * @private
31557 * @name clear
31558 * @memberOf Hash
31559 */
31560function hashClear() {
31561 this.__data__ = nativeCreate ? nativeCreate(null) : {};
31562}
31563
31564/**
31565 * Removes `key` and its value from the hash.
31566 *
31567 * @private
31568 * @name delete
31569 * @memberOf Hash
31570 * @param {Object} hash The hash to modify.
31571 * @param {string} key The key of the value to remove.
31572 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
31573 */
31574function hashDelete(key) {
31575 return this.has(key) && delete this.__data__[key];
31576}
31577
31578/**
31579 * Gets the hash value for `key`.
31580 *
31581 * @private
31582 * @name get
31583 * @memberOf Hash
31584 * @param {string} key The key of the value to get.
31585 * @returns {*} Returns the entry value.
31586 */
31587function hashGet(key) {
31588 var data = this.__data__;
31589 if (nativeCreate) {
31590 var result = data[key];
31591 return result === HASH_UNDEFINED ? undefined : result;
31592 }
31593 return hasOwnProperty.call(data, key) ? data[key] : undefined;
31594}
31595
31596/**
31597 * Checks if a hash value for `key` exists.
31598 *
31599 * @private
31600 * @name has
31601 * @memberOf Hash
31602 * @param {string} key The key of the entry to check.
31603 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
31604 */
31605function hashHas(key) {
31606 var data = this.__data__;
31607 return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
31608}
31609
31610/**
31611 * Sets the hash `key` to `value`.
31612 *
31613 * @private
31614 * @name set
31615 * @memberOf Hash
31616 * @param {string} key The key of the value to set.
31617 * @param {*} value The value to set.
31618 * @returns {Object} Returns the hash instance.
31619 */
31620function hashSet(key, value) {
31621 var data = this.__data__;
31622 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
31623 return this;
31624}
31625
31626// Add methods to `Hash`.
31627Hash.prototype.clear = hashClear;
31628Hash.prototype['delete'] = hashDelete;
31629Hash.prototype.get = hashGet;
31630Hash.prototype.has = hashHas;
31631Hash.prototype.set = hashSet;
31632
31633/**
31634 * Creates an list cache object.
31635 *
31636 * @private
31637 * @constructor
31638 * @param {Array} [entries] The key-value pairs to cache.
31639 */
31640function ListCache(entries) {
31641 var index = -1,
31642 length = entries ? entries.length : 0;
31643
31644 this.clear();
31645 while (++index < length) {
31646 var entry = entries[index];
31647 this.set(entry[0], entry[1]);
31648 }
31649}
31650
31651/**
31652 * Removes all key-value entries from the list cache.
31653 *
31654 * @private
31655 * @name clear
31656 * @memberOf ListCache
31657 */
31658function listCacheClear() {
31659 this.__data__ = [];
31660}
31661
31662/**
31663 * Removes `key` and its value from the list cache.
31664 *
31665 * @private
31666 * @name delete
31667 * @memberOf ListCache
31668 * @param {string} key The key of the value to remove.
31669 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
31670 */
31671function listCacheDelete(key) {
31672 var data = this.__data__,
31673 index = assocIndexOf(data, key);
31674
31675 if (index < 0) {
31676 return false;
31677 }
31678 var lastIndex = data.length - 1;
31679 if (index == lastIndex) {
31680 data.pop();
31681 } else {
31682 splice.call(data, index, 1);
31683 }
31684 return true;
31685}
31686
31687/**
31688 * Gets the list cache value for `key`.
31689 *
31690 * @private
31691 * @name get
31692 * @memberOf ListCache
31693 * @param {string} key The key of the value to get.
31694 * @returns {*} Returns the entry value.
31695 */
31696function listCacheGet(key) {
31697 var data = this.__data__,
31698 index = assocIndexOf(data, key);
31699
31700 return index < 0 ? undefined : data[index][1];
31701}
31702
31703/**
31704 * Checks if a list cache value for `key` exists.
31705 *
31706 * @private
31707 * @name has
31708 * @memberOf ListCache
31709 * @param {string} key The key of the entry to check.
31710 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
31711 */
31712function listCacheHas(key) {
31713 return assocIndexOf(this.__data__, key) > -1;
31714}
31715
31716/**
31717 * Sets the list cache `key` to `value`.
31718 *
31719 * @private
31720 * @name set
31721 * @memberOf ListCache
31722 * @param {string} key The key of the value to set.
31723 * @param {*} value The value to set.
31724 * @returns {Object} Returns the list cache instance.
31725 */
31726function listCacheSet(key, value) {
31727 var data = this.__data__,
31728 index = assocIndexOf(data, key);
31729
31730 if (index < 0) {
31731 data.push([key, value]);
31732 } else {
31733 data[index][1] = value;
31734 }
31735 return this;
31736}
31737
31738// Add methods to `ListCache`.
31739ListCache.prototype.clear = listCacheClear;
31740ListCache.prototype['delete'] = listCacheDelete;
31741ListCache.prototype.get = listCacheGet;
31742ListCache.prototype.has = listCacheHas;
31743ListCache.prototype.set = listCacheSet;
31744
31745/**
31746 * Creates a map cache object to store key-value pairs.
31747 *
31748 * @private
31749 * @constructor
31750 * @param {Array} [entries] The key-value pairs to cache.
31751 */
31752function MapCache(entries) {
31753 var index = -1,
31754 length = entries ? entries.length : 0;
31755
31756 this.clear();
31757 while (++index < length) {
31758 var entry = entries[index];
31759 this.set(entry[0], entry[1]);
31760 }
31761}
31762
31763/**
31764 * Removes all key-value entries from the map.
31765 *
31766 * @private
31767 * @name clear
31768 * @memberOf MapCache
31769 */
31770function mapCacheClear() {
31771 this.__data__ = {
31772 'hash': new Hash,
31773 'map': new (Map || ListCache),
31774 'string': new Hash
31775 };
31776}
31777
31778/**
31779 * Removes `key` and its value from the map.
31780 *
31781 * @private
31782 * @name delete
31783 * @memberOf MapCache
31784 * @param {string} key The key of the value to remove.
31785 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
31786 */
31787function mapCacheDelete(key) {
31788 return getMapData(this, key)['delete'](key);
31789}
31790
31791/**
31792 * Gets the map value for `key`.
31793 *
31794 * @private
31795 * @name get
31796 * @memberOf MapCache
31797 * @param {string} key The key of the value to get.
31798 * @returns {*} Returns the entry value.
31799 */
31800function mapCacheGet(key) {
31801 return getMapData(this, key).get(key);
31802}
31803
31804/**
31805 * Checks if a map value for `key` exists.
31806 *
31807 * @private
31808 * @name has
31809 * @memberOf MapCache
31810 * @param {string} key The key of the entry to check.
31811 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
31812 */
31813function mapCacheHas(key) {
31814 return getMapData(this, key).has(key);
31815}
31816
31817/**
31818 * Sets the map `key` to `value`.
31819 *
31820 * @private
31821 * @name set
31822 * @memberOf MapCache
31823 * @param {string} key The key of the value to set.
31824 * @param {*} value The value to set.
31825 * @returns {Object} Returns the map cache instance.
31826 */
31827function mapCacheSet(key, value) {
31828 getMapData(this, key).set(key, value);
31829 return this;
31830}
31831
31832// Add methods to `MapCache`.
31833MapCache.prototype.clear = mapCacheClear;
31834MapCache.prototype['delete'] = mapCacheDelete;
31835MapCache.prototype.get = mapCacheGet;
31836MapCache.prototype.has = mapCacheHas;
31837MapCache.prototype.set = mapCacheSet;
31838
31839/**
31840 * Gets the index at which the `key` is found in `array` of key-value pairs.
31841 *
31842 * @private
31843 * @param {Array} array The array to inspect.
31844 * @param {*} key The key to search for.
31845 * @returns {number} Returns the index of the matched value, else `-1`.
31846 */
31847function assocIndexOf(array, key) {
31848 var length = array.length;
31849 while (length--) {
31850 if (eq(array[length][0], key)) {
31851 return length;
31852 }
31853 }
31854 return -1;
31855}
31856
31857/**
31858 * The base implementation of `_.get` without support for default values.
31859 *
31860 * @private
31861 * @param {Object} object The object to query.
31862 * @param {Array|string} path The path of the property to get.
31863 * @returns {*} Returns the resolved value.
31864 */
31865function baseGet(object, path) {
31866 path = isKey(path, object) ? [path] : castPath(path);
31867
31868 var index = 0,
31869 length = path.length;
31870
31871 while (object != null && index < length) {
31872 object = object[toKey(path[index++])];
31873 }
31874 return (index && index == length) ? object : undefined;
31875}
31876
31877/**
31878 * The base implementation of `_.isNative` without bad shim checks.
31879 *
31880 * @private
31881 * @param {*} value The value to check.
31882 * @returns {boolean} Returns `true` if `value` is a native function,
31883 * else `false`.
31884 */
31885function baseIsNative(value) {
31886 if (!isObject(value) || isMasked(value)) {
31887 return false;
31888 }
31889 var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
31890 return pattern.test(toSource(value));
31891}
31892
31893/**
31894 * The base implementation of `_.toString` which doesn't convert nullish
31895 * values to empty strings.
31896 *
31897 * @private
31898 * @param {*} value The value to process.
31899 * @returns {string} Returns the string.
31900 */
31901function baseToString(value) {
31902 // Exit early for strings to avoid a performance hit in some environments.
31903 if (typeof value == 'string') {
31904 return value;
31905 }
31906 if (isSymbol(value)) {
31907 return symbolToString ? symbolToString.call(value) : '';
31908 }
31909 var result = (value + '');
31910 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
31911}
31912
31913/**
31914 * Casts `value` to a path array if it's not one.
31915 *
31916 * @private
31917 * @param {*} value The value to inspect.
31918 * @returns {Array} Returns the cast property path array.
31919 */
31920function castPath(value) {
31921 return isArray(value) ? value : stringToPath(value);
31922}
31923
31924/**
31925 * Gets the data for `map`.
31926 *
31927 * @private
31928 * @param {Object} map The map to query.
31929 * @param {string} key The reference key.
31930 * @returns {*} Returns the map data.
31931 */
31932function getMapData(map, key) {
31933 var data = map.__data__;
31934 return isKeyable(key)
31935 ? data[typeof key == 'string' ? 'string' : 'hash']
31936 : data.map;
31937}
31938
31939/**
31940 * Gets the native function at `key` of `object`.
31941 *
31942 * @private
31943 * @param {Object} object The object to query.
31944 * @param {string} key The key of the method to get.
31945 * @returns {*} Returns the function if it's native, else `undefined`.
31946 */
31947function getNative(object, key) {
31948 var value = getValue(object, key);
31949 return baseIsNative(value) ? value : undefined;
31950}
31951
31952/**
31953 * Checks if `value` is a property name and not a property path.
31954 *
31955 * @private
31956 * @param {*} value The value to check.
31957 * @param {Object} [object] The object to query keys on.
31958 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
31959 */
31960function isKey(value, object) {
31961 if (isArray(value)) {
31962 return false;
31963 }
31964 var type = typeof value;
31965 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
31966 value == null || isSymbol(value)) {
31967 return true;
31968 }
31969 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
31970 (object != null && value in Object(object));
31971}
31972
31973/**
31974 * Checks if `value` is suitable for use as unique object key.
31975 *
31976 * @private
31977 * @param {*} value The value to check.
31978 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
31979 */
31980function isKeyable(value) {
31981 var type = typeof value;
31982 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
31983 ? (value !== '__proto__')
31984 : (value === null);
31985}
31986
31987/**
31988 * Checks if `func` has its source masked.
31989 *
31990 * @private
31991 * @param {Function} func The function to check.
31992 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
31993 */
31994function isMasked(func) {
31995 return !!maskSrcKey && (maskSrcKey in func);
31996}
31997
31998/**
31999 * Converts `string` to a property path array.
32000 *
32001 * @private
32002 * @param {string} string The string to convert.
32003 * @returns {Array} Returns the property path array.
32004 */
32005var stringToPath = memoize(function(string) {
32006 string = toString(string);
32007
32008 var result = [];
32009 if (reLeadingDot.test(string)) {
32010 result.push('');
32011 }
32012 string.replace(rePropName, function(match, number, quote, string) {
32013 result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
32014 });
32015 return result;
32016});
32017
32018/**
32019 * Converts `value` to a string key if it's not a string or symbol.
32020 *
32021 * @private
32022 * @param {*} value The value to inspect.
32023 * @returns {string|symbol} Returns the key.
32024 */
32025function toKey(value) {
32026 if (typeof value == 'string' || isSymbol(value)) {
32027 return value;
32028 }
32029 var result = (value + '');
32030 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
32031}
32032
32033/**
32034 * Converts `func` to its source code.
32035 *
32036 * @private
32037 * @param {Function} func The function to process.
32038 * @returns {string} Returns the source code.
32039 */
32040function toSource(func) {
32041 if (func != null) {
32042 try {
32043 return funcToString.call(func);
32044 } catch (e) {}
32045 try {
32046 return (func + '');
32047 } catch (e) {}
32048 }
32049 return '';
32050}
32051
32052/**
32053 * Creates a function that memoizes the result of `func`. If `resolver` is
32054 * provided, it determines the cache key for storing the result based on the
32055 * arguments provided to the memoized function. By default, the first argument
32056 * provided to the memoized function is used as the map cache key. The `func`
32057 * is invoked with the `this` binding of the memoized function.
32058 *
32059 * **Note:** The cache is exposed as the `cache` property on the memoized
32060 * function. Its creation may be customized by replacing the `_.memoize.Cache`
32061 * constructor with one whose instances implement the
32062 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
32063 * method interface of `delete`, `get`, `has`, and `set`.
32064 *
32065 * @static
32066 * @memberOf _
32067 * @since 0.1.0
32068 * @category Function
32069 * @param {Function} func The function to have its output memoized.
32070 * @param {Function} [resolver] The function to resolve the cache key.
32071 * @returns {Function} Returns the new memoized function.
32072 * @example
32073 *
32074 * var object = { 'a': 1, 'b': 2 };
32075 * var other = { 'c': 3, 'd': 4 };
32076 *
32077 * var values = _.memoize(_.values);
32078 * values(object);
32079 * // => [1, 2]
32080 *
32081 * values(other);
32082 * // => [3, 4]
32083 *
32084 * object.a = 2;
32085 * values(object);
32086 * // => [1, 2]
32087 *
32088 * // Modify the result cache.
32089 * values.cache.set(object, ['a', 'b']);
32090 * values(object);
32091 * // => ['a', 'b']
32092 *
32093 * // Replace `_.memoize.Cache`.
32094 * _.memoize.Cache = WeakMap;
32095 */
32096function memoize(func, resolver) {
32097 if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
32098 throw new TypeError(FUNC_ERROR_TEXT);
32099 }
32100 var memoized = function() {
32101 var args = arguments,
32102 key = resolver ? resolver.apply(this, args) : args[0],
32103 cache = memoized.cache;
32104
32105 if (cache.has(key)) {
32106 return cache.get(key);
32107 }
32108 var result = func.apply(this, args);
32109 memoized.cache = cache.set(key, result);
32110 return result;
32111 };
32112 memoized.cache = new (memoize.Cache || MapCache);
32113 return memoized;
32114}
32115
32116// Assign cache to `_.memoize`.
32117memoize.Cache = MapCache;
32118
32119/**
32120 * Performs a
32121 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
32122 * comparison between two values to determine if they are equivalent.
32123 *
32124 * @static
32125 * @memberOf _
32126 * @since 4.0.0
32127 * @category Lang
32128 * @param {*} value The value to compare.
32129 * @param {*} other The other value to compare.
32130 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
32131 * @example
32132 *
32133 * var object = { 'a': 1 };
32134 * var other = { 'a': 1 };
32135 *
32136 * _.eq(object, object);
32137 * // => true
32138 *
32139 * _.eq(object, other);
32140 * // => false
32141 *
32142 * _.eq('a', 'a');
32143 * // => true
32144 *
32145 * _.eq('a', Object('a'));
32146 * // => false
32147 *
32148 * _.eq(NaN, NaN);
32149 * // => true
32150 */
32151function eq(value, other) {
32152 return value === other || (value !== value && other !== other);
32153}
32154
32155/**
32156 * Checks if `value` is classified as an `Array` object.
32157 *
32158 * @static
32159 * @memberOf _
32160 * @since 0.1.0
32161 * @category Lang
32162 * @param {*} value The value to check.
32163 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
32164 * @example
32165 *
32166 * _.isArray([1, 2, 3]);
32167 * // => true
32168 *
32169 * _.isArray(document.body.children);
32170 * // => false
32171 *
32172 * _.isArray('abc');
32173 * // => false
32174 *
32175 * _.isArray(_.noop);
32176 * // => false
32177 */
32178var isArray = Array.isArray;
32179
32180/**
32181 * Checks if `value` is classified as a `Function` object.
32182 *
32183 * @static
32184 * @memberOf _
32185 * @since 0.1.0
32186 * @category Lang
32187 * @param {*} value The value to check.
32188 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
32189 * @example
32190 *
32191 * _.isFunction(_);
32192 * // => true
32193 *
32194 * _.isFunction(/abc/);
32195 * // => false
32196 */
32197function isFunction(value) {
32198 // The use of `Object#toString` avoids issues with the `typeof` operator
32199 // in Safari 8-9 which returns 'object' for typed array and other constructors.
32200 var tag = isObject(value) ? objectToString.call(value) : '';
32201 return tag == funcTag || tag == genTag;
32202}
32203
32204/**
32205 * Checks if `value` is the
32206 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
32207 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
32208 *
32209 * @static
32210 * @memberOf _
32211 * @since 0.1.0
32212 * @category Lang
32213 * @param {*} value The value to check.
32214 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
32215 * @example
32216 *
32217 * _.isObject({});
32218 * // => true
32219 *
32220 * _.isObject([1, 2, 3]);
32221 * // => true
32222 *
32223 * _.isObject(_.noop);
32224 * // => true
32225 *
32226 * _.isObject(null);
32227 * // => false
32228 */
32229function isObject(value) {
32230 var type = typeof value;
32231 return !!value && (type == 'object' || type == 'function');
32232}
32233
32234/**
32235 * Checks if `value` is object-like. A value is object-like if it's not `null`
32236 * and has a `typeof` result of "object".
32237 *
32238 * @static
32239 * @memberOf _
32240 * @since 4.0.0
32241 * @category Lang
32242 * @param {*} value The value to check.
32243 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
32244 * @example
32245 *
32246 * _.isObjectLike({});
32247 * // => true
32248 *
32249 * _.isObjectLike([1, 2, 3]);
32250 * // => true
32251 *
32252 * _.isObjectLike(_.noop);
32253 * // => false
32254 *
32255 * _.isObjectLike(null);
32256 * // => false
32257 */
32258function isObjectLike(value) {
32259 return !!value && typeof value == 'object';
32260}
32261
32262/**
32263 * Checks if `value` is classified as a `Symbol` primitive or object.
32264 *
32265 * @static
32266 * @memberOf _
32267 * @since 4.0.0
32268 * @category Lang
32269 * @param {*} value The value to check.
32270 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
32271 * @example
32272 *
32273 * _.isSymbol(Symbol.iterator);
32274 * // => true
32275 *
32276 * _.isSymbol('abc');
32277 * // => false
32278 */
32279function isSymbol(value) {
32280 return typeof value == 'symbol' ||
32281 (isObjectLike(value) && objectToString.call(value) == symbolTag);
32282}
32283
32284/**
32285 * Converts `value` to a string. An empty string is returned for `null`
32286 * and `undefined` values. The sign of `-0` is preserved.
32287 *
32288 * @static
32289 * @memberOf _
32290 * @since 4.0.0
32291 * @category Lang
32292 * @param {*} value The value to process.
32293 * @returns {string} Returns the string.
32294 * @example
32295 *
32296 * _.toString(null);
32297 * // => ''
32298 *
32299 * _.toString(-0);
32300 * // => '-0'
32301 *
32302 * _.toString([1, 2, 3]);
32303 * // => '1,2,3'
32304 */
32305function toString(value) {
32306 return value == null ? '' : baseToString(value);
32307}
32308
32309/**
32310 * Gets the value at `path` of `object`. If the resolved value is
32311 * `undefined`, the `defaultValue` is returned in its place.
32312 *
32313 * @static
32314 * @memberOf _
32315 * @since 3.7.0
32316 * @category Object
32317 * @param {Object} object The object to query.
32318 * @param {Array|string} path The path of the property to get.
32319 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
32320 * @returns {*} Returns the resolved value.
32321 * @example
32322 *
32323 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
32324 *
32325 * _.get(object, 'a[0].b.c');
32326 * // => 3
32327 *
32328 * _.get(object, ['a', '0', 'b', 'c']);
32329 * // => 3
32330 *
32331 * _.get(object, 'a.b.c', 'default');
32332 * // => 'default'
32333 */
32334function get(object, path, defaultValue) {
32335 var result = object == null ? undefined : baseGet(object, path);
32336 return result === undefined ? defaultValue : result;
32337}
32338
32339module.exports = get;
32340
32341}).call(this,typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
32342},{}],47:[function(require,module,exports){
32343(function (global){
32344
32345var userAgent = global.navigator && global.navigator.userAgent;
32346var isRunningInIE = userAgent && userAgent.indexOf("MSIE ") > -1;
32347var maxTimeout = Math.pow(2, 31) - 1; //see https://heycam.github.io/webidl/#abstract-opdef-converttoint
32348
32349// Make properties writable in IE, as per
32350// http://www.adequatelygood.com/Replacing-setTimeout-Globally.html
32351if (isRunningInIE) {
32352 global.setTimeout = global.setTimeout;
32353 global.clearTimeout = global.clearTimeout;
32354 global.setInterval = global.setInterval;
32355 global.clearInterval = global.clearInterval;
32356 global.Date = global.Date;
32357}
32358
32359// setImmediate is not a standard function
32360// avoid adding the prop to the window object if not present
32361if (global.setImmediate !== undefined) {
32362 global.setImmediate = global.setImmediate;
32363 global.clearImmediate = global.clearImmediate;
32364}
32365
32366// node expects setTimeout/setInterval to return a fn object w/ .ref()/.unref()
32367// browsers, a number.
32368// see https://github.com/cjohansen/Sinon.JS/pull/436
32369
32370var NOOP = function () { return undefined; };
32371var timeoutResult = setTimeout(NOOP, 0);
32372var addTimerReturnsObject = typeof timeoutResult === "object";
32373var hrtimePresent = (global.process && typeof global.process.hrtime === "function");
32374var nextTickPresent = (global.process && typeof global.process.nextTick === "function");
32375var performancePresent = (global.performance && typeof global.performance.now === "function");
32376var requestAnimationFramePresent = (global.requestAnimationFrame && typeof global.requestAnimationFrame === "function");
32377var cancelAnimationFramePresent = (global.cancelAnimationFrame && typeof global.cancelAnimationFrame === "function");
32378
32379clearTimeout(timeoutResult);
32380
32381var NativeDate = Date;
32382var uniqueTimerId = 1;
32383
32384/**
32385 * Parse strings like "01:10:00" (meaning 1 hour, 10 minutes, 0 seconds) into
32386 * number of milliseconds. This is used to support human-readable strings passed
32387 * to clock.tick()
32388 */
32389function parseTime(str) {
32390 if (!str) {
32391 return 0;
32392 }
32393
32394 var strings = str.split(":");
32395 var l = strings.length;
32396 var i = l;
32397 var ms = 0;
32398 var parsed;
32399
32400 if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
32401 throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");
32402 }
32403
32404 while (i--) {
32405 parsed = parseInt(strings[i], 10);
32406
32407 if (parsed >= 60) {
32408 throw new Error("Invalid time " + str);
32409 }
32410
32411 ms += parsed * Math.pow(60, (l - i - 1));
32412 }
32413
32414 return ms * 1000;
32415}
32416
32417/**
32418 * Floor function that also works for negative numbers
32419 */
32420function fixedFloor(n) {
32421 return (n >= 0 ? Math.floor(n) : Math.ceil(n));
32422}
32423
32424/**
32425 * % operator that also works for negative numbers
32426 */
32427function fixedModulo(n, m) {
32428 return ((n % m) + m) % m;
32429}
32430
32431/**
32432 * Used to grok the `now` parameter to createClock.
32433 * @param epoch {Date|number} the system time
32434 */
32435function getEpoch(epoch) {
32436 if (!epoch) { return 0; }
32437 if (typeof epoch.getTime === "function") { return epoch.getTime(); }
32438 if (typeof epoch === "number") { return epoch; }
32439 throw new TypeError("now should be milliseconds since UNIX epoch");
32440}
32441
32442function inRange(from, to, timer) {
32443 return timer && timer.callAt >= from && timer.callAt <= to;
32444}
32445
32446function mirrorDateProperties(target, source) {
32447 var prop;
32448 for (prop in source) {
32449 if (source.hasOwnProperty(prop)) {
32450 target[prop] = source[prop];
32451 }
32452 }
32453
32454 // set special now implementation
32455 if (source.now) {
32456 target.now = function now() {
32457 return target.clock.now;
32458 };
32459 } else {
32460 delete target.now;
32461 }
32462
32463 // set special toSource implementation
32464 if (source.toSource) {
32465 target.toSource = function toSource() {
32466 return source.toSource();
32467 };
32468 } else {
32469 delete target.toSource;
32470 }
32471
32472 // set special toString implementation
32473 target.toString = function toString() {
32474 return source.toString();
32475 };
32476
32477 target.prototype = source.prototype;
32478 target.parse = source.parse;
32479 target.UTC = source.UTC;
32480 target.prototype.toUTCString = source.prototype.toUTCString;
32481
32482 return target;
32483}
32484
32485function createDate() {
32486 function ClockDate(year, month, date, hour, minute, second, ms) {
32487 // Defensive and verbose to avoid potential harm in passing
32488 // explicit undefined when user does not pass argument
32489 switch (arguments.length) {
32490 case 0:
32491 return new NativeDate(ClockDate.clock.now);
32492 case 1:
32493 return new NativeDate(year);
32494 case 2:
32495 return new NativeDate(year, month);
32496 case 3:
32497 return new NativeDate(year, month, date);
32498 case 4:
32499 return new NativeDate(year, month, date, hour);
32500 case 5:
32501 return new NativeDate(year, month, date, hour, minute);
32502 case 6:
32503 return new NativeDate(year, month, date, hour, minute, second);
32504 default:
32505 return new NativeDate(year, month, date, hour, minute, second, ms);
32506 }
32507 }
32508
32509 return mirrorDateProperties(ClockDate, NativeDate);
32510}
32511
32512
32513function enqueueJob(clock, job) {
32514 // enqueues a microtick-deferred task - ecma262/#sec-enqueuejob
32515 if (!clock.jobs) {
32516 clock.jobs = [];
32517 }
32518 clock.jobs.push(job);
32519}
32520
32521function runJobs(clock) {
32522 // runs all microtick-deferred tasks - ecma262/#sec-runjobs
32523 if (!clock.jobs) {
32524 return;
32525 }
32526 for (var i = 0; i < clock.jobs.length; i++) {
32527 var job = clock.jobs[i];
32528 job.func.apply(null, job.args);
32529 }
32530 clock.jobs = [];
32531}
32532
32533function addTimer(clock, timer) {
32534 if (timer.func === undefined) {
32535 throw new Error("Callback must be provided to timer calls");
32536 }
32537
32538 timer.type = timer.immediate ? "Immediate" : "Timeout";
32539
32540 if (timer.hasOwnProperty("delay")) {
32541 timer.delay = timer.delay > maxTimeout ? 1 : timer.delay;
32542 timer.delay = Math.max(0, timer.delay);
32543 }
32544
32545 if (timer.hasOwnProperty("interval")) {
32546 timer.type = "Interval";
32547 timer.interval = timer.interval > maxTimeout ? 1 : timer.interval;
32548 }
32549
32550 if (timer.hasOwnProperty("animation")) {
32551 timer.type = "AnimationFrame";
32552 timer.animation = true;
32553 }
32554
32555 if (!clock.timers) {
32556 clock.timers = {};
32557 }
32558
32559 timer.id = uniqueTimerId++;
32560 timer.createdAt = clock.now;
32561 timer.callAt = clock.now + (parseInt(timer.delay) || (clock.duringTick ? 1 : 0));
32562
32563 clock.timers[timer.id] = timer;
32564
32565 if (addTimerReturnsObject) {
32566 return {
32567 id: timer.id,
32568 ref: NOOP,
32569 unref: NOOP
32570 };
32571 }
32572
32573 return timer.id;
32574}
32575
32576
32577/* eslint consistent-return: "off" */
32578function compareTimers(a, b) {
32579 // Sort first by absolute timing
32580 if (a.callAt < b.callAt) {
32581 return -1;
32582 }
32583 if (a.callAt > b.callAt) {
32584 return 1;
32585 }
32586
32587 // Sort next by immediate, immediate timers take precedence
32588 if (a.immediate && !b.immediate) {
32589 return -1;
32590 }
32591 if (!a.immediate && b.immediate) {
32592 return 1;
32593 }
32594
32595 // Sort next by creation time, earlier-created timers take precedence
32596 if (a.createdAt < b.createdAt) {
32597 return -1;
32598 }
32599 if (a.createdAt > b.createdAt) {
32600 return 1;
32601 }
32602
32603 // Sort next by id, lower-id timers take precedence
32604 if (a.id < b.id) {
32605 return -1;
32606 }
32607 if (a.id > b.id) {
32608 return 1;
32609 }
32610
32611 // As timer ids are unique, no fallback `0` is necessary
32612}
32613
32614function firstTimerInRange(clock, from, to) {
32615 var timers = clock.timers;
32616 var timer = null;
32617 var id, isInRange;
32618
32619 for (id in timers) {
32620 if (timers.hasOwnProperty(id)) {
32621 isInRange = inRange(from, to, timers[id]);
32622
32623 if (isInRange && (!timer || compareTimers(timer, timers[id]) === 1)) {
32624 timer = timers[id];
32625 }
32626 }
32627 }
32628
32629 return timer;
32630}
32631
32632function firstTimer(clock) {
32633 var timers = clock.timers;
32634 var timer = null;
32635 var id;
32636
32637 for (id in timers) {
32638 if (timers.hasOwnProperty(id)) {
32639 if (!timer || compareTimers(timer, timers[id]) === 1) {
32640 timer = timers[id];
32641 }
32642 }
32643 }
32644
32645 return timer;
32646}
32647
32648function lastTimer(clock) {
32649 var timers = clock.timers;
32650 var timer = null;
32651 var id;
32652
32653 for (id in timers) {
32654 if (timers.hasOwnProperty(id)) {
32655 if (!timer || compareTimers(timer, timers[id]) === -1) {
32656 timer = timers[id];
32657 }
32658 }
32659 }
32660
32661 return timer;
32662}
32663
32664function callTimer(clock, timer) {
32665 if (typeof timer.interval === "number") {
32666 clock.timers[timer.id].callAt += timer.interval;
32667 } else {
32668 delete clock.timers[timer.id];
32669 }
32670
32671 if (typeof timer.func === "function") {
32672 timer.func.apply(null, timer.args);
32673 } else {
32674 /* eslint no-eval: "off" */
32675 eval(timer.func);
32676 }
32677}
32678
32679function clearTimer(clock, timerId, ttype) {
32680 if (!timerId) {
32681 // null appears to be allowed in most browsers, and appears to be
32682 // relied upon by some libraries, like Bootstrap carousel
32683 return;
32684 }
32685
32686 if (!clock.timers) {
32687 clock.timers = [];
32688 }
32689
32690 // in Node, timerId is an object with .ref()/.unref(), and
32691 // its .id field is the actual timer id.
32692 if (typeof timerId === "object") {
32693 timerId = timerId.id;
32694 }
32695
32696 if (clock.timers.hasOwnProperty(timerId)) {
32697 // check that the ID matches a timer of the correct type
32698 var timer = clock.timers[timerId];
32699 if (timer.type === ttype) {
32700 delete clock.timers[timerId];
32701 } else {
32702 var clear = ttype === "AnimationFrame" ? "cancelAnimationFrame" : "clear" + ttype;
32703 var schedule = timer.type === "AnimationFrame" ? "requestAnimationFrame" : "set" + timer.type;
32704 throw new Error("Cannot clear timer: timer created with " + schedule
32705 + "() but cleared with " + clear + "()");
32706 }
32707 }
32708}
32709
32710function uninstall(clock, target, config) {
32711 var method,
32712 i,
32713 l;
32714 var installedHrTime = "_hrtime";
32715 var installedNextTick = "_nextTick";
32716
32717 for (i = 0, l = clock.methods.length; i < l; i++) {
32718 method = clock.methods[i];
32719 if (method === "hrtime" && target.process) {
32720 target.process.hrtime = clock[installedHrTime];
32721 } else if (method === "nextTick" && target.process) {
32722 target.process.nextTick = clock[installedNextTick];
32723 } else {
32724 if (target[method] && target[method].hadOwnProperty) {
32725 target[method] = clock["_" + method];
32726 if (method === "clearInterval" && config.shouldAdvanceTime === true) {
32727 target[method](clock.attachedInterval);
32728 }
32729 } else {
32730 try {
32731 delete target[method];
32732 } catch (ignore) { /* eslint empty-block: "off" */ }
32733 }
32734 }
32735 }
32736
32737 // Prevent multiple executions which will completely remove these props
32738 clock.methods = [];
32739
32740 // return pending timers, to enable checking what timers remained on uninstall
32741 if (!clock.timers) {
32742 return [];
32743 }
32744 return Object.keys(clock.timers).map(function mapper(key) {
32745 return clock.timers[key];
32746 });
32747}
32748
32749function hijackMethod(target, method, clock) {
32750 var prop;
32751 clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(target, method);
32752 clock["_" + method] = target[method];
32753
32754 if (method === "Date") {
32755 var date = mirrorDateProperties(clock[method], target[method]);
32756 target[method] = date;
32757 } else {
32758 target[method] = function () {
32759 return clock[method].apply(clock, arguments);
32760 };
32761
32762 for (prop in clock[method]) {
32763 if (clock[method].hasOwnProperty(prop)) {
32764 target[method][prop] = clock[method][prop];
32765 }
32766 }
32767 }
32768
32769 target[method].clock = clock;
32770}
32771
32772function doIntervalTick(clock, advanceTimeDelta) {
32773 clock.tick(advanceTimeDelta);
32774}
32775
32776var timers = {
32777 setTimeout: setTimeout,
32778 clearTimeout: clearTimeout,
32779 setImmediate: global.setImmediate,
32780 clearImmediate: global.clearImmediate,
32781 setInterval: setInterval,
32782 clearInterval: clearInterval,
32783 Date: Date
32784};
32785
32786if (hrtimePresent) {
32787 timers.hrtime = global.process.hrtime;
32788}
32789
32790if (nextTickPresent) {
32791 timers.nextTick = global.process.nextTick;
32792}
32793
32794if (performancePresent) {
32795 timers.performance = global.performance;
32796}
32797
32798if (requestAnimationFramePresent) {
32799 timers.requestAnimationFrame = global.requestAnimationFrame;
32800}
32801
32802if (cancelAnimationFramePresent) {
32803 timers.cancelAnimationFrame = global.cancelAnimationFrame;
32804}
32805
32806var keys = Object.keys || function (obj) {
32807 var ks = [];
32808 var key;
32809
32810 for (key in obj) {
32811 if (obj.hasOwnProperty(key)) {
32812 ks.push(key);
32813 }
32814 }
32815
32816 return ks;
32817};
32818
32819exports.timers = timers;
32820
32821/**
32822 * @param start {Date|number} the system time
32823 * @param loopLimit {number} maximum number of timers that will be run when calling runAll()
32824 */
32825function createClock(start, loopLimit) {
32826 start = start || 0;
32827 loopLimit = loopLimit || 1000;
32828
32829 var clock = {
32830 now: getEpoch(start),
32831 hrNow: 0,
32832 timeouts: {},
32833 Date: createDate(),
32834 loopLimit: loopLimit
32835 };
32836
32837 clock.Date.clock = clock;
32838
32839 function getTimeToNextFrame() {
32840 return 16 - ((clock.now - start) % 16);
32841 }
32842
32843 clock.setTimeout = function setTimeout(func, timeout) {
32844 return addTimer(clock, {
32845 func: func,
32846 args: Array.prototype.slice.call(arguments, 2),
32847 delay: timeout
32848 });
32849 };
32850
32851 clock.clearTimeout = function clearTimeout(timerId) {
32852 return clearTimer(clock, timerId, "Timeout");
32853 };
32854 clock.nextTick = function nextTick(func) {
32855 return enqueueJob(clock, {
32856 func: func,
32857 args: Array.prototype.slice.call(arguments, 1)
32858 });
32859 };
32860 clock.setInterval = function setInterval(func, timeout) {
32861 return addTimer(clock, {
32862 func: func,
32863 args: Array.prototype.slice.call(arguments, 2),
32864 delay: timeout,
32865 interval: timeout
32866 });
32867 };
32868
32869 clock.clearInterval = function clearInterval(timerId) {
32870 return clearTimer(clock, timerId, "Interval");
32871 };
32872
32873 clock.setImmediate = function setImmediate(func) {
32874 return addTimer(clock, {
32875 func: func,
32876 args: Array.prototype.slice.call(arguments, 1),
32877 immediate: true
32878 });
32879 };
32880
32881 clock.clearImmediate = function clearImmediate(timerId) {
32882 return clearTimer(clock, timerId, "Immediate");
32883 };
32884
32885 clock.requestAnimationFrame = function requestAnimationFrame(func) {
32886 var result = addTimer(clock, {
32887 func: func,
32888 delay: getTimeToNextFrame(),
32889 args: [clock.now + getTimeToNextFrame()],
32890 animation: true
32891 });
32892
32893 return result.id || result;
32894 };
32895
32896 clock.cancelAnimationFrame = function cancelAnimationFrame(timerId) {
32897 return clearTimer(clock, timerId, "AnimationFrame");
32898 };
32899
32900 function updateHrTime(newNow) {
32901 clock.hrNow += (newNow - clock.now);
32902 }
32903
32904 clock.tick = function tick(ms) {
32905 ms = typeof ms === "number" ? ms : parseTime(ms);
32906 var tickFrom = clock.now;
32907 var tickTo = clock.now + ms;
32908 var previous = clock.now;
32909 var timer, firstException, oldNow;
32910
32911 clock.duringTick = true;
32912
32913 // perform process.nextTick()s
32914 oldNow = clock.now;
32915 runJobs(clock);
32916 if (oldNow !== clock.now) {
32917 // compensate for any setSystemTime() call during process.nextTick() callback
32918 tickFrom += clock.now - oldNow;
32919 tickTo += clock.now - oldNow;
32920 }
32921
32922 // perform each timer in the requested range
32923 timer = firstTimerInRange(clock, tickFrom, tickTo);
32924 while (timer && tickFrom <= tickTo) {
32925 if (clock.timers[timer.id]) {
32926 updateHrTime(timer.callAt);
32927 tickFrom = timer.callAt;
32928 clock.now = timer.callAt;
32929 oldNow = clock.now;
32930 try {
32931 runJobs(clock);
32932 callTimer(clock, timer);
32933 } catch (e) {
32934 firstException = firstException || e;
32935 }
32936
32937 // compensate for any setSystemTime() call during timer callback
32938 if (oldNow !== clock.now) {
32939 tickFrom += clock.now - oldNow;
32940 tickTo += clock.now - oldNow;
32941 previous += clock.now - oldNow;
32942 }
32943 }
32944
32945 timer = firstTimerInRange(clock, previous, tickTo);
32946 previous = tickFrom;
32947 }
32948
32949 // perform process.nextTick()s again
32950 oldNow = clock.now;
32951 runJobs(clock);
32952 if (oldNow !== clock.now) {
32953 // compensate for any setSystemTime() call during process.nextTick() callback
32954 tickFrom += clock.now - oldNow;
32955 tickTo += clock.now - oldNow;
32956 }
32957 clock.duringTick = false;
32958
32959 // corner case: during runJobs, new timers were scheduled which could be in the range [clock.now, tickTo]
32960 timer = firstTimerInRange(clock, tickFrom, tickTo);
32961 if (timer) {
32962 try {
32963 clock.tick(tickTo - clock.now); // do it all again - for the remainder of the requested range
32964 } catch (e) {
32965 firstException = firstException || e;
32966 }
32967 } else {
32968 // no timers remaining in the requested range: move the clock all the way to the end
32969 updateHrTime(tickTo);
32970 clock.now = tickTo;
32971 }
32972 if (firstException) {
32973 throw firstException;
32974 }
32975 return clock.now;
32976 };
32977
32978 clock.next = function next() {
32979 runJobs(clock);
32980 var timer = firstTimer(clock);
32981 if (!timer) {
32982 return clock.now;
32983 }
32984
32985 clock.duringTick = true;
32986 try {
32987 updateHrTime(timer.callAt);
32988 clock.now = timer.callAt;
32989 callTimer(clock, timer);
32990 runJobs(clock);
32991 return clock.now;
32992 } finally {
32993 clock.duringTick = false;
32994 }
32995 };
32996
32997 clock.runAll = function runAll() {
32998 var numTimers, i;
32999 runJobs(clock);
33000 for (i = 0; i < clock.loopLimit; i++) {
33001 if (!clock.timers) {
33002 return clock.now;
33003 }
33004
33005 numTimers = keys(clock.timers).length;
33006 if (numTimers === 0) {
33007 return clock.now;
33008 }
33009
33010 clock.next();
33011 }
33012
33013 throw new Error("Aborting after running " + clock.loopLimit + " timers, assuming an infinite loop!");
33014 };
33015
33016 clock.runToFrame = function runToFrame() {
33017 return clock.tick(getTimeToNextFrame());
33018 };
33019
33020 clock.runToLast = function runToLast() {
33021 var timer = lastTimer(clock);
33022 if (!timer) {
33023 runJobs(clock);
33024 return clock.now;
33025 }
33026
33027 return clock.tick(timer.callAt);
33028 };
33029
33030 clock.reset = function reset() {
33031 clock.timers = {};
33032 };
33033
33034 clock.setSystemTime = function setSystemTime(systemTime) {
33035 // determine time difference
33036 var newNow = getEpoch(systemTime);
33037 var difference = newNow - clock.now;
33038 var id, timer;
33039
33040 // update 'system clock'
33041 clock.now = newNow;
33042
33043 // update timers and intervals to keep them stable
33044 for (id in clock.timers) {
33045 if (clock.timers.hasOwnProperty(id)) {
33046 timer = clock.timers[id];
33047 timer.createdAt += difference;
33048 timer.callAt += difference;
33049 }
33050 }
33051 };
33052
33053 if (performancePresent) {
33054 clock.performance = Object.create(global.performance);
33055 clock.performance.now = function lolexNow() {
33056 return clock.hrNow;
33057 };
33058 }
33059 if (hrtimePresent) {
33060 clock.hrtime = function (prev) {
33061 if (Array.isArray(prev)) {
33062 var oldSecs = (prev[0] + prev[1] / 1e9);
33063 var newSecs = (clock.hrNow / 1000);
33064 var difference = (newSecs - oldSecs);
33065 var secs = fixedFloor(difference);
33066 var nanosecs = fixedModulo(difference * 1e9, 1e9);
33067 return [
33068 secs,
33069 nanosecs
33070 ];
33071 }
33072 return [
33073 fixedFloor(clock.hrNow / 1000),
33074 fixedModulo(clock.hrNow * 1e6, 1e9)
33075 ];
33076 };
33077 }
33078
33079 return clock;
33080}
33081exports.createClock = createClock;
33082
33083/**
33084 * @param config {Object} optional config
33085 * @param config.target {Object} the target to install timers in (default `window`)
33086 * @param config.now {number|Date} a number (in milliseconds) or a Date object (default epoch)
33087 * @param config.toFake {string[]} names of the methods that should be faked.
33088 * @param config.loopLimit {number} the maximum number of timers that will be run when calling runAll()
33089 * @param config.shouldAdvanceTime {Boolean} tells lolex to increment mocked time automatically (default false)
33090 * @param config.advanceTimeDelta {Number} increment mocked time every <<advanceTimeDelta>> ms (default: 20ms)
33091 */
33092exports.install = function install(config) {
33093 if ( arguments.length > 1 || config instanceof Date || Array.isArray(config) || typeof config === "number") {
33094 throw new TypeError("lolex.install called with " + String(config) +
33095 " lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");
33096 }
33097 config = typeof config !== "undefined" ? config : {};
33098 config.shouldAdvanceTime = config.shouldAdvanceTime || false;
33099 config.advanceTimeDelta = config.advanceTimeDelta || 20;
33100
33101 var i, l;
33102 var target = config.target || global;
33103 var clock = createClock(config.now, config.loopLimit);
33104
33105 clock.uninstall = function () {
33106 return uninstall(clock, target, config);
33107 };
33108
33109 clock.methods = config.toFake || [];
33110
33111 if (clock.methods.length === 0) {
33112 // do not fake nextTick by default - GitHub#126
33113 clock.methods = keys(timers).filter(function (key) {return key !== "nextTick";});
33114 }
33115
33116 for (i = 0, l = clock.methods.length; i < l; i++) {
33117 if (clock.methods[i] === "hrtime") {
33118 if (target.process && typeof target.process.hrtime === "function") {
33119 hijackMethod(target.process, clock.methods[i], clock);
33120 }
33121 } else if (clock.methods[i] === "nextTick") {
33122 if (target.process && typeof target.process.nextTick === "function") {
33123 hijackMethod(target.process, clock.methods[i], clock);
33124 }
33125 } else {
33126 if (clock.methods[i] === "setInterval" && config.shouldAdvanceTime === true) {
33127 var intervalTick = doIntervalTick.bind(null, clock, config.advanceTimeDelta);
33128 var intervalId = target[clock.methods[i]](
33129 intervalTick,
33130 config.advanceTimeDelta);
33131 clock.attachedInterval = intervalId;
33132 }
33133 hijackMethod(target, clock.methods[i], clock);
33134 }
33135 }
33136
33137 return clock;
33138};
33139
33140}).call(this,typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
33141},{}],48:[function(require,module,exports){
33142var isarray = require('isarray');
33143
33144/**
33145 * Expose `pathToRegexp`.
33146 */
33147module.exports = pathToRegexp;
33148module.exports.parse = parse;
33149module.exports.compile = compile;
33150module.exports.tokensToFunction = tokensToFunction;
33151module.exports.tokensToRegExp = tokensToRegExp;
33152
33153/**
33154 * The main path matching regexp utility.
33155 *
33156 * @type {RegExp}
33157 */
33158var PATH_REGEXP = new RegExp([
33159 // Match escaped characters that would otherwise appear in future matches.
33160 // This allows the user to escape special characters that won't transform.
33161 '(\\\\.)',
33162 // Match Express-style parameters and un-named parameters with a prefix
33163 // and optional suffixes. Matches appear as:
33164 //
33165 // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
33166 // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
33167 // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
33168 '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
33169].join('|'), 'g');
33170
33171/**
33172 * Parse a string for the raw tokens.
33173 *
33174 * @param {string} str
33175 * @param {Object=} options
33176 * @return {!Array}
33177 */
33178function parse (str, options) {
33179 var tokens = [];
33180 var key = 0;
33181 var index = 0;
33182 var path = '';
33183 var defaultDelimiter = options && options.delimiter || '/';
33184 var res;
33185
33186 while ((res = PATH_REGEXP.exec(str)) != null) {
33187 var m = res[0];
33188 var escaped = res[1];
33189 var offset = res.index;
33190 path += str.slice(index, offset);
33191 index = offset + m.length;
33192
33193 // Ignore already escaped sequences.
33194 if (escaped) {
33195 path += escaped[1];
33196 continue
33197 }
33198
33199 var next = str[index];
33200 var prefix = res[2];
33201 var name = res[3];
33202 var capture = res[4];
33203 var group = res[5];
33204 var modifier = res[6];
33205 var asterisk = res[7];
33206
33207 // Push the current path onto the tokens.
33208 if (path) {
33209 tokens.push(path);
33210 path = '';
33211 }
33212
33213 var partial = prefix != null && next != null && next !== prefix;
33214 var repeat = modifier === '+' || modifier === '*';
33215 var optional = modifier === '?' || modifier === '*';
33216 var delimiter = res[2] || defaultDelimiter;
33217 var pattern = capture || group;
33218
33219 tokens.push({
33220 name: name || key++,
33221 prefix: prefix || '',
33222 delimiter: delimiter,
33223 optional: optional,
33224 repeat: repeat,
33225 partial: partial,
33226 asterisk: !!asterisk,
33227 pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
33228 });
33229 }
33230
33231 // Match any characters still remaining.
33232 if (index < str.length) {
33233 path += str.substr(index);
33234 }
33235
33236 // If the path exists, push it onto the end.
33237 if (path) {
33238 tokens.push(path);
33239 }
33240
33241 return tokens
33242}
33243
33244/**
33245 * Compile a string to a template function for the path.
33246 *
33247 * @param {string} str
33248 * @param {Object=} options
33249 * @return {!function(Object=, Object=)}
33250 */
33251function compile (str, options) {
33252 return tokensToFunction(parse(str, options))
33253}
33254
33255/**
33256 * Prettier encoding of URI path segments.
33257 *
33258 * @param {string}
33259 * @return {string}
33260 */
33261function encodeURIComponentPretty (str) {
33262 return encodeURI(str).replace(/[\/?#]/g, function (c) {
33263 return '%' + c.charCodeAt(0).toString(16).toUpperCase()
33264 })
33265}
33266
33267/**
33268 * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
33269 *
33270 * @param {string}
33271 * @return {string}
33272 */
33273function encodeAsterisk (str) {
33274 return encodeURI(str).replace(/[?#]/g, function (c) {
33275 return '%' + c.charCodeAt(0).toString(16).toUpperCase()
33276 })
33277}
33278
33279/**
33280 * Expose a method for transforming tokens into the path function.
33281 */
33282function tokensToFunction (tokens) {
33283 // Compile all the tokens into regexps.
33284 var matches = new Array(tokens.length);
33285
33286 // Compile all the patterns before compilation.
33287 for (var i = 0; i < tokens.length; i++) {
33288 if (typeof tokens[i] === 'object') {
33289 matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');
33290 }
33291 }
33292
33293 return function (obj, opts) {
33294 var path = '';
33295 var data = obj || {};
33296 var options = opts || {};
33297 var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;
33298
33299 for (var i = 0; i < tokens.length; i++) {
33300 var token = tokens[i];
33301
33302 if (typeof token === 'string') {
33303 path += token;
33304
33305 continue
33306 }
33307
33308 var value = data[token.name];
33309 var segment;
33310
33311 if (value == null) {
33312 if (token.optional) {
33313 // Prepend partial segment prefixes.
33314 if (token.partial) {
33315 path += token.prefix;
33316 }
33317
33318 continue
33319 } else {
33320 throw new TypeError('Expected "' + token.name + '" to be defined')
33321 }
33322 }
33323
33324 if (isarray(value)) {
33325 if (!token.repeat) {
33326 throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
33327 }
33328
33329 if (value.length === 0) {
33330 if (token.optional) {
33331 continue
33332 } else {
33333 throw new TypeError('Expected "' + token.name + '" to not be empty')
33334 }
33335 }
33336
33337 for (var j = 0; j < value.length; j++) {
33338 segment = encode(value[j]);
33339
33340 if (!matches[i].test(segment)) {
33341 throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
33342 }
33343
33344 path += (j === 0 ? token.prefix : token.delimiter) + segment;
33345 }
33346
33347 continue
33348 }
33349
33350 segment = token.asterisk ? encodeAsterisk(value) : encode(value);
33351
33352 if (!matches[i].test(segment)) {
33353 throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
33354 }
33355
33356 path += token.prefix + segment;
33357 }
33358
33359 return path
33360 }
33361}
33362
33363/**
33364 * Escape a regular expression string.
33365 *
33366 * @param {string} str
33367 * @return {string}
33368 */
33369function escapeString (str) {
33370 return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
33371}
33372
33373/**
33374 * Escape the capturing group by escaping special characters and meaning.
33375 *
33376 * @param {string} group
33377 * @return {string}
33378 */
33379function escapeGroup (group) {
33380 return group.replace(/([=!:$\/()])/g, '\\$1')
33381}
33382
33383/**
33384 * Attach the keys as a property of the regexp.
33385 *
33386 * @param {!RegExp} re
33387 * @param {Array} keys
33388 * @return {!RegExp}
33389 */
33390function attachKeys (re, keys) {
33391 re.keys = keys;
33392 return re
33393}
33394
33395/**
33396 * Get the flags for a regexp from the options.
33397 *
33398 * @param {Object} options
33399 * @return {string}
33400 */
33401function flags (options) {
33402 return options.sensitive ? '' : 'i'
33403}
33404
33405/**
33406 * Pull out keys from a regexp.
33407 *
33408 * @param {!RegExp} path
33409 * @param {!Array} keys
33410 * @return {!RegExp}
33411 */
33412function regexpToRegexp (path, keys) {
33413 // Use a negative lookahead to match only capturing groups.
33414 var groups = path.source.match(/\((?!\?)/g);
33415
33416 if (groups) {
33417 for (var i = 0; i < groups.length; i++) {
33418 keys.push({
33419 name: i,
33420 prefix: null,
33421 delimiter: null,
33422 optional: false,
33423 repeat: false,
33424 partial: false,
33425 asterisk: false,
33426 pattern: null
33427 });
33428 }
33429 }
33430
33431 return attachKeys(path, keys)
33432}
33433
33434/**
33435 * Transform an array into a regexp.
33436 *
33437 * @param {!Array} path
33438 * @param {Array} keys
33439 * @param {!Object} options
33440 * @return {!RegExp}
33441 */
33442function arrayToRegexp (path, keys, options) {
33443 var parts = [];
33444
33445 for (var i = 0; i < path.length; i++) {
33446 parts.push(pathToRegexp(path[i], keys, options).source);
33447 }
33448
33449 var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
33450
33451 return attachKeys(regexp, keys)
33452}
33453
33454/**
33455 * Create a path regexp from string input.
33456 *
33457 * @param {string} path
33458 * @param {!Array} keys
33459 * @param {!Object} options
33460 * @return {!RegExp}
33461 */
33462function stringToRegexp (path, keys, options) {
33463 return tokensToRegExp(parse(path, options), keys, options)
33464}
33465
33466/**
33467 * Expose a function for taking tokens and returning a RegExp.
33468 *
33469 * @param {!Array} tokens
33470 * @param {(Array|Object)=} keys
33471 * @param {Object=} options
33472 * @return {!RegExp}
33473 */
33474function tokensToRegExp (tokens, keys, options) {
33475 if (!isarray(keys)) {
33476 options = /** @type {!Object} */ (keys || options);
33477 keys = [];
33478 }
33479
33480 options = options || {};
33481
33482 var strict = options.strict;
33483 var end = options.end !== false;
33484 var route = '';
33485
33486 // Iterate over the tokens and create our regexp string.
33487 for (var i = 0; i < tokens.length; i++) {
33488 var token = tokens[i];
33489
33490 if (typeof token === 'string') {
33491 route += escapeString(token);
33492 } else {
33493 var prefix = escapeString(token.prefix);
33494 var capture = '(?:' + token.pattern + ')';
33495
33496 keys.push(token);
33497
33498 if (token.repeat) {
33499 capture += '(?:' + prefix + capture + ')*';
33500 }
33501
33502 if (token.optional) {
33503 if (!token.partial) {
33504 capture = '(?:' + prefix + '(' + capture + '))?';
33505 } else {
33506 capture = prefix + '(' + capture + ')?';
33507 }
33508 } else {
33509 capture = prefix + '(' + capture + ')';
33510 }
33511
33512 route += capture;
33513 }
33514 }
33515
33516 var delimiter = escapeString(options.delimiter || '/');
33517 var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
33518
33519 // In non-strict mode we allow a slash at the end of match. If the path to
33520 // match already ends with a slash, we remove it for consistency. The slash
33521 // is valid at the end of a path match, not in the middle. This is important
33522 // in non-ending mode, where "/test/" shouldn't match "/test//route".
33523 if (!strict) {
33524 route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';
33525 }
33526
33527 if (end) {
33528 route += '$';
33529 } else {
33530 // In non-ending mode, we need the capturing groups to match as much as
33531 // possible by using a positive lookahead to the end or next path segment.
33532 route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';
33533 }
33534
33535 return attachKeys(new RegExp('^' + route, flags(options)), keys)
33536}
33537
33538/**
33539 * Normalize the given path string, returning a regular expression.
33540 *
33541 * An empty array can be passed in for the keys, which will hold the
33542 * placeholder key descriptions. For example, using `/user/:id`, `keys` will
33543 * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
33544 *
33545 * @param {(string|RegExp|Array)} path
33546 * @param {(Array|Object)=} keys
33547 * @param {Object=} options
33548 * @return {!RegExp}
33549 */
33550function pathToRegexp (path, keys, options) {
33551 if (!isarray(keys)) {
33552 options = /** @type {!Object} */ (keys || options);
33553 keys = [];
33554 }
33555
33556 options = options || {};
33557
33558 if (path instanceof RegExp) {
33559 return regexpToRegexp(path, /** @type {!Array} */ (keys))
33560 }
33561
33562 if (isarray(path)) {
33563 return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
33564 }
33565
33566 return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
33567}
33568
33569},{"isarray":44}],49:[function(require,module,exports){
33570(function (global){
33571(function (global, factory) {
33572 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
33573 typeof define === 'function' && define.amd ? define(factory) :
33574 (global.typeDetect = factory());
33575}(this, (function () {
33576/* !
33577 * type-detect
33578 * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
33579 * MIT Licensed
33580 */
33581var promiseExists = typeof Promise === 'function';
33582
33583/* eslint-disable no-undef */
33584var globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist
33585
33586var symbolExists = typeof Symbol !== 'undefined';
33587var mapExists = typeof Map !== 'undefined';
33588var setExists = typeof Set !== 'undefined';
33589var weakMapExists = typeof WeakMap !== 'undefined';
33590var weakSetExists = typeof WeakSet !== 'undefined';
33591var dataViewExists = typeof DataView !== 'undefined';
33592var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';
33593var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';
33594var setEntriesExists = setExists && typeof Set.prototype.entries === 'function';
33595var mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';
33596var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());
33597var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());
33598var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';
33599var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());
33600var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';
33601var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());
33602var toStringLeftSliceLength = 8;
33603var toStringRightSliceLength = -1;
33604/**
33605 * ### typeOf (obj)
33606 *
33607 * Uses `Object.prototype.toString` to determine the type of an object,
33608 * normalising behaviour across engine versions & well optimised.
33609 *
33610 * @param {Mixed} object
33611 * @return {String} object type
33612 * @api public
33613 */
33614function typeDetect(obj) {
33615 /* ! Speed optimisation
33616 * Pre:
33617 * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)
33618 * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)
33619 * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)
33620 * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)
33621 * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)
33622 * Post:
33623 * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)
33624 * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)
33625 * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)
33626 * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)
33627 * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)
33628 */
33629 var typeofObj = typeof obj;
33630 if (typeofObj !== 'object') {
33631 return typeofObj;
33632 }
33633
33634 /* ! Speed optimisation
33635 * Pre:
33636 * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)
33637 * Post:
33638 * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)
33639 */
33640 if (obj === null) {
33641 return 'null';
33642 }
33643
33644 /* ! Spec Conformance
33645 * Test: `Object.prototype.toString.call(window)``
33646 * - Node === "[object global]"
33647 * - Chrome === "[object global]"
33648 * - Firefox === "[object Window]"
33649 * - PhantomJS === "[object Window]"
33650 * - Safari === "[object Window]"
33651 * - IE 11 === "[object Window]"
33652 * - IE Edge === "[object Window]"
33653 * Test: `Object.prototype.toString.call(this)``
33654 * - Chrome Worker === "[object global]"
33655 * - Firefox Worker === "[object DedicatedWorkerGlobalScope]"
33656 * - Safari Worker === "[object DedicatedWorkerGlobalScope]"
33657 * - IE 11 Worker === "[object WorkerGlobalScope]"
33658 * - IE Edge Worker === "[object WorkerGlobalScope]"
33659 */
33660 if (obj === globalObject) {
33661 return 'global';
33662 }
33663
33664 /* ! Speed optimisation
33665 * Pre:
33666 * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)
33667 * Post:
33668 * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)
33669 */
33670 if (
33671 Array.isArray(obj) &&
33672 (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))
33673 ) {
33674 return 'Array';
33675 }
33676
33677 // Not caching existence of `window` and related properties due to potential
33678 // for `window` to be unset before tests in quasi-browser environments.
33679 if (typeof window === 'object' && window !== null) {
33680 /* ! Spec Conformance
33681 * (https://html.spec.whatwg.org/multipage/browsers.html#location)
33682 * WhatWG HTML$7.7.3 - The `Location` interface
33683 * Test: `Object.prototype.toString.call(window.location)``
33684 * - IE <=11 === "[object Object]"
33685 * - IE Edge <=13 === "[object Object]"
33686 */
33687 if (typeof window.location === 'object' && obj === window.location) {
33688 return 'Location';
33689 }
33690
33691 /* ! Spec Conformance
33692 * (https://html.spec.whatwg.org/#document)
33693 * WhatWG HTML$3.1.1 - The `Document` object
33694 * Note: Most browsers currently adher to the W3C DOM Level 2 spec
33695 * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)
33696 * which suggests that browsers should use HTMLTableCellElement for
33697 * both TD and TH elements. WhatWG separates these.
33698 * WhatWG HTML states:
33699 * > For historical reasons, Window objects must also have a
33700 * > writable, configurable, non-enumerable property named
33701 * > HTMLDocument whose value is the Document interface object.
33702 * Test: `Object.prototype.toString.call(document)``
33703 * - Chrome === "[object HTMLDocument]"
33704 * - Firefox === "[object HTMLDocument]"
33705 * - Safari === "[object HTMLDocument]"
33706 * - IE <=10 === "[object Document]"
33707 * - IE 11 === "[object HTMLDocument]"
33708 * - IE Edge <=13 === "[object HTMLDocument]"
33709 */
33710 if (typeof window.document === 'object' && obj === window.document) {
33711 return 'Document';
33712 }
33713
33714 if (typeof window.navigator === 'object') {
33715 /* ! Spec Conformance
33716 * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)
33717 * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray
33718 * Test: `Object.prototype.toString.call(navigator.mimeTypes)``
33719 * - IE <=10 === "[object MSMimeTypesCollection]"
33720 */
33721 if (typeof window.navigator.mimeTypes === 'object' &&
33722 obj === window.navigator.mimeTypes) {
33723 return 'MimeTypeArray';
33724 }
33725
33726 /* ! Spec Conformance
33727 * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)
33728 * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray
33729 * Test: `Object.prototype.toString.call(navigator.plugins)``
33730 * - IE <=10 === "[object MSPluginsCollection]"
33731 */
33732 if (typeof window.navigator.plugins === 'object' &&
33733 obj === window.navigator.plugins) {
33734 return 'PluginArray';
33735 }
33736 }
33737
33738 if ((typeof window.HTMLElement === 'function' ||
33739 typeof window.HTMLElement === 'object') &&
33740 obj instanceof window.HTMLElement) {
33741 /* ! Spec Conformance
33742 * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)
33743 * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`
33744 * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``
33745 * - IE <=10 === "[object HTMLBlockElement]"
33746 */
33747 if (obj.tagName === 'BLOCKQUOTE') {
33748 return 'HTMLQuoteElement';
33749 }
33750
33751 /* ! Spec Conformance
33752 * (https://html.spec.whatwg.org/#htmltabledatacellelement)
33753 * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`
33754 * Note: Most browsers currently adher to the W3C DOM Level 2 spec
33755 * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)
33756 * which suggests that browsers should use HTMLTableCellElement for
33757 * both TD and TH elements. WhatWG separates these.
33758 * Test: Object.prototype.toString.call(document.createElement('td'))
33759 * - Chrome === "[object HTMLTableCellElement]"
33760 * - Firefox === "[object HTMLTableCellElement]"
33761 * - Safari === "[object HTMLTableCellElement]"
33762 */
33763 if (obj.tagName === 'TD') {
33764 return 'HTMLTableDataCellElement';
33765 }
33766
33767 /* ! Spec Conformance
33768 * (https://html.spec.whatwg.org/#htmltableheadercellelement)
33769 * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`
33770 * Note: Most browsers currently adher to the W3C DOM Level 2 spec
33771 * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)
33772 * which suggests that browsers should use HTMLTableCellElement for
33773 * both TD and TH elements. WhatWG separates these.
33774 * Test: Object.prototype.toString.call(document.createElement('th'))
33775 * - Chrome === "[object HTMLTableCellElement]"
33776 * - Firefox === "[object HTMLTableCellElement]"
33777 * - Safari === "[object HTMLTableCellElement]"
33778 */
33779 if (obj.tagName === 'TH') {
33780 return 'HTMLTableHeaderCellElement';
33781 }
33782 }
33783 }
33784
33785 /* ! Speed optimisation
33786 * Pre:
33787 * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)
33788 * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)
33789 * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)
33790 * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)
33791 * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)
33792 * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)
33793 * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)
33794 * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)
33795 * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)
33796 * Post:
33797 * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)
33798 * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)
33799 * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)
33800 * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)
33801 * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)
33802 * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)
33803 * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)
33804 * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)
33805 * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)
33806 */
33807 var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);
33808 if (typeof stringTag === 'string') {
33809 return stringTag;
33810 }
33811
33812 var objPrototype = Object.getPrototypeOf(obj);
33813 /* ! Speed optimisation
33814 * Pre:
33815 * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)
33816 * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)
33817 * Post:
33818 * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)
33819 * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)
33820 */
33821 if (objPrototype === RegExp.prototype) {
33822 return 'RegExp';
33823 }
33824
33825 /* ! Speed optimisation
33826 * Pre:
33827 * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)
33828 * Post:
33829 * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)
33830 */
33831 if (objPrototype === Date.prototype) {
33832 return 'Date';
33833 }
33834
33835 /* ! Spec Conformance
33836 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)
33837 * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise":
33838 * Test: `Object.prototype.toString.call(Promise.resolve())``
33839 * - Chrome <=47 === "[object Object]"
33840 * - Edge <=20 === "[object Object]"
33841 * - Firefox 29-Latest === "[object Promise]"
33842 * - Safari 7.1-Latest === "[object Promise]"
33843 */
33844 if (promiseExists && objPrototype === Promise.prototype) {
33845 return 'Promise';
33846 }
33847
33848 /* ! Speed optimisation
33849 * Pre:
33850 * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)
33851 * Post:
33852 * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)
33853 */
33854 if (setExists && objPrototype === Set.prototype) {
33855 return 'Set';
33856 }
33857
33858 /* ! Speed optimisation
33859 * Pre:
33860 * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)
33861 * Post:
33862 * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)
33863 */
33864 if (mapExists && objPrototype === Map.prototype) {
33865 return 'Map';
33866 }
33867
33868 /* ! Speed optimisation
33869 * Pre:
33870 * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)
33871 * Post:
33872 * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)
33873 */
33874 if (weakSetExists && objPrototype === WeakSet.prototype) {
33875 return 'WeakSet';
33876 }
33877
33878 /* ! Speed optimisation
33879 * Pre:
33880 * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)
33881 * Post:
33882 * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)
33883 */
33884 if (weakMapExists && objPrototype === WeakMap.prototype) {
33885 return 'WeakMap';
33886 }
33887
33888 /* ! Spec Conformance
33889 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)
33890 * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView":
33891 * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``
33892 * - Edge <=13 === "[object Object]"
33893 */
33894 if (dataViewExists && objPrototype === DataView.prototype) {
33895 return 'DataView';
33896 }
33897
33898 /* ! Spec Conformance
33899 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)
33900 * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator":
33901 * Test: `Object.prototype.toString.call(new Map().entries())``
33902 * - Edge <=13 === "[object Object]"
33903 */
33904 if (mapExists && objPrototype === mapIteratorPrototype) {
33905 return 'Map Iterator';
33906 }
33907
33908 /* ! Spec Conformance
33909 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)
33910 * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator":
33911 * Test: `Object.prototype.toString.call(new Set().entries())``
33912 * - Edge <=13 === "[object Object]"
33913 */
33914 if (setExists && objPrototype === setIteratorPrototype) {
33915 return 'Set Iterator';
33916 }
33917
33918 /* ! Spec Conformance
33919 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)
33920 * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator":
33921 * Test: `Object.prototype.toString.call([][Symbol.iterator]())``
33922 * - Edge <=13 === "[object Object]"
33923 */
33924 if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {
33925 return 'Array Iterator';
33926 }
33927
33928 /* ! Spec Conformance
33929 * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)
33930 * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator":
33931 * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``
33932 * - Edge <=13 === "[object Object]"
33933 */
33934 if (stringIteratorExists && objPrototype === stringIteratorPrototype) {
33935 return 'String Iterator';
33936 }
33937
33938 /* ! Speed optimisation
33939 * Pre:
33940 * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)
33941 * Post:
33942 * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)
33943 */
33944 if (objPrototype === null) {
33945 return 'Object';
33946 }
33947
33948 return Object
33949 .prototype
33950 .toString
33951 .call(obj)
33952 .slice(toStringLeftSliceLength, toStringRightSliceLength);
33953}
33954
33955return typeDetect;
33956
33957})));
33958
33959}).call(this,typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {});
33960},{}]},{},[12])(12)
33961});
33962});
33963
33964var arrayProto$d = lib.prototypes.array;
33965
33966
33967
33968
33969
33970var match$5 = samsam.createMatcher;
33971
33972
33973
33974
33975
33976
33977var valueToString$d = lib.valueToString;
33978var fakeServer = nise.fakeServer;
33979var fakeXhr = nise.fakeXhr;
33980
33981
33982var filter$3 = arrayProto$d.filter;
33983var forEach$8 = arrayProto$d.filter;
33984var push$6 = arrayProto$d.push;
33985var reverse$1 = arrayProto$d.reverse;
33986
33987function applyOnEach(fakes, method) {
33988 var matchingFakes = filter$3(fakes, function(fake) {
33989 return typeof fake[method] === "function";
33990 });
33991
33992 forEach$8(matchingFakes, function(fake) {
33993 fake[method]();
33994 });
33995}
33996
33997function Sandbox() {
33998 var sandbox = this;
33999 var collection = [];
34000 var fakeRestorers = [];
34001 var promiseLib;
34002
34003 sandbox.serverPrototype = fakeServer;
34004
34005 // this is for testing only
34006 sandbox.getFakes = function getFakes() {
34007 return collection;
34008 };
34009
34010 // this is for testing only
34011 sandbox.getRestorers = function() {
34012 return fakeRestorers;
34013 };
34014
34015 sandbox.createStubInstance = function createStubInstance(constructor) {
34016 if (typeof constructor !== "function") {
34017 throw new TypeError("The constructor should be a function.");
34018 }
34019 return this.stub(Object.create(constructor.prototype));
34020 };
34021
34022 sandbox.inject = function inject(obj) {
34023 obj.spy = function() {
34024 return sandbox.spy.apply(null, arguments);
34025 };
34026
34027 obj.stub = function() {
34028 return sandbox.stub.apply(null, arguments);
34029 };
34030
34031 obj.mock = function() {
34032 return sandbox.mock.apply(null, arguments);
34033 };
34034
34035 obj.createStubInstance = function() {
34036 return sandbox.createStubInstance.apply(sandbox, arguments);
34037 };
34038
34039 obj.fake = function() {
34040 return sandbox.fake.apply(null, arguments);
34041 };
34042
34043 obj.replace = function() {
34044 return sandbox.replace.apply(null, arguments);
34045 };
34046
34047 obj.replaceSetter = function() {
34048 return sandbox.replaceSetter.apply(null, arguments);
34049 };
34050
34051 obj.replaceGetter = function() {
34052 return sandbox.replaceGetter.apply(null, arguments);
34053 };
34054
34055 if (sandbox.clock) {
34056 obj.clock = sandbox.clock;
34057 }
34058
34059 if (sandbox.server) {
34060 obj.server = sandbox.server;
34061 obj.requests = sandbox.server.requests;
34062 }
34063
34064 obj.match = match$5;
34065
34066 return obj;
34067 };
34068
34069 sandbox.mock = function mock() {
34070 var m = mock_1.apply(null, arguments);
34071
34072 push$6(collection, m);
34073 usePromiseLibrary_1(promiseLib, m);
34074
34075 return m;
34076 };
34077
34078 sandbox.reset = function reset() {
34079 applyOnEach(collection, "reset");
34080 applyOnEach(collection, "resetHistory");
34081 };
34082
34083 sandbox.resetBehavior = function resetBehavior() {
34084 applyOnEach(collection, "resetBehavior");
34085 };
34086
34087 sandbox.resetHistory = function resetHistory() {
34088 function privateResetHistory(f) {
34089 var method = f.resetHistory || f.reset;
34090 if (method) {
34091 method.call(f);
34092 }
34093 }
34094
34095 forEach$8(collection, function(fake) {
34096 if (typeof fake === "function") {
34097 privateResetHistory(fake);
34098 return;
34099 }
34100
34101 var methods = [];
34102 if (fake.get) {
34103 push$6(methods, fake.get);
34104 }
34105
34106 if (fake.set) {
34107 push$6(methods, fake.set);
34108 }
34109
34110 forEach$8(methods, privateResetHistory);
34111 });
34112 };
34113
34114 sandbox.restore = function restore() {
34115 if (arguments.length) {
34116 throw new Error("sandbox.restore() does not take any parameters. Perhaps you meant stub.restore()");
34117 }
34118
34119 reverse$1(collection);
34120 applyOnEach(collection, "restore");
34121 collection = [];
34122
34123 forEach$8(fakeRestorers, function(restorer) {
34124 restorer();
34125 });
34126 fakeRestorers = [];
34127
34128 sandbox.restoreContext();
34129 };
34130
34131 sandbox.restoreContext = function restoreContext() {
34132 var injectedKeys = sandbox.injectedKeys;
34133 var injectInto = sandbox.injectInto;
34134
34135 if (!injectedKeys) {
34136 return;
34137 }
34138
34139 forEach$8(injectedKeys, function(injectedKey) {
34140 delete injectInto[injectedKey];
34141 });
34142
34143 injectedKeys = [];
34144 };
34145
34146 function getFakeRestorer(object, property) {
34147 var descriptor = getPropertyDescriptor(object, property);
34148
34149 function restorer() {
34150 Object.defineProperty(object, property, descriptor);
34151 }
34152 restorer.object = object;
34153 restorer.property = property;
34154 return restorer;
34155 }
34156
34157 function verifyNotReplaced(object, property) {
34158 forEach$8(fakeRestorers, function(fakeRestorer) {
34159 if (fakeRestorer.object === object && fakeRestorer.property === property) {
34160 throw new TypeError("Attempted to replace " + property + " which is already replaced");
34161 }
34162 });
34163 }
34164
34165 sandbox.replace = function replace(object, property, replacement) {
34166 var descriptor = getPropertyDescriptor(object, property);
34167
34168 if (typeof descriptor === "undefined") {
34169 throw new TypeError("Cannot replace non-existent own property " + valueToString$d(property));
34170 }
34171
34172 if (typeof replacement === "undefined") {
34173 throw new TypeError("Expected replacement argument to be defined");
34174 }
34175
34176 if (typeof descriptor.get === "function") {
34177 throw new Error("Use sandbox.replaceGetter for replacing getters");
34178 }
34179
34180 if (typeof descriptor.set === "function") {
34181 throw new Error("Use sandbox.replaceSetter for replacing setters");
34182 }
34183
34184 if (typeof object[property] !== typeof replacement) {
34185 throw new TypeError("Cannot replace " + typeof object[property] + " with " + typeof replacement);
34186 }
34187
34188 verifyNotReplaced(object, property);
34189
34190 // store a function for restoring the replaced property
34191 push$6(fakeRestorers, getFakeRestorer(object, property));
34192
34193 object[property] = replacement;
34194
34195 return replacement;
34196 };
34197
34198 sandbox.replaceGetter = function replaceGetter(object, property, replacement) {
34199 var descriptor = getPropertyDescriptor(object, property);
34200
34201 if (typeof descriptor === "undefined") {
34202 throw new TypeError("Cannot replace non-existent own property " + valueToString$d(property));
34203 }
34204
34205 if (typeof replacement !== "function") {
34206 throw new TypeError("Expected replacement argument to be a function");
34207 }
34208
34209 if (typeof descriptor.get !== "function") {
34210 throw new Error("`object.property` is not a getter");
34211 }
34212
34213 verifyNotReplaced(object, property);
34214
34215 // store a function for restoring the replaced property
34216 push$6(fakeRestorers, getFakeRestorer(object, property));
34217
34218 Object.defineProperty(object, property, {
34219 get: replacement,
34220 configurable: isPropertyConfigurable_1(object, property)
34221 });
34222
34223 return replacement;
34224 };
34225
34226 sandbox.replaceSetter = function replaceSetter(object, property, replacement) {
34227 var descriptor = getPropertyDescriptor(object, property);
34228
34229 if (typeof descriptor === "undefined") {
34230 throw new TypeError("Cannot replace non-existent own property " + valueToString$d(property));
34231 }
34232
34233 if (typeof replacement !== "function") {
34234 throw new TypeError("Expected replacement argument to be a function");
34235 }
34236
34237 if (typeof descriptor.set !== "function") {
34238 throw new Error("`object.property` is not a setter");
34239 }
34240
34241 verifyNotReplaced(object, property);
34242
34243 // store a function for restoring the replaced property
34244 push$6(fakeRestorers, getFakeRestorer(object, property));
34245
34246 // eslint-disable-next-line accessor-pairs
34247 Object.defineProperty(object, property, {
34248 set: replacement,
34249 configurable: isPropertyConfigurable_1(object, property)
34250 });
34251
34252 return replacement;
34253 };
34254
34255 sandbox.spy = function spy() {
34256 var s = spy_1.apply(spy_1, arguments);
34257
34258 push$6(collection, s);
34259
34260 return s;
34261 };
34262
34263 sandbox.stub = function stub(object, property) {
34264 if (isEsModule(object)) {
34265 throw new TypeError("ES Modules cannot be stubbed");
34266 }
34267
34268 if (isNonExistentOwnProperty_1(object, property)) {
34269 throw new TypeError("Cannot stub non-existent own property " + valueToString$d(property));
34270 }
34271
34272 var stubbed = stub_1.apply(null, arguments);
34273 var isStubbingEntireObject = typeof property === "undefined" && typeof object === "object";
34274
34275 if (isStubbingEntireObject) {
34276 var ownMethods = collectOwnMethods_1(stubbed);
34277
34278 forEach$8(ownMethods, function(method) {
34279 push$6(collection, method);
34280 });
34281
34282 usePromiseLibrary_1(promiseLib, ownMethods);
34283 } else {
34284 push$6(collection, stubbed);
34285 usePromiseLibrary_1(promiseLib, stubbed);
34286 }
34287
34288 return stubbed;
34289 };
34290
34291 // eslint-disable-next-line no-unused-vars
34292 sandbox.fake = function fake(f) {
34293 var s = fake_1.apply(fake_1, arguments);
34294
34295 push$6(collection, s);
34296
34297 return s;
34298 };
34299
34300 forEach$8(Object.keys(fake_1), function(key) {
34301 var fakeBehavior = fake_1[key];
34302 if (typeof fakeBehavior === "function") {
34303 sandbox.fake[key] = function() {
34304 var s = fakeBehavior.apply(fakeBehavior, arguments);
34305
34306 push$6(collection, s);
34307
34308 return s;
34309 };
34310 }
34311 });
34312
34313 sandbox.useFakeTimers = function useFakeTimers(args) {
34314 var clock = fakeTimers.useFakeTimers.call(null, args);
34315
34316 sandbox.clock = clock;
34317 push$6(collection, clock);
34318
34319 return clock;
34320 };
34321
34322 sandbox.verify = function verify() {
34323 applyOnEach(collection, "verify");
34324 };
34325
34326 sandbox.verifyAndRestore = function verifyAndRestore() {
34327 var exception;
34328
34329 try {
34330 sandbox.verify();
34331 } catch (e) {
34332 exception = e;
34333 }
34334
34335 sandbox.restore();
34336
34337 if (exception) {
34338 throw exception;
34339 }
34340 };
34341
34342 sandbox.useFakeServer = function useFakeServer() {
34343 var proto = sandbox.serverPrototype || fakeServer;
34344
34345 if (!proto || !proto.create) {
34346 return null;
34347 }
34348
34349 sandbox.server = proto.create();
34350 push$6(collection, sandbox.server);
34351
34352 return sandbox.server;
34353 };
34354
34355 sandbox.useFakeXMLHttpRequest = function useFakeXMLHttpRequest() {
34356 var xhr = fakeXhr.useFakeXMLHttpRequest();
34357 push$6(collection, xhr);
34358 return xhr;
34359 };
34360
34361 sandbox.usingPromise = function usingPromise(promiseLibrary) {
34362 promiseLib = promiseLibrary;
34363 collection.promiseLibrary = promiseLibrary;
34364
34365 return sandbox;
34366 };
34367}
34368
34369Sandbox.prototype.assert = assert_1;
34370Sandbox.prototype.match = match$5;
34371
34372var sandbox = Sandbox;
34373
34374var arrayProto$e = lib.prototypes.array;
34375
34376
34377var forEach$9 = arrayProto$e.forEach;
34378var push$7 = arrayProto$e.push;
34379
34380function prepareSandboxFromConfig(config) {
34381 var sandbox$$1 = new sandbox();
34382
34383 if (config.useFakeServer) {
34384 if (typeof config.useFakeServer === "object") {
34385 sandbox$$1.serverPrototype = config.useFakeServer;
34386 }
34387
34388 sandbox$$1.useFakeServer();
34389 }
34390
34391 if (config.useFakeTimers) {
34392 if (typeof config.useFakeTimers === "object") {
34393 sandbox$$1.useFakeTimers(config.useFakeTimers);
34394 } else {
34395 sandbox$$1.useFakeTimers();
34396 }
34397 }
34398
34399 return sandbox$$1;
34400}
34401
34402function exposeValue(sandbox$$1, config, key, value) {
34403 if (!value) {
34404 return;
34405 }
34406
34407 if (config.injectInto && !(key in config.injectInto)) {
34408 config.injectInto[key] = value;
34409 push$7(sandbox$$1.injectedKeys, key);
34410 } else {
34411 push$7(sandbox$$1.args, value);
34412 }
34413}
34414
34415function createSandbox(config) {
34416 if (!config) {
34417 return new sandbox();
34418 }
34419
34420 var configuredSandbox = prepareSandboxFromConfig(config);
34421 configuredSandbox.args = configuredSandbox.args || [];
34422 configuredSandbox.injectedKeys = [];
34423 configuredSandbox.injectInto = config.injectInto;
34424 var exposed = configuredSandbox.inject({});
34425
34426 if (config.properties) {
34427 forEach$9(config.properties, function(prop) {
34428 var value = exposed[prop] || (prop === "sandbox" && configuredSandbox);
34429 exposeValue(configuredSandbox, config, prop, value);
34430 });
34431 } else {
34432 exposeValue(configuredSandbox, config, "sandbox");
34433 }
34434
34435 return configuredSandbox;
34436}
34437
34438var createSandbox_1 = createSandbox;
34439
34440var defaultConfig = {
34441 injectInto: null,
34442 properties: [
34443 "spy",
34444 "stub",
34445 "mock",
34446 "clock",
34447 "server",
34448 "requests",
34449 "fake",
34450 "replace",
34451 "replaceSetter",
34452 "replaceGetter",
34453 "createStubInstance"
34454 ],
34455 useFakeTimers: true,
34456 useFakeServer: true
34457};
34458
34459var deprecated$1 = lib.deprecated;
34460
34461
34462
34463
34464
34465
34466
34467var apiMethods = {
34468 createSandbox: createSandbox_1,
34469 assert: assert_1,
34470 match: samsam.createMatcher,
34471 spyCall: call$1,
34472
34473 expectation: mockExpectation_1,
34474 createStubInstance: stub_1.createStubInstance,
34475 defaultConfig: defaultConfig,
34476
34477 setFormatter: format_1.setFormatter,
34478
34479 // fake timers
34480 timers: fakeTimers.timers,
34481
34482 // fake XHR
34483 xhr: nise.fakeXhr.xhr,
34484 FakeXMLHttpRequest: nise.fakeXhr.FakeXMLHttpRequest,
34485
34486 // fake server
34487 fakeServer: nise.fakeServer,
34488 fakeServerWithClock: nise.fakeServerWithClock,
34489 createFakeServer: nise.fakeServer.create.bind(nise.fakeServer),
34490 createFakeServerWithClock: nise.fakeServerWithClock.create.bind(nise.fakeServerWithClock),
34491
34492 addBehavior: function(name, fn) {
34493 behavior.addBehavior(stub_1, name, fn);
34494 }
34495};
34496
34497var legacySandboxAPI = {
34498 sandbox: {
34499 create: deprecated$1.wrap(
34500 createSandbox_1,
34501 // eslint-disable-next-line max-len
34502 "`sandbox.create()` is deprecated. Use default sandbox at `sinon.sandbox` or create new sandboxes with `sinon.createSandbox()`"
34503 )
34504 }
34505};
34506
34507var sandbox$1 = new sandbox();
34508
34509var api = extend(sandbox$1, legacySandboxAPI, apiMethods);
34510
34511var sinon = api;
34512
34513export default sinon;
34514
34515const _serverPrototype = sinon.serverPrototype;
34516export { _serverPrototype as serverPrototype };
34517const _getFakes = sinon.getFakes;
34518export { _getFakes as getFakes };
34519const _getRestorers = sinon.getRestorers;
34520export { _getRestorers as getRestorers };
34521const _createStubInstance = sinon.createStubInstance;
34522export { _createStubInstance as createStubInstance };
34523const _inject = sinon.inject;
34524export { _inject as inject };
34525const _mock = sinon.mock;
34526export { _mock as mock };
34527const _reset = sinon.reset;
34528export { _reset as reset };
34529const _resetBehavior = sinon.resetBehavior;
34530export { _resetBehavior as resetBehavior };
34531const _resetHistory = sinon.resetHistory;
34532export { _resetHistory as resetHistory };
34533const _restore = sinon.restore;
34534export { _restore as restore };
34535const _restoreContext = sinon.restoreContext;
34536export { _restoreContext as restoreContext };
34537const _replace = sinon.replace;
34538export { _replace as replace };
34539const _replaceGetter = sinon.replaceGetter;
34540export { _replaceGetter as replaceGetter };
34541const _replaceSetter = sinon.replaceSetter;
34542export { _replaceSetter as replaceSetter };
34543const _spy = sinon.spy;
34544export { _spy as spy };
34545const _stub = sinon.stub;
34546export { _stub as stub };
34547const _fake = sinon.fake;
34548export { _fake as fake };
34549const _useFakeTimers = sinon.useFakeTimers;
34550export { _useFakeTimers as useFakeTimers };
34551const _verify = sinon.verify;
34552export { _verify as verify };
34553const _verifyAndRestore = sinon.verifyAndRestore;
34554export { _verifyAndRestore as verifyAndRestore };
34555const _useFakeServer = sinon.useFakeServer;
34556export { _useFakeServer as useFakeServer };
34557const _useFakeXMLHttpRequest = sinon.useFakeXMLHttpRequest;
34558export { _useFakeXMLHttpRequest as useFakeXMLHttpRequest };
34559const _usingPromise = sinon.usingPromise;
34560export { _usingPromise as usingPromise };
34561const _sandbox = sinon.sandbox;
34562export { _sandbox as sandbox };
34563const _createSandbox = sinon.createSandbox;
34564export { _createSandbox as createSandbox };
34565const _assert = sinon.assert;
34566export { _assert as assert };
34567const _match = sinon.match;
34568export { _match as match };
34569const _spyCall = sinon.spyCall;
34570export { _spyCall as spyCall };
34571const _expectation = sinon.expectation;
34572export { _expectation as expectation };
34573const _defaultConfig = sinon.defaultConfig;
34574export { _defaultConfig as defaultConfig };
34575const _setFormatter = sinon.setFormatter;
34576export { _setFormatter as setFormatter };
34577const _timers = sinon.timers;
34578export { _timers as timers };
34579const _xhr = sinon.xhr;
34580export { _xhr as xhr };
34581const _FakeXMLHttpRequest = sinon.FakeXMLHttpRequest;
34582export { _FakeXMLHttpRequest as FakeXMLHttpRequest };
34583const _fakeServer = sinon.fakeServer;
34584export { _fakeServer as fakeServer };
34585const _fakeServerWithClock = sinon.fakeServerWithClock;
34586export { _fakeServerWithClock as fakeServerWithClock };
34587const _createFakeServer = sinon.createFakeServer;
34588export { _createFakeServer as createFakeServer };
34589const _createFakeServerWithClock = sinon.createFakeServerWithClock;
34590export { _createFakeServerWithClock as createFakeServerWithClock };
34591const _addBehavior = sinon.addBehavior;
34592export { _addBehavior as addBehavior };