cx 24.9.4 → 24.10.0

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.
Files changed (71) hide show
  1. package/dist/charts.css +19 -16
  2. package/dist/charts.js +127 -94
  3. package/dist/data.js +29 -26
  4. package/dist/manifest.js +692 -692
  5. package/dist/svg.js +56 -59
  6. package/dist/ui.js +52 -51
  7. package/dist/widgets.js +44 -40
  8. package/package.json +32 -32
  9. package/src/charts/Legend.js +49 -33
  10. package/src/charts/Legend.scss +40 -42
  11. package/src/charts/LegendEntry.js +120 -121
  12. package/src/charts/LegendEntry.scss +27 -31
  13. package/src/charts/PieLabel.js +71 -71
  14. package/src/charts/axis/NumericAxis.js +347 -347
  15. package/src/charts/axis/Stack.js +55 -55
  16. package/src/charts/helpers/PointReducer.js +43 -43
  17. package/src/charts/helpers/SnapPointFinder.js +69 -69
  18. package/src/data/Binding.spec.js +69 -69
  19. package/src/data/Expression.js +221 -221
  20. package/src/data/Expression.spec.js +184 -184
  21. package/src/data/StringTemplate.spec.js +105 -105
  22. package/src/data/getAccessor.spec.js +11 -11
  23. package/src/index.scss +6 -6
  24. package/src/svg/Text.d.ts +40 -40
  25. package/src/ui/Culture.d.ts +55 -55
  26. package/src/ui/Culture.js +139 -139
  27. package/src/ui/FocusManager.js +171 -171
  28. package/src/ui/Instance.d.ts +72 -72
  29. package/src/ui/VDOM.d.ts +12 -12
  30. package/src/ui/app/startAppLoop.js +58 -58
  31. package/src/ui/index.d.ts +42 -42
  32. package/src/ui/layout/LabelsTopLayout.js +134 -134
  33. package/src/util/Console.d.ts +4 -4
  34. package/src/util/index.d.ts +51 -51
  35. package/src/util/index.js +54 -54
  36. package/src/util/isValidIdentifierName.d.ts +1 -1
  37. package/src/util/isValidIdentifierName.js +5 -5
  38. package/src/util/isValidIdentifierName.spec.js +33 -33
  39. package/src/util/scss/add-rules.scss +38 -38
  40. package/src/widgets/CxCredit.scss +37 -37
  41. package/src/widgets/HighlightedSearchText.js +36 -36
  42. package/src/widgets/HighlightedSearchText.scss +18 -18
  43. package/src/widgets/List.scss +91 -91
  44. package/src/widgets/drag-drop/DropZone.js +214 -214
  45. package/src/widgets/form/Calendar.scss +196 -196
  46. package/src/widgets/form/ColorField.js +397 -397
  47. package/src/widgets/form/ColorPicker.scss +283 -283
  48. package/src/widgets/form/DateTimeField.js +573 -573
  49. package/src/widgets/form/LookupField.d.ts +179 -179
  50. package/src/widgets/form/MonthField.js +516 -516
  51. package/src/widgets/form/MonthPicker.scss +118 -118
  52. package/src/widgets/form/NumberField.js +459 -459
  53. package/src/widgets/form/NumberField.scss +61 -61
  54. package/src/widgets/form/Select.scss +99 -99
  55. package/src/widgets/form/Slider.scss +118 -118
  56. package/src/widgets/form/Switch.scss +140 -140
  57. package/src/widgets/form/TextArea.scss +43 -43
  58. package/src/widgets/form/TextField.js +290 -290
  59. package/src/widgets/form/TextField.scss +55 -55
  60. package/src/widgets/form/UploadButton.d.ts +34 -34
  61. package/src/widgets/form/variables.scss +353 -353
  62. package/src/widgets/grid/TreeNode.scss +88 -88
  63. package/src/widgets/grid/variables.scss +88 -88
  64. package/src/widgets/nav/Menu.scss +74 -74
  65. package/src/widgets/overlay/Dropdown.js +612 -612
  66. package/src/widgets/overlay/FlyweightTooltipTracker.js +39 -39
  67. package/src/widgets/overlay/Tooltip.js +300 -300
  68. package/src/widgets/overlay/Window.js +196 -196
  69. package/src/widgets/overlay/captureMouse.js +124 -124
  70. package/src/widgets/overlay/variables.scss +83 -83
  71. package/src/widgets/variables.scss +144 -144
package/dist/charts.css CHANGED
@@ -80,27 +80,30 @@
80
80
  }
81
81
 
82
82
  .cxb-legend {
83
- text-align: center;
83
+ display: flex;
84
+ justify-content: center;
85
+ align-items: flex-start;
86
+ flex-wrap: wrap;
87
+ gap: 5px 10px;
88
+ }
89
+
90
+ .cxb-legend.cxs-vertical {
91
+ flex-direction: column;
84
92
  }
85
93
 
86
94
  .cxe-legend-entry {
87
- display: inline-block;
88
- padding: 5px 5px 5px 30px;
95
+ display: flex;
96
+ align-items: center;
97
+ padding: 5px;
98
+ gap: 5px;
89
99
  font-size: smaller;
90
100
  position: relative;
91
- margin: 5px;
92
101
  box-sizing: border-box;
93
102
  cursor: pointer;
94
103
  }
95
- .cxb-legend.cxs-vertical .cxe-legend-entry {
96
- display: block;
97
- text-align: left;
98
- }
99
104
 
100
105
  .cxe-legend-svg {
101
- position: absolute;
102
- left: 5px;
103
- top: 50%;
106
+ flex-shrink: 0;
104
107
  }
105
108
 
106
109
  .cxe-legend-shape {
@@ -108,17 +111,17 @@
108
111
  }
109
112
 
110
113
  .cxb-legendentry {
111
- display: inline-block;
112
- padding: 5px 0 5px 30px;
114
+ display: inline-flex;
115
+ align-items: center;
116
+ padding: 5px;
117
+ gap: 5px;
113
118
  position: relative;
114
119
  box-sizing: border-box;
115
120
  cursor: pointer;
116
121
  }
117
122
 
118
123
  .cxe-legendentry-svg {
119
- position: absolute;
120
- left: 5px;
121
- top: 50%;
124
+ flex-shrink: 0;
122
125
  }
123
126
 
124
127
  .cxe-legendentry-shape {
package/dist/charts.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  shallowEquals,
18
18
  debug,
19
19
  isDefined,
20
- stopPropagation,
20
+ isNonEmptyArray,
21
21
  closest,
22
22
  getTopLevelBoundingClientRect,
23
23
  Format,
@@ -37,31 +37,34 @@ import {
37
37
  } from "cx/widgets";
38
38
 
39
39
  function _extends() {
40
- return (
41
- (_extends = Object.assign
42
- ? Object.assign.bind()
43
- : function (n) {
44
- for (var e = 1; e < arguments.length; e++) {
45
- var t = arguments[e];
46
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
40
+ _extends = Object.assign
41
+ ? Object.assign.bind()
42
+ : function (target) {
43
+ for (var i = 1; i < arguments.length; i++) {
44
+ var source = arguments[i];
45
+ for (var key in source) {
46
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
47
+ target[key] = source[key];
48
+ }
47
49
  }
48
- return n;
49
- }),
50
- _extends.apply(null, arguments)
51
- );
50
+ }
51
+ return target;
52
+ };
53
+ return _extends.apply(this, arguments);
52
54
  }
53
- function _inheritsLoose(t, o) {
54
- (t.prototype = Object.create(o.prototype)), (t.prototype.constructor = t), _setPrototypeOf(t, o);
55
+ function _inheritsLoose(subClass, superClass) {
56
+ subClass.prototype = Object.create(superClass.prototype);
57
+ subClass.prototype.constructor = subClass;
58
+ _setPrototypeOf(subClass, superClass);
55
59
  }
56
- function _setPrototypeOf(t, e) {
57
- return (
58
- (_setPrototypeOf = Object.setPrototypeOf
59
- ? Object.setPrototypeOf.bind()
60
- : function (t, e) {
61
- return (t.__proto__ = e), t;
62
- }),
63
- _setPrototypeOf(t, e)
64
- );
60
+ function _setPrototypeOf(o, p) {
61
+ _setPrototypeOf = Object.setPrototypeOf
62
+ ? Object.setPrototypeOf.bind()
63
+ : function _setPrototypeOf(o, p) {
64
+ o.__proto__ = p;
65
+ return o;
66
+ };
67
+ return _setPrototypeOf(o, p);
65
68
  }
66
69
 
67
70
  var Rect = /*#__PURE__*/ (function () {
@@ -1654,13 +1657,6 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1654
1657
  }
1655
1658
  _inheritsLoose(Legend, _HtmlElement);
1656
1659
  var _proto = Legend.prototype;
1657
- _proto.prepareData = function prepareData(context, instance) {
1658
- var data = instance.data;
1659
- data.stateMods = Object.assign(data.stateMods || {}, {
1660
- vertical: this.vertical,
1661
- });
1662
- _HtmlElement.prototype.prepareData.call(this, context, instance);
1663
- };
1664
1660
  _proto.declareData = function declareData() {
1665
1661
  var _HtmlElement$prototyp;
1666
1662
  (_HtmlElement$prototyp = _HtmlElement.prototype.declareData).call.apply(
@@ -1668,15 +1664,34 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1668
1664
  [this].concat(Array.prototype.slice.call(arguments), [
1669
1665
  {
1670
1666
  shape: undefined,
1667
+ entryStyle: {
1668
+ structured: true,
1669
+ },
1670
+ entryClass: {
1671
+ structured: true,
1672
+ },
1671
1673
  },
1672
1674
  ]),
1673
1675
  );
1674
1676
  };
1677
+ _proto.init = function init() {
1678
+ this.entryStyle = parseStyle(this.entryStyle);
1679
+ _HtmlElement.prototype.init.call(this);
1680
+ };
1681
+ _proto.prepareData = function prepareData(context, instance) {
1682
+ var data = instance.data;
1683
+ data.stateMods = Object.assign(data.stateMods || {}, {
1684
+ vertical: this.vertical,
1685
+ });
1686
+ _HtmlElement.prototype.prepareData.call(this, context, instance);
1687
+ };
1675
1688
  _proto.isValidHtmlAttribute = function isValidHtmlAttribute(attrName) {
1676
1689
  switch (attrName) {
1677
1690
  case "shapeSize":
1678
1691
  case "svgSize":
1679
1692
  case "shape":
1693
+ case "entryStyle":
1694
+ case "entryClass":
1680
1695
  return false;
1681
1696
  default:
1682
1697
  return _HtmlElement.prototype.isValidHtmlAttribute.call(this, attrName);
@@ -1708,42 +1723,48 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1708
1723
  var CSS = this.CSS;
1709
1724
  var entries = instance.legends[this.name] && instance.legends[this.name].entries,
1710
1725
  list;
1711
- if (isArray(entries) && entries.length > 0) {
1712
- list = /*#__PURE__*/ jsx(
1713
- "div",
1714
- {
1715
- className: CSS.element(this.baseClass, "wrap"),
1716
- children: entries.map(function (e, i) {
1717
- return withHoverSync(i, e.hoverSync, e.hoverChannel, e.hoverId, function (_ref) {
1718
- var onMouseMove = _ref.onMouseMove,
1719
- onMouseLeave = _ref.onMouseLeave,
1720
- hover = _ref.hover;
1721
- return /*#__PURE__*/ jsxs(
1722
- "div",
1723
- {
1724
- className: CSS.element(_this.baseClass, "entry", {
1725
- "color-root": true,
1726
- hover: hover,
1727
- disabled: e.disabled,
1728
- selected: e.selected,
1729
- }),
1730
- onClick: e.onClick,
1731
- onMouseMove: onMouseMove,
1732
- onMouseLeave: onMouseLeave,
1733
- children: [_this.renderShape(e, instance.data.shape), e.name],
1734
- },
1735
- i,
1736
- );
1737
- });
1738
- }),
1739
- },
1740
- "wrap",
1741
- );
1726
+ var _instance$data = instance.data,
1727
+ entryClass = _instance$data.entryClass,
1728
+ entryStyle = _instance$data.entryStyle,
1729
+ shape = _instance$data.shape;
1730
+ if (isNonEmptyArray(entries)) {
1731
+ list = entries.map(function (e, i) {
1732
+ return withHoverSync(i, e.hoverSync, e.hoverChannel, e.hoverId, function (_ref) {
1733
+ var onMouseMove = _ref.onMouseMove,
1734
+ onMouseLeave = _ref.onMouseLeave,
1735
+ hover = _ref.hover;
1736
+ return /*#__PURE__*/ jsxs(
1737
+ "div",
1738
+ {
1739
+ className: CSS.expand(
1740
+ CSS.element(_this.baseClass, "entry", {
1741
+ "color-root": true,
1742
+ hover: hover,
1743
+ disabled: e.disabled,
1744
+ selected: e.selected,
1745
+ }),
1746
+ entryClass,
1747
+ ),
1748
+ style: entryStyle,
1749
+ onClick: e.onClick,
1750
+ onMouseMove: onMouseMove,
1751
+ onMouseLeave: onMouseLeave,
1752
+ children: [
1753
+ _this.renderShape(e, shape),
1754
+ /*#__PURE__*/ jsx("div", {
1755
+ children: e.name,
1756
+ }),
1757
+ ],
1758
+ },
1759
+ i,
1760
+ );
1761
+ });
1762
+ });
1742
1763
  }
1743
1764
  return [list, _HtmlElement.prototype.renderChildren.call(this, context, instance)];
1744
1765
  };
1745
1766
  _proto.renderShape = function renderShape(entry, legendEntriesShape) {
1746
- var _this$CSS$element;
1767
+ var _this$CSS$element, _style$fill, _style$stroke;
1747
1768
  var className = this.CSS.element(
1748
1769
  this.baseClass,
1749
1770
  "shape",
@@ -1753,15 +1774,19 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1753
1774
  _this$CSS$element),
1754
1775
  );
1755
1776
  var shape = getShape(legendEntriesShape || entry.shape || "square");
1777
+
1778
+ // if the entry has a custom fill or stroke set, use it for both values
1779
+ var style = _extends({}, entry.style);
1780
+ style.fill = (_style$fill = style.fill) != null ? _style$fill : style.stroke;
1781
+ style.stroke = (_style$stroke = style.stroke) != null ? _style$stroke : style.fill;
1756
1782
  return /*#__PURE__*/ jsx("svg", {
1757
1783
  className: this.CSS.element(this.baseClass, "svg"),
1758
1784
  style: {
1759
1785
  width: this.svgSize + "px",
1760
1786
  height: this.svgSize + "px",
1761
- marginTop: -this.svgSize / 2 + "px",
1762
1787
  },
1763
1788
  children: shape(this.svgSize / 2, this.svgSize / 2, entry.shapeSize || this.shapeSize, {
1764
- style: entry.style,
1789
+ style: style,
1765
1790
  className: className,
1766
1791
  }),
1767
1792
  });
@@ -1799,21 +1824,21 @@ Legend.Scope = /*#__PURE__*/ (function (_PureContainer) {
1799
1824
  })(PureContainer);
1800
1825
  var LegendScope = Legend.Scope;
1801
1826
 
1802
- var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1827
+ var LegendEntry = /*#__PURE__*/ (function (_Container) {
1803
1828
  function LegendEntry() {
1804
- return _HtmlElement.apply(this, arguments) || this;
1829
+ return _Container.apply(this, arguments) || this;
1805
1830
  }
1806
- _inheritsLoose(LegendEntry, _HtmlElement);
1831
+ _inheritsLoose(LegendEntry, _Container);
1807
1832
  var _proto = LegendEntry.prototype;
1808
1833
  _proto.init = function init() {
1809
1834
  this.selection = Selection.create(this.selection);
1810
- _HtmlElement.prototype.init.call(this);
1835
+ _Container.prototype.init.call(this);
1811
1836
  };
1812
1837
  _proto.declareData = function declareData() {
1813
- var _HtmlElement$prototyp;
1838
+ var _Container$prototype$;
1814
1839
  var selection = this.selection.configureWidget(this);
1815
- (_HtmlElement$prototyp = _HtmlElement.prototype.declareData).call.apply(
1816
- _HtmlElement$prototyp,
1840
+ (_Container$prototype$ = _Container.prototype.declareData).call.apply(
1841
+ _Container$prototype$,
1817
1842
  [this].concat(Array.prototype.slice.call(arguments), [
1818
1843
  selection,
1819
1844
  {
@@ -1827,6 +1852,7 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1827
1852
  size: undefined,
1828
1853
  rx: undefined,
1829
1854
  ry: undefined,
1855
+ text: undefined,
1830
1856
  },
1831
1857
  ]),
1832
1858
  );
@@ -1834,13 +1860,13 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1834
1860
  _proto.prepareData = function prepareData(context, instance) {
1835
1861
  var data = instance.data;
1836
1862
  if (data.name && !data.colorName) data.colorName = data.name;
1837
- _HtmlElement.prototype.prepareData.call(this, context, instance);
1863
+ _Container.prototype.prepareData.call(this, context, instance);
1838
1864
  };
1839
1865
  _proto.explore = function explore(context, instance) {
1840
1866
  var data = instance.data;
1841
1867
  instance.colorMap = data.colorMap && context.getColorMap && context.getColorMap(data.colorMap);
1842
1868
  if (instance.colorMap && data.colorName) instance.colorMap.acknowledge(data.colorName);
1843
- _HtmlElement.prototype.explore.call(this, context, instance);
1869
+ _Container.prototype.explore.call(this, context, instance);
1844
1870
  };
1845
1871
  _proto.prepare = function prepare(context, instance) {
1846
1872
  var data = instance.data,
@@ -1850,23 +1876,6 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1850
1876
  if (instance.cache("colorIndex", data.colorIndex)) instance.markShouldUpdate(context);
1851
1877
  }
1852
1878
  };
1853
- _proto.attachProps = function attachProps(context, instance, props) {
1854
- var _this = this;
1855
- var shape = this.renderShape(instance);
1856
- props.children = [shape, props.children];
1857
- props.onMouseDown = stopPropagation;
1858
- props.onClick = function (e) {
1859
- _this.handleClick(e, instance);
1860
- };
1861
- delete props.active;
1862
- delete props.selection;
1863
- delete props.colorMap;
1864
- delete props.colorIndex;
1865
- delete props.shape;
1866
- delete props.name;
1867
- delete props.selected;
1868
- delete props.svgSize;
1869
- };
1870
1879
  _proto.handleClick = function handleClick(e, instance) {
1871
1880
  if (this.onClick && instance.invoke("onClick", e, instance) === false) return;
1872
1881
  e.stopPropagation();
@@ -1874,8 +1883,27 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1874
1883
  if (any || this.legendAction == "toggle") if (instance.set("active", !instance.data.active)) return;
1875
1884
  if ((any || this.legendAction == "select") && !this.selection.isDummy) this.selection.selectInstance(instance);
1876
1885
  };
1886
+ _proto.render = function render(context, instance, key) {
1887
+ var data = instance.data;
1888
+ var content = !isUndefined(this.text) ? data.text : this.renderChildren(context, instance);
1889
+ return /*#__PURE__*/ jsxs(
1890
+ "div",
1891
+ {
1892
+ className: data.classNames,
1893
+ style: data.style,
1894
+ children: [
1895
+ this.renderShape(instance),
1896
+ content != null &&
1897
+ /*#__PURE__*/ jsx("div", {
1898
+ children: content,
1899
+ }),
1900
+ ],
1901
+ },
1902
+ key,
1903
+ );
1904
+ };
1877
1905
  _proto.renderShape = function renderShape(instance) {
1878
- var _this$CSS$element;
1906
+ var _this$CSS$element, _style$fill, _style$stroke;
1879
1907
  var entry = instance.data;
1880
1908
  var className = this.CSS.element(
1881
1909
  this.baseClass,
@@ -1889,6 +1917,11 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1889
1917
  _this$CSS$element),
1890
1918
  );
1891
1919
  var shape = getShape(entry.shape || "square");
1920
+
1921
+ // if the entry has a custom fill or stroke set, use it for both values
1922
+ var style = _extends({}, entry.style);
1923
+ style.fill = (_style$fill = style.fill) != null ? _style$fill : style.stroke;
1924
+ style.stroke = (_style$stroke = style.stroke) != null ? _style$stroke : style.fill;
1892
1925
  return /*#__PURE__*/ jsx(
1893
1926
  "svg",
1894
1927
  {
@@ -1896,10 +1929,9 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1896
1929
  style: {
1897
1930
  width: this.svgSize + "px",
1898
1931
  height: this.svgSize + "px",
1899
- marginTop: -this.svgSize / 2 + "px",
1900
1932
  },
1901
1933
  children: shape(this.svgSize / 2, this.svgSize / 2, entry.size, {
1902
- style: entry.style,
1934
+ style: style,
1903
1935
  className: className,
1904
1936
  rx: entry.rx,
1905
1937
  ry: entry.ry,
@@ -1909,12 +1941,13 @@ var LegendEntry = /*#__PURE__*/ (function (_HtmlElement) {
1909
1941
  );
1910
1942
  };
1911
1943
  return LegendEntry;
1912
- })(HtmlElement);
1944
+ })(Container);
1913
1945
  LegendEntry.prototype.baseClass = "legendentry";
1914
1946
  LegendEntry.prototype.shape = "square";
1915
1947
  LegendEntry.prototype.legendAction = "auto";
1916
1948
  LegendEntry.prototype.size = 18;
1917
1949
  LegendEntry.prototype.svgSize = 20;
1950
+ LegendEntry.prototype.styled = true;
1918
1951
  Widget.alias("legend-entry", LegendEntry);
1919
1952
 
1920
1953
  var ColorMap = /*#__PURE__*/ (function (_Widget) {
package/dist/data.js CHANGED
@@ -118,23 +118,6 @@ function _construct(t, e, r) {
118
118
  var p = new (t.bind.apply(t, o))();
119
119
  return p;
120
120
  }
121
- function _extends() {
122
- return (
123
- (_extends = Object.assign
124
- ? Object.assign.bind()
125
- : function (n) {
126
- for (var e = 1; e < arguments.length; e++) {
127
- var t = arguments[e];
128
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
129
- }
130
- return n;
131
- }),
132
- _extends.apply(null, arguments)
133
- );
134
- }
135
- function _inheritsLoose(t, o) {
136
- (t.prototype = Object.create(o.prototype)), (t.prototype.constructor = t), _setPrototypeOf(t, o);
137
- }
138
121
  function _isNativeReflectConstruct() {
139
122
  try {
140
123
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
@@ -143,15 +126,35 @@ function _isNativeReflectConstruct() {
143
126
  return !!t;
144
127
  })();
145
128
  }
146
- function _setPrototypeOf(t, e) {
147
- return (
148
- (_setPrototypeOf = Object.setPrototypeOf
149
- ? Object.setPrototypeOf.bind()
150
- : function (t, e) {
151
- return (t.__proto__ = e), t;
152
- }),
153
- _setPrototypeOf(t, e)
154
- );
129
+ function _extends() {
130
+ _extends = Object.assign
131
+ ? Object.assign.bind()
132
+ : function (target) {
133
+ for (var i = 1; i < arguments.length; i++) {
134
+ var source = arguments[i];
135
+ for (var key in source) {
136
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
137
+ target[key] = source[key];
138
+ }
139
+ }
140
+ }
141
+ return target;
142
+ };
143
+ return _extends.apply(this, arguments);
144
+ }
145
+ function _inheritsLoose(subClass, superClass) {
146
+ subClass.prototype = Object.create(superClass.prototype);
147
+ subClass.prototype.constructor = subClass;
148
+ _setPrototypeOf(subClass, superClass);
149
+ }
150
+ function _setPrototypeOf(o, p) {
151
+ _setPrototypeOf = Object.setPrototypeOf
152
+ ? Object.setPrototypeOf.bind()
153
+ : function _setPrototypeOf(o, p) {
154
+ o.__proto__ = p;
155
+ return o;
156
+ };
157
+ return _setPrototypeOf(o, p);
155
158
  }
156
159
 
157
160
  function computable() {