@mjhls/mjh-framework 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -34
- package/dist/index.es.js +1395 -126
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1395 -125
- package/dist/index.js.map +1 -1
- package/package.json +72 -71
package/dist/index.js
CHANGED
|
@@ -19,12 +19,7 @@ var NavDropdown = _interopDefault(require('react-bootstrap/NavDropdown'));
|
|
|
19
19
|
var Form = _interopDefault(require('react-bootstrap/Form'));
|
|
20
20
|
var FormControl = _interopDefault(require('react-bootstrap/FormControl'));
|
|
21
21
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
22
|
-
var events = _interopDefault(require('events'));
|
|
23
22
|
var PropTypes = _interopDefault(require('prop-types'));
|
|
24
|
-
var tty = _interopDefault(require('tty'));
|
|
25
|
-
var util = _interopDefault(require('util'));
|
|
26
|
-
var fs = _interopDefault(require('fs'));
|
|
27
|
-
var net = _interopDefault(require('net'));
|
|
28
23
|
|
|
29
24
|
/*! *****************************************************************************
|
|
30
25
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -904,6 +899,27 @@ var DeckQueue = function (_React$Component) {
|
|
|
904
899
|
return DeckQueue;
|
|
905
900
|
}(React__default.Component);
|
|
906
901
|
|
|
902
|
+
var Column1 = function Column1(props) {
|
|
903
|
+
return React__default.createElement(
|
|
904
|
+
'section',
|
|
905
|
+
null,
|
|
906
|
+
React__default.createElement(
|
|
907
|
+
Row,
|
|
908
|
+
{ className: 'justify-content-md-center' },
|
|
909
|
+
React__default.createElement(
|
|
910
|
+
Col,
|
|
911
|
+
{ className: 'middleCol' },
|
|
912
|
+
React__default.createElement(
|
|
913
|
+
'h1',
|
|
914
|
+
null,
|
|
915
|
+
props.title
|
|
916
|
+
),
|
|
917
|
+
props.children
|
|
918
|
+
)
|
|
919
|
+
)
|
|
920
|
+
);
|
|
921
|
+
};
|
|
922
|
+
|
|
907
923
|
var Column2 = function Column2(props) {
|
|
908
924
|
var rightItems = props.rightItems;
|
|
909
925
|
|
|
@@ -1450,6 +1466,472 @@ function createCommonjsModule(fn, module) {
|
|
|
1450
1466
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
1451
1467
|
}
|
|
1452
1468
|
|
|
1469
|
+
var domain;
|
|
1470
|
+
|
|
1471
|
+
// This constructor is used to store event handlers. Instantiating this is
|
|
1472
|
+
// faster than explicitly calling `Object.create(null)` to get a "clean" empty
|
|
1473
|
+
// object (tested with v8 v4.9).
|
|
1474
|
+
function EventHandlers() {}
|
|
1475
|
+
EventHandlers.prototype = Object.create(null);
|
|
1476
|
+
|
|
1477
|
+
function EventEmitter() {
|
|
1478
|
+
EventEmitter.init.call(this);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
// nodejs oddity
|
|
1482
|
+
// require('events') === require('events').EventEmitter
|
|
1483
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
1484
|
+
|
|
1485
|
+
EventEmitter.usingDomains = false;
|
|
1486
|
+
|
|
1487
|
+
EventEmitter.prototype.domain = undefined;
|
|
1488
|
+
EventEmitter.prototype._events = undefined;
|
|
1489
|
+
EventEmitter.prototype._maxListeners = undefined;
|
|
1490
|
+
|
|
1491
|
+
// By default EventEmitters will print a warning if more than 10 listeners are
|
|
1492
|
+
// added to it. This is a useful default which helps finding memory leaks.
|
|
1493
|
+
EventEmitter.defaultMaxListeners = 10;
|
|
1494
|
+
|
|
1495
|
+
EventEmitter.init = function() {
|
|
1496
|
+
this.domain = null;
|
|
1497
|
+
if (EventEmitter.usingDomains) {
|
|
1498
|
+
// if there is an active domain, then attach to it.
|
|
1499
|
+
if (domain.active && !(this instanceof domain.Domain)) ;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
|
|
1503
|
+
this._events = new EventHandlers();
|
|
1504
|
+
this._eventsCount = 0;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
this._maxListeners = this._maxListeners || undefined;
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
// Obviously not all Emitters should be limited to 10. This function allows
|
|
1511
|
+
// that to be increased. Set to zero for unlimited.
|
|
1512
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
1513
|
+
if (typeof n !== 'number' || n < 0 || isNaN(n))
|
|
1514
|
+
throw new TypeError('"n" argument must be a positive number');
|
|
1515
|
+
this._maxListeners = n;
|
|
1516
|
+
return this;
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
function $getMaxListeners(that) {
|
|
1520
|
+
if (that._maxListeners === undefined)
|
|
1521
|
+
return EventEmitter.defaultMaxListeners;
|
|
1522
|
+
return that._maxListeners;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
1526
|
+
return $getMaxListeners(this);
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
// These standalone emit* functions are used to optimize calling of event
|
|
1530
|
+
// handlers for fast cases because emit() itself often has a variable number of
|
|
1531
|
+
// arguments and can be deoptimized because of that. These functions always have
|
|
1532
|
+
// the same number of arguments and thus do not get deoptimized, so the code
|
|
1533
|
+
// inside them can execute faster.
|
|
1534
|
+
function emitNone(handler, isFn, self) {
|
|
1535
|
+
if (isFn)
|
|
1536
|
+
handler.call(self);
|
|
1537
|
+
else {
|
|
1538
|
+
var len = handler.length;
|
|
1539
|
+
var listeners = arrayClone(handler, len);
|
|
1540
|
+
for (var i = 0; i < len; ++i)
|
|
1541
|
+
listeners[i].call(self);
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
function emitOne(handler, isFn, self, arg1) {
|
|
1545
|
+
if (isFn)
|
|
1546
|
+
handler.call(self, arg1);
|
|
1547
|
+
else {
|
|
1548
|
+
var len = handler.length;
|
|
1549
|
+
var listeners = arrayClone(handler, len);
|
|
1550
|
+
for (var i = 0; i < len; ++i)
|
|
1551
|
+
listeners[i].call(self, arg1);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
function emitTwo(handler, isFn, self, arg1, arg2) {
|
|
1555
|
+
if (isFn)
|
|
1556
|
+
handler.call(self, arg1, arg2);
|
|
1557
|
+
else {
|
|
1558
|
+
var len = handler.length;
|
|
1559
|
+
var listeners = arrayClone(handler, len);
|
|
1560
|
+
for (var i = 0; i < len; ++i)
|
|
1561
|
+
listeners[i].call(self, arg1, arg2);
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
function emitThree(handler, isFn, self, arg1, arg2, arg3) {
|
|
1565
|
+
if (isFn)
|
|
1566
|
+
handler.call(self, arg1, arg2, arg3);
|
|
1567
|
+
else {
|
|
1568
|
+
var len = handler.length;
|
|
1569
|
+
var listeners = arrayClone(handler, len);
|
|
1570
|
+
for (var i = 0; i < len; ++i)
|
|
1571
|
+
listeners[i].call(self, arg1, arg2, arg3);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
function emitMany(handler, isFn, self, args) {
|
|
1576
|
+
if (isFn)
|
|
1577
|
+
handler.apply(self, args);
|
|
1578
|
+
else {
|
|
1579
|
+
var len = handler.length;
|
|
1580
|
+
var listeners = arrayClone(handler, len);
|
|
1581
|
+
for (var i = 0; i < len; ++i)
|
|
1582
|
+
listeners[i].apply(self, args);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
EventEmitter.prototype.emit = function emit(type) {
|
|
1587
|
+
var er, handler, len, args, i, events, domain;
|
|
1588
|
+
var doError = (type === 'error');
|
|
1589
|
+
|
|
1590
|
+
events = this._events;
|
|
1591
|
+
if (events)
|
|
1592
|
+
doError = (doError && events.error == null);
|
|
1593
|
+
else if (!doError)
|
|
1594
|
+
return false;
|
|
1595
|
+
|
|
1596
|
+
domain = this.domain;
|
|
1597
|
+
|
|
1598
|
+
// If there is no 'error' event listener then throw.
|
|
1599
|
+
if (doError) {
|
|
1600
|
+
er = arguments[1];
|
|
1601
|
+
if (domain) {
|
|
1602
|
+
if (!er)
|
|
1603
|
+
er = new Error('Uncaught, unspecified "error" event');
|
|
1604
|
+
er.domainEmitter = this;
|
|
1605
|
+
er.domain = domain;
|
|
1606
|
+
er.domainThrown = false;
|
|
1607
|
+
domain.emit('error', er);
|
|
1608
|
+
} else if (er instanceof Error) {
|
|
1609
|
+
throw er; // Unhandled 'error' event
|
|
1610
|
+
} else {
|
|
1611
|
+
// At least give some kind of context to the user
|
|
1612
|
+
var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
|
|
1613
|
+
err.context = er;
|
|
1614
|
+
throw err;
|
|
1615
|
+
}
|
|
1616
|
+
return false;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
handler = events[type];
|
|
1620
|
+
|
|
1621
|
+
if (!handler)
|
|
1622
|
+
return false;
|
|
1623
|
+
|
|
1624
|
+
var isFn = typeof handler === 'function';
|
|
1625
|
+
len = arguments.length;
|
|
1626
|
+
switch (len) {
|
|
1627
|
+
// fast cases
|
|
1628
|
+
case 1:
|
|
1629
|
+
emitNone(handler, isFn, this);
|
|
1630
|
+
break;
|
|
1631
|
+
case 2:
|
|
1632
|
+
emitOne(handler, isFn, this, arguments[1]);
|
|
1633
|
+
break;
|
|
1634
|
+
case 3:
|
|
1635
|
+
emitTwo(handler, isFn, this, arguments[1], arguments[2]);
|
|
1636
|
+
break;
|
|
1637
|
+
case 4:
|
|
1638
|
+
emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
|
|
1639
|
+
break;
|
|
1640
|
+
// slower
|
|
1641
|
+
default:
|
|
1642
|
+
args = new Array(len - 1);
|
|
1643
|
+
for (i = 1; i < len; i++)
|
|
1644
|
+
args[i - 1] = arguments[i];
|
|
1645
|
+
emitMany(handler, isFn, this, args);
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
return true;
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
function _addListener(target, type, listener, prepend) {
|
|
1652
|
+
var m;
|
|
1653
|
+
var events;
|
|
1654
|
+
var existing;
|
|
1655
|
+
|
|
1656
|
+
if (typeof listener !== 'function')
|
|
1657
|
+
throw new TypeError('"listener" argument must be a function');
|
|
1658
|
+
|
|
1659
|
+
events = target._events;
|
|
1660
|
+
if (!events) {
|
|
1661
|
+
events = target._events = new EventHandlers();
|
|
1662
|
+
target._eventsCount = 0;
|
|
1663
|
+
} else {
|
|
1664
|
+
// To avoid recursion in the case that type === "newListener"! Before
|
|
1665
|
+
// adding it to the listeners, first emit "newListener".
|
|
1666
|
+
if (events.newListener) {
|
|
1667
|
+
target.emit('newListener', type,
|
|
1668
|
+
listener.listener ? listener.listener : listener);
|
|
1669
|
+
|
|
1670
|
+
// Re-assign `events` because a newListener handler could have caused the
|
|
1671
|
+
// this._events to be assigned to a new object
|
|
1672
|
+
events = target._events;
|
|
1673
|
+
}
|
|
1674
|
+
existing = events[type];
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
if (!existing) {
|
|
1678
|
+
// Optimize the case of one listener. Don't need the extra array object.
|
|
1679
|
+
existing = events[type] = listener;
|
|
1680
|
+
++target._eventsCount;
|
|
1681
|
+
} else {
|
|
1682
|
+
if (typeof existing === 'function') {
|
|
1683
|
+
// Adding the second element, need to change to array.
|
|
1684
|
+
existing = events[type] = prepend ? [listener, existing] :
|
|
1685
|
+
[existing, listener];
|
|
1686
|
+
} else {
|
|
1687
|
+
// If we've already got an array, just append.
|
|
1688
|
+
if (prepend) {
|
|
1689
|
+
existing.unshift(listener);
|
|
1690
|
+
} else {
|
|
1691
|
+
existing.push(listener);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
// Check for listener leak
|
|
1696
|
+
if (!existing.warned) {
|
|
1697
|
+
m = $getMaxListeners(target);
|
|
1698
|
+
if (m && m > 0 && existing.length > m) {
|
|
1699
|
+
existing.warned = true;
|
|
1700
|
+
var w = new Error('Possible EventEmitter memory leak detected. ' +
|
|
1701
|
+
existing.length + ' ' + type + ' listeners added. ' +
|
|
1702
|
+
'Use emitter.setMaxListeners() to increase limit');
|
|
1703
|
+
w.name = 'MaxListenersExceededWarning';
|
|
1704
|
+
w.emitter = target;
|
|
1705
|
+
w.type = type;
|
|
1706
|
+
w.count = existing.length;
|
|
1707
|
+
emitWarning(w);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
return target;
|
|
1713
|
+
}
|
|
1714
|
+
function emitWarning(e) {
|
|
1715
|
+
typeof console.warn === 'function' ? console.warn(e) : console.log(e);
|
|
1716
|
+
}
|
|
1717
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
1718
|
+
return _addListener(this, type, listener, false);
|
|
1719
|
+
};
|
|
1720
|
+
|
|
1721
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
1722
|
+
|
|
1723
|
+
EventEmitter.prototype.prependListener =
|
|
1724
|
+
function prependListener(type, listener) {
|
|
1725
|
+
return _addListener(this, type, listener, true);
|
|
1726
|
+
};
|
|
1727
|
+
|
|
1728
|
+
function _onceWrap(target, type, listener) {
|
|
1729
|
+
var fired = false;
|
|
1730
|
+
function g() {
|
|
1731
|
+
target.removeListener(type, g);
|
|
1732
|
+
if (!fired) {
|
|
1733
|
+
fired = true;
|
|
1734
|
+
listener.apply(target, arguments);
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
g.listener = listener;
|
|
1738
|
+
return g;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
EventEmitter.prototype.once = function once(type, listener) {
|
|
1742
|
+
if (typeof listener !== 'function')
|
|
1743
|
+
throw new TypeError('"listener" argument must be a function');
|
|
1744
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
1745
|
+
return this;
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
EventEmitter.prototype.prependOnceListener =
|
|
1749
|
+
function prependOnceListener(type, listener) {
|
|
1750
|
+
if (typeof listener !== 'function')
|
|
1751
|
+
throw new TypeError('"listener" argument must be a function');
|
|
1752
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
1753
|
+
return this;
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
// emits a 'removeListener' event iff the listener was removed
|
|
1757
|
+
EventEmitter.prototype.removeListener =
|
|
1758
|
+
function removeListener(type, listener) {
|
|
1759
|
+
var list, events, position, i, originalListener;
|
|
1760
|
+
|
|
1761
|
+
if (typeof listener !== 'function')
|
|
1762
|
+
throw new TypeError('"listener" argument must be a function');
|
|
1763
|
+
|
|
1764
|
+
events = this._events;
|
|
1765
|
+
if (!events)
|
|
1766
|
+
return this;
|
|
1767
|
+
|
|
1768
|
+
list = events[type];
|
|
1769
|
+
if (!list)
|
|
1770
|
+
return this;
|
|
1771
|
+
|
|
1772
|
+
if (list === listener || (list.listener && list.listener === listener)) {
|
|
1773
|
+
if (--this._eventsCount === 0)
|
|
1774
|
+
this._events = new EventHandlers();
|
|
1775
|
+
else {
|
|
1776
|
+
delete events[type];
|
|
1777
|
+
if (events.removeListener)
|
|
1778
|
+
this.emit('removeListener', type, list.listener || listener);
|
|
1779
|
+
}
|
|
1780
|
+
} else if (typeof list !== 'function') {
|
|
1781
|
+
position = -1;
|
|
1782
|
+
|
|
1783
|
+
for (i = list.length; i-- > 0;) {
|
|
1784
|
+
if (list[i] === listener ||
|
|
1785
|
+
(list[i].listener && list[i].listener === listener)) {
|
|
1786
|
+
originalListener = list[i].listener;
|
|
1787
|
+
position = i;
|
|
1788
|
+
break;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
if (position < 0)
|
|
1793
|
+
return this;
|
|
1794
|
+
|
|
1795
|
+
if (list.length === 1) {
|
|
1796
|
+
list[0] = undefined;
|
|
1797
|
+
if (--this._eventsCount === 0) {
|
|
1798
|
+
this._events = new EventHandlers();
|
|
1799
|
+
return this;
|
|
1800
|
+
} else {
|
|
1801
|
+
delete events[type];
|
|
1802
|
+
}
|
|
1803
|
+
} else {
|
|
1804
|
+
spliceOne(list, position);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
if (events.removeListener)
|
|
1808
|
+
this.emit('removeListener', type, originalListener || listener);
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
return this;
|
|
1812
|
+
};
|
|
1813
|
+
|
|
1814
|
+
EventEmitter.prototype.removeAllListeners =
|
|
1815
|
+
function removeAllListeners(type) {
|
|
1816
|
+
var listeners, events;
|
|
1817
|
+
|
|
1818
|
+
events = this._events;
|
|
1819
|
+
if (!events)
|
|
1820
|
+
return this;
|
|
1821
|
+
|
|
1822
|
+
// not listening for removeListener, no need to emit
|
|
1823
|
+
if (!events.removeListener) {
|
|
1824
|
+
if (arguments.length === 0) {
|
|
1825
|
+
this._events = new EventHandlers();
|
|
1826
|
+
this._eventsCount = 0;
|
|
1827
|
+
} else if (events[type]) {
|
|
1828
|
+
if (--this._eventsCount === 0)
|
|
1829
|
+
this._events = new EventHandlers();
|
|
1830
|
+
else
|
|
1831
|
+
delete events[type];
|
|
1832
|
+
}
|
|
1833
|
+
return this;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
// emit removeListener for all listeners on all events
|
|
1837
|
+
if (arguments.length === 0) {
|
|
1838
|
+
var keys = Object.keys(events);
|
|
1839
|
+
for (var i = 0, key; i < keys.length; ++i) {
|
|
1840
|
+
key = keys[i];
|
|
1841
|
+
if (key === 'removeListener') continue;
|
|
1842
|
+
this.removeAllListeners(key);
|
|
1843
|
+
}
|
|
1844
|
+
this.removeAllListeners('removeListener');
|
|
1845
|
+
this._events = new EventHandlers();
|
|
1846
|
+
this._eventsCount = 0;
|
|
1847
|
+
return this;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
listeners = events[type];
|
|
1851
|
+
|
|
1852
|
+
if (typeof listeners === 'function') {
|
|
1853
|
+
this.removeListener(type, listeners);
|
|
1854
|
+
} else if (listeners) {
|
|
1855
|
+
// LIFO order
|
|
1856
|
+
do {
|
|
1857
|
+
this.removeListener(type, listeners[listeners.length - 1]);
|
|
1858
|
+
} while (listeners[0]);
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
return this;
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
|
1865
|
+
var evlistener;
|
|
1866
|
+
var ret;
|
|
1867
|
+
var events = this._events;
|
|
1868
|
+
|
|
1869
|
+
if (!events)
|
|
1870
|
+
ret = [];
|
|
1871
|
+
else {
|
|
1872
|
+
evlistener = events[type];
|
|
1873
|
+
if (!evlistener)
|
|
1874
|
+
ret = [];
|
|
1875
|
+
else if (typeof evlistener === 'function')
|
|
1876
|
+
ret = [evlistener.listener || evlistener];
|
|
1877
|
+
else
|
|
1878
|
+
ret = unwrapListeners(evlistener);
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
return ret;
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1884
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
|
1885
|
+
if (typeof emitter.listenerCount === 'function') {
|
|
1886
|
+
return emitter.listenerCount(type);
|
|
1887
|
+
} else {
|
|
1888
|
+
return listenerCount.call(emitter, type);
|
|
1889
|
+
}
|
|
1890
|
+
};
|
|
1891
|
+
|
|
1892
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
|
1893
|
+
function listenerCount(type) {
|
|
1894
|
+
var events = this._events;
|
|
1895
|
+
|
|
1896
|
+
if (events) {
|
|
1897
|
+
var evlistener = events[type];
|
|
1898
|
+
|
|
1899
|
+
if (typeof evlistener === 'function') {
|
|
1900
|
+
return 1;
|
|
1901
|
+
} else if (evlistener) {
|
|
1902
|
+
return evlistener.length;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
return 0;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
1910
|
+
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
// About 1.5x faster than the two-arg version of Array#splice().
|
|
1914
|
+
function spliceOne(list, index) {
|
|
1915
|
+
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
|
|
1916
|
+
list[i] = list[k];
|
|
1917
|
+
list.pop();
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
function arrayClone(arr, i) {
|
|
1921
|
+
var copy = new Array(i);
|
|
1922
|
+
while (i--)
|
|
1923
|
+
copy[i] = arr[i];
|
|
1924
|
+
return copy;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
function unwrapListeners(arr) {
|
|
1928
|
+
var ret = new Array(arr.length);
|
|
1929
|
+
for (var i = 0; i < ret.length; ++i) {
|
|
1930
|
+
ret[i] = arr[i].listener || arr[i];
|
|
1931
|
+
}
|
|
1932
|
+
return ret;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1453
1935
|
var utils = createCommonjsModule(function (module, exports) {
|
|
1454
1936
|
|
|
1455
1937
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1516,7 +1998,7 @@ var registeredSlots = {};
|
|
|
1516
1998
|
var managerAlreadyInitialized = false;
|
|
1517
1999
|
var globalTargetingArguments = {};
|
|
1518
2000
|
var globalAdSenseAttributes = {};
|
|
1519
|
-
var DFPManager = Object.assign(new
|
|
2001
|
+
var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0), {
|
|
1520
2002
|
singleRequestIsEnabled: function singleRequestIsEnabled() {
|
|
1521
2003
|
return singleRequestEnabled;
|
|
1522
2004
|
},
|
|
@@ -2627,52 +3109,63 @@ var lib_1 = lib.DFPSlotsProvider;
|
|
|
2627
3109
|
var lib_2 = lib.AdSlot;
|
|
2628
3110
|
var lib_3 = lib.DFPManager;
|
|
2629
3111
|
|
|
2630
|
-
var
|
|
2631
|
-
|
|
3112
|
+
var AD = function AD(_ref) {
|
|
3113
|
+
var networkID = _ref.networkID,
|
|
3114
|
+
adUnit = _ref.adUnit,
|
|
3115
|
+
sizeMapping = _ref.sizeMapping,
|
|
3116
|
+
className = _ref.className,
|
|
3117
|
+
_ref$slotId = _ref.slotId,
|
|
3118
|
+
slotId = _ref$slotId === undefined ? 'test' : _ref$slotId,
|
|
3119
|
+
sizes = _ref.sizes,
|
|
3120
|
+
minInViewPercent = _ref.minInViewPercent;
|
|
2632
3121
|
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
3122
|
+
return React__default.createElement(
|
|
3123
|
+
lib_1,
|
|
3124
|
+
{ dfpNetworkId: networkID, sizeMapping: sizeMapping },
|
|
3125
|
+
React__default.createElement(
|
|
3126
|
+
'div',
|
|
3127
|
+
{ className: className },
|
|
3128
|
+
React__default.createElement(lib_2, {
|
|
3129
|
+
slotId: slotId,
|
|
3130
|
+
sizes: sizes,
|
|
3131
|
+
adUnit: adUnit,
|
|
3132
|
+
sizeMapping: sizeMapping,
|
|
3133
|
+
onSlotVisibilityChanged: function onSlotVisibilityChanged(dfpEventData) {
|
|
3134
|
+
if (minInViewPercent && dfpEventData.event.inViewPercentage < minInViewPercent) {
|
|
3135
|
+
lib_3.refresh(slotId);
|
|
3136
|
+
}
|
|
3137
|
+
},
|
|
3138
|
+
onSlotIsViewable: function onSlotIsViewable(dfpEventData) {
|
|
3139
|
+
return console.log(slotId + ' viewable!.', dfpEventData);
|
|
3140
|
+
}
|
|
3141
|
+
})
|
|
3142
|
+
)
|
|
3143
|
+
);
|
|
3144
|
+
};
|
|
2637
3145
|
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
3146
|
+
AD.propTypes = {
|
|
3147
|
+
networkID: PropTypes.number.isRequired,
|
|
3148
|
+
adUnit: PropTypes.string.isRequired,
|
|
3149
|
+
slotId: PropTypes.string.isRequired,
|
|
3150
|
+
className: PropTypes.string,
|
|
3151
|
+
sizeMapping: PropTypes.array,
|
|
3152
|
+
sizes: PropTypes.array,
|
|
3153
|
+
minInViewPercent: PropTypes.number
|
|
3154
|
+
};
|
|
2644
3155
|
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
sizes: [[728, 90], [320, 50]],
|
|
2659
|
-
adUnit: this.option.adUnit,
|
|
2660
|
-
sizeMapping: [{ viewport: [768, 1], sizes: [[728, 90]] }, { viewport: [1, 1], sizes: [[320, 50]] }],
|
|
2661
|
-
onSlotVisibilityChanged: function onSlotVisibilityChanged(dfpEventData) {
|
|
2662
|
-
if (dfpEventData.event.inViewPercentage < '70') {
|
|
2663
|
-
lib_3.refresh('test');
|
|
2664
|
-
}
|
|
2665
|
-
},
|
|
2666
|
-
onSlotIsViewable: function onSlotIsViewable(dfpEventData) {
|
|
2667
|
-
return console.log('slot 1 viewable!.', dfpEventData);
|
|
2668
|
-
}
|
|
2669
|
-
})
|
|
2670
|
-
)
|
|
2671
|
-
);
|
|
2672
|
-
}
|
|
2673
|
-
}]);
|
|
2674
|
-
return AD728x90;
|
|
2675
|
-
}(React.Component);
|
|
3156
|
+
var AD728x90 = function AD728x90(_ref) {
|
|
3157
|
+
var networkID = _ref.networkID,
|
|
3158
|
+
adUnit = _ref.adUnit;
|
|
3159
|
+
|
|
3160
|
+
return React__default.createElement(AD, {
|
|
3161
|
+
networkID: networkID,
|
|
3162
|
+
adUnit: adUnit,
|
|
3163
|
+
className: 'AD728x90',
|
|
3164
|
+
sizes: [[300, 250], [300, 600]],
|
|
3165
|
+
sizeMapping: [{ viewport: [768, 1], sizes: [[728, 90]] }, { viewport: [1, 1], sizes: [[320, 50]] }],
|
|
3166
|
+
minInViewPercent: 70
|
|
3167
|
+
});
|
|
3168
|
+
};
|
|
2676
3169
|
|
|
2677
3170
|
// Main
|
|
2678
3171
|
var TemplateNormal = function TemplateNormal(props) {
|
|
@@ -2698,6 +3191,12 @@ var TemplateNormal = function TemplateNormal(props) {
|
|
|
2698
3191
|
|
|
2699
3192
|
function layout() {
|
|
2700
3193
|
switch (config.columns) {
|
|
3194
|
+
case '1':
|
|
3195
|
+
return React__default.createElement(
|
|
3196
|
+
Column1,
|
|
3197
|
+
null,
|
|
3198
|
+
props.children
|
|
3199
|
+
);
|
|
2701
3200
|
case '2':
|
|
2702
3201
|
return React__default.createElement(
|
|
2703
3202
|
Column2,
|
|
@@ -2733,72 +3232,24 @@ var TemplateNormal = function TemplateNormal(props) {
|
|
|
2733
3232
|
);
|
|
2734
3233
|
};
|
|
2735
3234
|
|
|
2736
|
-
var AD300x250 = function (
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
function AD300x250(props) {
|
|
2740
|
-
classCallCheck(this, AD300x250);
|
|
2741
|
-
|
|
2742
|
-
var _this = possibleConstructorReturn(this, (AD300x250.__proto__ || Object.getPrototypeOf(AD300x250)).call(this, props));
|
|
2743
|
-
|
|
2744
|
-
_this.option = {
|
|
2745
|
-
networkID: props.networkID,
|
|
2746
|
-
adUnit: props.adUnit
|
|
2747
|
-
};
|
|
2748
|
-
return _this;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
createClass(AD300x250, [{
|
|
2752
|
-
key: 'render',
|
|
2753
|
-
value: function render() {
|
|
2754
|
-
return React__default.createElement(
|
|
2755
|
-
lib_1,
|
|
2756
|
-
{ dfpNetworkId: this.option.networkID },
|
|
2757
|
-
React__default.createElement(
|
|
2758
|
-
'div',
|
|
2759
|
-
{ className: 'AD300x250' },
|
|
2760
|
-
React__default.createElement(lib_2, { sizes: [[300, 250]], adUnit: this.option.adUnit })
|
|
2761
|
-
)
|
|
2762
|
-
);
|
|
2763
|
-
}
|
|
2764
|
-
}]);
|
|
2765
|
-
return AD300x250;
|
|
2766
|
-
}(React.Component);
|
|
2767
|
-
|
|
2768
|
-
var AD300x250x600 = function (_Component) {
|
|
2769
|
-
inherits(AD300x250x600, _Component);
|
|
3235
|
+
var AD300x250 = function AD300x250(_ref) {
|
|
3236
|
+
var networkID = _ref.networkID,
|
|
3237
|
+
adUnit = _ref.adUnit;
|
|
2770
3238
|
|
|
2771
|
-
|
|
2772
|
-
|
|
3239
|
+
return React__default.createElement(AD, { networkID: networkID, adUnit: adUnit, className: 'AD300x250', sizes: [[300, 250]] });
|
|
3240
|
+
};
|
|
2773
3241
|
|
|
2774
|
-
|
|
3242
|
+
var AD300x250x600 = function AD300x250x600(_ref) {
|
|
3243
|
+
var networkID = _ref.networkID,
|
|
3244
|
+
adUnit = _ref.adUnit;
|
|
2775
3245
|
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
createClass(AD300x250x600, [{
|
|
2784
|
-
key: 'render',
|
|
2785
|
-
value: function render() {
|
|
2786
|
-
return React__default.createElement(
|
|
2787
|
-
lib_1,
|
|
2788
|
-
{ dfpNetworkId: this.option.networkID },
|
|
2789
|
-
React__default.createElement(
|
|
2790
|
-
'div',
|
|
2791
|
-
{ className: 'AD300x250' },
|
|
2792
|
-
React__default.createElement(lib_2, {
|
|
2793
|
-
sizes: [[300, 250], [300, 600]],
|
|
2794
|
-
adUnit: this.option.adUnit
|
|
2795
|
-
})
|
|
2796
|
-
)
|
|
2797
|
-
);
|
|
2798
|
-
}
|
|
2799
|
-
}]);
|
|
2800
|
-
return AD300x250x600;
|
|
2801
|
-
}(React.Component);
|
|
3246
|
+
return React__default.createElement(AD, {
|
|
3247
|
+
networkID: networkID,
|
|
3248
|
+
adUnit: adUnit,
|
|
3249
|
+
className: 'AD300x250',
|
|
3250
|
+
sizes: [[300, 250], [300, 600]]
|
|
3251
|
+
});
|
|
3252
|
+
};
|
|
2802
3253
|
|
|
2803
3254
|
var getYoutubeId = createCommonjsModule(function (module, exports) {
|
|
2804
3255
|
(function (root, factory) {
|
|
@@ -2911,7 +3362,7 @@ var Sister;
|
|
|
2911
3362
|
*/
|
|
2912
3363
|
Sister = function () {
|
|
2913
3364
|
var sister = {},
|
|
2914
|
-
events
|
|
3365
|
+
events = {};
|
|
2915
3366
|
|
|
2916
3367
|
/**
|
|
2917
3368
|
* @name handler
|
|
@@ -2926,8 +3377,8 @@ Sister = function () {
|
|
|
2926
3377
|
*/
|
|
2927
3378
|
sister.on = function (name, handler) {
|
|
2928
3379
|
var listener = {name: name, handler: handler};
|
|
2929
|
-
events
|
|
2930
|
-
events
|
|
3380
|
+
events[name] = events[name] || [];
|
|
3381
|
+
events[name].unshift(listener);
|
|
2931
3382
|
return listener;
|
|
2932
3383
|
};
|
|
2933
3384
|
|
|
@@ -2935,10 +3386,10 @@ Sister = function () {
|
|
|
2935
3386
|
* @param {listener}
|
|
2936
3387
|
*/
|
|
2937
3388
|
sister.off = function (listener) {
|
|
2938
|
-
var index = events
|
|
3389
|
+
var index = events[listener.name].indexOf(listener);
|
|
2939
3390
|
|
|
2940
3391
|
if (index !== -1) {
|
|
2941
|
-
events
|
|
3392
|
+
events[listener.name].splice(index, 1);
|
|
2942
3393
|
}
|
|
2943
3394
|
};
|
|
2944
3395
|
|
|
@@ -2947,7 +3398,7 @@ Sister = function () {
|
|
|
2947
3398
|
* @param {Object} data Event data.
|
|
2948
3399
|
*/
|
|
2949
3400
|
sister.trigger = function (name, data) {
|
|
2950
|
-
var listeners = events
|
|
3401
|
+
var listeners = events[name],
|
|
2951
3402
|
i;
|
|
2952
3403
|
|
|
2953
3404
|
if (listeners) {
|
|
@@ -3641,6 +4092,824 @@ var browser_5 = browser.useColors;
|
|
|
3641
4092
|
var browser_6 = browser.storage;
|
|
3642
4093
|
var browser_7 = browser.colors;
|
|
3643
4094
|
|
|
4095
|
+
// MIT lisence
|
|
4096
|
+
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
4097
|
+
|
|
4098
|
+
function isatty() {
|
|
4099
|
+
return false;
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4102
|
+
function ReadStream() {
|
|
4103
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4106
|
+
function WriteStream() {
|
|
4107
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
4108
|
+
}
|
|
4109
|
+
|
|
4110
|
+
var tty = {
|
|
4111
|
+
isatty: isatty,
|
|
4112
|
+
ReadStream: ReadStream,
|
|
4113
|
+
WriteStream: WriteStream
|
|
4114
|
+
};
|
|
4115
|
+
|
|
4116
|
+
// shim for using process in browser
|
|
4117
|
+
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
4118
|
+
|
|
4119
|
+
function defaultSetTimout() {
|
|
4120
|
+
throw new Error('setTimeout has not been defined');
|
|
4121
|
+
}
|
|
4122
|
+
function defaultClearTimeout () {
|
|
4123
|
+
throw new Error('clearTimeout has not been defined');
|
|
4124
|
+
}
|
|
4125
|
+
var cachedSetTimeout = defaultSetTimout;
|
|
4126
|
+
var cachedClearTimeout = defaultClearTimeout;
|
|
4127
|
+
if (typeof global.setTimeout === 'function') {
|
|
4128
|
+
cachedSetTimeout = setTimeout;
|
|
4129
|
+
}
|
|
4130
|
+
if (typeof global.clearTimeout === 'function') {
|
|
4131
|
+
cachedClearTimeout = clearTimeout;
|
|
4132
|
+
}
|
|
4133
|
+
|
|
4134
|
+
function runTimeout(fun) {
|
|
4135
|
+
if (cachedSetTimeout === setTimeout) {
|
|
4136
|
+
//normal enviroments in sane situations
|
|
4137
|
+
return setTimeout(fun, 0);
|
|
4138
|
+
}
|
|
4139
|
+
// if setTimeout wasn't available but was latter defined
|
|
4140
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
4141
|
+
cachedSetTimeout = setTimeout;
|
|
4142
|
+
return setTimeout(fun, 0);
|
|
4143
|
+
}
|
|
4144
|
+
try {
|
|
4145
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
4146
|
+
return cachedSetTimeout(fun, 0);
|
|
4147
|
+
} catch(e){
|
|
4148
|
+
try {
|
|
4149
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
4150
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
4151
|
+
} catch(e){
|
|
4152
|
+
// 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
|
|
4153
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
4154
|
+
}
|
|
4155
|
+
}
|
|
4156
|
+
|
|
4157
|
+
|
|
4158
|
+
}
|
|
4159
|
+
function runClearTimeout(marker) {
|
|
4160
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
4161
|
+
//normal enviroments in sane situations
|
|
4162
|
+
return clearTimeout(marker);
|
|
4163
|
+
}
|
|
4164
|
+
// if clearTimeout wasn't available but was latter defined
|
|
4165
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
4166
|
+
cachedClearTimeout = clearTimeout;
|
|
4167
|
+
return clearTimeout(marker);
|
|
4168
|
+
}
|
|
4169
|
+
try {
|
|
4170
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
4171
|
+
return cachedClearTimeout(marker);
|
|
4172
|
+
} catch (e){
|
|
4173
|
+
try {
|
|
4174
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
4175
|
+
return cachedClearTimeout.call(null, marker);
|
|
4176
|
+
} catch (e){
|
|
4177
|
+
// 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.
|
|
4178
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
4179
|
+
return cachedClearTimeout.call(this, marker);
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
|
|
4185
|
+
}
|
|
4186
|
+
var queue = [];
|
|
4187
|
+
var draining = false;
|
|
4188
|
+
var currentQueue;
|
|
4189
|
+
var queueIndex = -1;
|
|
4190
|
+
|
|
4191
|
+
function cleanUpNextTick() {
|
|
4192
|
+
if (!draining || !currentQueue) {
|
|
4193
|
+
return;
|
|
4194
|
+
}
|
|
4195
|
+
draining = false;
|
|
4196
|
+
if (currentQueue.length) {
|
|
4197
|
+
queue = currentQueue.concat(queue);
|
|
4198
|
+
} else {
|
|
4199
|
+
queueIndex = -1;
|
|
4200
|
+
}
|
|
4201
|
+
if (queue.length) {
|
|
4202
|
+
drainQueue();
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4206
|
+
function drainQueue() {
|
|
4207
|
+
if (draining) {
|
|
4208
|
+
return;
|
|
4209
|
+
}
|
|
4210
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
4211
|
+
draining = true;
|
|
4212
|
+
|
|
4213
|
+
var len = queue.length;
|
|
4214
|
+
while(len) {
|
|
4215
|
+
currentQueue = queue;
|
|
4216
|
+
queue = [];
|
|
4217
|
+
while (++queueIndex < len) {
|
|
4218
|
+
if (currentQueue) {
|
|
4219
|
+
currentQueue[queueIndex].run();
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
queueIndex = -1;
|
|
4223
|
+
len = queue.length;
|
|
4224
|
+
}
|
|
4225
|
+
currentQueue = null;
|
|
4226
|
+
draining = false;
|
|
4227
|
+
runClearTimeout(timeout);
|
|
4228
|
+
}
|
|
4229
|
+
function nextTick(fun) {
|
|
4230
|
+
var args = new Array(arguments.length - 1);
|
|
4231
|
+
if (arguments.length > 1) {
|
|
4232
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4233
|
+
args[i - 1] = arguments[i];
|
|
4234
|
+
}
|
|
4235
|
+
}
|
|
4236
|
+
queue.push(new Item(fun, args));
|
|
4237
|
+
if (queue.length === 1 && !draining) {
|
|
4238
|
+
runTimeout(drainQueue);
|
|
4239
|
+
}
|
|
4240
|
+
}
|
|
4241
|
+
// v8 likes predictible objects
|
|
4242
|
+
function Item(fun, array) {
|
|
4243
|
+
this.fun = fun;
|
|
4244
|
+
this.array = array;
|
|
4245
|
+
}
|
|
4246
|
+
Item.prototype.run = function () {
|
|
4247
|
+
this.fun.apply(null, this.array);
|
|
4248
|
+
};
|
|
4249
|
+
var title = 'browser';
|
|
4250
|
+
var platform = 'browser';
|
|
4251
|
+
var browser$1 = true;
|
|
4252
|
+
var env = {};
|
|
4253
|
+
var argv = [];
|
|
4254
|
+
var version = ''; // empty string to avoid regexp issues
|
|
4255
|
+
var versions = {};
|
|
4256
|
+
var release = {};
|
|
4257
|
+
var config = {};
|
|
4258
|
+
|
|
4259
|
+
function noop() {}
|
|
4260
|
+
|
|
4261
|
+
var on = noop;
|
|
4262
|
+
var addListener = noop;
|
|
4263
|
+
var once = noop;
|
|
4264
|
+
var off = noop;
|
|
4265
|
+
var removeListener = noop;
|
|
4266
|
+
var removeAllListeners = noop;
|
|
4267
|
+
var emit = noop;
|
|
4268
|
+
|
|
4269
|
+
function binding(name) {
|
|
4270
|
+
throw new Error('process.binding is not supported');
|
|
4271
|
+
}
|
|
4272
|
+
|
|
4273
|
+
function cwd () { return '/' }
|
|
4274
|
+
function chdir (dir) {
|
|
4275
|
+
throw new Error('process.chdir is not supported');
|
|
4276
|
+
}function umask() { return 0; }
|
|
4277
|
+
|
|
4278
|
+
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
4279
|
+
var performance = global.performance || {};
|
|
4280
|
+
var performanceNow =
|
|
4281
|
+
performance.now ||
|
|
4282
|
+
performance.mozNow ||
|
|
4283
|
+
performance.msNow ||
|
|
4284
|
+
performance.oNow ||
|
|
4285
|
+
performance.webkitNow ||
|
|
4286
|
+
function(){ return (new Date()).getTime() };
|
|
4287
|
+
|
|
4288
|
+
// generate timestamp or delta
|
|
4289
|
+
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
4290
|
+
function hrtime(previousTimestamp){
|
|
4291
|
+
var clocktime = performanceNow.call(performance)*1e-3;
|
|
4292
|
+
var seconds = Math.floor(clocktime);
|
|
4293
|
+
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
|
4294
|
+
if (previousTimestamp) {
|
|
4295
|
+
seconds = seconds - previousTimestamp[0];
|
|
4296
|
+
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
4297
|
+
if (nanoseconds<0) {
|
|
4298
|
+
seconds--;
|
|
4299
|
+
nanoseconds += 1e9;
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
return [seconds,nanoseconds]
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
var startTime = new Date();
|
|
4306
|
+
function uptime() {
|
|
4307
|
+
var currentTime = new Date();
|
|
4308
|
+
var dif = currentTime - startTime;
|
|
4309
|
+
return dif / 1000;
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4312
|
+
var process$1 = {
|
|
4313
|
+
nextTick: nextTick,
|
|
4314
|
+
title: title,
|
|
4315
|
+
browser: browser$1,
|
|
4316
|
+
env: env,
|
|
4317
|
+
argv: argv,
|
|
4318
|
+
version: version,
|
|
4319
|
+
versions: versions,
|
|
4320
|
+
on: on,
|
|
4321
|
+
addListener: addListener,
|
|
4322
|
+
once: once,
|
|
4323
|
+
off: off,
|
|
4324
|
+
removeListener: removeListener,
|
|
4325
|
+
removeAllListeners: removeAllListeners,
|
|
4326
|
+
emit: emit,
|
|
4327
|
+
binding: binding,
|
|
4328
|
+
cwd: cwd,
|
|
4329
|
+
chdir: chdir,
|
|
4330
|
+
umask: umask,
|
|
4331
|
+
hrtime: hrtime,
|
|
4332
|
+
platform: platform,
|
|
4333
|
+
release: release,
|
|
4334
|
+
config: config,
|
|
4335
|
+
uptime: uptime
|
|
4336
|
+
};
|
|
4337
|
+
|
|
4338
|
+
var inherits$1;
|
|
4339
|
+
if (typeof Object.create === 'function'){
|
|
4340
|
+
inherits$1 = function inherits(ctor, superCtor) {
|
|
4341
|
+
// implementation from standard node.js 'util' module
|
|
4342
|
+
ctor.super_ = superCtor;
|
|
4343
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
4344
|
+
constructor: {
|
|
4345
|
+
value: ctor,
|
|
4346
|
+
enumerable: false,
|
|
4347
|
+
writable: true,
|
|
4348
|
+
configurable: true
|
|
4349
|
+
}
|
|
4350
|
+
});
|
|
4351
|
+
};
|
|
4352
|
+
} else {
|
|
4353
|
+
inherits$1 = function inherits(ctor, superCtor) {
|
|
4354
|
+
ctor.super_ = superCtor;
|
|
4355
|
+
var TempCtor = function () {};
|
|
4356
|
+
TempCtor.prototype = superCtor.prototype;
|
|
4357
|
+
ctor.prototype = new TempCtor();
|
|
4358
|
+
ctor.prototype.constructor = ctor;
|
|
4359
|
+
};
|
|
4360
|
+
}
|
|
4361
|
+
var inherits$2 = inherits$1;
|
|
4362
|
+
|
|
4363
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
4364
|
+
var formatRegExp = /%[sdj%]/g;
|
|
4365
|
+
function format(f) {
|
|
4366
|
+
if (!isString(f)) {
|
|
4367
|
+
var objects = [];
|
|
4368
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
4369
|
+
objects.push(inspect(arguments[i]));
|
|
4370
|
+
}
|
|
4371
|
+
return objects.join(' ');
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4374
|
+
var i = 1;
|
|
4375
|
+
var args = arguments;
|
|
4376
|
+
var len = args.length;
|
|
4377
|
+
var str = String(f).replace(formatRegExp, function(x) {
|
|
4378
|
+
if (x === '%%') return '%';
|
|
4379
|
+
if (i >= len) return x;
|
|
4380
|
+
switch (x) {
|
|
4381
|
+
case '%s': return String(args[i++]);
|
|
4382
|
+
case '%d': return Number(args[i++]);
|
|
4383
|
+
case '%j':
|
|
4384
|
+
try {
|
|
4385
|
+
return JSON.stringify(args[i++]);
|
|
4386
|
+
} catch (_) {
|
|
4387
|
+
return '[Circular]';
|
|
4388
|
+
}
|
|
4389
|
+
default:
|
|
4390
|
+
return x;
|
|
4391
|
+
}
|
|
4392
|
+
});
|
|
4393
|
+
for (var x = args[i]; i < len; x = args[++i]) {
|
|
4394
|
+
if (isNull(x) || !isObject(x)) {
|
|
4395
|
+
str += ' ' + x;
|
|
4396
|
+
} else {
|
|
4397
|
+
str += ' ' + inspect(x);
|
|
4398
|
+
}
|
|
4399
|
+
}
|
|
4400
|
+
return str;
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4403
|
+
// Mark that a method should not be used.
|
|
4404
|
+
// Returns a modified function which warns once by default.
|
|
4405
|
+
// If --no-deprecation is set, then it is a no-op.
|
|
4406
|
+
function deprecate(fn, msg) {
|
|
4407
|
+
// Allow for deprecating things in the process of starting up.
|
|
4408
|
+
if (isUndefined(global.process)) {
|
|
4409
|
+
return function() {
|
|
4410
|
+
return deprecate(fn, msg).apply(this, arguments);
|
|
4411
|
+
};
|
|
4412
|
+
}
|
|
4413
|
+
|
|
4414
|
+
var warned = false;
|
|
4415
|
+
function deprecated() {
|
|
4416
|
+
if (!warned) {
|
|
4417
|
+
{
|
|
4418
|
+
console.error(msg);
|
|
4419
|
+
}
|
|
4420
|
+
warned = true;
|
|
4421
|
+
}
|
|
4422
|
+
return fn.apply(this, arguments);
|
|
4423
|
+
}
|
|
4424
|
+
|
|
4425
|
+
return deprecated;
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
var debugs = {};
|
|
4429
|
+
var debugEnviron;
|
|
4430
|
+
function debuglog(set) {
|
|
4431
|
+
if (isUndefined(debugEnviron))
|
|
4432
|
+
debugEnviron = process$1.env.NODE_DEBUG || '';
|
|
4433
|
+
set = set.toUpperCase();
|
|
4434
|
+
if (!debugs[set]) {
|
|
4435
|
+
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
|
4436
|
+
var pid = 0;
|
|
4437
|
+
debugs[set] = function() {
|
|
4438
|
+
var msg = format.apply(null, arguments);
|
|
4439
|
+
console.error('%s %d: %s', set, pid, msg);
|
|
4440
|
+
};
|
|
4441
|
+
} else {
|
|
4442
|
+
debugs[set] = function() {};
|
|
4443
|
+
}
|
|
4444
|
+
}
|
|
4445
|
+
return debugs[set];
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
/**
|
|
4449
|
+
* Echos the value of a value. Trys to print the value out
|
|
4450
|
+
* in the best way possible given the different types.
|
|
4451
|
+
*
|
|
4452
|
+
* @param {Object} obj The object to print out.
|
|
4453
|
+
* @param {Object} opts Optional options object that alters the output.
|
|
4454
|
+
*/
|
|
4455
|
+
/* legacy: obj, showHidden, depth, colors*/
|
|
4456
|
+
function inspect(obj, opts) {
|
|
4457
|
+
// default options
|
|
4458
|
+
var ctx = {
|
|
4459
|
+
seen: [],
|
|
4460
|
+
stylize: stylizeNoColor
|
|
4461
|
+
};
|
|
4462
|
+
// legacy...
|
|
4463
|
+
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
4464
|
+
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
4465
|
+
if (isBoolean(opts)) {
|
|
4466
|
+
// legacy...
|
|
4467
|
+
ctx.showHidden = opts;
|
|
4468
|
+
} else if (opts) {
|
|
4469
|
+
// got an "options" object
|
|
4470
|
+
_extend(ctx, opts);
|
|
4471
|
+
}
|
|
4472
|
+
// set default options
|
|
4473
|
+
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
4474
|
+
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
4475
|
+
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
4476
|
+
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
4477
|
+
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
4478
|
+
return formatValue(ctx, obj, ctx.depth);
|
|
4479
|
+
}
|
|
4480
|
+
|
|
4481
|
+
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
4482
|
+
inspect.colors = {
|
|
4483
|
+
'bold' : [1, 22],
|
|
4484
|
+
'italic' : [3, 23],
|
|
4485
|
+
'underline' : [4, 24],
|
|
4486
|
+
'inverse' : [7, 27],
|
|
4487
|
+
'white' : [37, 39],
|
|
4488
|
+
'grey' : [90, 39],
|
|
4489
|
+
'black' : [30, 39],
|
|
4490
|
+
'blue' : [34, 39],
|
|
4491
|
+
'cyan' : [36, 39],
|
|
4492
|
+
'green' : [32, 39],
|
|
4493
|
+
'magenta' : [35, 39],
|
|
4494
|
+
'red' : [31, 39],
|
|
4495
|
+
'yellow' : [33, 39]
|
|
4496
|
+
};
|
|
4497
|
+
|
|
4498
|
+
// Don't use 'blue' not visible on cmd.exe
|
|
4499
|
+
inspect.styles = {
|
|
4500
|
+
'special': 'cyan',
|
|
4501
|
+
'number': 'yellow',
|
|
4502
|
+
'boolean': 'yellow',
|
|
4503
|
+
'undefined': 'grey',
|
|
4504
|
+
'null': 'bold',
|
|
4505
|
+
'string': 'green',
|
|
4506
|
+
'date': 'magenta',
|
|
4507
|
+
// "name": intentionally not styling
|
|
4508
|
+
'regexp': 'red'
|
|
4509
|
+
};
|
|
4510
|
+
|
|
4511
|
+
|
|
4512
|
+
function stylizeWithColor(str, styleType) {
|
|
4513
|
+
var style = inspect.styles[styleType];
|
|
4514
|
+
|
|
4515
|
+
if (style) {
|
|
4516
|
+
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
|
4517
|
+
'\u001b[' + inspect.colors[style][1] + 'm';
|
|
4518
|
+
} else {
|
|
4519
|
+
return str;
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
|
|
4523
|
+
|
|
4524
|
+
function stylizeNoColor(str, styleType) {
|
|
4525
|
+
return str;
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
|
|
4529
|
+
function arrayToHash(array) {
|
|
4530
|
+
var hash = {};
|
|
4531
|
+
|
|
4532
|
+
array.forEach(function(val, idx) {
|
|
4533
|
+
hash[val] = true;
|
|
4534
|
+
});
|
|
4535
|
+
|
|
4536
|
+
return hash;
|
|
4537
|
+
}
|
|
4538
|
+
|
|
4539
|
+
|
|
4540
|
+
function formatValue(ctx, value, recurseTimes) {
|
|
4541
|
+
// Provide a hook for user-specified inspect functions.
|
|
4542
|
+
// Check that value is an object with an inspect function on it
|
|
4543
|
+
if (ctx.customInspect &&
|
|
4544
|
+
value &&
|
|
4545
|
+
isFunction(value.inspect) &&
|
|
4546
|
+
// Filter out the util module, it's inspect function is special
|
|
4547
|
+
value.inspect !== inspect &&
|
|
4548
|
+
// Also filter out any prototype objects using the circular check.
|
|
4549
|
+
!(value.constructor && value.constructor.prototype === value)) {
|
|
4550
|
+
var ret = value.inspect(recurseTimes, ctx);
|
|
4551
|
+
if (!isString(ret)) {
|
|
4552
|
+
ret = formatValue(ctx, ret, recurseTimes);
|
|
4553
|
+
}
|
|
4554
|
+
return ret;
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
// Primitive types cannot have properties
|
|
4558
|
+
var primitive = formatPrimitive(ctx, value);
|
|
4559
|
+
if (primitive) {
|
|
4560
|
+
return primitive;
|
|
4561
|
+
}
|
|
4562
|
+
|
|
4563
|
+
// Look up the keys of the object.
|
|
4564
|
+
var keys = Object.keys(value);
|
|
4565
|
+
var visibleKeys = arrayToHash(keys);
|
|
4566
|
+
|
|
4567
|
+
if (ctx.showHidden) {
|
|
4568
|
+
keys = Object.getOwnPropertyNames(value);
|
|
4569
|
+
}
|
|
4570
|
+
|
|
4571
|
+
// IE doesn't make error fields non-enumerable
|
|
4572
|
+
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
|
|
4573
|
+
if (isError(value)
|
|
4574
|
+
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
|
|
4575
|
+
return formatError(value);
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4578
|
+
// Some type of object without properties can be shortcutted.
|
|
4579
|
+
if (keys.length === 0) {
|
|
4580
|
+
if (isFunction(value)) {
|
|
4581
|
+
var name = value.name ? ': ' + value.name : '';
|
|
4582
|
+
return ctx.stylize('[Function' + name + ']', 'special');
|
|
4583
|
+
}
|
|
4584
|
+
if (isRegExp(value)) {
|
|
4585
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
4586
|
+
}
|
|
4587
|
+
if (isDate(value)) {
|
|
4588
|
+
return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
|
4589
|
+
}
|
|
4590
|
+
if (isError(value)) {
|
|
4591
|
+
return formatError(value);
|
|
4592
|
+
}
|
|
4593
|
+
}
|
|
4594
|
+
|
|
4595
|
+
var base = '', array = false, braces = ['{', '}'];
|
|
4596
|
+
|
|
4597
|
+
// Make Array say that they are Array
|
|
4598
|
+
if (isArray$1(value)) {
|
|
4599
|
+
array = true;
|
|
4600
|
+
braces = ['[', ']'];
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4603
|
+
// Make functions say that they are functions
|
|
4604
|
+
if (isFunction(value)) {
|
|
4605
|
+
var n = value.name ? ': ' + value.name : '';
|
|
4606
|
+
base = ' [Function' + n + ']';
|
|
4607
|
+
}
|
|
4608
|
+
|
|
4609
|
+
// Make RegExps say that they are RegExps
|
|
4610
|
+
if (isRegExp(value)) {
|
|
4611
|
+
base = ' ' + RegExp.prototype.toString.call(value);
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
// Make dates with properties first say the date
|
|
4615
|
+
if (isDate(value)) {
|
|
4616
|
+
base = ' ' + Date.prototype.toUTCString.call(value);
|
|
4617
|
+
}
|
|
4618
|
+
|
|
4619
|
+
// Make error with message first say the error
|
|
4620
|
+
if (isError(value)) {
|
|
4621
|
+
base = ' ' + formatError(value);
|
|
4622
|
+
}
|
|
4623
|
+
|
|
4624
|
+
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
4625
|
+
return braces[0] + base + braces[1];
|
|
4626
|
+
}
|
|
4627
|
+
|
|
4628
|
+
if (recurseTimes < 0) {
|
|
4629
|
+
if (isRegExp(value)) {
|
|
4630
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
4631
|
+
} else {
|
|
4632
|
+
return ctx.stylize('[Object]', 'special');
|
|
4633
|
+
}
|
|
4634
|
+
}
|
|
4635
|
+
|
|
4636
|
+
ctx.seen.push(value);
|
|
4637
|
+
|
|
4638
|
+
var output;
|
|
4639
|
+
if (array) {
|
|
4640
|
+
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
4641
|
+
} else {
|
|
4642
|
+
output = keys.map(function(key) {
|
|
4643
|
+
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
4644
|
+
});
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
ctx.seen.pop();
|
|
4648
|
+
|
|
4649
|
+
return reduceToSingleString(output, base, braces);
|
|
4650
|
+
}
|
|
4651
|
+
|
|
4652
|
+
|
|
4653
|
+
function formatPrimitive(ctx, value) {
|
|
4654
|
+
if (isUndefined(value))
|
|
4655
|
+
return ctx.stylize('undefined', 'undefined');
|
|
4656
|
+
if (isString(value)) {
|
|
4657
|
+
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
4658
|
+
.replace(/'/g, "\\'")
|
|
4659
|
+
.replace(/\\"/g, '"') + '\'';
|
|
4660
|
+
return ctx.stylize(simple, 'string');
|
|
4661
|
+
}
|
|
4662
|
+
if (isNumber(value))
|
|
4663
|
+
return ctx.stylize('' + value, 'number');
|
|
4664
|
+
if (isBoolean(value))
|
|
4665
|
+
return ctx.stylize('' + value, 'boolean');
|
|
4666
|
+
// For some reason typeof null is "object", so special case here.
|
|
4667
|
+
if (isNull(value))
|
|
4668
|
+
return ctx.stylize('null', 'null');
|
|
4669
|
+
}
|
|
4670
|
+
|
|
4671
|
+
|
|
4672
|
+
function formatError(value) {
|
|
4673
|
+
return '[' + Error.prototype.toString.call(value) + ']';
|
|
4674
|
+
}
|
|
4675
|
+
|
|
4676
|
+
|
|
4677
|
+
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
4678
|
+
var output = [];
|
|
4679
|
+
for (var i = 0, l = value.length; i < l; ++i) {
|
|
4680
|
+
if (hasOwnProperty(value, String(i))) {
|
|
4681
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
4682
|
+
String(i), true));
|
|
4683
|
+
} else {
|
|
4684
|
+
output.push('');
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
keys.forEach(function(key) {
|
|
4688
|
+
if (!key.match(/^\d+$/)) {
|
|
4689
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
4690
|
+
key, true));
|
|
4691
|
+
}
|
|
4692
|
+
});
|
|
4693
|
+
return output;
|
|
4694
|
+
}
|
|
4695
|
+
|
|
4696
|
+
|
|
4697
|
+
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
4698
|
+
var name, str, desc;
|
|
4699
|
+
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
4700
|
+
if (desc.get) {
|
|
4701
|
+
if (desc.set) {
|
|
4702
|
+
str = ctx.stylize('[Getter/Setter]', 'special');
|
|
4703
|
+
} else {
|
|
4704
|
+
str = ctx.stylize('[Getter]', 'special');
|
|
4705
|
+
}
|
|
4706
|
+
} else {
|
|
4707
|
+
if (desc.set) {
|
|
4708
|
+
str = ctx.stylize('[Setter]', 'special');
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
if (!hasOwnProperty(visibleKeys, key)) {
|
|
4712
|
+
name = '[' + key + ']';
|
|
4713
|
+
}
|
|
4714
|
+
if (!str) {
|
|
4715
|
+
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
4716
|
+
if (isNull(recurseTimes)) {
|
|
4717
|
+
str = formatValue(ctx, desc.value, null);
|
|
4718
|
+
} else {
|
|
4719
|
+
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
4720
|
+
}
|
|
4721
|
+
if (str.indexOf('\n') > -1) {
|
|
4722
|
+
if (array) {
|
|
4723
|
+
str = str.split('\n').map(function(line) {
|
|
4724
|
+
return ' ' + line;
|
|
4725
|
+
}).join('\n').substr(2);
|
|
4726
|
+
} else {
|
|
4727
|
+
str = '\n' + str.split('\n').map(function(line) {
|
|
4728
|
+
return ' ' + line;
|
|
4729
|
+
}).join('\n');
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
} else {
|
|
4733
|
+
str = ctx.stylize('[Circular]', 'special');
|
|
4734
|
+
}
|
|
4735
|
+
}
|
|
4736
|
+
if (isUndefined(name)) {
|
|
4737
|
+
if (array && key.match(/^\d+$/)) {
|
|
4738
|
+
return str;
|
|
4739
|
+
}
|
|
4740
|
+
name = JSON.stringify('' + key);
|
|
4741
|
+
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
4742
|
+
name = name.substr(1, name.length - 2);
|
|
4743
|
+
name = ctx.stylize(name, 'name');
|
|
4744
|
+
} else {
|
|
4745
|
+
name = name.replace(/'/g, "\\'")
|
|
4746
|
+
.replace(/\\"/g, '"')
|
|
4747
|
+
.replace(/(^"|"$)/g, "'");
|
|
4748
|
+
name = ctx.stylize(name, 'string');
|
|
4749
|
+
}
|
|
4750
|
+
}
|
|
4751
|
+
|
|
4752
|
+
return name + ': ' + str;
|
|
4753
|
+
}
|
|
4754
|
+
|
|
4755
|
+
|
|
4756
|
+
function reduceToSingleString(output, base, braces) {
|
|
4757
|
+
var length = output.reduce(function(prev, cur) {
|
|
4758
|
+
if (cur.indexOf('\n') >= 0) ;
|
|
4759
|
+
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
|
4760
|
+
}, 0);
|
|
4761
|
+
|
|
4762
|
+
if (length > 60) {
|
|
4763
|
+
return braces[0] +
|
|
4764
|
+
(base === '' ? '' : base + '\n ') +
|
|
4765
|
+
' ' +
|
|
4766
|
+
output.join(',\n ') +
|
|
4767
|
+
' ' +
|
|
4768
|
+
braces[1];
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4771
|
+
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
|
4772
|
+
}
|
|
4773
|
+
|
|
4774
|
+
|
|
4775
|
+
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4776
|
+
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4777
|
+
function isArray$1(ar) {
|
|
4778
|
+
return Array.isArray(ar);
|
|
4779
|
+
}
|
|
4780
|
+
|
|
4781
|
+
function isBoolean(arg) {
|
|
4782
|
+
return typeof arg === 'boolean';
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4785
|
+
function isNull(arg) {
|
|
4786
|
+
return arg === null;
|
|
4787
|
+
}
|
|
4788
|
+
|
|
4789
|
+
function isNullOrUndefined(arg) {
|
|
4790
|
+
return arg == null;
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4793
|
+
function isNumber(arg) {
|
|
4794
|
+
return typeof arg === 'number';
|
|
4795
|
+
}
|
|
4796
|
+
|
|
4797
|
+
function isString(arg) {
|
|
4798
|
+
return typeof arg === 'string';
|
|
4799
|
+
}
|
|
4800
|
+
|
|
4801
|
+
function isSymbol(arg) {
|
|
4802
|
+
return typeof arg === 'symbol';
|
|
4803
|
+
}
|
|
4804
|
+
|
|
4805
|
+
function isUndefined(arg) {
|
|
4806
|
+
return arg === void 0;
|
|
4807
|
+
}
|
|
4808
|
+
|
|
4809
|
+
function isRegExp(re) {
|
|
4810
|
+
return isObject(re) && objectToString(re) === '[object RegExp]';
|
|
4811
|
+
}
|
|
4812
|
+
|
|
4813
|
+
function isObject(arg) {
|
|
4814
|
+
return typeof arg === 'object' && arg !== null;
|
|
4815
|
+
}
|
|
4816
|
+
|
|
4817
|
+
function isDate(d) {
|
|
4818
|
+
return isObject(d) && objectToString(d) === '[object Date]';
|
|
4819
|
+
}
|
|
4820
|
+
|
|
4821
|
+
function isError(e) {
|
|
4822
|
+
return isObject(e) &&
|
|
4823
|
+
(objectToString(e) === '[object Error]' || e instanceof Error);
|
|
4824
|
+
}
|
|
4825
|
+
|
|
4826
|
+
function isFunction(arg) {
|
|
4827
|
+
return typeof arg === 'function';
|
|
4828
|
+
}
|
|
4829
|
+
|
|
4830
|
+
function isPrimitive(arg) {
|
|
4831
|
+
return arg === null ||
|
|
4832
|
+
typeof arg === 'boolean' ||
|
|
4833
|
+
typeof arg === 'number' ||
|
|
4834
|
+
typeof arg === 'string' ||
|
|
4835
|
+
typeof arg === 'symbol' || // ES6 symbol
|
|
4836
|
+
typeof arg === 'undefined';
|
|
4837
|
+
}
|
|
4838
|
+
|
|
4839
|
+
function isBuffer(maybeBuf) {
|
|
4840
|
+
return Buffer.isBuffer(maybeBuf);
|
|
4841
|
+
}
|
|
4842
|
+
|
|
4843
|
+
function objectToString(o) {
|
|
4844
|
+
return Object.prototype.toString.call(o);
|
|
4845
|
+
}
|
|
4846
|
+
|
|
4847
|
+
|
|
4848
|
+
function pad(n) {
|
|
4849
|
+
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
|
4850
|
+
}
|
|
4851
|
+
|
|
4852
|
+
|
|
4853
|
+
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
|
4854
|
+
'Oct', 'Nov', 'Dec'];
|
|
4855
|
+
|
|
4856
|
+
// 26 Feb 16:19:34
|
|
4857
|
+
function timestamp() {
|
|
4858
|
+
var d = new Date();
|
|
4859
|
+
var time = [pad(d.getHours()),
|
|
4860
|
+
pad(d.getMinutes()),
|
|
4861
|
+
pad(d.getSeconds())].join(':');
|
|
4862
|
+
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
|
4863
|
+
}
|
|
4864
|
+
|
|
4865
|
+
|
|
4866
|
+
// log is just a thin wrapper to console.log that prepends a timestamp
|
|
4867
|
+
function log() {
|
|
4868
|
+
console.log('%s - %s', timestamp(), format.apply(null, arguments));
|
|
4869
|
+
}
|
|
4870
|
+
|
|
4871
|
+
function _extend(origin, add) {
|
|
4872
|
+
// Don't do anything if add isn't an object
|
|
4873
|
+
if (!add || !isObject(add)) return origin;
|
|
4874
|
+
|
|
4875
|
+
var keys = Object.keys(add);
|
|
4876
|
+
var i = keys.length;
|
|
4877
|
+
while (i--) {
|
|
4878
|
+
origin[keys[i]] = add[keys[i]];
|
|
4879
|
+
}
|
|
4880
|
+
return origin;
|
|
4881
|
+
}
|
|
4882
|
+
function hasOwnProperty(obj, prop) {
|
|
4883
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
4884
|
+
}
|
|
4885
|
+
|
|
4886
|
+
var util = {
|
|
4887
|
+
inherits: inherits$2,
|
|
4888
|
+
_extend: _extend,
|
|
4889
|
+
log: log,
|
|
4890
|
+
isBuffer: isBuffer,
|
|
4891
|
+
isPrimitive: isPrimitive,
|
|
4892
|
+
isFunction: isFunction,
|
|
4893
|
+
isError: isError,
|
|
4894
|
+
isDate: isDate,
|
|
4895
|
+
isObject: isObject,
|
|
4896
|
+
isRegExp: isRegExp,
|
|
4897
|
+
isUndefined: isUndefined,
|
|
4898
|
+
isSymbol: isSymbol,
|
|
4899
|
+
isString: isString,
|
|
4900
|
+
isNumber: isNumber,
|
|
4901
|
+
isNullOrUndefined: isNullOrUndefined,
|
|
4902
|
+
isNull: isNull,
|
|
4903
|
+
isBoolean: isBoolean,
|
|
4904
|
+
isArray: isArray$1,
|
|
4905
|
+
inspect: inspect,
|
|
4906
|
+
deprecate: deprecate,
|
|
4907
|
+
format: format,
|
|
4908
|
+
debuglog: debuglog
|
|
4909
|
+
};
|
|
4910
|
+
|
|
4911
|
+
var require$$2 = {};
|
|
4912
|
+
|
|
3644
4913
|
var node = createCommonjsModule(function (module, exports) {
|
|
3645
4914
|
/**
|
|
3646
4915
|
* Module dependencies.
|
|
@@ -3827,15 +5096,15 @@ function createWritableStdioStream (fd) {
|
|
|
3827
5096
|
break;
|
|
3828
5097
|
|
|
3829
5098
|
case 'FILE':
|
|
3830
|
-
var fs
|
|
3831
|
-
stream = new fs
|
|
5099
|
+
var fs = require$$2;
|
|
5100
|
+
stream = new fs.SyncWriteStream(fd, { autoClose: false });
|
|
3832
5101
|
stream._type = 'fs';
|
|
3833
5102
|
break;
|
|
3834
5103
|
|
|
3835
5104
|
case 'PIPE':
|
|
3836
5105
|
case 'TCP':
|
|
3837
|
-
var net
|
|
3838
|
-
stream = new net
|
|
5106
|
+
var net = require$$2;
|
|
5107
|
+
stream = new net.Socket({
|
|
3839
5108
|
fd: fd,
|
|
3840
5109
|
readable: false,
|
|
3841
5110
|
writable: true
|
|
@@ -4038,12 +5307,12 @@ var YouTubePlayer = {};
|
|
|
4038
5307
|
* @see https://developers.google.com/youtube/iframe_api_reference#Events
|
|
4039
5308
|
*/
|
|
4040
5309
|
YouTubePlayer.proxyEvents = function (emitter) {
|
|
4041
|
-
var events
|
|
5310
|
+
var events = {};
|
|
4042
5311
|
|
|
4043
5312
|
var _loop = function _loop(eventName) {
|
|
4044
5313
|
var onEventName = 'on' + eventName.slice(0, 1).toUpperCase() + eventName.slice(1);
|
|
4045
5314
|
|
|
4046
|
-
events
|
|
5315
|
+
events[onEventName] = function (event) {
|
|
4047
5316
|
debug('event "%s"', onEventName, event);
|
|
4048
5317
|
|
|
4049
5318
|
emitter.trigger(eventName, event);
|
|
@@ -4075,7 +5344,7 @@ YouTubePlayer.proxyEvents = function (emitter) {
|
|
|
4075
5344
|
}
|
|
4076
5345
|
}
|
|
4077
5346
|
|
|
4078
|
-
return events
|
|
5347
|
+
return events;
|
|
4079
5348
|
};
|
|
4080
5349
|
|
|
4081
5350
|
/**
|
|
@@ -4663,6 +5932,7 @@ var getSerializers = function getSerializers() {
|
|
|
4663
5932
|
|
|
4664
5933
|
exports.DeckContent = DeckContent;
|
|
4665
5934
|
exports.DeckQueue = DeckQueue;
|
|
5935
|
+
exports.Column1 = Column1;
|
|
4666
5936
|
exports.Column2 = Column2;
|
|
4667
5937
|
exports.Column3 = Column3;
|
|
4668
5938
|
exports.Header = Header;
|