@desynova-digital/player 3.13.17 → 3.13.18

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 (57) hide show
  1. package/Manager.js +9 -10
  2. package/actions/player.js +15 -30
  3. package/actions/video.js +25 -50
  4. package/colors.js +1 -2
  5. package/components/AudioMeter.js +12 -14
  6. package/components/BigPlayButton.js +12 -14
  7. package/components/ImageViewer.js +13 -15
  8. package/components/MarkerBar.js +12 -14
  9. package/components/Player.js +14 -16
  10. package/components/PlayerHeader.js +12 -14
  11. package/components/Playlist.js +15 -14
  12. package/components/PointersBar.js +14 -16
  13. package/components/PosterImage.js +1 -2
  14. package/components/Shortcut.js +151 -120
  15. package/components/Slider.js +12 -14
  16. package/components/TagsBar.js +12 -14
  17. package/components/Video.js +14 -17
  18. package/components/control-bar/AudioTracksMenuButton.js +11 -13
  19. package/components/control-bar/CameraButton.js +12 -14
  20. package/components/control-bar/CommentsButton.js +12 -14
  21. package/components/control-bar/ControlBar.js +12 -14
  22. package/components/control-bar/EditorControlMenuButton.js +12 -14
  23. package/components/control-bar/ForwardControl.js +1 -2
  24. package/components/control-bar/ForwardReplayControl.js +13 -15
  25. package/components/control-bar/FullscreenToggle.js +12 -14
  26. package/components/control-bar/PlayToggle.js +12 -14
  27. package/components/control-bar/ReplayControl.js +1 -2
  28. package/components/control-bar/SubtitleLanguagesMenuButton.js +11 -13
  29. package/components/control-bar/SubtitleMovementMenu.js +12 -14
  30. package/components/control-bar/VolumeMenuButton.js +12 -14
  31. package/components/control-bar/ZoomMenuButton.js +12 -14
  32. package/components/marking-controls/MarkInControl.js +12 -14
  33. package/components/marking-controls/MarkOutControl.js +12 -14
  34. package/components/marking-controls/MarkingAddButton.js +12 -14
  35. package/components/marking-controls/MarkingDeleteButton.js +12 -14
  36. package/components/marking-controls/MarkingPreview.js +12 -14
  37. package/components/progress-bar/AudioWaveform.js +12 -14
  38. package/components/progress-bar/MouseTimeDisplay.js +1 -2
  39. package/components/progress-bar/ProgressControl.js +12 -14
  40. package/components/progress-bar/SeekBar.js +12 -14
  41. package/components/progress-bar/Timeline.js +12 -14
  42. package/components/settings-menu-control/PlaybackRateControl.js +12 -14
  43. package/components/settings-menu-control/SafeAreaControl.js +12 -14
  44. package/components/time-controls/CurrentTimeDisplay.js +1 -2
  45. package/components/time-controls/DurationDisplay.js +1 -2
  46. package/components/volume-control/VolumeBar.js +12 -14
  47. package/components/volume-control/VolumeLevel.js +1 -2
  48. package/components/zoom-control/ZoomBar.js +12 -14
  49. package/components/zoom-control/ZoomLevel.js +1 -2
  50. package/index.js +3 -3
  51. package/package.json +1 -1
  52. package/reducers/index.js +2 -4
  53. package/reducers/operation.js +6 -7
  54. package/reducers/player.js +6 -8
  55. package/utils/browser.js +4 -8
  56. package/utils/fullscreen.js +4 -5
  57. package/utils/index.js +6 -7
@@ -9,7 +9,7 @@ var _propTypes = require("prop-types");
9
9
  var _lodash = require("lodash");
10
10
  var _hotkeysJs = _interopRequireDefault(require("hotkeys-js"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
13
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
14
14
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
15
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -19,16 +19,16 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
19
19
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
20
20
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
21
21
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
22
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
23
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
22
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
25
23
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
25
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
30
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
31
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
30
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
31
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
32
  var propTypes = {
33
33
  clickable: _propTypes.PropTypes.bool,
34
34
  dblclickable: _propTypes.PropTypes.bool,
@@ -49,13 +49,12 @@ var defaultProps = {
49
49
  player: {},
50
50
  shortcuts: []
51
51
  };
52
- var Shortcut = /*#__PURE__*/function (_Component) {
52
+ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
53
53
  _inherits(Shortcut, _Component);
54
- var _super = _createSuper(Shortcut);
55
54
  function Shortcut(props, context) {
56
55
  var _this;
57
56
  _classCallCheck(this, Shortcut);
58
- _this = _super.call(this, props, context);
57
+ _this = _callSuper(this, Shortcut, [props, context]);
59
58
  _defineProperty(_assertThisInitialized(_this), "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
60
59
  _this.handleKeyMovement(keyCode);
61
60
  }));
@@ -66,13 +65,23 @@ var Shortcut = /*#__PURE__*/function (_Component) {
66
65
  *common function to handle the key functionalies. eg-> W Key and Q key functionalities
67
66
  */
68
67
  _defineProperty(_assertThisInitialized(_this), "handleKeyMovement", function (keyCode) {
69
- var currentTimeRequired = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
68
+ var _this$props$markers$, _this$props$playerSel, _this$props$player, _this$props$player2;
69
+ var frameRateNumber = parseInt(_this.props.frameRate);
70
+ var timeAfterOverlap;
70
71
  var keyPressHandle = _this.defaultShortcuts.find(function (shortcut) {
71
72
  return shortcut.keyCode === keyCode;
72
73
  });
74
+ var ans = _this.findAdjacentMarkers((_this$props$markers$ = _this.props.markers[0]) === null || _this$props$markers$ === void 0 ? void 0 : _this$props$markers$.values, (_this$props$playerSel = _this.props.playerSelectedMarker) === null || _this$props$playerSel === void 0 ? void 0 : _this$props$playerSel.data);
75
+ if (((_this$props$player = _this.props.player) === null || _this$props$player === void 0 ? void 0 : _this$props$player.currentTime) >= (ans === null || ans === void 0 ? void 0 : ans.in_time_forward)) {
76
+ timeAfterOverlap = ans.in_time_forward - 1 / frameRateNumber;
77
+ }
78
+ if (((_this$props$player2 = _this.props.player) === null || _this$props$player2 === void 0 ? void 0 : _this$props$player2.currentTime) <= (ans === null || ans === void 0 ? void 0 : ans.out_time_behind)) {
79
+ timeAfterOverlap = ans.out_time_behind + 1 / frameRateNumber;
80
+ }
73
81
  if (keyPressHandle) {
74
- var currentTime = currentTimeRequired ? _this.props.player.currentTime : undefined;
75
- keyPressHandle.handle(_this.props.player, _this.props.actions, currentTime);
82
+ keyPressHandle.handle(_this.props.player, _this.props.actions, {
83
+ timeAfterOverlap: timeAfterOverlap
84
+ });
76
85
  }
77
86
  });
78
87
  /**
@@ -85,42 +94,37 @@ var Shortcut = /*#__PURE__*/function (_Component) {
85
94
  * Once we leave the keyCombo isCalled variable is set to false. This ensures that on the next combo press we will again execute Q/W key combo first.
86
95
  */
87
96
  _defineProperty(_assertThisInitialized(_this), "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
88
- console.log("".concat(keyParameter, " arrow key pressed"));
89
- if (!_this.state.isCalled) {
97
+ if (!_this.isCalled) {
90
98
  handleKeyMovement();
91
99
  }
92
100
  if (event.type === 'keydown') {
93
101
  debounceKeyFunc();
94
- _this.setState({
95
- isCalled: true
96
- });
102
+ _this.isCalled = true;
97
103
  }
98
104
  if (event.type === 'keyup') {
99
- _this.setState({
100
- isCalled: false
101
- });
105
+ _this.isCalled = false;
102
106
  }
103
107
  });
104
108
  _defineProperty(_assertThisInitialized(_this), "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
105
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87, false), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Right');
109
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Right');
106
110
  }, 0, {
107
111
  leading: true,
108
112
  trailing: true
109
113
  }));
110
114
  _defineProperty(_assertThisInitialized(_this), "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
111
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87, false), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Left');
115
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Left');
112
116
  }, 0, {
113
117
  leading: true,
114
118
  trailing: true
115
119
  }));
116
120
  _defineProperty(_assertThisInitialized(_this), "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
117
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81, false), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Right');
121
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Right');
118
122
  }, 0, {
119
123
  leading: true,
120
124
  trailing: true
121
125
  }));
122
126
  _defineProperty(_assertThisInitialized(_this), "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
123
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81, false), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Left');
127
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Left');
124
128
  }, 0, {
125
129
  leading: true,
126
130
  trailing: true
@@ -247,39 +251,47 @@ var Shortcut = /*#__PURE__*/function (_Component) {
247
251
  if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
248
252
  return;
249
253
  }
250
- if (playerType !== 'panel') {
251
- var createPoint = true;
252
- if (markers && markers.length && markers[0].values && markers[0].values.length) {
253
- var markerArr = markers[0].values;
254
- if (Object.keys(player.selectedMarker).length) {
255
- markerArr = markerArr.filter(function (marker) {
256
- return marker.start_time !== player.selectedMarker.leftMarker && marker.end_time !== player.selectedMarker.rightMarker;
254
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
255
+ args[_key - 2] = arguments[_key];
256
+ }
257
+ var isOverLapTime = args[0].timeAfterOverlap;
258
+ if (isOverLapTime) {
259
+ onAddMarker(args[0].timeAfterOverlap, playerSelectedMarker.rightMarker, 'update');
260
+ } else {
261
+ if (playerType !== 'panel') {
262
+ var createPoint = true;
263
+ if (markers && markers.length && markers[0].values && markers[0].values.length) {
264
+ var markerArr = markers[0].values;
265
+ if (Object.keys(player.selectedMarker).length) {
266
+ markerArr = markerArr.filter(function (marker) {
267
+ return marker.start_time !== player.selectedMarker.leftMarker && marker.end_time !== player.selectedMarker.rightMarker;
268
+ });
269
+ }
270
+ markerArr.filter(function (marker) {
271
+ if (player.currentTime >= marker.start_time && player.currentTime <= marker.end_time || playerSelectedMarker.leftMarker > -1 && player.currentTime > marker.start_time && playerSelectedMarker.leftMarker < marker.start_time || playerSelectedMarker.leftMarker > -1 && player.currentTime < marker.start_time && playerSelectedMarker.leftMarker > marker.end_time) {
272
+ createPoint = false;
273
+ }
257
274
  });
258
275
  }
259
- markerArr.filter(function (marker) {
260
- if (player.currentTime >= marker.start_time && player.currentTime <= marker.end_time || playerSelectedMarker.leftMarker > -1 && player.currentTime > marker.start_time && playerSelectedMarker.leftMarker < marker.start_time || playerSelectedMarker.leftMarker > -1 && player.currentTime < marker.start_time && playerSelectedMarker.leftMarker > marker.end_time) {
261
- createPoint = false;
262
- }
263
- });
264
- }
265
- if (!createPoint && playerSelectedMarker.markerType === 'update' && player.currentTime > player.selectedMarker.leftMarker && player.currentTime < player.selectedMarker.rightMarker) {
266
- createPoint = true;
267
- }
268
- if (createPoint) {
269
- if (playerSelectedMarker.rightMarker < 0 || playerSelectedMarker.rightMarker > -1 && player.currentTime < playerSelectedMarker.rightMarker) {
270
- // actions.handleMarkerPointChange(
271
- // player.markerType !== 'update' ? 'add' : 'update',
272
- // 'left',
273
- // player.currentTime
274
- // );
275
- var data = {
276
- markerType: playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length ? 'update' : 'add',
277
- markerPos: 'left',
278
- currentTime: player.currentTime
279
- };
280
- onAddMarker(player.currentTime, -1, '', true, data);
281
- if (playerSelectedMarker.leftMarker > -1 && playerSelectedMarker.rightMarker > -1 && (!playerSelectedMarker.markerCreate || playerSelectedMarker.markerType === 'update' || playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length)) {
282
- onAddMarker(player.currentTime, playerSelectedMarker.rightMarker, 'update');
276
+ if (!createPoint && playerSelectedMarker.markerType === 'update' && player.currentTime > player.selectedMarker.leftMarker && player.currentTime < player.selectedMarker.rightMarker) {
277
+ createPoint = true;
278
+ }
279
+ if (createPoint) {
280
+ if (playerSelectedMarker.rightMarker < 0 || playerSelectedMarker.rightMarker > -1 && player.currentTime < playerSelectedMarker.rightMarker) {
281
+ // actions.handleMarkerPointChange(
282
+ // player.markerType !== 'update' ? 'add' : 'update',
283
+ // 'left',
284
+ // player.currentTime
285
+ // );
286
+ var data = {
287
+ markerType: playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length ? 'update' : 'add',
288
+ markerPos: 'left',
289
+ currentTime: player.currentTime
290
+ };
291
+ onAddMarker(player.currentTime, -1, '', true, data);
292
+ if (playerSelectedMarker.leftMarker > -1 && playerSelectedMarker.rightMarker > -1 && (!playerSelectedMarker.markerCreate || playerSelectedMarker.markerType === 'update' || playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length)) {
293
+ onAddMarker(player.currentTime, playerSelectedMarker.rightMarker, 'update');
294
+ }
283
295
  }
284
296
  }
285
297
  }
@@ -300,50 +312,62 @@ var Shortcut = /*#__PURE__*/function (_Component) {
300
312
  if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
301
313
  return;
302
314
  }
303
- var createPoint = true;
304
- if (playerType !== 'panel') {
305
- if (markers && markers.length && markers[0].values && markers[0].values.length) {
306
- var markerArr = markers[0].values;
307
- if (Object.keys(player.selectedMarker).length) {
308
- markerArr = markerArr.filter(function (marker) {
309
- return marker.start_time !== player.selectedMarker.leftMarker && marker.end_time !== player.selectedMarker.rightMarker;
315
+ for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
316
+ args[_key2 - 2] = arguments[_key2];
317
+ }
318
+ var isOverLapTime = args[0].timeAfterOverlap;
319
+ if (isOverLapTime) {
320
+ var data = {
321
+ markerType: playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length ? 'update' : 'add',
322
+ markerPos: 'right',
323
+ currentTime: args[0].timeAfterOverlap
324
+ };
325
+ onAddMarker(playerSelectedMarker.leftMarker, args[0].timeAfterOverlap, 'update', false, data);
326
+ } else {
327
+ var createPoint = true;
328
+ if (playerType !== 'panel') {
329
+ if (markers && markers.length && markers[0].values && markers[0].values.length) {
330
+ var markerArr = markers[0].values;
331
+ if (Object.keys(player.selectedMarker).length) {
332
+ markerArr = markerArr.filter(function (marker) {
333
+ return marker.start_time !== player.selectedMarker.leftMarker && marker.end_time !== player.selectedMarker.rightMarker;
334
+ });
335
+ }
336
+ markerArr.filter(function (marker) {
337
+ if (player.currentTime >= marker.start_time && player.currentTime <= marker.end_time || playerSelectedMarker.leftMarker > -1 && player.currentTime > marker.start_time && playerSelectedMarker.leftMarker < marker.start_time || playerSelectedMarker.leftMarker > -1 && player.currentTime < marker.start_time && playerSelectedMarker.leftMarker > marker.end_time) {
338
+ createPoint = false;
339
+ }
310
340
  });
311
341
  }
312
- markerArr.filter(function (marker) {
313
- if (player.currentTime >= marker.start_time && player.currentTime <= marker.end_time || playerSelectedMarker.leftMarker > -1 && player.currentTime > marker.start_time && playerSelectedMarker.leftMarker < marker.start_time || playerSelectedMarker.leftMarker > -1 && player.currentTime < marker.start_time && playerSelectedMarker.leftMarker > marker.end_time) {
314
- createPoint = false;
342
+ if (!createPoint && playerSelectedMarker.markerType === 'update' && player.currentTime > player.selectedMarker.leftMarker && player.currentTime < player.selectedMarker.rightMarker) {
343
+ createPoint = true;
344
+ }
345
+ if (createPoint && playerSelectedMarker.leftMarker > -1 && player.currentTime > playerSelectedMarker.leftMarker) {
346
+ // actions.handleMarkerPointChange(
347
+ // markerType: player.markerType !== 'update' ? 'add' : 'update',
348
+ // markerPos: 'right',
349
+ // currentTime: player.currentTime
350
+ // );
351
+ var _data = {
352
+ markerType: playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length ? 'update' : 'add',
353
+ markerPos: 'right',
354
+ currentTime: player.currentTime
355
+ };
356
+ if (playerSelectedMarker.leftMarker > -1 && playerSelectedMarker.rightMarker > -1 && (!playerSelectedMarker.markerCreate || playerSelectedMarker.markerType === 'update' || playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length)) {
357
+ onAddMarker(playerSelectedMarker.leftMarker, player.currentTime, 'update', false, _data);
315
358
  }
316
- });
317
- }
318
- if (!createPoint && playerSelectedMarker.markerType === 'update' && player.currentTime > player.selectedMarker.leftMarker && player.currentTime < player.selectedMarker.rightMarker) {
319
- createPoint = true;
320
- }
321
- if (createPoint && playerSelectedMarker.leftMarker > -1 && player.currentTime > playerSelectedMarker.leftMarker) {
322
- // actions.handleMarkerPointChange(
323
- // markerType: player.markerType !== 'update' ? 'add' : 'update',
324
- // markerPos: 'right',
325
- // currentTime: player.currentTime
326
- // );
327
- var data = {
328
- markerType: playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length ? 'update' : 'add',
329
- markerPos: 'right',
330
- currentTime: player.currentTime
331
- };
332
- if (playerSelectedMarker.leftMarker > -1 && playerSelectedMarker.rightMarker > -1 && (!playerSelectedMarker.markerCreate || playerSelectedMarker.markerType === 'update' || playerSelectedMarker.data && Object.keys(playerSelectedMarker.data).length)) {
333
- onAddMarker(playerSelectedMarker.leftMarker, player.currentTime, 'update', false, data);
359
+ //Commented for CN-632.
360
+ // if (player.controlType === 'default') {
361
+ // onMarkerSelect(player.leftMarker, player.currentTime);
362
+ // }
334
363
  }
335
- //Commented for CN-632.
336
- // if (player.controlType === 'default') {
337
- // onMarkerSelect(player.leftMarker, player.currentTime);
338
- // }
339
364
  }
340
- }
341
-
342
- if (playerSelectedMarker.leftMarker > -1 && player.currentTime > -1 && playerSelectedMarker.markerCreate && createPoint && player.currentTime > playerSelectedMarker.leftMarker) {
343
- // actions.handleMarkerPointChange('create');
344
- onAddMarker(playerSelectedMarker.leftMarker, player.currentTime, '', false, {
345
- markerType: 'create'
346
- });
365
+ if (playerSelectedMarker.leftMarker > -1 && player.currentTime > -1 && playerSelectedMarker.markerCreate && createPoint && player.currentTime > playerSelectedMarker.leftMarker) {
366
+ // actions.handleMarkerPointChange('create');
367
+ onAddMarker(playerSelectedMarker.leftMarker, player.currentTime, '', false, {
368
+ markerType: 'create'
369
+ });
370
+ }
347
371
  }
348
372
  }
349
373
  }, {
@@ -442,14 +466,9 @@ var Shortcut = /*#__PURE__*/function (_Component) {
442
466
  handle: function handle(player, actions, frameRate, e, markers) {
443
467
  var _this$props3 = _this.props,
444
468
  leftMarker = _this$props3.playerSelectedMarker.leftMarker,
445
- _this$props3$playerSe = _this$props3.playerSelectedMarker,
446
- _this$props3$playerSe2 = _this$props3$playerSe === void 0 ? {} : _this$props3$playerSe,
447
- _this$props3$playerSe3 = _this$props3$playerSe2.data,
448
- _this$props3$playerSe4 = _this$props3$playerSe3 === void 0 ? {} : _this$props3$playerSe3,
449
- uniqueKey = _this$props3$playerSe4.uniqueKey,
450
469
  onTagClick = _this$props3.onTagClick;
451
470
  var newIndex = markers.findIndex(function (item) {
452
- return item.uniqueKey === uniqueKey;
471
+ return item.in_time === leftMarker;
453
472
  }) - 1;
454
473
  if (leftMarker > -1 && newIndex > -1) {
455
474
  var _markers$newIndex, _markers$newIndex2, _markers$newIndex3;
@@ -464,14 +483,9 @@ var Shortcut = /*#__PURE__*/function (_Component) {
464
483
  handle: function handle(player, actions, frameRate, e, markers) {
465
484
  var _this$props4 = _this.props,
466
485
  leftMarker = _this$props4.playerSelectedMarker.leftMarker,
467
- _this$props4$playerSe = _this$props4.playerSelectedMarker,
468
- _this$props4$playerSe2 = _this$props4$playerSe === void 0 ? {} : _this$props4$playerSe,
469
- _this$props4$playerSe3 = _this$props4$playerSe2.data,
470
- _this$props4$playerSe4 = _this$props4$playerSe3 === void 0 ? {} : _this$props4$playerSe3,
471
- uniqueKey = _this$props4$playerSe4.uniqueKey,
472
486
  onTagClick = _this$props4.onTagClick;
473
487
  var newIndex = markers.findIndex(function (item) {
474
- return item.uniqueKey === uniqueKey;
488
+ return item.in_time === leftMarker;
475
489
  }) + 1;
476
490
  if (leftMarker > -1 && newIndex < markers.length) {
477
491
  var _markers$newIndex4, _markers$newIndex5, _markers$newIndex6;
@@ -481,9 +495,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
481
495
  }
482
496
  }];
483
497
  _this.shortcuts = _toConsumableArray(_this.defaultShortcuts);
484
- _this.state = {
485
- isCalled: false
486
- };
498
+ _this.isCalled = false;
487
499
  _this.mergeShortcuts = _this.mergeShortcuts.bind(_assertThisInitialized(_this));
488
500
  _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
489
501
  _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
@@ -494,19 +506,19 @@ var Shortcut = /*#__PURE__*/function (_Component) {
494
506
  key: "componentDidMount",
495
507
  value: function componentDidMount() {
496
508
  this.mergeShortcuts();
497
- (0, _hotkeysJs["default"])('ctrl+i+left', {
509
+ (0, _hotkeysJs["default"])('ctrl+i+left, ctrl+left+i, i+ctrl+left, i+left+ ctrl, left+ ctrl+ i, left+i+ ctrl', {
498
510
  keyup: true,
499
511
  keydown: true
500
512
  }, this.threeKeyCombo4);
501
- (0, _hotkeysJs["default"])('ctrl+i+right', {
513
+ (0, _hotkeysJs["default"])('ctrl+i+right,ctrl+right+i,i+ctrl+right,i+right+ctrl,right+ctrl+i,right+i+ctrl', {
502
514
  keyup: true,
503
515
  keydown: true
504
516
  }, this.threeKeyCombo3);
505
- (0, _hotkeysJs["default"])('ctrl+o+left', {
517
+ (0, _hotkeysJs["default"])('ctrl+o+left,ctrl+left+o,o+ctrl+left,o+left+ctrl,left+ctrl+o,left+o+ctrl', {
506
518
  keyup: true,
507
519
  keydown: true
508
520
  }, this.threeKeyCombo2);
509
- (0, _hotkeysJs["default"])('ctrl+o+right', {
521
+ (0, _hotkeysJs["default"])('ctrl+o+right,ctrl+right+o,o+ctrl+right,o+right+ctrl,right+ctrl+o,right+o+ctrl', {
510
522
  keyup: true,
511
523
  keydown: true
512
524
  }, this.threeKeyCombo1);
@@ -514,6 +526,26 @@ var Shortcut = /*#__PURE__*/function (_Component) {
514
526
  document.addEventListener('click', this.handleClick);
515
527
  document.addEventListener('dblclick', this.handleDoubleClick);
516
528
  }
529
+ }, {
530
+ key: "findAdjacentMarkers",
531
+ value: function findAdjacentMarkers(markers, selectedMarker) {
532
+ if (markers) {
533
+ var index = markers === null || markers === void 0 ? void 0 : markers.findIndex(function (marker) {
534
+ return marker.in_time === selectedMarker.in_time && marker.out_time === selectedMarker.out_time;
535
+ });
536
+ if (index !== -1) {
537
+ var adjacentMarkerForward = markers[index + 1];
538
+ var adjacentMarkerBehind = markers[index - 1];
539
+ var result = {
540
+ in_time_forward: adjacentMarkerForward ? adjacentMarkerForward.in_time : undefined,
541
+ out_time_behind: adjacentMarkerBehind ? adjacentMarkerBehind.out_time : undefined
542
+ };
543
+ return result;
544
+ }
545
+ } else {
546
+ return undefined;
547
+ }
548
+ }
517
549
  }, {
518
550
  key: "componentDidUpdate",
519
551
  value: function componentDidUpdate(prevProps) {
@@ -533,10 +565,10 @@ var Shortcut = /*#__PURE__*/function (_Component) {
533
565
  }, {
534
566
  key: "componentWillUnmount",
535
567
  value: function componentWillUnmount() {
536
- _hotkeysJs["default"].unbind('ctrl+i+left');
537
- _hotkeysJs["default"].unbind('ctrl+i+right');
538
- _hotkeysJs["default"].unbind('ctrl+o+left');
539
- _hotkeysJs["default"].unbind('ctrl+o+right');
568
+ _hotkeysJs["default"].unbind('ctrl+i+left, ctrl+left+i, i+ctrl+left, i+left+ ctrl, left+ ctrl+ i, left+i+ ctrl');
569
+ _hotkeysJs["default"].unbind('ctrl+i+right,ctrl+right+i,i+ctrl+right,i+right+ctrl,right+ctrl+i,right+i+ctrl');
570
+ _hotkeysJs["default"].unbind('ctrl+o+left,ctrl+left+o,o+ctrl+left,o+left+ctrl,left+ctrl+o,left+o+ctrl');
571
+ _hotkeysJs["default"].unbind('ctrl+o+right,ctrl+right+o,o+ctrl+right,o+right+ctrl,right+ctrl+o,right+o+ctrl');
540
572
  document.removeEventListener('keydown', this.handleKeyPress);
541
573
  document.removeEventListener('click', this.handleClick);
542
574
  document.removeEventListener('dblclick', this.handleDoubleClick);
@@ -755,7 +787,6 @@ var Shortcut = /*#__PURE__*/function (_Component) {
755
787
  }]);
756
788
  return Shortcut;
757
789
  }(_react.Component);
758
- exports["default"] = Shortcut;
759
790
  Shortcut.propTypes = propTypes;
760
791
  Shortcut.defaultProps = defaultProps;
761
792
  Shortcut.displayName = 'Shortcut';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -13,20 +13,20 @@ var _colors = _interopRequireDefault(require("../colors"));
13
13
  var Dom = _interopRequireWildcard(require("../utils/dom"));
14
14
  var _templateObject;
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
18
18
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
19
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
20
20
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
23
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
22
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
23
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
26
24
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
27
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
25
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
29
26
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
27
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
30
30
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
31
31
  var propTypes = {
32
32
  onMouseDown: _propTypes.PropTypes.func,
@@ -65,13 +65,12 @@ var defaultProps = {
65
65
  valuetext: ''
66
66
  };
67
67
  var SliderBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: 2;\n width: 100%;\n height: 100%;\n background: ", ";\n"])), _colors["default"].dark.base);
68
- var Slider = /*#__PURE__*/function (_Component) {
68
+ var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
69
69
  _inherits(Slider, _Component);
70
- var _super = _createSuper(Slider);
71
70
  function Slider(props, context) {
72
71
  var _this;
73
72
  _classCallCheck(this, Slider);
74
- _this = _super.call(this, props, context);
73
+ _this = _callSuper(this, Slider, [props, context]);
75
74
  _this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this));
76
75
  _this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
77
76
  _this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));
@@ -268,7 +267,6 @@ var Slider = /*#__PURE__*/function (_Component) {
268
267
  }]);
269
268
  return Slider;
270
269
  }(_react.Component);
271
- exports["default"] = Slider;
272
270
  Slider.propTypes = propTypes;
273
271
  Slider.defaultProps = defaultProps;
274
272
  Slider.displayName = 'Slider';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -10,20 +10,20 @@ var _propTypes = require("prop-types");
10
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
11
11
  var _templateObject;
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
15
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
16
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
17
17
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
20
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
23
21
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
24
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
23
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
24
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
28
28
  var propTypes = {
29
29
  tagsMarker: _propTypes.PropTypes.instanceOf(Array),
@@ -31,13 +31,12 @@ var propTypes = {
31
31
  actions: _propTypes.PropTypes.instanceOf(Object)
32
32
  };
33
33
  var TagsBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 10px;\n position: absolute;\n bottom: 40px;\n cursor: default;\n .marker {\n position: absolute;\n width: 2px;\n height: 100%;\n background: #00cec6;\n cursor: pointer;\n transition: transform 250ms ease-in-out;\n &:hover {\n transform: scale(2);\n }\n }\n"])));
34
- var TagsBar = /*#__PURE__*/function (_Component) {
34
+ var TagsBar = exports["default"] = /*#__PURE__*/function (_Component) {
35
35
  _inherits(TagsBar, _Component);
36
- var _super = _createSuper(TagsBar);
37
36
  function TagsBar(props) {
38
37
  var _this;
39
38
  _classCallCheck(this, TagsBar);
40
- _this = _super.call(this, props);
39
+ _this = _callSuper(this, TagsBar, [props]);
41
40
  _this.getMarkerPosition = _this.getMarkerPosition.bind(_assertThisInitialized(_this));
42
41
  return _this;
43
42
  }
@@ -78,6 +77,5 @@ var TagsBar = /*#__PURE__*/function (_Component) {
78
77
  }]);
79
78
  return TagsBar;
80
79
  }(_react.Component);
81
- exports["default"] = TagsBar;
82
80
  TagsBar.propTypes = propTypes;
83
81
  TagsBar.displayName = 'TagsBar';