From c97f43da9feeac6bb3217a888e97d55030e17b90 Mon Sep 17 00:00:00 2001 From: Wensheng Yan Date: Sun, 5 Mar 2017 22:42:02 -0500 Subject: [PATCH] add mobile pinch support --- dist/videojs-panorama.v4.js | 51 +++++++++++++++++++++++++++++---- dist/videojs-panorama.v4.min.js | 2 +- dist/videojs-panorama.v5.js | 51 +++++++++++++++++++++++++++++---- dist/videojs-panorama.v5.min.js | 2 +- index.html | 3 +- index_3d.html | 3 +- index_v4.html | 3 +- package.json | 2 +- src/scripts/lib/BaseCanvas.js | 27 +++++++++++++++-- src/scripts/lib/Canvas.js | 10 +++++++ src/scripts/lib/Util.js | 9 +++++- 11 files changed, 141 insertions(+), 22 deletions(-) diff --git a/dist/videojs-panorama.v4.js b/dist/videojs-panorama.v4.js index 76be0db..9df1920 100644 --- a/dist/videojs-panorama.v4.js +++ b/dist/videojs-panorama.v4.js @@ -401,6 +401,10 @@ var _MobileBuffering = require('../lib/MobileBuffering'); var _MobileBuffering2 = _interopRequireDefault(_MobileBuffering); +var _Util = require('../lib/Util'); + +var _Util2 = _interopRequireDefault(_Util); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var HAVE_CURRENT_DATA = 2; @@ -465,11 +469,11 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { attachControlEvents: function attachControlEvents() { this.on('mousemove', this.handleMouseMove.bind(this)); - this.on('touchmove', this.handleMouseMove.bind(this)); + this.on('touchmove', this.handleTouchMove.bind(this)); this.on('mousedown', this.handleMouseDown.bind(this)); - this.on('touchstart', this.handleMouseDown.bind(this)); + this.on('touchstart', this.handleTouchStart.bind(this)); this.on('mouseup', this.handleMouseUp.bind(this)); - this.on('touchend', this.handleMouseUp.bind(this)); + this.on('touchend', this.handleTouchEnd.bind(this)); if (this.settings.scrollable) { this.on('mousewheel', this.handleMouseWheel.bind(this)); this.on('MozMousePixelScroll', this.handleMouseWheel.bind(this)); @@ -507,6 +511,19 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { this.onPointerDownLat = this.lat; }, + handleTouchStart: function handleTouchStart(event) { + if (event.touches.length > 1) { + this.isUserPinch = true; + this.multiTouchDistance = _Util2.default.getTouchesDistance(event.touches); + } + this.handleMouseDown(event); + }, + + handleTouchEnd: function handleTouchEnd(event) { + this.isUserPinch = false; + this.handleMouseUp(event); + }, + handleMouseMove: function handleMouseMove(event) { var clientX = event.clientX || event.touches && event.touches[0].clientX; var clientY = event.clientY || event.touches && event.touches[0].clientY; @@ -524,6 +541,13 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { } }, + handleTouchMove: function handleTouchMove(event) { + //handle single touch event, + if (!this.isUserPinch || event.touches.length <= 1) { + this.handleMouseMove(event); + } + }, + handleMobileOrientation: function handleMobileOrientation(event) { if (typeof event.rotationRate === "undefined") return; var x = event.rotationRate.alpha; @@ -623,7 +647,7 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { exports.default = BaseCanvas; -},{"../lib/Detector":6,"../lib/MobileBuffering":8}],5:[function(require,module,exports){ +},{"../lib/Detector":6,"../lib/MobileBuffering":8,"../lib/Util":11}],5:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -768,6 +792,16 @@ var Canvas = function Canvas(baseComponent, THREE) { } }, + handleTouchMove: function handleTouchMove(event) { + parent.handleTouchMove.call(this, event); + if (this.isUserPinch) { + var currentDistance = _Util2.default.getTouchesDistance(event.touches); + event.wheelDeltaY = (currentDistance - this.multiTouchDistance) * 2; + this.handleMouseWheel.call(this, event); + this.multiTouchDistance = currentDistance; + } + }, + render: function render() { parent.render.call(this); this.camera.target.x = 500 * Math.sin(this.phi) * Math.cos(this.theta); @@ -1319,6 +1353,10 @@ function deepCopy(obj) { return to; } +function getTouchesDistance(touches) { + return Math.sqrt((touches[0].clientX - touches[1].clientX) * (touches[0].clientX - touches[1].clientX) + (touches[0].clientY - touches[1].clientY) * (touches[0].clientY - touches[1].clientY)); +} + exports.default = { whichTransitionEvent: whichTransitionEvent, mobileAndTabletcheck: mobileAndTabletcheck, @@ -1326,7 +1364,8 @@ exports.default = { isRealIphone: isRealIphone, fovToProjection: fovToProjection, extend: extend, - deepCopy: deepCopy + deepCopy: deepCopy, + getTouchesDistance: getTouchesDistance }; },{}],12:[function(require,module,exports){ @@ -1682,4 +1721,4 @@ videojs.plugin('panorama', (0, _plugin2.default)({ })); },{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvaW50ZXJ2YWxvbWV0ZXIvZGlzdC9pbnRlcnZhbG9tZXRlci5jb21tb24tanMuanMiLCJub2RlX21vZHVsZXMvaXBob25lLWlubGluZS12aWRlby9kaXN0L2lwaG9uZS1pbmxpbmUtdmlkZW8uY29tbW9uLWpzLmpzIiwibm9kZV9tb2R1bGVzL3Bvb3ItbWFucy1zeW1ib2wvZGlzdC9wb29yLW1hbnMtc3ltYm9sLmNvbW1vbi1qcy5qcyIsInNyYy9zY3JpcHRzL2xpYi9CYXNlQ2FudmFzLmpzIiwic3JjL3NjcmlwdHMvbGliL0NhbnZhcy5qcyIsInNyYy9zY3JpcHRzL2xpYi9EZXRlY3Rvci5qcyIsInNyYy9zY3JpcHRzL2xpYi9IZWxwZXJDYW52YXMuanMiLCJzcmMvc2NyaXB0cy9saWIvTW9iaWxlQnVmZmVyaW5nLmpzIiwic3JjL3NjcmlwdHMvbGliL05vdGljZS5qcyIsInNyYy9zY3JpcHRzL2xpYi9UaHJlZUNhbnZhcy5qcyIsInNyYy9zY3JpcHRzL2xpYi9VdGlsLmpzIiwic3JjL3NjcmlwdHMvbGliL1ZSQnV0dG9uLmpzIiwic3JjL3NjcmlwdHMvcGx1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ciBjb250ZXh0ID0gdGhpcy5oZWxwZXJDYW52YXMuZWwoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRleHR1cmUgPSBuZXcgVEhSRUUuVGV4dHVyZShjb250ZXh0KTtcbiAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgIHRoaXMudGV4dHVyZSA9IG5ldyBUSFJFRS5UZXh0dXJlKHZpZGVvKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmlkZW8uc3R5bGUuZGlzcGxheSA9IFwibm9uZVwiO1xuXG4gICAgICAgICAgICB0aGlzLnRleHR1cmUuZ2VuZXJhdGVNaXBtYXBzID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnRleHR1cmUubWluRmlsdGVyID0gVEhSRUUuTGluZWFyRmlsdGVyO1xuICAgICAgICAgICAgdGhpcy50ZXh0dXJlLm1heEZpbHRlciA9IFRIUkVFLkxpbmVhckZpbHRlcjtcbiAgICAgICAgICAgIHRoaXMudGV4dHVyZS5mb3JtYXQgPSBUSFJFRS5SR0JGb3JtYXQ7XG5cbiAgICAgICAgICAgIHRoaXMuZWxfID0gdGhpcy5yZW5kZXJlci5kb21FbGVtZW50O1xuICAgICAgICAgICAgdGhpcy5lbF8uY2xhc3NMaXN0LmFkZCgndmpzLXZpZGVvLWNhbnZhcycpO1xuXG4gICAgICAgICAgICBvcHRpb25zLmVsID0gdGhpcy5lbF87XG4gICAgICAgICAgICBiYXNlQ29tcG9uZW50LmNhbGwodGhpcywgcGxheWVyLCBvcHRpb25zKTtcblxuICAgICAgICAgICAgdGhpcy5hdHRhY2hDb250cm9sRXZlbnRzKCk7XG4gICAgICAgICAgICB0aGlzLnBsYXllcigpLm9uKFwicGxheVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50aW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5hbmltYXRlKCk7XG4gICAgICAgICAgICB9L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DAuMSlcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbGF5ZXIoKS5wYXVzZWQoKSA/IHRoaXMucGxheWVyKCkucGxheSgpIDogdGhpcy5wbGF5ZXIoKS5wYXVzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlRG93bjogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHZhciBjbGllbnRYID0gZXZlbnQuY2xpZW50WCB8fCBldmVudC50b3VjaGVzICYmIGV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WDtcbiAgICAgICAgICAgIHZhciBjbGllbnRZID0gZXZlbnQuY2xpZW50WSB8fCBldmVudC50b3VjaGVzICYmIGV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WTtcbiAgICAgICAgICAgIGlmKHR5cGVvZiBjbGllbnRYID09PSBcInVuZGVmaW5lZFwiIHx8IGNsaWVudFkgPT09IFwidW5kZWZpbmVkXCIpIHJldHVybjtcbiAgICAgICAgICAgIHRoaXMubW91c2VEb3duID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMub25Qb2ludGVyRG93blBvaW50ZXJYID0gY2xpZW50WDtcbiAgICAgICAgICAgIHRoaXMub25Qb2ludGVyRG93blBvaW50ZXJZID0gY2xpZW50WTtcbiAgICAgICAgICAgIHRoaXMub25Qb2ludGVyRG93bkxvbiA9IHRoaXMubG9uO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duTGF0ID0gdGhpcy5sYXQ7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VNb3ZlOiBmdW5jdGlvbihldmVudCl7XG4gICAgICAgICAgICB2YXIgY2xpZW50WCA9IGV2ZW50LmNsaWVudFggfHwgZXZlbnQudG91Y2hlcyAmJiBldmVudC50b3VjaGVzWzBdLmNsaWVudFg7XG4gICAgICAgICAgICB2YXIgY2xpZW50WSA9IGV2ZW50LmNsaWVudFkgfHwgZXZlbnQudG91Y2hlcyAmJiBldmVudC50b3VjaGVzWzBdLmNsaWVudFk7XG4gICAgICAgICAgICBpZih0eXBlb2YgY2xpZW50WCA9PT0gXCJ1bmRlZmluZWRcIiB8fCBjbGllbnRZID09PSBcInVuZGVmaW5lZFwiKSByZXR1cm47XG4gICAgICAgICAgICBpZih0aGlzLnNldHRpbmdzLmNsaWNrQW5kRHJhZyl7XG4gICAgICAgICAgICAgICAgaWYodGhpcy5tb3VzZURvd24pe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA9ICggdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclggLSBjbGllbnRYICkgKiAwLjIgKyB0aGlzLm9uUG9pbnRlckRvd25Mb247XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGF0ID0gKCBjbGllbnRZIC0gdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclkgKSAqIDAuMiArIHRoaXMub25Qb2ludGVyRG93bkxhdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICB2YXIgeCA9IGV2ZW50LnBhZ2VYIC0gdGhpcy5lbF8ub2Zmc2V0TGVmdDtcbiAgICAgICAgICAgICAgICB2YXIgeSA9IGV2ZW50LnBhZ2VZIC0gdGhpcy5lbF8ub2Zmc2V0VG9wO1xuICAgICAgICAgICAgICAgIHRoaXMubG9uID0gKHggLyB0aGlzLndpZHRoKSAqIDQzMCAtIDIyNTtcbiAgICAgICAgICAgICAgICB0aGlzLmxhdCA9ICh5IC8gdGhpcy5oZWlnaHQpICogLTE4MCArIDkwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vYmlsZU9yaWVudGF0aW9uOiBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgIGlmKHR5cGVvZiBldmVudC5yb3RhdGlvblJhdGUgPT09IFwid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ID0gb3JpZW50YXRpb247XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5sb24gPSAob3JpZW50YXRpb25EZWdyZWUgPT0gLTkwKT8gdGhpcy5sb24gKyB4ICogdGhpcy5zZXR0aW5ncy5tb2JpbGVWaWJyYXRpb25WYWx1ZSA6IHRoaXMubG9uIC0geCAqIHRoaXMuc2V0dGluZ3MubW9iaWxlVmlicmF0aW9uVmFsdWU7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXQgPSAob3JpZW50YXRpb25EZWdyZWUgPT0gLTkwKT8gdGhpcy5sYXQgKyB5ICogdGhpcy5zZXR0aW5ncy5tb2JpbGVWaWJyYXRpb25WYWx1ZSA6IHRoaXMubGF0IC0geSAqIHRoaXMuc2V0dGluZ3MubW9iaWxlVmlicmF0aW9uVmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VXaGVlbDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlRW50ZXI6IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdGhpcy5pc1VzZXJJbnRlcmFjdGluZyA9IHRydWU7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VMZWFzZTogZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICB0aGlzLmlzVXNlckludGVyYWN0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICBpZih0aGlzLm1vdXNlRG93bikge1xuICAgICAgICAgICAgICAgIHRoaXMubW91c2VEb3duID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgYW5pbWF0ZTogZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHRoaXMucmVxdWVzdEFuaW1hdGlvbklkID0gcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCB0aGlzLmFuaW1hdGUuYmluZCh0aGlzKSApO1xuICAgICAgICAgICAgaWYoIXRoaXMucGxheWVyKCkucGF1c2VkKCkpe1xuICAgICAgICAgICAgICAgIGlmKHR5cGVvZih0aGlzLnRleHR1cmUpICE9PSBcInVuZGVmaW5lZFwiICYmICghdGhpcy5pc1BsYXlPbk1vYmlsZSAmJiB0aGlzLnBsYXllcigpLnJlYWR5U3RhdGUoKSA+PSBIQVZFX0NVUlJFTlRfREFUQSB8fCB0aGlzLmlzUGxheU9uTW9iaWxlICYmIHRoaXMucGxheWVyKCkuaGFzQ2xhc3MoXCJ2anMtcGxheWluZ1wiKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGN0ID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjdCAtIHRoaXMudGltZSA+PSAzMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50ZXh0dXJlLm5lZWRzVXBkYXRlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGltZSA9IGN0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmKHRoaXMuaXNQbGF5T25Nb2JpbGUpe1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN1cnJlbnRUaW1lID0gdGhpcy5wbGF5ZXIoKS5jdXJyZW50VGltZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoTW9iaWxlQnVmZmVyaW5nLmlzQnVmZmVyaW5nKGN1cnJlbnRUaW1lKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRoaXMucGxheWVyKCkuaGFzQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIikpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXllcigpLmFkZENsYXNzKFwidmpzLXBhbm9yYW1hLW1vYmlsZS1pbmxpbmUtdmlkZW8tYnVmZmVyaW5nXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRoaXMucGxheWVyKCkuaGFzQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIikpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXllcigpLnJlbW92ZUNsYXNzKFwidmpzLXBhbm9yYW1hLW1vYmlsZS1pbmxpbmUtdmlkZW8tYnVmZmVyaW5nXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgcmVuZGVyOiBmdW5jdGlvbigpe1xuICAgICAgICAgICAgaWYoIXRoaXMuaXNVc2VySW50ZXJhY3Rpbmcpe1xuICAgICAgICAgICAgICAgIHZhciBzeW1ib2xMYXQgPSAodGhpcy5sYXQgPiB0aGlzLnNldHRpbmdzLmluaXRMYXQpPyAgLTEgOiAxO1xuICAgICAgICAgICAgICAgIHZhciBzeW1ib2xMb24gPSAodGhpcy5sb24gPiB0aGlzLnNldHRpbmdzLmluaXRMb24pPyAgLTEgOiAxO1xuICAgICAgICAgICAgICAgIGlmKHRoaXMuc2V0dGluZ3MuYmFja1RvVmVydGljYWxDZW50ZXIpe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdCA9IChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF0ID4gKHRoaXMuc2V0dGluZ3MuaW5pdExhdCAtIE1hdGguYWJzKHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExhdCkpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdCA8ICh0aGlzLnNldHRpbmdzLmluaXRMYXQgKyBNYXRoLmFicyh0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMYXQpKVxuICAgICAgICAgICAgICAgICAgICApPyB0aGlzLnNldHRpbmdzLmluaXRMYXQgOiB0aGlzLmxhdCArIHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExhdCAqIHN5bWJvbExhdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYodGhpcy5zZXR0aW5ncy5iYWNrVG9Ib3Jpem9uQ2VudGVyKXtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sb24gPSAoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA+ICh0aGlzLnNldHRpbmdzLmluaXRMb24gLSBNYXRoLmFicyh0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMb24pKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb24gPCAodGhpcy5zZXR0aW5ncy5pbml0TG9uICsgTWF0aC5hYnModGhpcy5zZXR0aW5ncy5yZXR1cm5TdGVwTG9uKSlcbiAgICAgICAgICAgICAgICAgICAgKT8gdGhpcy5zZXR0aW5ncy5pbml0TG9uIDogdGhpcy5sb24gKyB0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMb24gKiBzeW1ib2xMb247XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5sYXQgPSBNYXRoLm1heCggdGhpcy5zZXR0aW5ncy5taW5MYXQsIE1hdGgubWluKCB0aGlzLnNldHRpbmdzLm1heExhdCwgdGhpcy5sYXQgKSApO1xuICAgICAgICAgICAgdGhpcy5sb24gPSBNYXRoLm1heCggdGhpc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sZXQgbm9ybWFscyA9IGdlb21ldHJ5LmF0dHJpYnV0ZXMubm9ybWFsLmFycmF5O1xuICAgICAgICAgICAgICAgIGxldCB1dnMgPSBnZW9tZXRyeS5hdHRyaWJ1dGVzLnV2LmFycmF5O1xuICAgICAgICAgICAgICAgIGZvciAoIGxldCBpID0gMCwgbCA9IG5vcm1hbHMubGVuZ3RoIC8gMzsgaSA8IGw7IGkgKysgKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB4ID0gbm9ybWFsc1sgaSAqIDMgKyAwIF07XG4gICAgICAgICAgICAgICAgICAgIGxldCB5ID0gbm9ybWFsc1sgaSAqIDMgKyAxIF07XG4gICAgICAgICAgICAgICAgICAgIGxldCB6ID0gbm9ybWFsc1sgaSAqIDMgKyAyIF07XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHIgPSBNYXRoLmFzaW4oTWF0aC5zcXJ0KHggKiB4ICsgeiAqIHopIC8gTWF0aC5zcXJ0KHggKiB4ICArIHkgKiB5ICsgeiAqIHopKSAvIE1hdGguUEk7XG4gICAgICAgICAgICAgICAgICAgIGlmKHkgPCAwKSByID0gMSAtIHI7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0aGV0YSA9ICh4ID09IDAgJiYgeiA9PSAwKT8gMCA6IE1hdGguYWNvcyh4IC8gTWF0aC5zcXJ0KHggKiB4ICsgeiAqIHopKTtcbiAgICAgICAgICAgICAgICAgICAgaWYoeiA8IDApIHRoZXRhID0gdGhldGEgKiAtMTtcbiAgICAgICAgICAgICAgICAgICAgdXZzWyBpICogMiArIDAgXSA9IC0wLjggKiByICogTWF0aC5jb3ModGhldGEpICsgMC41O1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMSBdID0gMC44ICogciAqIE1hdGguc2luKHRoZXRhKSArIDAuNTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWCggb3B0aW9ucy5yb3RhdGVYKTtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVZKCBvcHRpb25zLnJvdGF0ZVkpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVooIG9wdGlvbnMucm90YXRlWik7XG4gICAgICAgICAgICB9ZWxzZSBpZih0aGlzLnZpZGVvVHlwZSA9PT0gXCJkdWFsX2Zpc2hleWVcIil7XG4gICAgICAgICAgICAgICAgbGV0IG5vcm1hbHMgPSBnZW9tZXRyeS5hdHRyaWJ1dGVzLm5vcm1hbC5hcnJheTtcbiAgICAgICAgICAgICAgICBsZXQgdXZzID0gZ2VvbWV0cnkuYXR0cmlidXRlcy51di5hcnJheTtcbiAgICAgICAgICAgICAgICBsZXQgbCA9IG5vcm1hbHMubGVuZ3RoIC8gMztcbiAgICAgICAgICAgICAgICBmb3IgKCBsZXQgaSA9IDA7IGkgPCBsIC8gMjsgaSArKyApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBub3JtYWxzWyBpICogMyArIDAgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBub3JtYWxzWyBpICogMyArIDEgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHogPSBub3JtYWxzWyBpICogMyArIDIgXTtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgciA9ICggeCA9PSAwICYmIHogPT0gMCApID8gMSA6ICggTWF0aC5hY29zKCB5ICkgLyBNYXRoLnNxcnQoIHggKiB4ICsgeiAqIHogKSApICogKCAyIC8gTWF0aC5QSSApO1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMCBdID0geCAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5yeCAqIHIgKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTEuY292ZXJYICArIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS54O1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMSBdID0geiAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5yeSAqIHIgKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTEuY292ZXJZICArIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS55O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKCBsZXQgaSA9IGwgLyAyOyBpIDwgbDsgaSArKyApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBub3JtYWxzWyBpICogMyArIDAgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBub3JtYWxzWyBpICogMyArIDEgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHogPSBub3JtYWxzWyBpICogMyArIDIgXTtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgciA9ICggeCA9PSAwICYmIHogPT0gMCApID8gMSA6ICggTWF0aC5hY29zKCAtIHkgKSAvIE1hdGguc3FydCggeCAqIHggKyB6ICogeiApICkgKiAoIDIgLyBNYXRoLlBJICk7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAwIF0gPSAtIHggKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIucnggKiByICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUyLmNvdmVyWCAgKyBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIueDtcbiAgICAgICAgICAgICAgICAgICAgdXZzWyBpICogMiArIDEgXSA9IHogKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIucnkgKiByICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUyLmNvdmVyWSAgKyBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIueTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWCggb3B0aW9ucy5yb3RhdGVYKTtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVZKCBvcHRpb25zLnJvdGF0ZVkpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVooIG9wdGlvbnMucm90YXRlWik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBnZW9tZXRyeS5zY2FsZSggLSAxLCAxLCAxICk7XG4gICAgICAgICAgICAvL2RlZmluZSBtZXNoXG4gICAgICAgICAgICB0aGlzLm1lc2ggPSBuZXcgVEhSRUUuTWVzaChnZW9tZXRyeSxcbiAgICAgICAgICAgICAgICBuZXcgVEhSRUUuTWVzaEJhc2ljTWF0ZXJpYWwoeyBtYXA6IHRoaXMudGV4dHVyZX0pXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgLy90aGlzLm1lc2guc2NhbGUueCA9IC0xO1xuICAgICAgICAgICAgdGhpcy5zY2VuZS5hZGQodGhpcy5tZXNoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBlbmFibGVWUjogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5WUk1vZGUgPSB0cnVlO1xuICAgICAgICAgICAgaWYodHlwZW9mIHZySE1EICE9PSAndW5kZWZpbmVkJyl7XG4gICAgICAgICAgICAgICAgdmFyIGV5ZVBhcmFtc0wgPSB2ckhNRC5nZXRFeWVQYXJhbWV0ZXJzKCAnbGVmdCcgKTtcbiAgICAgICAgICAgICAgICB2YXIgZXllUGFyYW1zUiA9IHZySE1ELmdldEV5ZVBhcmFtZXRlcnMoICdyaWdodCcgKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuZXllRk9WTCA9IGV5ZVBhcmFtc0wucmVjb21tZW5kZWRGaWVsZE9mVmlldztcbiAgICAgICAgICAgICAgICB0aGlzLmV5ZUZPVlIgPSBleWVQYXJhbXNSLnJlY29tbWVuZGVkRmllbGRPZlZpZXc7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuY2FtZXJhTCA9IG5ldyBUSFJFRS5QZXJzcGVjdGl2ZUNhbWVyYSh0aGlzLmNhbWVyYS5mb3YsIHRoaXMud2lkdGggLzIgLyB0aGlzLmhlaWdodCwg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gICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlV2hlZWw6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHBhcmVudC5oYW5kbGVNb3VzZVdoZWVsKGV2ZW50KTtcbiAgICAgICAgICAgIC8vIFdlYktpdFxuICAgICAgICAgICAgaWYgKCBldmVudC53aGVlbERlbHRhWSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYS5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YVkgKiAwLjA1O1xuICAgICAgICAgICAgICAgIC8vIE9wZXJhIC8gRXhwbG9yZXIgOVxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQud2hlZWxEZWx0YSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYS5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YSAqIDAuMDU7XG4gICAgICAgICAgICAgICAgLy8gRmlyZWZveFxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQuZGV0YWlsICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiArPSBldmVudC5kZXRhaWwgKiAxLjA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS5mb3YgPSBNYXRoLm1pbih0aGlzLnNldHRpbmdzLm1heEZvdiwgdGhpcy5jYW1lcmEuZm92KTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiA9IE1hdGgubWF4KHRoaXMuc2V0dGluZ3MubWluRm92LCB0aGlzLmNhbWVyYS5mb3YpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgaWYodGhpcy5WUk1vZGUpe1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgPSB0aGlzLmNhbWVyYS5mb3Y7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLmZvdiA9IHRoaXMuY2FtZXJhLmZvdjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgcmVuZGVyOiBmdW5jdGlvbigpe1xuICAgICAgICAgICAgcGFyZW50LnJlbmRlci5jYWxsKHRoaXMpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEudGFyZ2V0LnggPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguY29zKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS50YXJnZXQueSA9IDUwMCAqIE1hdGguY29zKCB0aGlzLnBoaSApO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEudGFyZ2V0LnogPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguc2luKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS5sb29rQXQoIHRoaXMuY2FtZXJhLnRhcmdldCApO1xuXG4gICAgICAgICAgICBpZighdGhpcy5WUk1vZGUpe1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKCB0aGlzLnNjZW5lLCB0aGlzLmNhbWVyYSApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZXtcbiAgICAgICAgICAgICAgICB2YXIgdmlld1BvcnRXaWR0aCA9IHRoaXMud2lkdGggLyAyLCB2aWV3UG9ydEhlaWdodCA9IHRoaXMuaGVpZ2h0O1xuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiB2ckhNRCAhPT0gJ3VuZGVmaW5lZCcpe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwucHJvamVjdGlvbk1hdHJpeCA9IFV0aWwuZm92VG9Qcm9qZWN0aW9uKCB0aGlzLmV5ZUZPVkwsIHRydWUsIHRoaXMuY2FtZXJhLm5lYXIsIHRoaXMuY2FtZXJhLmZhciApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIucHJvamVjdGlvbk1hdHJpeCA9IFV0aWwuZm92VG9Qcm9qZWN0aW9uKCB0aGlzLmV5ZUZPVlIsIHRydWUsIHRoaXMuY2FtZXJhLm5lYXIsIHRoaXMuY2FtZXJhLmZhciApO1xuICAgICAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9uTCA9IHRoaXMubG9uICsgdGhpcy5zZXR0aW5ncy5WUkdhcERlZ3JlZTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxvblIgPSB0aGlzLmxvbiAtIHRoaXMuc2V0dGluZ3MuVlJHYXBEZWdyZWU7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHRoZXRhTCA9IFRIUkVFLk1hdGguZGVnVG9SYWQoIGxvbkwgKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRoZXRhUiA9IFRIUkVFLk1hdGguZGVnVG9SYWQoIGxvblIgKTtcblxuICAgICAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0TCA9IFV0aWwuZGVlcENvcHkodGhpcy5jYW1lcmEudGFyZ2V0KTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0TC54ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLmNvcyggdGhldGFMICk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldEwueiA9IDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5zaW4oIHRoZXRhTCApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwubG9va0F0KHRhcmdldEwpO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXRSID0gVXRpbC5kZWVwQ29weSh0aGlzLmNhbWVyYS50YXJnZXQpO1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRSLnggPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguY29zKCB0aGV0YVIgKTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ui56ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLnNpbiggdGhldGFSICk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi5sb29rQXQodGFyZ2V0Uik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHJlbmRlciBsZWZ0IGV5ZVxuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2V0Vmlld3BvcnQoIDAsIDAsIHZpZXdQb3J0V2lkdGgsIHZpZXdQb3J0SGVpZ2h0ICk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRTY2lzc29yKCAwLCAwLCB2aWV3UG9ydFdpZHRoLCB2aWV3UG9ydEhlaWdodCApO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKCB0aGlzLnNjZW5lLCB0aGlzLmNhbWVyYUwgKTtcblxuICAgICAgICAgICAgICAgIC8vIHJlbmRlciByaWdodCBleWVcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFZpZXdwb3J0KCB2aWV3UG9ydFdpZHRoLCAwLCB2aWV3UG9ydFdpZHRoLCB2aWV3UG9ydEhlaWdodCApO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2V0U2Npc3Nvciggdmlld1BvcnRXaWR0aCwgMCwgdmlld1BvcnRXaWR0aCwgdmlld1BvcnRIZWlnaHQgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnJlbmRlciggdGhpcy5zY2VuZSwgdGhpcy5jYW1lcmFSICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTt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hdG9yLnVzZXJBZ2VudCxcbiAgICAgICAgICAgICAgICAgcmUgPSBuZXcgUmVnRXhwKFwiTVNJRSAoWzAtOV17MSx9W1xcXFwuMC05XXswLH0pXCIpO1xuXG4gICAgICAgICAgICAgaWYgKHJlLmV4ZWModWEpICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgIHJ2ID0gcGFyc2VGbG9hdChSZWdFeHAuJDEpO1xuICAgICAgICAgICAgIH1cbiAgICAgICAgIH1cbiAgICAgICAgIGVsc2UgaWYgKG5hdmlnYXRvci5hcHBOYW1lID09IFwiTmV0c2NhcGVcIikge1xuICAgICAgICAgICAgIC8vLyBpbiBJRSAxMSB0aGUgbmF2aWdhdG9yLmFwcFZlcnNpb24gc2F5cyAndHJpZGVudCdcbiAgICAgICAgICAgICAvLy8gaW4gRWRnZSB0aGUgbmF2aWdhdG9yLmFwcFZlcnNpb24gZG9lcyBub3Qgc2F5IHRyaWRlbnRcbiAgICAgICAgICAgICBpZiAobmF2aWdhdG9yLmFwcFZlcnNpb24uaW5kZXhPZignVHJpZGVudCcpICE9PSAtMSkgcnYgPSAxMTtcbiAgICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgICB2YXIgdWEgPSBuYXZpZ2F0b3IudXNlckFnZW50O1xuICAgICAgICAgICAgICAgICB2YXIgcmUgPSBuZXcgUmVnRXhwKFwiRWRnZVxcLyhbMC05XXsxLH1bXFxcXC4wLTldezAsfSlcIik7XG4gICAgICAgICAgICAgICAgIGlmIChyZS5leGVjKHVhKSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgcnYgPSBwYXJzZUZsb2F0KFJlZ0V4cC4kMSk7XG4gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICB9XG4gICAgICAgICB9XG5cbiAgICAgICAgIHJldHVybiBydjtcbiAgICAgfSxcblxuICAgIHN1cHBvcnRWaWRlb1RleHR1cmU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLy9pZSAxMS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gICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VXaGVlbDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgcGFyZW50LmhhbmRsZU1vdXNlV2hlZWwoZXZlbnQpO1xuICAgICAgICAgICAgLy8gV2ViS2l0XG4gICAgICAgICAgICBpZiAoIGV2ZW50LndoZWVsRGVsdGFZICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YVkgKiAwLjA1O1xuICAgICAgICAgICAgICAgIC8vIE9wZXJhIC8gRXhwbG9yZXIgOVxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQud2hlZWxEZWx0YSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92IC09IGV2ZW50LndoZWVsRGVsdGEgKiAwLjA1O1xuICAgICAgICAgICAgICAgIC8vIEZpcmVmb3hcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIGV2ZW50LmRldGFpbCApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92ICs9IGV2ZW50LmRldGFpbCAqIDEuMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgPSBNYXRoLm1pbih0aGlzLnNldHRpbmdzLm1heEZvdiwgdGhpcy5jYW1lcmFMLmZvdik7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92ID0gTWF0aC5tYXgodGhpcy5zZXR0aW5ncy5taW5Gb3YsIHRoaXMuY2FtZXJhTC5mb3YpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmFMLnVwZGF0ZVByb2plY3Rpb25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VZOiAwLFxuICAgIHJvdGF0ZVo6IDAsXG5cbiAgICBhdXRvTW9iaWxlT3JpZW50YXRpb246IGZhbHNlLFxuICAgIG1vYmlsZVZpYnJhdGlvblZhbHVlOiB1dGlsLmlzSW9zKCk/IDAuMDIyIDogMSxcblxuICAgIFZSRW5hYmxlOiB0cnVlLFxuICAgIFZSR2FwRGVncmVlOiAyLjUsXG5cbiAgICBjbG9zZVBhbm9yYW1hOiBmYWxzZSxcblxuICAgIGhlbHBlckNhbnZhczoge30sXG5cbiAgICBkdWFsRmlzaDoge1xuICAgICAgICB3aWR0aDogMTkyMCxcbiAgICAgICAgaGVpZ2h0OiAxMDgwLFxuICAgICAgICBjaXJjbGUxOiB7XG4gICAgICAgICAgICB4OiAwLjI0MDYyNSxcbiAgICAgICAgICAgIHk6IDAuNTUzNzA0LFxuICAgICAgICAgICAgcng6IDAuMjMzMzMsXG4gICAgICAgICAgICByeTogMC40MzE0OCxcbiAgICAgICAgICAgIGNvdmVyWDogMC45MTMsXG4gICAgICAgICAgICBjb3Zlclk6IDAuOVxuICAgICAgICB9LFxuICAgICAgICBjaXJjbGUyOiB7XG4gICAgICAgICAgICB4OiAwLjc1NzI5MixcbiAgICAgICAgICAgIHk6IDAuNTUzNzA0LFxuICAgICAgICAgICAgcng6IDAuMjMyMjkyLFxuICAgICAgICAgICAgcnk6IDAuNDI5NjI5NixcbiAgICAgICAgICAgIGNvdmVyWDogMC45MTMsXG4gICAgICAgICAgICBjb3Zlclk6IDAuOTMwOFxuICAgICAgICB9XG4gICAgfVxufTtcblxuZnVuY3Rpb24gcGxheWVyUmVzaXplKHBsYXllcil7XG4gICAgdmFyIGNhbnZhcyA9IHBsYXllci5nZXRDaGlsZCgnQ2FudmFzJyk7XG4gICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcGxheWVyLmVsKCkuc3R5bGUud2lkdGggPSB3aW5kb3cuaW5uZXJXaWR0aCArIFwicHhcIjtcbiAgICAgICAgcGxheWV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hpbGQoXCJIZWxwZXJDYW52YXNcIiwge1xuICAgICAgICAgICAgICAgICAgICB2aWRlbzogdmlkZW8sXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiAob3B0aW9ucy5oZWxwZXJDYW52YXMud2lkdGgpPyBvcHRpb25zLmhlbHBlckNhbnZhcy53aWR0aDogdGhpcy53aWR0aCxcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAob3B0aW9ucy5oZWxwZXJDYW52YXMuaGVpZ2h0KT8gb3B0aW9ucy5oZWxwZXJDYW52YXMuaGVpZ2h0OiB0aGlzLmhlaWdodFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHZhciBjb250ZXh0ID0gdGhpcy5oZWxwZXJDYW52YXMuZWwoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRleHR1cmUgPSBuZXcgVEhSRUUuVGV4dHVyZShjb250ZXh0KTtcbiAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgIHRoaXMudGV4dHVyZSA9IG5ldyBUSFJFRS5UZXh0dXJlKHZpZGVvKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmlkZW8uc3R5bGUuZGlzcGxheSA9IFwibm9uZVwiO1xuXG4gICAgICAgICAgICB0aGlzLnRleHR1cmUuZ2VuZXJhdGVNaXBtYXBzID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnRleHR1cmUubWluRmlsdGVyID0gVEhSRUUuTGluZWFyRmlsdGVyO1xuICAgICAgICAgICAgdGhpcy50ZXh0dXJlLm1heEZpbHRlciA9IFRIUkVFLkxpbmVhckZpbHRlcjtcbiAgICAgICAgICAgIHRoaXMudGV4dHVyZS5mb3JtYXQgPSBUSFJFRS5SR0JGb3JtYXQ7XG5cbiAgICAgICAgICAgIHRoaXMuZWxfID0gdGhpcy5yZW5kZXJlci5kb21FbGVtZW50O1xuICAgICAgICAgICAgdGhpcy5lbF8uY2xhc3NMaXN0LmFkZCgndmpzLXZpZGVvLWNhbnZhcycpO1xuXG4gICAgICAgICAgICBvcHRpb25zLmVsID0gdGhpcy5lbF87XG4gICAgICAgICAgICBiYXNlQ29tcG9uZW50LmNhbGwodGhpcywgcGxheWVyLCBvcHRpb25zKTtcblxuICAgICAgICAgICAgdGhpcy5hdHRhY2hDb250cm9sRXZlbnRzKCk7XG4gICAgICAgICAgICB0aGlzLnBsYXllcigpLm9uKFwicGxheVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50aW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5hbmltYXRlKCk7XG4gICAgICAgICAgICB9LmJpbmQodGhpcykpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGF0dGFjaENvbnRyb2xFdmVudHM6IGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICB0aGlzLm9uKCdtb3VzZW1vdmUnLCB0aGlzLmhhbmRsZU1vdXNlTW92ZS5iaW5kKHRoaXMpKTtcbiAgICAgICAgICAgIHRoaXMub24oJ3RvdWNobW92ZScsIHRoaXMuaGFuZGxlVG91Y2hNb3ZlLmJpbmQodGhpcykpO1xuICAgICAgICAgICAgdGhpcy5vbignbW91c2Vkb3duJywgdGhpcy5oYW5kbGVNb3VzZURvd24uYmluZCh0aGlzKSk7XG4gICAgICAgICAgICB0aGlzLm9uKCd0b3VjaHN0YXJ0Jyx0aGlzLmhhbmRsZVRvdWNoU3RhcnQuYmluZCh0aGlzKSk7XG4gICAgICAgICAgICB0aGlzLm9uKCdtb3VzZXVwJywgdGhpcy5oYW5kbGVNb3VzZVVwLmJpbmQodGhpcykpO1xuICAgICAgICAgICAgdGhpcy5vbigndG91Y2hlbmQnLCB0aGlzLmhhbmRsZVRvdWNoRW5kLmJpbmQodGhpcykpO1xuICAgICAgICAgICAgaWYodGhpcy5zZXR0aW5ncy5zY3JvbGxhYmxlKXtcbiAgICAgICAgICAgICAgICB0aGlzLm9uKCdtb3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2xpZW50WTtcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgY2xpZW50WCA9PT0gXCJ1bmRlZmluZWRcIiB8fCBjbGllbnRZID09PSBcInVuZGVmaW5lZFwiKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdmFyIGRpZmZYID0gTWF0aC5hYnMoY2xpZW50WCAtIHRoaXMub25Qb2ludGVyRG93blBvaW50ZXJYKTtcbiAgICAgICAgICAgICAgICB2YXIgZGlmZlkgPSBNYXRoLmFicyhjbGllbnRZIC0gdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclkpO1xuICAgICAgICAgICAgICAgIGlmKGRpZmZYIDwgMC4xICYmIGRpZmZZIDwgMC4xKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXllcigpLnBhdXNlZCgpID8gdGhpcy5wbGF5ZXIoKS5wbGF5KCkgOiB0aGlzLnBsYXllcigpLnBhdXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VEb3duOiBmdW5jdGlvbihldmVudCl7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgdmFyIGNsaWVudFggPSBldmVudC5jbGllbnRYIHx8IGV2ZW50LnRvdWNoZXMgJiYgZXZlbnQudG91Y2hlc1swXS5jbGllbnRYO1xuICAgICAgICAgICAgdmFyIGNsaWVudFkgPSBldmVudC5jbGllbnRZIHx8IGV2ZW50LnRvdWNoZXMgJiYgZXZlbnQudG91Y2hlc1swXS5jbGllbnRZO1xuICAgICAgICAgICAgaWYodHlwZW9mIGNsaWVudFggPT09IFwidW5kZWZpbmVkXCIgfHwgY2xpZW50WSA9PT0gXCJ1bmRlZmluZWRcIikgcmV0dXJuO1xuICAgICAgICAgICAgdGhpcy5tb3VzZURvd24gPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclggPSBjbGllbnRYO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclkgPSBjbGllbnRZO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duTG9uID0gdGhpcy5sb247XG4gICAgICAgICAgICB0aGlzLm9uUG9pbnRlckRvd25MYXQgPSB0aGlzLmxhdDtcbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVUb3VjaFN0YXJ0OiBmdW5jdGlvbihldmVudCl7XG4gICAgICAgICAgICBpZihldmVudC50b3VjaGVzLmxlbmd0aCA+IDEpe1xuICAgICAgICAgICAgICAgIHRoaXMuaXNVc2VyUGluY2ggPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMubXVsdGlUb3VjaERpc3RhbmNlID0gVXRpbC5nZXRUb3VjaGVzRGlzdGFuY2UoZXZlbnQudG91Y2hlcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmhhbmRsZU1vdXNlRG93bihldmVudCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlVG91Y2hFbmQ6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHRoaXMuaXNVc2VyUGluY2ggPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlTW91c2VVcChldmVudCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VNb3ZlOiBmdW5jdGlvbihldmVudCl7XG4gICAgICAgICAgICB2YXIgY2xpZW50WCA9IGV2ZW50LmNsaWVudFggfHwgZXZlbnQudG91Y2hlcyAmJiBldmVudC50b3VjaGVzWzBdLmNsaWVudFg7XG4gICAgICAgICAgICB2YXIgY2xpZW50WSA9IGV2ZW50LmNsaWVudFkgfHwgZXZlbnQudG91Y2hlcyAmJiBldmVudC50b3VjaGVzWzBdLmNsaWVudFk7XG4gICAgICAgICAgICBpZih0eXBlb2YgY2xpZW50WCA9PT0gXCJ1bmRlZmluZWRcIiB8fCBjbGllbnRZID09PSBcInVuZGVmaW5lZFwiKSByZXR1cm47XG4gICAgICAgICAgICBpZih0aGlzLnNldHRpbmdzLmNsaWNrQW5kRHJhZyl7XG4gICAgICAgICAgICAgICAgaWYodGhpcy5tb3VzZURvd24pe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA9ICggdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclggLSBjbGllbnRYICkgKiAwLjIgKyB0aGlzLm9uUG9pbnRlckRvd25Mb247XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGF0ID0gKCBjbGllbnRZIC0gdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclkgKSAqIDAuMiArIHRoaXMub25Qb2ludGVyRG93bkxhdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICB2YXIgeCA9IGV2ZW50LnBhZ2VYIC0gdGhpcy5lbF8ub2Zmc2V0TGVmdDtcbiAgICAgICAgICAgICAgICB2YXIgeSA9IGV2ZW50LnBhZ2VZIC0gdGhpcy5lbF8ub2Zmc2V0VG9wO1xuICAgICAgICAgICAgICAgIHRoaXMubG9uID0gKHggLyB0aGlzLndpZHRoKSAqIDQzMCAtIDIyNTtcbiAgICAgICAgICAgICAgICB0aGlzLmxhdCA9ICh5IC8gdGhpcy5oZWlnaHQpICogLTE4MCArIDkwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZVRvdWNoTW92ZTogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgLy9oYW5kbGUgc2luZ2xlIHRvdWNoIGV2ZW50LFxuICAgICAgICAgICAgaWYoIXRoaXMuaXNVc2VyUGluY2ggfHwgZXZlbnQudG91Y2hlcy5sZW5ndGggPD0gMSl7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVNb3VzZU1vdmUoZXZlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vYm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ICAgICAgICBpZih0eXBlb2Ygb3JpZW50YXRpb24gIT0gXCJ1bmRlZmluZWRcIil7XG4gICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uRGVncmVlID0gb3JpZW50YXRpb247XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5sb24gPSAob3JpZW50YXRpb25EZWdyZWUgPT0gLTkwKT8gdGhpcy5sb24gKyB4ICogdGhpcy5zZXR0aW5ncy5tb2JpbGVWaWJyYXRpb25WYWx1ZSA6IHRoaXMubG9uIC0geCAqIHRoaXMuc2V0dGluZ3MubW9iaWxlVmlicmF0aW9uVmFsdWU7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXQgPSAob3JpZW50YXRpb25EZWdyZWUgPT0gLTkwKT8gdGhpcy5sYXQgKyB5ICogdGhpcy5zZXR0aW5ncy5tb2JpbGVWaWJyYXRpb25WYWx1ZSA6IHRoaXMubGF0IC0geSAqIHRoaXMuc2V0dGluZ3MubW9iaWxlVmlicmF0aW9uVmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VXaGVlbDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlRW50ZXI6IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdGhpcy5pc1VzZXJJbnRlcmFjdGluZyA9IHRydWU7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VMZWFzZTogZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICB0aGlzLmlzVXNlckludGVyYWN0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICBpZih0aGlzLm1vdXNlRG93bikge1xuICAgICAgICAgICAgICAgIHRoaXMubW91c2VEb3duID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgYW5pbWF0ZTogZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHRoaXMucmVxdWVzdEFuaW1hdGlvbklkID0gcmVxdWVzdEFuaW1hdGlvbkZyYW1lKCB0aGlzLmFuaW1hdGUuYmluZCh0aGlzKSApO1xuICAgICAgICAgICAgaWYoIXRoaXMucGxheWVyKCkucGF1c2VkKCkpe1xuICAgICAgICAgICAgICAgIGlmKHR5cGVvZih0aGlzLnRleHR1cmUpICE9PSBcInVuZGVmaW5lZFwiICYmICghdGhpcy5pc1BsYXlPbk1vYmlsZSAmJiB0aGlzLnBsYXllcigpLnJlYWR5U3RhdGUoKSA+PSBIQVZFX0NVUlJFTlRfREFUQSB8fCB0aGlzLmlzUGxheU9uTW9iaWxlICYmIHRoaXMucGxheWVyKCkuaGFzQ2xhc3MoXCJ2anMtcGxheWluZ1wiKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGN0ID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjdCAtIHRoaXMudGltZSA+PSAzMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50ZXh0dXJlLm5lZWRzVXBkYXRlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGltZSA9IGN0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmKHRoaXMuaXNQbGF5T25Nb2JpbGUpe1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN1cnJlbnRUaW1lID0gdGhpcy5wbGF5ZXIoKS5jdXJyZW50VGltZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoTW9iaWxlQnVmZmVyaW5nLmlzQnVmZmVyaW5nKGN1cnJlbnRUaW1lKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRoaXMucGxheWVyKCkuaGFzQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIikpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXllcigpLmFkZENsYXNzKFwidmpzLXBhbm9yYW1hLW1vYmlsZS1pbmxpbmUtdmlkZW8tYnVmZmVyaW5nXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRoaXMucGxheWVyKCkuaGFzQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIikpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXllcigpLnJlbW92ZUNsYXNzKFwidmpzLXBhbm9yYW1hLW1vYmlsZS1pbmxpbmUtdmlkZW8tYnVmZmVyaW5nXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMucmVuZGVyKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgcmVuZGVyOiBmdW5jdGlvbigpe1xuICAgICAgICAgICAgaWYoIXRoaXMuaXNVc2VySW50ZXJhY3Rpbmcpe1xuICAgICAgICAgICAgICAgIHZhciBzeW1ib2xMYXQgPSAodGhpcy5sYXQgPiB0aGlzLnNldHRpbmdzLmluaXRMYXQpPyAgLTEgOiAxO1xuICAgICAgICAgICAgICAgIHZhciBzeW1ib2xMb24gPSAodGhpcy5sb24gPiB0aGlzLnNldHRpbmdzLmluaXRMb24pPyAgLTEgOiAxO1xuICAgICAgICAgICAgICAgIGlmKHRoaXMuc2V0dGluZ3MuYmFja1RvVmVydGljYWxDZW50ZXIpe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdCA9IChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF0ID4gKHRoaXMuc2V0dGluZ3MuaW5pdExhdCAtIE1hdGguYWJzKHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExhdCkpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdCA8ICh0aGlzLnNldHRpbmdzLmluaXRMYXQgKyBNYXRoLmFicyh0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMYXQpKVxuICAgICAgICAgICAgICAgICAgICApPyB0aGlzLnNldHRpbmdzLmluaXRMYXQgOiB0aGlzLmxhdCArIHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExhdCAqIHN5bWJvbExhdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYodGhpcy5zZXR0aW5ncy5iYWNrVG9Ib3Jpem9uQ2VudGVyKXtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sb24gPSAoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA+ICh0aGlzLnNldHRpbmdzLmluaXRMb24gLSBNYXRoLmFicyh0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMb24pKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb24gPCAodGhpcy5zZXR0aW5ncy5pbml0TG9uICsgTWF0aC5hYnModGhpcy5zZXR0aW5ncy5yZXR1cm5TdGVwTG9uKSlcbiAgICAgICAgICAgICAgICAgICAgKT8gdGhpcy5zZXR0aW5ncy5pbml0TG9uIDogdGhpcy5sb24gKyB0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMb24gKiBzeW1ib2xMb247XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5sYXQgPSBNYXRoLm1heCggdGhpcy5zZXR0aW5ncy5taW5MYX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CApLnRvTm9uSW5kZXhlZCgpO1xuICAgICAgICAgICAgaWYodGhpcy52aWRlb1R5cGUgPT09IFwiZmlzaGV5ZVwiKXtcbiAgICAgICAgICAgICAgICBsZXQgbm9ybWFscyA9IGdlb21ldHJ5LmF0dHJpYnV0ZXMubm9ybWFsLmFycmF5O1xuICAgICAgICAgICAgICAgIGxldCB1dnMgPSBnZW9tZXRyeS5hdHRyaWJ1dGVzLnV2LmFycmF5O1xuICAgICAgICAgICAgICAgIGZvciAoIGxldCBpID0gMCwgbCA9IG5vcm1hbHMubGVuZ3RoIC8gMzsgaSA8IGw7IGkgKysgKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB4ID0gbm9ybWFsc1sgaSAqIDMgKyAwIF07XG4gICAgICAgICAgICAgICAgICAgIGxldCB5ID0gbm9ybWFsc1sgaSAqIDMgKyAxIF07XG4gICAgICAgICAgICAgICAgICAgIGxldCB6ID0gbm9ybWFsc1sgaSAqIDMgKyAyIF07XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHIgPSBNYXRoLmFzaW4oTWF0aC5zcXJ0KHggKiB4ICsgeiAqIHopIC8gTWF0aC5zcXJ0KHggKiB4ICArIHkgKiB5ICsgeiAqIHopKSAvIE1hdGguUEk7XG4gICAgICAgICAgICAgICAgICAgIGlmKHkgPCAwKSByID0gMSAtIHI7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0aGV0YSA9ICh4ID09IDAgJiYgeiA9PSAwKT8gMCA6IE1hdGguYWNvcyh4IC8gTWF0aC5zcXJ0KHggKiB4ICsgeiAqIHopKTtcbiAgICAgICAgICAgICAgICAgICAgaWYoeiA8IDApIHRoZXRhID0gdGhldGEgKiAtMTtcbiAgICAgICAgICAgICAgICAgICAgdXZzWyBpICogMiArIDAgXSA9IC0wLjggKiByICogTWF0aC5jb3ModGhldGEpICsgMC41O1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMSBdID0gMC44ICogciAqIE1hdGguc2luKHRoZXRhKSArIDAuNTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWCggb3B0aW9ucy5yb3RhdGVYKTtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVZKCBvcHRpb25zLnJvdGF0ZVkpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVooIG9wdGlvbnMucm90YXRlWik7XG4gICAgICAgICAgICB9ZWxzZSBpZih0aGlzLnZpZGVvVHlwZSA9PT0gXCJkdWFsX2Zpc2hleWVcIil7XG4gICAgICAgICAgICAgICAgbGV0IG5vcm1hbHMgPSBnZW9tZXRyeS5hdHRyaWJ1dGVzLm5vcm1hbC5hcnJheTtcbiAgICAgICAgICAgICAgICBsZXQgdXZzID0gZ2VvbWV0cnkuYXR0cmlidXRlcy51di5hcnJheTtcbiAgICAgICAgICAgICAgICBsZXQgbCA9IG5vcm1hbHMubGVuZ3RoIC8gMztcbiAgICAgICAgICAgICAgICBmb3IgKCBsZXQgaSA9IDA7IGkgPCBsIC8gMjsgaSArKyApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBub3JtYWxzWyBpICogMyArIDAgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBub3JtYWxzWyBpICogMyArIDEgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHogPSBub3JtYWxzWyBpICogMyArIDIgXTtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgciA9ICggeCA9PSAwICYmIHogPT0gMCApID8gMSA6ICggTWF0aC5hY29zKCB5ICkgLyBNYXRoLnNxcnQoIHggKiB4ICsgeiAqIHogKSApICogKCAyIC8gTWF0aC5QSSApO1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMCBdID0geCAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5yeCAqIHIgKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTEuY292ZXJYICArIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS54O1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMSBdID0geiAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5yeSAqIHIgKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTEuY292ZXJZICArIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS55O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKCBsZXQgaSA9IGwgLyAyOyBpIDwgbDsgaSArKyApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBub3JtYWxzWyBpICogMyArIDAgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBub3JtYWxzWyBpICogMyArIDEgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHogPSBub3JtYWxzWyBpICogMyArIDIgXTtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgciA9ICggeCA9PSAwICYmIHogPT0gMCApID8gMSA6ICggTWF0aC5hY29zKCAtIHkgKSAvIE1hdGguc3FydCggeCAqIHggKyB6ICogeiApICkgKiAoIDIgLyBNYXRoLlBJICk7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAwIF0gPSAtIHggKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIucnggKiByICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUyLmNvdmVyWCAgKyBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIueDtcbiAgICAgICAgICAgICAgICAgICAgdXZzWyBpICogMiArIDEgXSA9IHogKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIucnkgKiByICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUyLmNvdmVyWSAgKyBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIueTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWCggb3B0aW9ucy5yb3RhdGVYKTtcbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVZKCBvcHRpb25zLnJvdGF0ZVkpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVooIG9wdGlvbnMucm90YXRlWik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBnZW9tZXRyeS5zY2FsZSggLSAxLCAxLCAxICk7XG4gICAgICAgICAgICAvL2RlZmluZSBtZXNoXG4gICAgICAgICAgICB0aGlzLm1lc2ggPSBuZXcgVEhSRUUuTWVzaChnZW9tZXRyeSxcbiAgICAgICAgICAgICAgICBuZXcgVEhSRUUuTWVzaEJhc2ljTWF0ZXJpYWwoeyBtYXA6IHRoaXMudGV4dHVyZX0pXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgLy90aGlzLm1lc2guc2NhbGUueCA9IC0xO1xuICAgICAgICAgICAgdGhpcy5zY2VuZS5hZGQodGhpcy5tZXNoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBlbmFibGVWUjogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5WUk1vZGUgPSB0cnVlO1xuICAgICAgICAgICAgaWYodHlwZW9mIHZySE1EICE9PSAndW5kZWZpbmVkJyl7XG4gICAgICAgICAgICAgICAgdmFyIGV5ZVBhcmFtc0wgPSB2ckhNRC5nZXRFeWVQYXJhbWV0ZXJzKCAnbGVmdCcgKTtcbiAgICAgICAgICAgICAgICB2YXIgZXllUGFyYW1zUiA9IHZySE1ELmdldEV5ZVBhcmFtZXRlcnMoICdyaWdodCcgKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuZXllRk9WTCA9IGV5ZVBhcmFtc0wucmVjb21tZW5kZWRGaWVsZE9mVmlldztcbiAgICAgICAgICAgICAgICB0aGlzLmV5ZUZPVlIgPSBleWVQYXJhbXNSLnJlY29tbWVuZGVkRmllbGRPZlZpZXc7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuY2FtZXJh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ZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlV2hlZWw6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHBhcmVudC5oYW5kbGVNb3VzZVdoZWVsKGV2ZW50KTtcbiAgICAgICAgICAgIC8vIFdlYktpdFxuICAgICAgICAgICAgaWYgKCBldmVudC53aGVlbERlbHRhWSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYS5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YVkgKiAwLjA1O1xuICAgICAgICAgICAgICAgIC8vIE9wZXJhIC8gRXhwbG9yZXIgOVxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQud2hlZWxEZWx0YSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYS5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YSAqIDAuMDU7XG4gICAgICAgICAgICAgICAgLy8gRmlyZWZveFxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQuZGV0YWlsICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiArPSBldmVudC5kZXRhaWwgKiAxLjA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS5mb3YgPSBNYXRoLm1pbih0aGlzLnNldHRpbmdzLm1heEZvdiwgdGhpcy5jYW1lcmEuZm92KTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiA9IE1hdGgubWF4KHRoaXMuc2V0dGluZ3MubWluRm92LCB0aGlzLmNhbWVyYS5mb3YpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgaWYodGhpcy5WUk1vZGUpe1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgPSB0aGlzLmNhbWVyYS5mb3Y7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLmZvdiA9IHRoaXMuY2FtZXJhLmZvdjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlVG91Y2hNb3ZlOiBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgIHBhcmVudC5oYW5kbGVUb3VjaE1vdmUuY2FsbCh0aGlzLCBldmVudCk7XG4gICAgICAgICAgICBpZih0aGlzLmlzVXNlclBpbmNoKXtcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudERpc3RhbmNlID0gVXRpbC5nZXRUb3VjaGVzRGlzdGFuY2UoZXZlbnQudG91Y2hlcyk7XG4gICAgICAgICAgICAgICAgZXZlbnQud2hlZWxEZWx0YVkgPSAgKGN1cnJlbnREaXN0YW5jZSAtIHRoaXMubXVsdGlUb3VjaERpc3RhbmNlKSAqIDI7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVNb3VzZVdoZWVsLmNhbGwodGhpcywgZXZlbnQpO1xuICAgICAgICAgICAgICAgIHRoaXMubXVsdGlUb3VjaERpc3RhbmNlID0gY3VycmVudERpc3RhbmNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIHJlbmRlcjogZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHBhcmVudC5yZW5kZXIuY2FsbCh0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLnRhcmdldC54ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLmNvcyggdGhpcy50aG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G4gICAgICAgICAgICAgICAgICAgIHZhciBsb25SID0gdGhpcy5sb24gLSB0aGlzLnNldHRpbmdzLlZSR2FwRGVncmVlO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aGV0YUwgPSBUSFJFRS5NYXRoLmRlZ1RvUmFkKCBsb25MICk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0aGV0YVIgPSBUSFJFRS5NYXRoLmRlZ1RvUmFkKCBsb25SICk7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldEwgPSBVdGlsLmRlZXBDb3B5KHRoaXMuY2FtZXJhLnRhcmdldCk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldEwueCA9IDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5jb3MoIHRoZXRhTCApO1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRMLnogPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguc2luKCB0aGV0YUwgKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmxvb2tBdCh0YXJnZXRMKTtcblxuICAgICAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0UiA9IFV0aWwuZGVlcENvcHkodGhpcy5jYW1lcmEudGFyZ2V0KTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ui54ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLmNvcyggdGhldGFSICk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldFIueiA9IDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5zaW4oIHRoZXRhUiApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIubG9va0F0KHRhcmdldFIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyByZW5kZXIgbGVmdCBleWVcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFZpZXdw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ICAgICAgICAgICAgaWYob3B0aW9ucy5jYWxsYmFjaykgb3B0aW9ucy5jYWxsYmFjaygpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZVJlc2l6ZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcGFyZW50LmhhbmRsZVJlc2l6ZS5jYWxsKHRoaXMpO1xuICAgICAgICAgICAgdmFyIGFzcGVjdFJhdGlvID0gdGhpcy53aWR0aCAvIHRoaXMuaGVpZ2h0O1xuICAgICAgICAgICAgaWYoIXRoaXMuVlJNb2RlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmFzcGVjdCA9IGFzcGVjdFJhdGlvO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICBhc3BlY3RSYXRpbyAvPSAyO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5hc3BlY3QgPSBhc3BlY3RSYXRpbztcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIuYXNwZWN0ID0gYXNwZWN0UmF0aW87XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLnVwZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlV2hlZWw6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHBhcmVudC5oYW5kbGVNb3VzZVdoZWVsKGV2ZW50KTtcbiAgICAgICAgICAgIC8vIFdlYktpdFxuICAgICAgICAgICAgaWYgKCBldmVudC53aGVlbERlbHRhWSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92IC09IGV2ZW50LndoZWVsRGVsdGFZICogMC4wNTtcbiAgICAgICAgICAgICAgICAvLyBPcGVyYSAvIEV4cGxvcmVyIDlcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIGV2ZW50LndoZWVsRGVsdGEgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmZvdiAtPSBldmVudC53aGVlbERlbHRhICogMC4wNTtcbiAgICAgICAgICAgICAgICAvLyBGaXJlZm94XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBldmVudC5kZXRhaWwgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmZvdiArPSBldmVudC5kZXRhaWwgKiAxLjA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92ID0gTWF0aC5taW4odGhpcy5zZXR0aW5ncy5tYXhGb3YsIHRoaXMuY2FtZXJhTC5mb3YpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmZvdiA9IE1hdGgubWF4KHRoaXMuc2V0dGluZ3MubWluRm92LCB0aGlzLmNhbWVyYUwuZm92KTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhTC51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICBpZih0aGlzLlZSTW9kZSl7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLmZvdiA9IHRoaXMuY2FtZXJhTC5mb3Y7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnVwZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBlbmFibGVWUjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICB0aGlzLlZSTW9kZSA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLnNjZW5lLmFkZCh0aGlzLm1lc2hSKTtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlUmVzaXplKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZGlzYWJsZVZSOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHRoaXMuVlJNb2RlID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnNjZW5lLnJlbW92ZSh0aGlzLm1lc2hSKTtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlUmVzaXplKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgcmVuZGVyOiBmdW5jdGlvbigpe1xuICAgICAgICAgICAgcGFyZW50LnJlbmRlci5jYWxsKHRoaXMpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmFMLnRhcmdldC54ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLmNvcyggdGhpcy50aGV0YSApO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmFMLnRhcmdldC55ID0gNTAwICogTWF0aC5jb3MoIHRoaXMucGhpICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYUwudGFyZ2V0LnogPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguc2luKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYUwubG9va0F0KHRoaXMuY2FtZXJhTC50YXJnZXQpO1xuXG4gICAgICAgICAgICBpZih0aGlzLlZSTW9kZSl7XG4gICAgICAgICAgICAgICAgdmFyIHZpZXdQb3J0V2lkdGggPSB0aGlzLndpZHRoIC8gMiwgdmlld1BvcnRIZWlnaHQgPSB0aGlzLmhlaWdodDtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIudGFyZ2V0LnggPSAxMDAwICsgNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLmNvcyggdGhpcy50aGV0YSApO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi50YXJnZXQueSA9IDUwMCAqIE1hdGguY29zKCB0aGlzLnBoaSApO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi50YXJnZXQueiA9IDUwMCA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WjogMCxcblxuICAgIGF1dG9Nb2JpbGVPcmllbnRhdGlvbjogZmFsc2UsXG4gICAgbW9iaWxlVmlicmF0aW9uVmFsdWU6IHV0aWwuaXNJb3MoKT8gMC4wMjIgOiAxLFxuXG4gICAgVlJFbmFibGU6IHRydWUsXG4gICAgVlJHYXBEZWdyZWU6IDIuNSxcblxuICAgIGNsb3NlUGFub3JhbWE6IGZhbHNlLFxuXG4gICAgaGVscGVyQ2FudmFzOiB7fSxcblxuICAgIGR1YWxGaXNoOiB7XG4gICAgICAgIHdpZHRoOiAxOTIwLFxuICAgICAgICBoZWlnaHQ6IDEwODAsXG4gICAgICAgIGNpcmNsZTE6IHtcbiAgICAgICAgICAgIHg6IDAuMjQwNjI1LFxuICAgICAgICAgICAgeTogMC41NTM3MDQsXG4gICAgICAgICAgICByeDogMC4yMzMzMyxcbiAgICAgICAgICAgIHJ5OiAwLjQzMTQ4LFxuICAgICAgICAgICAgY292ZXJYOiAwLjkxMyxcbiAgICAgICAgICAgIGNvdmVyWTogMC45XG4gICAgICAgIH0sXG4gICAgICAgIGNpcmNsZTI6IHtcbiAgICAgICAgICAgIHg6IDAuNzU3MjkyLFxuICAgICAgICAgICAgeTogMC41NTM3MDQsXG4gICAgICAgICAgICByeDogMC4yMzIyOTIsXG4gICAgICAgICAgICByeTogMC40Mjk2Mjk2LFxuICAgICAgICAgICAgY292ZXJYOiAwLjkxMyxcbiAgICAgICAgICAgIGNvdmVyWTogMC45MzA4XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5mdW5jdGlvbiBwbGF5ZXJSZXNpemUocGxheWVyKXtcbiAgICB2YXIgY2FudmFzID0gcGxheWVyLmdldENoaWxkKCdDYW52YXMnKTtcbiAgICByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgICBwbGF5ZXIuZWwoKS5zdHlsZS53aWR0aCA9IHdpbmRvdy5pbm5lcldpZHRoICsgXCJweFwiO1xuICAgICAgICBwbGF5ZXIuZWwoKS5zdHlsZS5o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AgICAgIHJldHVybiB2aWRlb2pzLnV0aWwubWVyZ2VPcHRpb25zKGRlZmF1bHRzLCBvcHRpb25zKTtcbiAgICB9LFxuICAgIGdldFRlY2g6IGdldFRlY2gsXG4gICAgZ2V0RnVsbHNjcmVlblRvZ2dsZUNsaWNrRm46IGdldEZ1bGxzY3JlZW5Ub2dnbGVDbGlja0ZuXG59KSk7Il19 diff --git a/dist/videojs-panorama.v4.min.js b/dist/videojs-panorama.v4.min.js index 05a7a9b..a2c79fd 100644 --- a/dist/videojs-panorama.v4.min.js +++ b/dist/videojs-panorama.v4.min.js @@ -1 +1 @@ -!function e(t,i,n){function a(s,o){if(!i[s]){if(!t[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,function(e){var i=t[s][1][e];return a(i?i:e)},c,c.exports,e,t,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s=e.video.duration}function d(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&c(t)&&(t.driver.currentTime=0)),l(t.video,t.driver.currentTime)):t.video.networkState!==t.video.NETWORK_IDLE||t.video.buffered.length||t.video.load(),t.video.ended&&(delete t.video[x],t.video.pause(!0))}function u(){var e=this,t=e[M];return e.webkitDisplayingFullscreen?void e[T]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(l(e,0,!0),t.driver.src=e.src),void(e.paused&&(t.paused=!1,e.buffered.length||e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(o(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&o(e,"playing")))))}function f(e){var t=this,i=t[M];i.driver.pause(),i.updater.stop(),t.webkitDisplayingFullscreen&&t[L](),i.paused&&!e||(i.paused=!0,i.hasAudio||o(t,"pause"),t.ended&&(t[x]=!0,o(t,"ended")))}function v(e,t){var i=e[M]={};i.paused=!0,i.hasAudio=t,i.video=e,i.updater=w.frameIntervalometer(d.bind(i)),t?i.driver=h(e):(e.addEventListener("canplay",function(){e.paused||o(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,c(i)&&l(e,0)},get ended(){return c(i)}}),e.addEventListener("emptied",function(){var t=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(l(e,0,!0),i.driver.src=e.src,t?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?t&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[T]())}),t&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){R.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function p(e){var t=e[M];e[T]=e.play,e[L]=e.pause,e.play=u,e.pause=f,r(e,"paused",t.driver),r(e,"muted",t.driver,!0),r(e,"playbackRate",t.driver,!0),r(e,"ended",t.driver),r(e,"loop",t.driver,!0),a(e,"seeking"),a(e,"seeked"),a(e,"timeupdate",x,!1),a(e,"ended",x,!1)}function m(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),i&&!y||e[M]||(v(e,t),p(e),e.classList.add("IIV"),!t&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var g,b=n(e("poor-mans-symbol")),w=e("intervalometer"),y=/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,M=b(),x=b(),T=b("nativeplay"),L=b("nativepause"),R=[],C=0;m.isWhitelisted=y,t.exports=m},{intervalometer:1,"poor-mans-symbol":3}],3:[function(e,t,i){"use strict";var n="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol;t.exports=n},{}],4:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("../lib/Detector"),r=n(a),s=e("../lib/MobileBuffering"),o=n(s),h=2,l=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{constructor:function(n,a){this.settings=a,this.width=n.el().offsetWidth,this.height=n.el().offsetHeight,this.lon=a.initLon,this.lat=a.initLat,this.phi=0,this.theta=0,this.videoType=a.videoType,this.clickToToggle=a.clickToToggle,this.mouseDown=!1,this.isUserInteracting=!1,this.renderer=new t.WebGLRenderer,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.autoClear=!1,this.renderer.setClearColor(0,1);var s=i.getTech(n);if(this.supportVideoTexture=r.default.supportVideoTexture(),this.liveStreamOnSafari=r.default.isLiveStreamOnSafari(s),this.liveStreamOnSafari&&(this.supportVideoTexture=!1),this.supportVideoTexture)this.texture=new t.Texture(s);else{this.helperCanvas=n.addChild("HelperCanvas",{video:s,width:a.helperCanvas.width?a.helperCanvas.width:this.width,height:a.helperCanvas.height?a.helperCanvas.height:this.height});var o=this.helperCanvas.el();this.texture=new t.Texture(o)}s.style.display="none",this.texture.generateMipmaps=!1,this.texture.minFilter=t.LinearFilter,this.texture.maxFilter=t.LinearFilter,this.texture.format=t.RGBFormat,this.el_=this.renderer.domElement,this.el_.classList.add("vjs-video-canvas"),a.el=this.el_,e.call(this,n,a),this.attachControlEvents(),this.player().on("play",function(){this.time=(new Date).getTime(),this.animate()}.bind(this))},attachControlEvents:function(){this.on("mousemove",this.handleMouseMove.bind(this)),this.on("touchmove",this.handleMouseMove.bind(this)),this.on("mousedown",this.handleMouseDown.bind(this)),this.on("touchstart",this.handleMouseDown.bind(this)),this.on("mouseup",this.handleMouseUp.bind(this)),this.on("touchend",this.handleMouseUp.bind(this)),this.settings.scrollable&&(this.on("mousewheel",this.handleMouseWheel.bind(this)),this.on("MozMousePixelScroll",this.handleMouseWheel.bind(this))),this.on("mouseenter",this.handleMouseEnter.bind(this)),this.on("mouseleave",this.handleMouseLease.bind(this))},handleResize:function(){this.width=this.player().el().offsetWidth,this.height=this.player().el().offsetHeight,this.renderer.setSize(this.width,this.height)},handleMouseUp:function(e){if(this.mouseDown=!1,this.clickToToggle){var t=e.clientX||e.changedTouches&&e.changedTouches[0].clientX,i=e.clientY||e.changedTouches&&e.changedTouches[0].clientY;if("undefined"==typeof t||"undefined"===i)return;var n=Math.abs(t-this.onPointerDownPointerX),a=Math.abs(i-this.onPointerDownPointerY);n<.1&&a<.1&&(this.player().paused()?this.player().play():this.player().pause())}},handleMouseDown:function(e){e.preventDefault();var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;"undefined"!=typeof t&&"undefined"!==i&&(this.mouseDown=!0,this.onPointerDownPointerX=t,this.onPointerDownPointerY=i,this.onPointerDownLon=this.lon,this.onPointerDownLat=this.lat)},handleMouseMove:function(e){var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;if("undefined"!=typeof t&&"undefined"!==i)if(this.settings.clickAndDrag)this.mouseDown&&(this.lon=.2*(this.onPointerDownPointerX-t)+this.onPointerDownLon,this.lat=.2*(i-this.onPointerDownPointerY)+this.onPointerDownLat);else{var n=e.pageX-this.el_.offsetLeft,a=e.pageY-this.el_.offsetTop;this.lon=n/this.width*430-225,this.lat=a/this.height*-180+90}},handleMobileOrientation:function(e){if("undefined"!=typeof e.rotationRate){var t=e.rotationRate.alpha,i=e.rotationRate.beta,n="undefined"!=typeof e.portrait?e.portrait:window.matchMedia("(orientation: portrait)").matches,a="undefined"!=typeof e.landscape?e.landscape:window.matchMedia("(orientation: landscape)").matches,r=e.orientation||window.orientation;if(n)this.lon=this.lon-i*this.settings.mobileVibrationValue,this.lat=this.lat+t*this.settings.mobileVibrationValue;else if(a){var s=-90;"undefined"!=typeof r&&(s=r),this.lon=s==-90?this.lon+t*this.settings.mobileVibrationValue:this.lon-t*this.settings.mobileVibrationValue,this.lat=s==-90?this.lat+i*this.settings.mobileVibrationValue:this.lat-i*this.settings.mobileVibrationValue}}},handleMouseWheel:function(e){e.stopPropagation(),e.preventDefault()},handleMouseEnter:function(e){this.isUserInteracting=!0},handleMouseLease:function(e){this.isUserInteracting=!1,this.mouseDown&&(this.mouseDown=!1)},animate:function(){if(this.requestAnimationId=requestAnimationFrame(this.animate.bind(this)),!this.player().paused()&&"undefined"!=typeof this.texture&&(!this.isPlayOnMobile&&this.player().readyState()>=h||this.isPlayOnMobile&&this.player().hasClass("vjs-playing"))){var e=(new Date).getTime();if(e-this.time>=30&&(this.texture.needsUpdate=!0,this.time=e),this.isPlayOnMobile){var t=this.player().currentTime();o.default.isBuffering(t)?this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")||this.player().addClass("vjs-panorama-mobile-inline-video-buffering"):this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")&&this.player().removeClass("vjs-panorama-mobile-inline-video-buffering")}}this.render()},render:function(){if(!this.isUserInteracting){var e=this.lat>this.settings.initLat?-1:1,i=this.lon>this.settings.initLon?-1:1;this.settings.backToVerticalCenter&&(this.lat=this.lat>this.settings.initLat-Math.abs(this.settings.returnStepLat)&&this.latthis.settings.initLon-Math.abs(this.settings.returnStepLon)&&this.lon2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene,this.camera=new t.PerspectiveCamera(i.initFov,this.width/this.height,1,2e3),this.camera.target=new t.Vector3(0,0,0);var a="equirectangular"===this.videoType?new t.SphereGeometry(500,60,40):new t.SphereBufferGeometry(500,60,40).toNonIndexed();if("fisheye"===this.videoType){for(var r=a.attributes.normal.array,s=a.attributes.uv.array,o=0,h=r.length/3;o=13},isLiveStreamOnSafari:function(e){for(var t=e.querySelectorAll("source"),i=!1,n=0;nWebGL.
','Find out how to get it here.'].join("\n"):['Your browser does not seem to support WebGL.
','Find out how to get it here.'].join("\n")),e},addGetWebGLMessage:function(e){var t,i,a;e=e||{},t=void 0!==e.parent?e.parent:document.body,i=void 0!==e.id?e.id:"oldie",a=n.getWebGLErrorMessage(),a.id=i,t.appendChild(a)}};i.default=n},{}],7:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=document.createElement("canvas");n.className="vjs-video-helper-canvas";var a=function(e){return{constructor:function(t,i){this.videoElement=i.video,this.width=i.width,this.height=i.height,n.width=this.width,n.height=this.height,n.style.display="none",i.el=n,this.context=n.getContext("2d"),this.context.drawImage(this.videoElement,0,0,this.width,this.height),e.call(this,t,i)},getContext:function(){return this.context},update:function(){this.context.drawImage(this.videoElement,0,0,this.width,this.height)},el:function(){return n}}};i.default=a},{}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={prev_currentTime:0,counter:0,isBuffering:function(e){return e==this.prev_currentTime?this.counter++:this.counter=0,this.prev_currentTime=e,this.counter>10&&(this.counter=10,!0)}};i.default=n},{}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e){var t=document.createElement("div");return t.className="vjs-video-notice-label",{constructor:function(i,a){"object"==n(a.NoticeMessage)?(t=a.NoticeMessage,a.el=a.NoticeMessage):"string"==typeof a.NoticeMessage&&(t.innerHTML=a.NoticeMessage,a.el=t),e.call(this,i,a)},el:function(){return t}}};i.default=a},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("./BaseCanvas"),r=n(a),s=e("./Util"),o=n(s),h=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene;var a=this.width/this.height;this.cameraL=new t.PerspectiveCamera(i.initFov,a,1,2e3),this.cameraL.target=new t.Vector3(0,0,0),this.cameraR=new t.PerspectiveCamera(i.initFov,a/2,1,2e3),this.cameraR.position.set(1e3,0,0),this.cameraR.target=new t.Vector3(1e3,0,0);for(var r=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),s=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),o=r.attributes.uv.array,h=r.attributes.normal.array,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i]);return t}function d(e){var t={};for(var i in e)t[i]=e[i];return t}Object.defineProperty(i,"__esModule",{value:!0}),i.default={whichTransitionEvent:n,mobileAndTabletcheck:a,isIos:r,isRealIphone:s,fovToProjection:l,extend:c,deepCopy:d}},{}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e){return{constructor:function(t,i){e.call(this,t,i)},buildCSSClass:function(){return"vjs-VR-control "+e.prototype.buildCSSClass.call(this)},handleClick:function(){var e=this.player().getChild("Canvas");e.VRMode?e.disableVR():e.enableVR(),e.VRMode?this.addClass("enable"):this.removeClass("enable"),e.VRMode?this.player().trigger("VRModeOn"):this.player().trigger("VRModeOff")},controlText_:"VR"}};i.default=n},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.getChild("Canvas");return function(){e.el().style.width=window.innerWidth+"px",e.el().style.height=window.innerHeight+"px",t.handleResize()}}function r(e,t){var i=a(e);e.controlBar.fullscreenToggle.off("tap",t),e.controlBar.fullscreenToggle.on("tap",function(){var t=e.getChild("Canvas");e.isFullscreen()?(e.isFullscreen(!1),e.exitFullWindow(),e.el().style.width="",e.el().style.height="",t.handleResize(),window.removeEventListener("devicemotion",i)):(e.isFullscreen(!0),e.enterFullWindow(),i(),window.addEventListener("devicemotion",i))})}Object.defineProperty(i,"__esModule",{value:!0});var s=e("./lib/Util"),o=n(s),h=e("./lib/Detector"),l=n(h),c=e("iphone-inline-video"),d=n(c),u=o.default.mobileAndTabletcheck(),f={clickAndDrag:u,showNotice:!0,NoticeMessage:"Please use your mouse drag and drop the video.",autoHideNotice:3e3,scrollable:!0,initFov:75,maxFov:105,minFov:51,initLat:0,initLon:-180,returnStepLat:.5,returnStepLon:2,backToVerticalCenter:!u,backToHorizonCenter:!u,clickToToggle:!1,minLat:-85,maxLat:85,minLon:-(1/0),maxLon:1/0,videoType:"equirectangular",rotateX:0,rotateY:0,rotateZ:0,autoMobileOrientation:!1,mobileVibrationValue:o.default.isIos()?.022:1,VREnable:!0,VRGapDegree:2.5,closePanorama:!1,helperCanvas:{},dualFish:{width:1920,height:1080,circle1:{x:.240625,y:.553704,rx:.23333,ry:.43148,coverX:.913,coverY:.9},circle2:{x:.757292,y:.553704,rx:.232292,ry:.4296296,coverX:.913,coverY:.9308}}},v=function(e,t,i){if(e.addClass("vjs-panorama"),!l.default.webgl)return p(e,{NoticeMessage:l.default.getWebGLErrorMessage(),autoHideNotice:t.autoHideNotice}),void(t.callback&&t.callback());e.addChild("Canvas",o.default.deepCopy(t));var n=e.getChild("Canvas");if(u){var a=i.getTech(e);o.default.isRealIphone()&&(a.setAttribute("playsinline",""),(0,d.default)(a,!0)),o.default.isIos()&&r(e,i.getFullscreenToggleClickFn(e)),e.addClass("vjs-panorama-mobile-inline-video"),e.removeClass("vjs-using-native-controls"),n.playOnMobile()}t.showNotice&&e.on("playing",function(){p(e,o.default.deepCopy(t))}),t.VREnable&&e.controlBar.addChild("VRButton",{},e.controlBar.children().length-1),n.hide(),e.on("play",function(){n.show()}),e.on("fullscreenchange",function(){n.handleResize()}),t.callback&&t.callback()},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{NoticeMessage:""},i=e.addChild("Notice",t);t.autoHideNotice>0&&setTimeout(function(){i.addClass("vjs-video-notice-fadeOut");var e=o.default.whichTransitionEvent(),t=function t(){i.hide(),i.removeClass("vjs-video-notice-fadeOut"),i.off(e,t)};i.on(e,t)},t.autoHideNotice)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["equirectangular","fisheye","3dVideo","dual_fisheye"],i=function(i){var n=this;return e.mergeOption&&(i=e.mergeOption(f,i)),"undefined"==typeof e._init||"function"!=typeof e._init?void console.error("plugin must implement init function()."):(t.indexOf(i.videoType)==-1&&(i.videoType=f.videoType),e._init(i),void this.ready(function(){v(n,i,e)}))};return i.VERSION="0.1.3",i};i.default=m},{"./lib/Detector":6,"./lib/Util":11,"iphone-inline-video":2}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return e.tech?e.tech.el():e.h.el()}function r(e){return e.controlBar.fullscreenToggle.onClick||e.controlBar.fullscreenToggle.u}var s=e("./lib/Canvas"),o=n(s),h=e("./lib/ThreeCanvas"),l=n(h),c=e("./lib/Notice"),d=n(c),u=e("./lib/HelperCanvas"),f=n(u),v=e("./lib/VRButton"),p=n(v),m=e("./plugin"),g=n(m),b=videojs.Component,w=function(e,t){this.constructor(e,t)},y=(0,d.default)(b);y.init=w,videojs.Notice=b.extend(y);var M=(0,f.default)(b);M.init=w,videojs.HelperCanvas=b.extend(M);var x=videojs.Button,T=(0,p.default)(x);T.init=w,T.onClick=T.u=T.handleClick,T.buttonText=T.ta=T.controlText_,T.T=function(){return"vjs-VR-control "+x.prototype.T.call(this)},videojs.VRButton=x.extend(T),videojs.plugin("panorama",(0,g.default)({_init:function(e){var t="3dVideo"!==e.videoType?(0,o.default)(b,window.THREE,{getTech:a}):(0,l.default)(b,window.THREE,{getTech:a});t.init=w,videojs.Canvas=b.extend(t)},mergeOption:function(e,t){return videojs.util.mergeOptions(e,t)},getTech:a,getFullscreenToggleClickFn:r}))},{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]); \ No newline at end of file +!function e(t,i,n){function a(s,o){if(!i[s]){if(!t[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,function(e){var i=t[s][1][e];return a(i?i:e)},c,c.exports,e,t,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s=e.video.duration}function d(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&c(t)&&(t.driver.currentTime=0)),l(t.video,t.driver.currentTime)):t.video.networkState!==t.video.NETWORK_IDLE||t.video.buffered.length||t.video.load(),t.video.ended&&(delete t.video[T],t.video.pause(!0))}function u(){var e=this,t=e[y];return e.webkitDisplayingFullscreen?void e[x]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(l(e,0,!0),t.driver.src=e.src),void(e.paused&&(t.paused=!1,e.buffered.length||e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(o(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&o(e,"playing")))))}function f(e){var t=this,i=t[y];i.driver.pause(),i.updater.stop(),t.webkitDisplayingFullscreen&&t[L](),i.paused&&!e||(i.paused=!0,i.hasAudio||o(t,"pause"),t.ended&&(t[T]=!0,o(t,"ended")))}function v(e,t){var i=e[y]={};i.paused=!0,i.hasAudio=t,i.video=e,i.updater=w.frameIntervalometer(d.bind(i)),t?i.driver=h(e):(e.addEventListener("canplay",function(){e.paused||o(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,c(i)&&l(e,0)},get ended(){return c(i)}}),e.addEventListener("emptied",function(){var t=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(l(e,0,!0),i.driver.src=e.src,t?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?t&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[x]())}),t&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){R.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function p(e){var t=e[y];e[x]=e.play,e[L]=e.pause,e.play=u,e.pause=f,r(e,"paused",t.driver),r(e,"muted",t.driver,!0),r(e,"playbackRate",t.driver,!0),r(e,"ended",t.driver),r(e,"loop",t.driver,!0),a(e,"seeking"),a(e,"seeked"),a(e,"timeupdate",T,!1),a(e,"ended",T,!1)}function m(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),i&&!M||e[y]||(v(e,t),p(e),e.classList.add("IIV"),!t&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var g,b=n(e("poor-mans-symbol")),w=e("intervalometer"),M=/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,y=b(),T=b(),x=b("nativeplay"),L=b("nativepause"),R=[],C=0;m.isWhitelisted=M,t.exports=m},{intervalometer:1,"poor-mans-symbol":3}],3:[function(e,t,i){"use strict";var n="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol;t.exports=n},{}],4:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("../lib/Detector"),r=n(a),s=e("../lib/MobileBuffering"),o=n(s),h=e("../lib/Util"),l=n(h),c=2,d=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{constructor:function(n,a){this.settings=a,this.width=n.el().offsetWidth,this.height=n.el().offsetHeight,this.lon=a.initLon,this.lat=a.initLat,this.phi=0,this.theta=0,this.videoType=a.videoType,this.clickToToggle=a.clickToToggle,this.mouseDown=!1,this.isUserInteracting=!1,this.renderer=new t.WebGLRenderer,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.autoClear=!1,this.renderer.setClearColor(0,1);var s=i.getTech(n);if(this.supportVideoTexture=r.default.supportVideoTexture(),this.liveStreamOnSafari=r.default.isLiveStreamOnSafari(s),this.liveStreamOnSafari&&(this.supportVideoTexture=!1),this.supportVideoTexture)this.texture=new t.Texture(s);else{this.helperCanvas=n.addChild("HelperCanvas",{video:s,width:a.helperCanvas.width?a.helperCanvas.width:this.width,height:a.helperCanvas.height?a.helperCanvas.height:this.height});var o=this.helperCanvas.el();this.texture=new t.Texture(o)}s.style.display="none",this.texture.generateMipmaps=!1,this.texture.minFilter=t.LinearFilter,this.texture.maxFilter=t.LinearFilter,this.texture.format=t.RGBFormat,this.el_=this.renderer.domElement,this.el_.classList.add("vjs-video-canvas"),a.el=this.el_,e.call(this,n,a),this.attachControlEvents(),this.player().on("play",function(){this.time=(new Date).getTime(),this.animate()}.bind(this))},attachControlEvents:function(){this.on("mousemove",this.handleMouseMove.bind(this)),this.on("touchmove",this.handleTouchMove.bind(this)),this.on("mousedown",this.handleMouseDown.bind(this)),this.on("touchstart",this.handleTouchStart.bind(this)),this.on("mouseup",this.handleMouseUp.bind(this)),this.on("touchend",this.handleTouchEnd.bind(this)),this.settings.scrollable&&(this.on("mousewheel",this.handleMouseWheel.bind(this)),this.on("MozMousePixelScroll",this.handleMouseWheel.bind(this))),this.on("mouseenter",this.handleMouseEnter.bind(this)),this.on("mouseleave",this.handleMouseLease.bind(this))},handleResize:function(){this.width=this.player().el().offsetWidth,this.height=this.player().el().offsetHeight,this.renderer.setSize(this.width,this.height)},handleMouseUp:function(e){if(this.mouseDown=!1,this.clickToToggle){var t=e.clientX||e.changedTouches&&e.changedTouches[0].clientX,i=e.clientY||e.changedTouches&&e.changedTouches[0].clientY;if("undefined"==typeof t||"undefined"===i)return;var n=Math.abs(t-this.onPointerDownPointerX),a=Math.abs(i-this.onPointerDownPointerY);n<.1&&a<.1&&(this.player().paused()?this.player().play():this.player().pause())}},handleMouseDown:function(e){e.preventDefault();var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;"undefined"!=typeof t&&"undefined"!==i&&(this.mouseDown=!0,this.onPointerDownPointerX=t,this.onPointerDownPointerY=i,this.onPointerDownLon=this.lon,this.onPointerDownLat=this.lat)},handleTouchStart:function(e){e.touches.length>1&&(this.isUserPinch=!0,this.multiTouchDistance=l.default.getTouchesDistance(e.touches)),this.handleMouseDown(e)},handleTouchEnd:function(e){this.isUserPinch=!1,this.handleMouseUp(e)},handleMouseMove:function(e){var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;if("undefined"!=typeof t&&"undefined"!==i)if(this.settings.clickAndDrag)this.mouseDown&&(this.lon=.2*(this.onPointerDownPointerX-t)+this.onPointerDownLon,this.lat=.2*(i-this.onPointerDownPointerY)+this.onPointerDownLat);else{var n=e.pageX-this.el_.offsetLeft,a=e.pageY-this.el_.offsetTop;this.lon=n/this.width*430-225,this.lat=a/this.height*-180+90}},handleTouchMove:function(e){(!this.isUserPinch||e.touches.length<=1)&&this.handleMouseMove(e)},handleMobileOrientation:function(e){if("undefined"!=typeof e.rotationRate){var t=e.rotationRate.alpha,i=e.rotationRate.beta,n="undefined"!=typeof e.portrait?e.portrait:window.matchMedia("(orientation: portrait)").matches,a="undefined"!=typeof e.landscape?e.landscape:window.matchMedia("(orientation: landscape)").matches,r=e.orientation||window.orientation;if(n)this.lon=this.lon-i*this.settings.mobileVibrationValue,this.lat=this.lat+t*this.settings.mobileVibrationValue;else if(a){var s=-90;"undefined"!=typeof r&&(s=r),this.lon=s==-90?this.lon+t*this.settings.mobileVibrationValue:this.lon-t*this.settings.mobileVibrationValue,this.lat=s==-90?this.lat+i*this.settings.mobileVibrationValue:this.lat-i*this.settings.mobileVibrationValue}}},handleMouseWheel:function(e){e.stopPropagation(),e.preventDefault()},handleMouseEnter:function(e){this.isUserInteracting=!0},handleMouseLease:function(e){this.isUserInteracting=!1,this.mouseDown&&(this.mouseDown=!1)},animate:function(){if(this.requestAnimationId=requestAnimationFrame(this.animate.bind(this)),!this.player().paused()&&"undefined"!=typeof this.texture&&(!this.isPlayOnMobile&&this.player().readyState()>=c||this.isPlayOnMobile&&this.player().hasClass("vjs-playing"))){var e=(new Date).getTime();if(e-this.time>=30&&(this.texture.needsUpdate=!0,this.time=e),this.isPlayOnMobile){var t=this.player().currentTime();o.default.isBuffering(t)?this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")||this.player().addClass("vjs-panorama-mobile-inline-video-buffering"):this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")&&this.player().removeClass("vjs-panorama-mobile-inline-video-buffering")}}this.render()},render:function(){if(!this.isUserInteracting){var e=this.lat>this.settings.initLat?-1:1,i=this.lon>this.settings.initLon?-1:1;this.settings.backToVerticalCenter&&(this.lat=this.lat>this.settings.initLat-Math.abs(this.settings.returnStepLat)&&this.latthis.settings.initLon-Math.abs(this.settings.returnStepLon)&&this.lon2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene,this.camera=new t.PerspectiveCamera(i.initFov,this.width/this.height,1,2e3),this.camera.target=new t.Vector3(0,0,0);var a="equirectangular"===this.videoType?new t.SphereGeometry(500,60,40):new t.SphereBufferGeometry(500,60,40).toNonIndexed();if("fisheye"===this.videoType){for(var r=a.attributes.normal.array,s=a.attributes.uv.array,o=0,h=r.length/3;o=13},isLiveStreamOnSafari:function(e){for(var t=e.querySelectorAll("source"),i=!1,n=0;nWebGL.
','Find out how to get it here.'].join("\n"):['Your browser does not seem to support WebGL.
','Find out how to get it here.'].join("\n")),e},addGetWebGLMessage:function(e){var t,i,a;e=e||{},t=void 0!==e.parent?e.parent:document.body,i=void 0!==e.id?e.id:"oldie",a=n.getWebGLErrorMessage(),a.id=i,t.appendChild(a)}};i.default=n},{}],7:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=document.createElement("canvas");n.className="vjs-video-helper-canvas";var a=function(e){return{constructor:function(t,i){this.videoElement=i.video,this.width=i.width,this.height=i.height,n.width=this.width,n.height=this.height,n.style.display="none",i.el=n,this.context=n.getContext("2d"),this.context.drawImage(this.videoElement,0,0,this.width,this.height),e.call(this,t,i)},getContext:function(){return this.context},update:function(){this.context.drawImage(this.videoElement,0,0,this.width,this.height)},el:function(){return n}}};i.default=a},{}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={prev_currentTime:0,counter:0,isBuffering:function(e){return e==this.prev_currentTime?this.counter++:this.counter=0,this.prev_currentTime=e,this.counter>10&&(this.counter=10,!0)}};i.default=n},{}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e){var t=document.createElement("div");return t.className="vjs-video-notice-label",{constructor:function(i,a){"object"==n(a.NoticeMessage)?(t=a.NoticeMessage,a.el=a.NoticeMessage):"string"==typeof a.NoticeMessage&&(t.innerHTML=a.NoticeMessage,a.el=t),e.call(this,i,a)},el:function(){return t}}};i.default=a},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("./BaseCanvas"),r=n(a),s=e("./Util"),o=n(s),h=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene;var a=this.width/this.height;this.cameraL=new t.PerspectiveCamera(i.initFov,a,1,2e3),this.cameraL.target=new t.Vector3(0,0,0),this.cameraR=new t.PerspectiveCamera(i.initFov,a/2,1,2e3),this.cameraR.position.set(1e3,0,0),this.cameraR.target=new t.Vector3(1e3,0,0);for(var r=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),s=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),o=r.attributes.uv.array,h=r.attributes.normal.array,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i]);return t}function d(e){var t={};for(var i in e)t[i]=e[i];return t}function u(e){return Math.sqrt((e[0].clientX-e[1].clientX)*(e[0].clientX-e[1].clientX)+(e[0].clientY-e[1].clientY)*(e[0].clientY-e[1].clientY))}Object.defineProperty(i,"__esModule",{value:!0}),i.default={whichTransitionEvent:n,mobileAndTabletcheck:a,isIos:r,isRealIphone:s,fovToProjection:l,extend:c,deepCopy:d,getTouchesDistance:u}},{}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e){return{constructor:function(t,i){e.call(this,t,i)},buildCSSClass:function(){return"vjs-VR-control "+e.prototype.buildCSSClass.call(this)},handleClick:function(){var e=this.player().getChild("Canvas");e.VRMode?e.disableVR():e.enableVR(),e.VRMode?this.addClass("enable"):this.removeClass("enable"),e.VRMode?this.player().trigger("VRModeOn"):this.player().trigger("VRModeOff")},controlText_:"VR"}};i.default=n},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.getChild("Canvas");return function(){e.el().style.width=window.innerWidth+"px",e.el().style.height=window.innerHeight+"px",t.handleResize()}}function r(e,t){var i=a(e);e.controlBar.fullscreenToggle.off("tap",t),e.controlBar.fullscreenToggle.on("tap",function(){var t=e.getChild("Canvas");e.isFullscreen()?(e.isFullscreen(!1),e.exitFullWindow(),e.el().style.width="",e.el().style.height="",t.handleResize(),window.removeEventListener("devicemotion",i)):(e.isFullscreen(!0),e.enterFullWindow(),i(),window.addEventListener("devicemotion",i))})}Object.defineProperty(i,"__esModule",{value:!0});var s=e("./lib/Util"),o=n(s),h=e("./lib/Detector"),l=n(h),c=e("iphone-inline-video"),d=n(c),u=o.default.mobileAndTabletcheck(),f={clickAndDrag:u,showNotice:!0,NoticeMessage:"Please use your mouse drag and drop the video.",autoHideNotice:3e3,scrollable:!0,initFov:75,maxFov:105,minFov:51,initLat:0,initLon:-180,returnStepLat:.5,returnStepLon:2,backToVerticalCenter:!u,backToHorizonCenter:!u,clickToToggle:!1,minLat:-85,maxLat:85,minLon:-(1/0),maxLon:1/0,videoType:"equirectangular",rotateX:0,rotateY:0,rotateZ:0,autoMobileOrientation:!1,mobileVibrationValue:o.default.isIos()?.022:1,VREnable:!0,VRGapDegree:2.5,closePanorama:!1,helperCanvas:{},dualFish:{width:1920,height:1080,circle1:{x:.240625,y:.553704,rx:.23333,ry:.43148,coverX:.913,coverY:.9},circle2:{x:.757292,y:.553704,rx:.232292,ry:.4296296,coverX:.913,coverY:.9308}}},v=function(e,t,i){if(e.addClass("vjs-panorama"),!l.default.webgl)return p(e,{NoticeMessage:l.default.getWebGLErrorMessage(),autoHideNotice:t.autoHideNotice}),void(t.callback&&t.callback());e.addChild("Canvas",o.default.deepCopy(t));var n=e.getChild("Canvas");if(u){var a=i.getTech(e);o.default.isRealIphone()&&(a.setAttribute("playsinline",""),(0,d.default)(a,!0)),o.default.isIos()&&r(e,i.getFullscreenToggleClickFn(e)),e.addClass("vjs-panorama-mobile-inline-video"),e.removeClass("vjs-using-native-controls"),n.playOnMobile()}t.showNotice&&e.on("playing",function(){p(e,o.default.deepCopy(t))}),t.VREnable&&e.controlBar.addChild("VRButton",{},e.controlBar.children().length-1),n.hide(),e.on("play",function(){n.show()}),e.on("fullscreenchange",function(){n.handleResize()}),t.callback&&t.callback()},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{NoticeMessage:""},i=e.addChild("Notice",t);t.autoHideNotice>0&&setTimeout(function(){i.addClass("vjs-video-notice-fadeOut");var e=o.default.whichTransitionEvent(),t=function t(){i.hide(),i.removeClass("vjs-video-notice-fadeOut"),i.off(e,t)};i.on(e,t)},t.autoHideNotice)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["equirectangular","fisheye","3dVideo","dual_fisheye"],i=function(i){var n=this;return e.mergeOption&&(i=e.mergeOption(f,i)),"undefined"==typeof e._init||"function"!=typeof e._init?void console.error("plugin must implement init function()."):(t.indexOf(i.videoType)==-1&&(i.videoType=f.videoType),e._init(i),void this.ready(function(){v(n,i,e)}))};return i.VERSION="0.1.3",i};i.default=m},{"./lib/Detector":6,"./lib/Util":11,"iphone-inline-video":2}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return e.tech?e.tech.el():e.h.el()}function r(e){return e.controlBar.fullscreenToggle.onClick||e.controlBar.fullscreenToggle.u}var s=e("./lib/Canvas"),o=n(s),h=e("./lib/ThreeCanvas"),l=n(h),c=e("./lib/Notice"),d=n(c),u=e("./lib/HelperCanvas"),f=n(u),v=e("./lib/VRButton"),p=n(v),m=e("./plugin"),g=n(m),b=videojs.Component,w=function(e,t){this.constructor(e,t)},M=(0,d.default)(b);M.init=w,videojs.Notice=b.extend(M);var y=(0,f.default)(b);y.init=w,videojs.HelperCanvas=b.extend(y);var T=videojs.Button,x=(0,p.default)(T);x.init=w,x.onClick=x.u=x.handleClick,x.buttonText=x.ta=x.controlText_,x.T=function(){return"vjs-VR-control "+T.prototype.T.call(this)},videojs.VRButton=T.extend(x),videojs.plugin("panorama",(0,g.default)({_init:function(e){var t="3dVideo"!==e.videoType?(0,o.default)(b,window.THREE,{getTech:a}):(0,l.default)(b,window.THREE,{getTech:a});t.init=w,videojs.Canvas=b.extend(t)},mergeOption:function(e,t){return videojs.util.mergeOptions(e,t)},getTech:a,getFullscreenToggleClickFn:r}))},{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]); \ No newline at end of file diff --git a/dist/videojs-panorama.v5.js b/dist/videojs-panorama.v5.js index e66f2e8..7856426 100644 --- a/dist/videojs-panorama.v5.js +++ b/dist/videojs-panorama.v5.js @@ -401,6 +401,10 @@ var _MobileBuffering = require('../lib/MobileBuffering'); var _MobileBuffering2 = _interopRequireDefault(_MobileBuffering); +var _Util = require('../lib/Util'); + +var _Util2 = _interopRequireDefault(_Util); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var HAVE_CURRENT_DATA = 2; @@ -465,11 +469,11 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { attachControlEvents: function attachControlEvents() { this.on('mousemove', this.handleMouseMove.bind(this)); - this.on('touchmove', this.handleMouseMove.bind(this)); + this.on('touchmove', this.handleTouchMove.bind(this)); this.on('mousedown', this.handleMouseDown.bind(this)); - this.on('touchstart', this.handleMouseDown.bind(this)); + this.on('touchstart', this.handleTouchStart.bind(this)); this.on('mouseup', this.handleMouseUp.bind(this)); - this.on('touchend', this.handleMouseUp.bind(this)); + this.on('touchend', this.handleTouchEnd.bind(this)); if (this.settings.scrollable) { this.on('mousewheel', this.handleMouseWheel.bind(this)); this.on('MozMousePixelScroll', this.handleMouseWheel.bind(this)); @@ -507,6 +511,19 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { this.onPointerDownLat = this.lat; }, + handleTouchStart: function handleTouchStart(event) { + if (event.touches.length > 1) { + this.isUserPinch = true; + this.multiTouchDistance = _Util2.default.getTouchesDistance(event.touches); + } + this.handleMouseDown(event); + }, + + handleTouchEnd: function handleTouchEnd(event) { + this.isUserPinch = false; + this.handleMouseUp(event); + }, + handleMouseMove: function handleMouseMove(event) { var clientX = event.clientX || event.touches && event.touches[0].clientX; var clientY = event.clientY || event.touches && event.touches[0].clientY; @@ -524,6 +541,13 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { } }, + handleTouchMove: function handleTouchMove(event) { + //handle single touch event, + if (!this.isUserPinch || event.touches.length <= 1) { + this.handleMouseMove(event); + } + }, + handleMobileOrientation: function handleMobileOrientation(event) { if (typeof event.rotationRate === "undefined") return; var x = event.rotationRate.alpha; @@ -623,7 +647,7 @@ var BaseCanvas = function BaseCanvas(baseComponent, THREE) { exports.default = BaseCanvas; -},{"../lib/Detector":6,"../lib/MobileBuffering":8}],5:[function(require,module,exports){ +},{"../lib/Detector":6,"../lib/MobileBuffering":8,"../lib/Util":11}],5:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -768,6 +792,16 @@ var Canvas = function Canvas(baseComponent, THREE) { } }, + handleTouchMove: function handleTouchMove(event) { + parent.handleTouchMove.call(this, event); + if (this.isUserPinch) { + var currentDistance = _Util2.default.getTouchesDistance(event.touches); + event.wheelDeltaY = (currentDistance - this.multiTouchDistance) * 2; + this.handleMouseWheel.call(this, event); + this.multiTouchDistance = currentDistance; + } + }, + render: function render() { parent.render.call(this); this.camera.target.x = 500 * Math.sin(this.phi) * Math.cos(this.theta); @@ -1319,6 +1353,10 @@ function deepCopy(obj) { return to; } +function getTouchesDistance(touches) { + return Math.sqrt((touches[0].clientX - touches[1].clientX) * (touches[0].clientX - touches[1].clientX) + (touches[0].clientY - touches[1].clientY) * (touches[0].clientY - touches[1].clientY)); +} + exports.default = { whichTransitionEvent: whichTransitionEvent, mobileAndTabletcheck: mobileAndTabletcheck, @@ -1326,7 +1364,8 @@ exports.default = { isRealIphone: isRealIphone, fovToProjection: fovToProjection, extend: extend, - deepCopy: deepCopy + deepCopy: deepCopy, + getTouchesDistance: getTouchesDistance }; },{}],12:[function(require,module,exports){ @@ -1670,4 +1709,4 @@ videojs.plugin('panorama', (0, _plugin2.default)({ })); },{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjoz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fCBjbGllbnRZID09PSBcInVuZGVmaW5lZFwiKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdmFyIGRpZmZYID0gTWF0aC5hYnMoY2xpZW50WCAtIHRoaXMub25Qb2ludGVyRG93blBvaW50ZXJYKTtcbiAgICAgICAgICAgICAgICB2YXIgZGlmZlkgPSBNYXRoLmFicyhjbGllbnRZIC0gdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclkpO1xuICAgICAgICAgICAgICAgIGlmKGRpZmZYIDwgMC4xICYmIGRpZmZZIDwgMC4xKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXllcigpLnBhdXNlZCgpID8gdGhpcy5wbGF5ZXIoKS5wbGF5KCkgOiB0aGlzLnBsYXllcigpLnBhdXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VEb3duOiBmdW5jdGlvbihldmVudCl7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgdmFyIGNsaWVudFggPSBldmVudC5jbGllbnRYIHx8IGV2ZW50LnRvdWNoZXMgJiYgZXZlbnQudG91Y2hlc1swXS5jbGllbnRYO1xuICAgICAgICAgICAgdmFyIGNsaWVudFkgPSBldmVudC5jbGllbnRZIHx8IGV2ZW50LnRvdWNoZXMgJiYgZXZlbnQudG91Y2hlc1swXS5jbGllbnRZO1xuICAgICAgICAgICAgaWYodHlwZW9mIGNsaWVudFggPT09IFwidW5kZWZpbmVkXCIgfHwgY2xpZW50WSA9PT0gXCJ1bmRlZmluZWRcIikgcmV0dXJuO1xuICAgICAgICAgICAgdGhpcy5tb3VzZURvd24gPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclggPSBjbGllbnRYO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclkgPSBjbGllbnRZO1xuICAgICAgICAgICAgdGhpcy5vblBvaW50ZXJEb3duTG9uID0gdGhpcy5sb247XG4gICAgICAgICAgICB0aGlzLm9uUG9pbnRlckRvd25MYXQgPSB0aGlzLmxhdDtcbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVNb3VzZU1vdmU6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHZhciBjbGllbnRYID0gZXZlbnQuY2xpZW50WCB8fCBldmVudC50b3VjaGVzICYmIGV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WDtcbiAgICAgICAgICAgIHZhciBjbGllbnRZID0gZXZlbnQuY2xpZW50WSB8fCBldmVudC50b3VjaGVzICYmIGV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WTtcbiAgICAgICAgICAgIGlmKHR5cGVvZiBjbGllbnRYID09PSBcInVuZGVmaW5lZFwiIHx8IGNsaWVudFkgPT09IFwidW5kZWZpbmVkXCIpIHJldHVybjtcbiAgICAgICAgICAgIGlmKHRoaXMuc2V0dGluZ3MuY2xpY2tBbmREcmFnKXtcbiAgICAgICAgICAgICAgICBpZih0aGlzLm1vdXNlRG93bil7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubG9uID0gKCB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWCAtIGNsaWVudFggKSAqIDAuMiArIHRoaXMub25Qb2ludGVyRG93bkxvbjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXQgPSAoIGNsaWVudFkgLSB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWSApICogMC4yICsgdGhpcy5vblBvaW50ZXJEb3duTGF0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgIHZhciB4ID0gZXZlbnQucGFnZVggLSB0aGlzLmVsXy5vZmZzZXRMZWZ0O1xuICAgICAgICAgICAgICAgIHZhciB5ID0gZXZlbnQucGFnZVkgLSB0aGlzLmVsXy5vZmZzZXRUb3A7XG4gICAgICAgICAgICAgICAgdGhpcy5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gICAgfSxcblxuICAgICAgICBoYW5kbGVNb3VzZUxlYXNlOiBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgIHRoaXMuaXNVc2VySW50ZXJhY3RpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmKHRoaXMubW91c2VEb3duKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5tb3VzZURvd24gPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBhbmltYXRlOiBmdW5jdGlvbigpe1xuICAgICAgICAgICAgdGhpcy5yZXF1ZXN0QW5pbWF0aW9uSWQgPSByZXF1ZXN0QW5pbWF0aW9uRnJhbWUoIHRoaXMuYW5pbWF0ZS5iaW5kKHRoaXMpICk7XG4gICAgICAgICAgICBpZighdGhpcy5wbGF5ZXIoKS5wYXVzZWQoKSl7XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mKHRoaXMudGV4dHVyZSkgIT09IFwidW5kZWZpbmVkXCIgJiYgKCF0aGlzLmlzUGxheU9uTW9iaWxlICYmIHRoaXMucGxheWVyKCkucmVhZHlTdGF0ZSgpID49IEhBVkVfQ1VSUkVOVF9EQVRBIHx8IHRoaXMuaXNQbGF5T25Nb2JpbGUgJiYgdGhpcy5wbGF5ZXIoKS5oYXNDbGFzcyhcInZqcy1wbGF5aW5nXCIpKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY3QgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGN0IC0gdGhpcy50aW1lID49IDMwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHR1cmUubmVlZHNVcGRhdGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50aW1lID0gY3Q7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYodGhpcy5pc1BsYXlPbk1vYmlsZSl7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3VycmVudFRpbWUgPSB0aGlzLnBsYXllcigpLmN1cnJlbnRUaW1lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZihNb2JpbGVCdWZmZXJpbmcuaXNCdWZmZXJpbmcoY3VycmVudFRpbWUpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdGhpcy5wbGF5ZXIoKS5oYXNDbGFzcyhcInZqcy1wYW5vcmFtYS1tb2JpbGUtaW5saW5lLXZpZGVvLWJ1ZmZlcmluZ1wiKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGxheWVyKCkuYWRkQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodGhpcy5wbGF5ZXIoKS5oYXNDbGFzcyhcInZqcy1wYW5vcmFtYS1tb2JpbGUtaW5saW5lLXZpZGVvLWJ1ZmZlcmluZ1wiKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGxheWVyKCkucmVtb3ZlQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTtcbiAgICAgICAgfSxcblxuICAgICAgICByZW5kZXI6IGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBpZighdGhpcy5pc1VzZXJJbnRlcmFjdGluZyl7XG4gICAgICAgICAgICAgICAgdmFyIHN5bWJvbExhdCA9ICh0aGlzLmxhdCA+IHRoaXMuc2V0dGluZ3MuaW5pdExhdCk/ICAtMSA6IDE7XG4gICAgICAgICAgICAgICAgdmFyIHN5bWJvbExvbiA9ICh0aGlzLmxvbiA+IHRoaXMuc2V0dGluZ3MuaW5pdExvbik/ICAtMSA6IDE7XG4gICAgICAgICAgICAgICAgaWYodGhpcy5zZXR0aW5ncy5iYWNrVG9WZXJ0aWNhbENlbnRlcil7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGF0ID0gKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXQgPiAodGhpcy5zZXR0aW5ncy5pbml0TGF0IC0gTWF0aC5hYnModGhpcy5zZXR0aW5ncy5yZXR1cm5TdGVwTGF0KSkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF0IDwgKHRoaXMuc2V0dGluZ3MuaW5pdExhdCArIE1hdGguYWJzKHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExhdCkpXG4gICAgICAgICAgICAgICAgICAgICk/IHRoaXMuc2V0dGluZ3MuaW5pdExhdCA6IHRoaXMubGF0ICsgdGhpcy5zZXR0aW5ncy5yZXR1cm5TdGVwTGF0ICogc3ltYm9sTGF0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZih0aGlzLnNldHRpbmdzLmJhY2tUb0hvcml6b25DZW50ZXIpe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA9IChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubG9uID4gKHRoaXMuc2V0dGluZ3MuaW5pdExvbiAtIE1hdGguYWJzKHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExvbikpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA8ICh0aGlzLnNldHRpbmdzLmluaXRMb24gKyBNYXRoLmFicyh0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMb24pKVxuICAgICAgICAgICAgICAgICAgICApPyB0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C8vZGVmaW5lIGdlb21ldHJ5XG4gICAgICAgICAgICB2YXIgZ2VvbWV0cnkgPSAodGhpcy52aWRlb1R5cGUgPT09IFwiZXF1aXJlY3Rhbmd1bGFyXCIpPyBuZXcgVEhSRUUuU3BoZXJlR2VvbWV0cnkoNTAwLCA2MCwgNDApOiBuZXcgVEhSRUUuU3BoZXJlQnVmZmVyR2VvbWV0cnkoIDUwMCwgNjAsIDQwICkudG9Ob25JbmRleGVkKCk7XG4gICAgICAgICAgICBpZih0aGlzLnZpZGVvVHlwZSA9PT0gXCJmaXNoZXllXCIpe1xuICAgICAgICAgICAgICAgIGxldCBub3JtYWxzID0gZ2VvbWV0cnkuYXR0cmlidXRlcy5ub3JtYWwuYXJyYXk7XG4gICAgICAgICAgICAgICAgbGV0IHV2cyA9IGdlb21ldHJ5LmF0dHJpYnV0ZXMudXYuYXJyYXk7XG4gICAgICAgICAgICAgICAgZm9yICggbGV0IGkgPSAwLCBsID0gbm9ybWFscy5sZW5ndGggLyAzOyBpIDwgbDsgaSArKyApIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBub3JtYWxzWyBpICogMyArIDAgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBub3JtYWxzWyBpICogMyArIDEgXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHogPSBub3JtYWxzWyBpICogMyArIDIgXTtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgciA9IE1hdGguYXNpbihNYXRoLnNxcnQoeCAqIHggKyB6ICogeikgLyBNYXRoLnNxcnQoeCAqIHggICsgeSAqIHkgKyB6ICogeikpIC8gTWF0aC5QSTtcbiAgICAgICAgICAgICAgICAgICAgaWYoeSA8IDApIHIgPSAxIC0gcjtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRoZXRhID0gKHggPT0gMCAmJiB6ID09IDApPyAwIDogTWF0aC5hY29zKHggLyBNYXRoLnNxcnQoeCAqIHggKyB6ICogeikpO1xuICAgICAgICAgICAgICAgICAgICBpZih6IDwgMCkgdGhldGEgPSB0aGV0YSAqIC0xO1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMCBdID0gLTAuOCAqIHIgKiBNYXRoLmNvcyh0aGV0YSkgKyAwLjU7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAxIF0gPSAwLjggKiByICogTWF0aC5zaW4odGhldGEpICsgMC41O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVYKCBvcHRpb25zLnJvdGF0ZVgpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVkoIG9wdGlvbnMucm90YXRlWSk7XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWiggb3B0aW9ucy5yb3RhdGVaKTtcbiAgICAgICAgICAgIH1lbHNlIGlmKHRoaXMudmlkZW9UeXBlID09PSBcImR1YWxfZmlzaGV5ZVwiKXtcbiAgICAgICAgICAgICAgICBsZXQgbm9ybWFscyA9IGdlb21ldHJ5LmF0dHJpYnV0ZXMubm9ybWFsLmFycmF5O1xuICAgICAgICAgICAgICAgIGxldCB1dnMgPSBnZW9tZXRyeS5hdHRyaWJ1dGVzLnV2LmFycmF5O1xuICAgICAgICAgICAgICAgIGxldCBsID0gbm9ybWFscy5sZW5ndGggLyAzO1xuICAgICAgICAgICAgICAgIGZvciAoIGxldCBpID0gMDsgaSA8IGwgLyAyOyBpICsrICkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgeCA9IG5vcm1hbHNbIGkgKiAzICsgMCBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IG5vcm1hbHNbIGkgKiAzICsgMSBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeiA9IG5vcm1hbHNbIGkgKiAzICsgMiBdO1xuXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0gKCB4ID09IDAgJiYgeiA9PSAwICkgPyAxIDogKCBNYXRoLmFjb3MoIHkgKSAvIE1hdGguc3FydCggeCAqIHggKyB6ICogeiApICkgKiAoIDIgLyBNYXRoLlBJICk7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAwIF0gPSB4ICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLnJ4ICogciAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5jb3ZlclggICsgb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLng7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAxIF0gPSB6ICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLnJ5ICogciAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5jb3ZlclkgICsgb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLnk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvciAoIGxldCBpID0gbCAvIDI7IGkgPCBsOyBpICsrICkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgeCA9IG5vcm1hbHNbIGkgKiAzICsgMCBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IG5vcm1hbHNbIGkgKiAzICsgMSBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeiA9IG5vcm1hbHNbIGkgKiAzICsgMiBdO1xuXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0gKCB4ID09IDAgJiYgeiA9PSAwICkgPyAxIDogKCBNYXRoLmFjb3MoIC0geSApIC8gTWF0aC5zcXJ0KCB4ICogeCArIHogKiB6ICkgKSAqICggMiAvIE1hdGguUEkgKTtcbiAgICAgICAgICAgICAgICAgICAgdXZzWyBpICogMiArIDAgXSA9IC0geCAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMi5yeCAqIHIgKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIuY292ZXJYICArIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMi54O1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMSBdID0geiAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMi5yeSAqIHIgKiBvcHRpb25zLmR1YWxGaXNoLmNpcmNsZTIuY292ZXJZICArIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMi55O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVYKCBvcHRpb25zLnJvdGF0ZVgpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVkoIG9wdGlvbnMucm90YXRlWSk7XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWiggb3B0aW9ucy5yb3RhdGVaKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGdlb21ldHJ5LnNjYWxlKCAtIDEsIDEsIDEgKTtcbiAgICAgICAgICAgIC8vZGVmaW5lIG1lc2hcbiAgICAgICAgICAgIHRoaXMubWVzaCA9IG5ldyBUSFJFRS5NZXNoKGdlb21ldHJ5LFxuICAgICAgICAgICAgICAgIG5ldyBUSFJFRS5NZXNoQmFzaWNNYXRlcmlhbCh7IG1hcDogdGhpcy50ZXh0dXJlfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICAvL3RoaXMubWVzaC5zY2FsZS54ID0gLTE7XG4gICAgICAgICAgICB0aGlzLnNjZW5lLmFkZCh0aGlzLm1lc2gpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGVuYWJsZVZSOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLlZSTW9kZSA9IHRydWU7XG4gICAgICAgICAgICBpZih0eXBlb2YgdnJITUQgIT09ICd1bmRlZmluZWQnKXtcbiAgICAgICAgICAgICAgICB2YXIgZXllUGFyYW1zTCA9IHZySE1ELmdldEV5ZVBhcmFtZXRlcnMoICdsZWZ0JyApO1xuICAgICAgICAgICAgICAgIHZhciBleWVQYXJhbXNSID0gdnJITUQuZ2V0RXllUGFyYW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yaXgoKTtcbiAgICAgICAgICAgIGlmKHRoaXMuVlJNb2RlKXtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuYXNwZWN0ID0gdGhpcy5jYW1lcmEuYXNwZWN0IC8gMjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIuYXNwZWN0ID0gdGhpcy5jYW1lcmEuYXNwZWN0IC8gMjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VXaGVlbDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgcGFyZW50LmhhbmRsZU1vdXNlV2hlZWwoZXZlbnQpO1xuICAgICAgICAgICAgLy8gV2ViS2l0XG4gICAgICAgICAgICBpZiAoIGV2ZW50LndoZWVsRGVsdGFZICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiAtPSBldmVudC53aGVlbERlbHRhWSAqIDAuMDU7XG4gICAgICAgICAgICAgICAgLy8gT3BlcmEgLyBFeHBsb3JlciA5XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBldmVudC53aGVlbERlbHRhICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiAtPSBldmVudC53aGVlbERlbHRhICogMC4wNTtcbiAgICAgICAgICAgICAgICAvLyBGaXJlZm94XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBldmVudC5kZXRhaWwgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmEuZm92ICs9IGV2ZW50LmRldGFpbCAqIDEuMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiA9IE1hdGgubWluKHRoaXMuc2V0dGluZ3MubWF4Rm92LCB0aGlzLmNhbWVyYS5mb3YpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEuZm92ID0gTWF0aC5tYXgodGhpcy5zZXR0aW5ncy5taW5Gb3YsIHRoaXMuY2FtZXJhLmZvdik7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICBpZih0aGlzLlZSTW9kZSl7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmZvdiA9IHRoaXMuY2FtZXJhLmZvdjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIuZm92ID0gdGhpcy5jYW1lcmEuZm92O1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnVwZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICByZW5kZXI6IGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBwYXJlbnQucmVuZGVyLmNhbGwodGhpcyk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS50YXJnZXQueCA9IDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5jb3MoIHRoaXMudGhldGEgKTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLnRhcmdldC55ID0gNTAwICogTWF0aC5jb3MoIHRoaXMucGhpICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS50YXJnZXQueiA9IDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5zaW4oIHRoaXMudGhldGEgKTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLmxvb2tBdCggdGhpcy5jYW1lcmEudGFyZ2V0ICk7XG5cbiAgICAgICAgICAgIGlmKCF0aGlzLlZSTW9kZSl7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5yZW5kZXIoIHRoaXMuc2NlbmUsIHRoaXMuY2FtZXJhICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgIHZhciB2aWV3UG9ydFdpZHRoID0gdGhpcy53aWR0aCAvIDIsIHZpZXdQb3J0SGVpZ2h0ID0gdGhpcy5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHZySE1EICE9PSAndW5kZWZpbmVkJyl7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5wcm9qZWN0aW9uTWF0cml4ID0gVXRpbC5mb3ZUb1Byb2plY3Rpb24oIHRoaXMuZXllRk9WTCwgdHJ1ZSwgdGhpcy5jYW1lcmEubmVhciwgdGhpcy5jYW1lcmEuZmFyICk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi5wcm9qZWN0aW9uTWF0cml4ID0gVXRpbC5mb3ZUb1Byb2plY3Rpb24oIHRoaXMuZXllRk9WUiwgdHJ1ZSwgdGhpcy5jYW1lcmEubmVhciwgdGhpcy5jYW1lcmEuZmFyICk7XG4gICAgICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsb25MID0gdGhpcy5sb24gKyB0aGlzLnNldHRpbmdzLlZSR2FwRGVncmVlO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9uUiA9IHRoaXMubG9uIC0gdGhpcy5zZXR0aW5ncy5WUkdhcERlZ3JlZTtcblxuICAgICAgICAgICAgICAgICAgICB2YXIgdGhldGFMID0gVEhSRUUuTWF0aC5kZWdUb1JhZCggbG9uTCApO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGhldGFSID0gVEhSRUUuTWF0aC5kZWdUb1JhZCggbG9uUiApO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXRMID0gVXRpbC5kZWVwQ29weSh0aGlzLmNhbWVyYS50YXJnZXQpO1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRMLnggPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguY29zKCB0aGV0YUwgKTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0TC56ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLnNpbiggdGhldGFMICk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5sb29rQXQodGFyZ2V0TCk7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldFIgPSBVdGlsLmRlZXBDb3B5KHRoaXMuY2FtZXJhLnRhcmdldCk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldFIueCA9IDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5jb3MoIHRoZXRhUiApO1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRSLnogPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguc2luKCB0aGV0YVIgKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLmxvb2tBdCh0YXJnZXRSKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gcmVuZGVyIGxlZnQgZXllXG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRWaWV3cG9ydCggMCwgMCwgdmlld1BvcnRXaWR0aCwgdmlld1BvcnRIZWlnaHQgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFNjaXNzb3IoIDAsIDAsIHZpZXdQb3J0V2lkdGgsIHZpZXdQb3J0SGVpZ2h0ICk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5yZW5kZXIoIHRoaXMuc2NlbmUsIHRoaXMuY2FtZXJhTCApO1xuXG4gICAgICAgICAgICAgICAgLy8gcmVuZGVyIHJpZ2h0IGV5ZVxuICAgICAgICAgICAgICAgIHR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biAgICAgICAgdXBkYXRlOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQuZHJhd0ltYWdlKHRoaXMudmlkZW9FbGVtZW50LCAwLCAwLCB0aGlzLndpZHRoLCB0aGlzLmhlaWdodCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZWw6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBlbGVtZW50O1xuICAgICAgICB9XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgSGVscGVyQ2FudmFzOyIsIi8qKlxuICogQ3JlYXRlZCBieSB5YW53c2ggb24gNi82LzE2LlxuICovXG52YXIgTW9iaWxlQnVmZmVyaW5nID0ge1xuICAgIHByZXZfY3VycmVudFRpbWU6IDAsXG4gICAgY291bnRlcjogMCxcbiAgICBcbiAgICBpc0J1ZmZlcmluZzogZnVuY3Rpb24gKGN1cnJlbnRUaW1lKSB7XG4gICAgICAgIGlmIChjdXJyZW50VGltZSA9PSB0aGlzLnByZXZfY3VycmVudFRpbWUpIHRoaXMuY291bnRlcisrO1xuICAgICAgICBlbHNlIHRoaXMuY291bnRlciA9IDA7XG4gICAgICAgIHRoaXMucHJldl9jdXJyZW50VGltZSA9IGN1cnJlbnRUaW1lO1xuICAgICAgICBpZih0aGlzLmNvdW50ZXIgPiAxMCl7XG4gICAgICAgICAgICAvL25vdCBsZXQgY291bnRlciBvdmVyZmxvd1xuICAgICAgICAgICAgdGhpcy5jb3VudGVyID0gMTA7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgTW9iaWxlQnVmZmVyaW5nOyIsIi8qKlxuICogQ3JlYXRlZCBieSB5YW53c2ggb24gNC80LzE2LlxuICovXG5cbnZhciBOb3RpY2UgPSBmdW5jdGlvbihiYXNlQ29tcG9uZW50KXtcbiAgICB2YXIg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hTC5hc3BlY3QgPSBhc3BlY3RSYXRpbztcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgYXNwZWN0UmF0aW8gLz0gMjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuYXNwZWN0ID0gYXNwZWN0UmF0aW87XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLmFzcGVjdCA9IGFzcGVjdFJhdGlvO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnVwZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVNb3VzZVdoZWVsOiBmdW5jdGlvbihldmVudCl7XG4gICAgICAgICAgICBwYXJlbnQuaGFuZGxlTW91c2VXaGVlbChldmVudCk7XG4gICAgICAgICAgICAvLyBXZWJLaXRcbiAgICAgICAgICAgIGlmICggZXZlbnQud2hlZWxEZWx0YVkgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmZvdiAtPSBldmVudC53aGVlbERlbHRhWSAqIDAuMDU7XG4gICAgICAgICAgICAgICAgLy8gT3BlcmEgLyBFeHBsb3JlciA5XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBldmVudC53aGVlbERlbHRhICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YSAqIDAuMDU7XG4gICAgICAgICAgICAgICAgLy8gRmlyZWZveFxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQuZGV0YWlsICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgKz0gZXZlbnQuZGV0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B0aGlzLnBoaSApICogTWF0aC5jb3MoIHRoaXMudGhldGEgKTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhTC50YXJnZXQueSA9IDUwMCAqIE1hdGguY29zKCB0aGlzLnBoaSApO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmFMLnRhcmdldC56ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLnNpbiggdGhpcy50aGV0YSApO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmxvb2tBdCh0aGlzLmNhbWVyYUwudGFyZ2V0KTtcblxuICAgICAgICAgICAgaWYodGhpcy5WUk1vZGUpe1xuICAgICAgICAgICAgICAgIHZhciB2aWV3UG9ydFdpZHRoID0gdGhpcy53aWR0aCAvIDIsIHZpZXdQb3J0SGVpZ2h0ID0gdGhpcy5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnRhcmdldC54ID0gMTAwMCArIDUwMCAqIE1hdGguc2luKCB0aGlzLnBoaSApICogTWF0aC5jb3MoIHRoaXMudGhldGEgKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIudGFyZ2V0LnkgPSA1MDAgKiBNYXRoLmNvcyggdGhpcy5waGkgKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIudGFyZ2V0LnogPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguc2luKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLmxvb2tBdCggdGhpcy5jYW1lcmFSLnRhcmdldCApO1xuXG4gICAgICAgICAgICAgICAgLy8gcmVuZGVyIGxlZnQgZXllXG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRWaWV3cG9ydCggMCwgMCwgdmlld1BvcnRXaWR0aCwgdmlld1BvcnRIZWlnaHQgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFNjaX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1xuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZU1vdXNlVXA6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHRoaXMubW91c2VEb3duID0gZmFsc2U7XG4gICAgICAgICAgICBpZih0aGlzLmNsaWNrVG9Ub2dnbGUpe1xuICAgICAgICAgICAgICAgIHZhciBjbGllbnRYID0gZXZlbnQuY2xpZW50WCB8fCBldmVudC5jaGFuZ2VkVG91Y2hlcyAmJiBldmVudC5jaGFuZ2VkVG91Y2hlc1swXS5jbGllbnRYO1xuICAgICAgICAgICAgICAgIHZhciBjbGllbnRZID0gZXZlbnQuY2xpZW50WSB8fCBldmVudC5jaGFuZ2VkVG91Y2hlcyAmJiBldmVudC5jaGFuZ2VkVG91Y2hlc1swXS5jbGllbnRZO1xuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBjbGllbnRYID09PSBcInVuZGVmaW5lZFwiIHx8IGNsaWVudFkgPT09IFwidW5kZWZpbmVkXCIpIHJldHVybjtcbiAgICAgICAgICAgICAgICB2YXIgZGlmZlggPSBNYXRoLmFicyhjbGllbnRYIC0gdGhpcy5vblBvaW50ZXJEb3duUG9pbnRlclgpO1xuICAgICAgICAgICAgICAgIHZhciBkaWZmWSA9IE1hdGguYWJzKGNsaWVudFkgLSB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWSk7XG4gICAgICAgICAgICAgICAgaWYoZGlmZlggPCAwLjEgJiYgZGlmZlkgPCAwLjEpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGxheWVyKCkucGF1c2VkKCkgPyB0aGlzLnBsYXllcigpLnBsYXkoKSA6IHRoaXMucGxheWVyKCkucGF1c2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVNb3VzZURvd246IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB2YXIgY2xpZW50WCA9IGV2ZW50LmNsaWVudFggfHwgZXZlbnQudG91Y2hlcyAmJiBldmVudC50b3VjaGVzWzBdLmNsaWVudFg7XG4gICAgICAgICAgICB2YXIgY2xpZW50WSA9IGV2ZW50LmNsaWVudFkgfHwgZXZlbnQudG91Y2hlcyAmJiBldmVudC50b3VjaGVzWzBdLmNsaWVudFk7XG4gICAgICAgICAgICBpZih0eXBlb2YgY2xpZW50WCA9PT0gXCJ1bmRlZmluZWRcIiB8fCBjbGllbnRZID09PSBcInVuZGVmaW5lZFwiKSByZXR1cm47XG4gICAgICAgICAgICB0aGlzLm1vdXNlRG93biA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWCA9IGNsaWVudFg7XG4gICAgICAgICAgICB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWSA9IGNsaWVudFk7XG4gICAgICAgICAgICB0aGlzLm9uUG9pbnRlckRvd25Mb24gPSB0aGlzLmxvbjtcbiAgICAgICAgICAgIHRoaXMub25Qb2ludGVyRG93bkxhdCA9IHRoaXMubGF0O1xuICAgICAgICB9LFxuXG4gICAgICAgIGhhbmRsZVRvdWNoU3RhcnQ6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIGlmKGV2ZW50LnRvdWNoZXMubGVuZ3RoID4gMSl7XG4gICAgICAgICAgICAgICAgdGhpcy5pc1VzZXJQaW5jaCA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy5tdWx0aVRvdWNoRGlzdGFuY2UgPSBVdGlsLmdldFRvdWNoZXNEaXN0YW5jZShldmVudC50b3VjaGVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuaGFuZGxlTW91c2VEb3duKGV2ZW50KTtcbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVUb3VjaEVuZDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgdGhpcy5pc1VzZXJQaW5jaCA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVNb3VzZVVwKGV2ZW50KTtcbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVNb3VzZU1vdmU6IGZ1bmN0aW9uKGV2ZW50KXtcbiAgICAgICAgICAgIHZhciBjbGllbnRYID0gZXZlbnQuY2xpZW50WCB8fCBldmVudC50b3VjaGVzICYmIGV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WDtcbiAgICAgICAgICAgIHZhciBjbGllbnRZID0gZXZlbnQuY2xpZW50WSB8fCBldmVudC50b3VjaGVzICYmIGV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WTtcbiAgICAgICAgICAgIGlmKHR5cGVvZiBjbGllbnRYID09PSBcInVuZGVmaW5lZFwiIHx8IGNsaWVudFkgPT09IFwidW5kZWZpbmVkXCIpIHJldHVybjtcbiAgICAgICAgICAgIGlmKHRoaXMuc2V0dGluZ3MuY2xpY2tBbmREcmFnKXtcbiAgICAgICAgICAgICAgICBpZih0aGlzLm1vdXNlRG93bil7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubG9uID0gKCB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWCAtIGNsaWVudFggKSAqIDAuMiArIHRoaXMub25Qb2ludGVyRG93bkxvbjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXQgPSAoIGNsaWVudFkgLSB0aGlzLm9uUG9pbnRlckRvd25Qb2ludGVyWSApICogMC4yICsgdGhpcy5vblBvaW50ZXJEb3duTGF0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgIHZhciB4ID0gZXZlbnQucGFnZVggLSB0aGlzLmVsXy5vZmZzZXRMZWZ0O1xuICAgICAgICAgICAgICAgIHZhciB5ID0gZXZlbnQucGFnZVkgLSB0aGlzLmVsXy5vZmZzZXRUb3A7XG4gICAgICAgICAgICAgICAgdGhpcy5sb24gPSAoeCAvIHRoaXMud2lkdGgpICogNDMw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aWYgKGN0IC0gdGhpcy50aW1lID49IDMwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHR1cmUubmVlZHNVcGRhdGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50aW1lID0gY3Q7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYodGhpcy5pc1BsYXlPbk1vYmlsZSl7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3VycmVudFRpbWUgPSB0aGlzLnBsYXllcigpLmN1cnJlbnRUaW1lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZihNb2JpbGVCdWZmZXJpbmcuaXNCdWZmZXJpbmcoY3VycmVudFRpbWUpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdGhpcy5wbGF5ZXIoKS5oYXNDbGFzcyhcInZqcy1wYW5vcmFtYS1tb2JpbGUtaW5saW5lLXZpZGVvLWJ1ZmZlcmluZ1wiKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGxheWVyKCkuYWRkQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodGhpcy5wbGF5ZXIoKS5oYXNDbGFzcyhcInZqcy1wYW5vcmFtYS1tb2JpbGUtaW5saW5lLXZpZGVvLWJ1ZmZlcmluZ1wiKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGxheWVyKCkucmVtb3ZlQ2xhc3MoXCJ2anMtcGFub3JhbWEtbW9iaWxlLWlubGluZS12aWRlby1idWZmZXJpbmdcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5yZW5kZXIoKTtcbiAgICAgICAgfSxcblxuICAgICAgICByZW5kZXI6IGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBpZighdGhpcy5pc1VzZXJJbnRlcmFjdGluZyl7XG4gICAgICAgICAgICAgICAgdmFyIHN5bWJvbExhdCA9ICh0aGlzLmxhdCA+IHRoaXMuc2V0dGluZ3MuaW5pdExhdCk/ICAtMSA6IDE7XG4gICAgICAgICAgICAgICAgdmFyIHN5bWJvbExvbiA9ICh0aGlzLmxvbiA+IHRoaXMuc2V0dGluZ3MuaW5pdExvbik/ICAtMSA6IDE7XG4gICAgICAgICAgICAgICAgaWYodGhpcy5zZXR0aW5ncy5iYWNrVG9WZXJ0aWNhbENlbnRlcil7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGF0ID0gKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXQgPiAodGhpcy5zZXR0aW5ncy5pbml0TGF0IC0gTWF0aC5hYnModGhpcy5zZXR0aW5ncy5yZXR1cm5TdGVwTGF0KSkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF0IDwgKHRoaXMuc2V0dGluZ3MuaW5pdExhdCArIE1hdGguYWJzKHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExhdCkpXG4gICAgICAgICAgICAgICAgICAgICk/IHRoaXMuc2V0dGluZ3MuaW5pdExhdCA6IHRoaXMubGF0ICsgdGhpcy5zZXR0aW5ncy5yZXR1cm5TdGVwTGF0ICogc3ltYm9sTGF0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZih0aGlzLnNldHRpbmdzLmJhY2tUb0hvcml6b25DZW50ZXIpe1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA9IChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubG9uID4gKHRoaXMuc2V0dGluZ3MuaW5pdExvbiAtIE1hdGguYWJzKHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExvbikpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxvbiA8ICh0aGlzLnNldHRpbmdzLmluaXRMb24gKyBNYXRoLmFicyh0aGlzLnNldHRpbmdzLnJldHVyblN0ZXBMb24pKVxuICAgICAgICAgICAgICAgICAgICApPyB0aGlzLnNldHRpbmdzLmluaXRMb24gOiB0aGlzLmxvbiArIHRoaXMuc2V0dGluZ3MucmV0dXJuU3RlcExvbiAqIHN5bWJvbExvbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmxhdCA9IE1hdGgubWF4KCB0aGlzLnNldHRpbmdzLm1pbkxhdCwgTWF0aC5taW4oIHRoaXMuc2V0dGluZ3MubWF4TGF0LCB0aGlzLmxhdCApICk7XG4gICAgICAgICAgICB0aGlzLmxvbiA9IE1hdGgubWF4KCB0aGlzLnNldHRpbmdzLm1pbkxvbiwgTWF0aC5taW4oIHRoaXMuc2V0dGluZ3MubWF4TG9uLCB0aGlzLmxvbiApICk7XG4gICAgICAgICAgICB0aGlzLnBoaSA9IFRIUkVFLk1hdGguZGVnVG9SYWQoIDkwIC0gdGhpcy5sYXQgKTtcbiAgICAgICAgICAgIHRoaXMudGhldGEgPSBUSFJFRS5NYXRoLmRlZ1RvUmFkKCB0aGlzLmxvbiApO1xuXG4gICAgICAgICAgICBpZighdGhpcy5zdXBwb3J0VmlkZW9UZXh0dXJlKXtcbiAgICAgICAgICAgICAgICB0aGlzLmhlbHBlckNhbnZhcy51cGRhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuY2xlYXIoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBwbGF5T25Nb2JpbGU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRoaXMuaXN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NYXRoLnNxcnQoeCAqIHggICsgeSAqIHkgKyB6ICogeikpIC8gTWF0aC5QSTtcbiAgICAgICAgICAgICAgICAgICAgaWYoeSA8IDApIHIgPSAxIC0gcjtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRoZXRhID0gKHggPT0gMCAmJiB6ID09IDApPyAwIDogTWF0aC5hY29zKHggLyBNYXRoLnNxcnQoeCAqIHggKyB6ICogeikpO1xuICAgICAgICAgICAgICAgICAgICBpZih6IDwgMCkgdGhldGEgPSB0aGV0YSAqIC0xO1xuICAgICAgICAgICAgICAgICAgICB1dnNbIGkgKiAyICsgMCBdID0gLTAuOCAqIHIgKiBNYXRoLmNvcyh0aGV0YSkgKyAwLjU7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAxIF0gPSAwLjggKiByICogTWF0aC5zaW4odGhldGEpICsgMC41O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBnZW9tZXRyeS5yb3RhdGVYKCBvcHRpb25zLnJvdGF0ZVgpO1xuICAgICAgICAgICAgICAgIGdlb21ldHJ5LnJvdGF0ZVkoIG9wdGlvbnMucm90YXRlWSk7XG4gICAgICAgICAgICAgICAgZ2VvbWV0cnkucm90YXRlWiggb3B0aW9ucy5yb3RhdGVaKTtcbiAgICAgICAgICAgIH1lbHNlIGlmKHRoaXMudmlkZW9UeXBlID09PSBcImR1YWxfZmlzaGV5ZVwiKXtcbiAgICAgICAgICAgICAgICBsZXQgbm9ybWFscyA9IGdlb21ldHJ5LmF0dHJpYnV0ZXMubm9ybWFsLmFycmF5O1xuICAgICAgICAgICAgICAgIGxldCB1dnMgPSBnZW9tZXRyeS5hdHRyaWJ1dGVzLnV2LmFycmF5O1xuICAgICAgICAgICAgICAgIGxldCBsID0gbm9ybWFscy5sZW5ndGggLyAzO1xuICAgICAgICAgICAgICAgIGZvciAoIGxldCBpID0gMDsgaSA8IGwgLyAyOyBpICsrICkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgeCA9IG5vcm1hbHNbIGkgKiAzICsgMCBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IG5vcm1hbHNbIGkgKiAzICsgMSBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeiA9IG5vcm1hbHNbIGkgKiAzICsgMiBdO1xuXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0gKCB4ID09IDAgJiYgeiA9PSAwICkgPyAxIDogKCBNYXRoLmFjb3MoIHkgKSAvIE1hdGguc3FydCggeCAqIHggKyB6ICogeiApICkgKiAoIDIgLyBNYXRoLlBJICk7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAwIF0gPSB4ICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLnJ4ICogciAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5jb3ZlclggICsgb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLng7XG4gICAgICAgICAgICAgICAgICAgIHV2c1sgaSAqIDIgKyAxIF0gPSB6ICogb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLnJ5ICogciAqIG9wdGlvbnMuZHVhbEZpc2guY2lyY2xlMS5jb3ZlclkgICsgb3B0aW9ucy5kdWFsRmlzaC5jaXJjbGUxLnk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvciAoIGxldCBpID0gbCAvIDI7IGkgPCBsOyBpICsrICkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgeCA9IG5vcm1hbHNbIGkgKiAzICsgMCBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IG5vcm1hbHNbIGkgKiAzICsgMSBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeiA9IG5vcm1hbHNbIGkgKiAzICsgMiBdO1xuXG4gICAgICAgICAgICAgICAgICAgIGxldCByID0gKCB4ID09IDAgJiYgeiA9PSAwICkgPyAxIDogKCBNYXRoLmFjb3MoIC0geSApIC8gTWF0aC5zcXJ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gfSxcblxuICAgICAgICBoYW5kbGVSZXNpemU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHBhcmVudC5oYW5kbGVSZXNpemUuY2FsbCh0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLmFzcGVjdCA9IHRoaXMud2lkdGggLyB0aGlzLmhlaWdodDtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLnVwZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgIGlmKHRoaXMuVlJNb2RlKXtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuYXNwZWN0ID0gdGhpcy5jYW1lcmEuYXNwZWN0IC8gMjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIuYXNwZWN0ID0gdGhpcy5jYW1lcmEuYXNwZWN0IC8gMjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VXaGVlbDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgcGFyZW50LmhhbmRsZU1vdXNlV2hlZWwoZXZlbnQpO1xuICAgICAgICAgICAgLy8gV2ViS2l0XG4gICAgICAgICAgICBpZiAoIGV2ZW50LndoZWVsRGVsdGFZICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiAtPSBldmVudC53aGVlbERlbHRhWSAqIDAuMDU7XG4gICAgICAgICAgICAgICAgLy8gT3BlcmEgLyBFeHBsb3JlciA5XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBldmVudC53aGVlbERlbHRhICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiAtPSBldmVudC53aGVlbERlbHRhICogMC4wNTtcbiAgICAgICAgICAgICAgICAvLyBGaXJlZm94XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBldmVudC5kZXRhaWwgKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmEuZm92ICs9IGV2ZW50LmRldGFpbCAqIDEuMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY2FtZXJhLmZvdiA9IE1hdGgubWluKHRoaXMuc2V0dGluZ3MubWF4Rm92LCB0aGlzLmNhbWVyYS5mb3YpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEuZm92ID0gTWF0aC5tYXgodGhpcy5zZXR0aW5ncy5taW5Gb3YsIHRoaXMuY2FtZXJhLmZvdik7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICBpZih0aGlzLlZSTW9kZSl7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFMLmZvdiA9IHRoaXMuY2FtZXJhLmZvdjtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYVIuZm92ID0gdGhpcy5jYW1lcmEuZm92O1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnVwZGF0ZVByb2plY3Rpb25NYXRyaXgoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBoYW5kbGVUb3VjaE1vdmU6IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgcGFyZW50LmhhbmRsZVRvdWNoTW92ZS5jYWxsKHRoaXMsIGV2ZW50KTtcbiAgICAgICAgICAgIGlmKHRoaXMuaXNVc2VyUGluY2gpe1xuICAgICAgICAgICAgICAgIGxldCBjdXJyZW50RGlzdGFuY2UgPSBVdGlsLmdldFRvdWNoZXNEaXN0YW5jZShldmVudC50b3VjaGVzKTtcbiAgICAgICAgICAgICAgICBldmVudC53aGVlbERlbHRhWSA9ICAoY3VycmVudERpc3RhbmNlIC0gdGhpcy5tdWx0aVRvdWNoRGlzdGFuY2UpICogMjtcbiAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZU1vdXNlV2hlZWwuY2FsbCh0aGlzLCBldmVudCk7XG4gICAgICAgICAgICAgICAgdGhpcy5tdWx0aVRvdWNoRGlzdGFuY2UgPSBjdXJyZW50RGlzdGFuY2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgcmVuZGVyOiBmdW5jdGlvbigpe1xuICAgICAgICAgICAgcGFyZW50LnJlbmRlci5jYWxsKHRoaXMpO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEudGFyZ2V0LnggPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguY29zKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS50YXJnZXQueSA9IDUwMCAqIE1hdGguY29zKCB0aGlzLnBoaSApO1xuICAgICAgICAgICAgdGhpcy5jYW1lcmEudGFyZ2V0LnogPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguc2luKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYS5sb29rQXQoIHRoaXMuY2FtZXJhLnRhcmdldCApO1xuXG4gICAgICAgICAgICBpZighdGhpcy5WUk1vZGUpe1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKCB0aGlzLnNjZW5lLCB0aGlzLmNhbWVyYSApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZXtcbiAgICAgICAgICAgICAgICB2YXIgdmlld1BvcnRXaWR0aCA9IHRoaXMud2lkdGggLyAyLCB2aWV3UG9ydEhlaWdodCA9IHRoaXMuaGVpZ2h0O1xuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiB2ckhNRCAhP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va0F0KHRhcmdldEwpO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXRSID0gVXRpbC5kZWVwQ29weSh0aGlzLmNhbWVyYS50YXJnZXQpO1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRSLnggPSA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguY29zKCB0aGV0YVIgKTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ui56ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLnNpbiggdGhldGFSICk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi5sb29rQXQodGFyZ2V0Uik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHJlbmRlciBsZWZ0IGV5ZVxuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2V0Vmlld3BvcnQoIDAsIDAsIHZpZXdQb3J0V2lkdGgsIHZpZXdQb3J0SGVpZ2h0ICk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRTY2lzc29yKCAwLCAwLCB2aWV3UG9ydFdpZHRoLCB2aWV3UG9ydEhlaWdodCApO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKCB0aGlzLnNjZW5lLCB0aGlzLmNhbWVyYUwgKTtcblxuICAgICAgICAgICAgICAgIC8vIHJlbmRlciByaWdodCBleWVcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFZpZXdwb3J0KCB2aWV3UG9ydFdpZHRoLCAwLCB2aWV3UG9ydFdpZHRoLCB2aWV3UG9ydEhlaWdodCApO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2V0U2Npc3Nvciggdmlld1BvcnRXaWR0aCwgMCwgdmlld1BvcnRXaWR0aCwgdmlld1BvcnRIZWlnaHQgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyL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mFtZSA9PSAnTWljcm9zb2Z0IEludGVybmV0IEV4cGxvcmVyJykge1xuXG4gICAgICAgICAgICAgdmFyIHVhID0gbmF2aWdhdG9yLnVzZXJBZ2VudCxcbiAgICAgICAgICAgICAgICAgcmUgPSBuZXcgUmVnRXhwKFwiTVNJRSAoWzAtOV17MSx9W1xcXFwuMC05XXswLH0pXCIpO1xuXG4gICAgICAgICAgICAgaWYgKHJlLmV4ZWModWEpICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgIHJ2ID0gcGFyc2VGbG9hdChSZWdFeHAuJDEpO1xuICAgICAgICAgICAgIH1cbiAgICAgICAgIH1cbiAgICAgICAgIGVsc2UgaWYgKG5hdmlnYXRvci5hcHBOYW1lID09IFwiTmV0c2NhcGVcIikge1xuICAgICAgICAgICAgIC8vLyBpbiBJRSAxMSB0aGUgbmF2aWdhdG9yLmFwcFZlcnNpb24gc2F5cyAndHJpZGVudCdcbiAgICAgICAgICAgICAvLy8gaW4gRWRnZSB0aGUgbmF2aWdhdG9yLmFwcFZlcnNpb24gZG9lcyBub3Qgc2F5IHRyaWRlbnRcbiAgICAgICAgICAgICBpZiAobmF2aWdhdG9yLmFwcFZlcnNpb24uaW5kZXhPZignVHJpZGVudCcpICE9PSAtMSkgcnYgPSAxMTtcbiAgICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgICB2YXIgdWEgPSBuYXZpZ2F0b3IudXNlckFnZW50O1xuICAgICAgICAgICAgICAgICB2YXIgcmUgPSBuZXcgUmVnRXhwKFwiRWRnZVxcLyhbMC05XXsxLH1bXFxcXC4wLTldezAsfSlcIik7XG4gICAgICAgICAgICAgICAgIGlmIChyZS5leGVjKHVhKSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgcnYgPSBwYXJzZUZsb2F0KFJlZ0V4cC4kMSk7XG4gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICB9XG4gICAgICAgICB9XG5cbiAgICAgICAgIHJldHVybiBydjtc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cGVjdFJhdGlvO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi5hc3BlY3QgPSBhc3BlY3RSYXRpbztcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwudXBkYXRlUHJvamVjdGlvbk1hdHJpeCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi51cGRhdGVQcm9qZWN0aW9uTWF0cml4KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgaGFuZGxlTW91c2VXaGVlbDogZnVuY3Rpb24oZXZlbnQpe1xuICAgICAgICAgICAgcGFyZW50LmhhbmRsZU1vdXNlV2hlZWwoZXZlbnQpO1xuICAgICAgICAgICAgLy8gV2ViS2l0XG4gICAgICAgICAgICBpZiAoIGV2ZW50LndoZWVsRGVsdGFZICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgLT0gZXZlbnQud2hlZWxEZWx0YVkgKiAwLjA1O1xuICAgICAgICAgICAgICAgIC8vIE9wZXJhIC8gRXhwbG9yZXIgOVxuICAgICAgICAgICAgfSBlbHNlIGlmICggZXZlbnQud2hlZWxEZWx0YSApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92IC09IGV2ZW50LndoZWVsRGVsdGEgKiAwLjA1O1xuICAgICAgICAgICAgICAgIC8vIEZpcmVmb3hcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIGV2ZW50LmRldGFpbCApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92ICs9IGV2ZW50LmRldGFpbCAqIDEuMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5mb3YgPSBNYXRoLm1pbih0aGlzLnNldHRpbmdzLm1heEZvdiwgdGhpcy5jYW1lcmFMLmZvdik7XG4gICAgICAgICAgICB0aGlzLmNhbWVyYUwuZm92ID0gTWF0aC5tYXgodGhpcy5zZXR0aW5ncy5taW5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BoaSApICogTWF0aC5zaW4oIHRoaXMudGhldGEgKTtcbiAgICAgICAgICAgIHRoaXMuY2FtZXJhTC5sb29rQXQodGhpcy5jYW1lcmFMLnRhcmdldCk7XG5cbiAgICAgICAgICAgIGlmKHRoaXMuVlJNb2RlKXtcbiAgICAgICAgICAgICAgICB2YXIgdmlld1BvcnRXaWR0aCA9IHRoaXMud2lkdGggLyAyLCB2aWV3UG9ydEhlaWdodCA9IHRoaXMuaGVpZ2h0O1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi50YXJnZXQueCA9IDEwMDAgKyA1MDAgKiBNYXRoLnNpbiggdGhpcy5waGkgKSAqIE1hdGguY29zKCB0aGlzLnRoZXRhICk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnRhcmdldC55ID0gNTAwICogTWF0aC5jb3MoIHRoaXMucGhpICk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYW1lcmFSLnRhcmdldC56ID0gNTAwICogTWF0aC5zaW4oIHRoaXMucGhpICkgKiBNYXRoLnNpbiggdGhpcy50aGV0YSApO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FtZXJhUi5sb29rQXQoIHRoaXMuY2FtZXJhUi50YXJnZXQgKTtcblxuICAgICAgICAgICAgICAgIC8vIHJlbmRlciBsZWZ0IGV5ZVxuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2V0Vmlld3BvcnQoIDAsIDAsIHZpZXdQb3J0V2lkdGgsIHZpZXdQb3J0SGVpZ2h0ICk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRTY2lzc29yKCAwLCAwLCB2aWV3UG9ydFdpZHRoLCB2aWV3UG9ydEhlaWdodCApO1xuICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKCB0aGlzLnNjZW5lLCB0aGlzLmNhbWVyYUwgKTtcblxuICAgICAgICAgICAgICAgIC8vIHJlbmRlciByaWdodCBleWVcbiAgICAgICAgICA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wdGlvbjogZnVuY3Rpb24gKGRlZmF1bHRzLCBvcHRpb25zKSB7XG4gICAgICAgIHJldHVybiB2aWRlb2pzLm1lcmdlT3B0aW9ucyhkZWZhdWx0cywgb3B0aW9ucyk7XG4gICAgfSxcbiAgICBnZXRUZWNoOiBnZXRUZWNoLFxuICAgIGdldEZ1bGxzY3JlZW5Ub2dnbGVDbGlja0ZuOiBnZXRGdWxsc2NyZWVuVG9nZ2xlQ2xpY2tGblxufSkpO1xuIl19 diff --git a/dist/videojs-panorama.v5.min.js b/dist/videojs-panorama.v5.min.js index 0ed7015..bc96c76 100644 --- a/dist/videojs-panorama.v5.min.js +++ b/dist/videojs-panorama.v5.min.js @@ -1 +1 @@ -!function e(t,i,n){function a(s,o){if(!i[s]){if(!t[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=i[s]={exports:{}};t[s][0].call(d.exports,function(e){var i=t[s][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s=e.video.duration}function c(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&d(t)&&(t.driver.currentTime=0)),l(t.video,t.driver.currentTime)):t.video.networkState!==t.video.NETWORK_IDLE||t.video.buffered.length||t.video.load(),t.video.ended&&(delete t.video[x],t.video.pause(!0))}function u(){var e=this,t=e[M];return e.webkitDisplayingFullscreen?void e[T]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(l(e,0,!0),t.driver.src=e.src),void(e.paused&&(t.paused=!1,e.buffered.length||e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(o(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&o(e,"playing")))))}function f(e){var t=this,i=t[M];i.driver.pause(),i.updater.stop(),t.webkitDisplayingFullscreen&&t[L](),i.paused&&!e||(i.paused=!0,i.hasAudio||o(t,"pause"),t.ended&&(t[x]=!0,o(t,"ended")))}function p(e,t){var i=e[M]={};i.paused=!0,i.hasAudio=t,i.video=e,i.updater=w.frameIntervalometer(c.bind(i)),t?i.driver=h(e):(e.addEventListener("canplay",function(){e.paused||o(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,d(i)&&l(e,0)},get ended(){return d(i)}}),e.addEventListener("emptied",function(){var t=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(l(e,0,!0),i.driver.src=e.src,t?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?t&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[T]())}),t&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){R.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function v(e){var t=e[M];e[T]=e.play,e[L]=e.pause,e.play=u,e.pause=f,r(e,"paused",t.driver),r(e,"muted",t.driver,!0),r(e,"playbackRate",t.driver,!0),r(e,"ended",t.driver),r(e,"loop",t.driver,!0),a(e,"seeking"),a(e,"seeked"),a(e,"timeupdate",x,!1),a(e,"ended",x,!1)}function m(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),i&&!y||e[M]||(p(e,t),v(e),e.classList.add("IIV"),!t&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var g,b=n(e("poor-mans-symbol")),w=e("intervalometer"),y=/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,M=b(),x=b(),T=b("nativeplay"),L=b("nativepause"),R=[],C=0;m.isWhitelisted=y,t.exports=m},{intervalometer:1,"poor-mans-symbol":3}],3:[function(e,t,i){"use strict";var n="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol;t.exports=n},{}],4:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("../lib/Detector"),r=n(a),s=e("../lib/MobileBuffering"),o=n(s),h=2,l=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{constructor:function(n,a){this.settings=a,this.width=n.el().offsetWidth,this.height=n.el().offsetHeight,this.lon=a.initLon,this.lat=a.initLat,this.phi=0,this.theta=0,this.videoType=a.videoType,this.clickToToggle=a.clickToToggle,this.mouseDown=!1,this.isUserInteracting=!1,this.renderer=new t.WebGLRenderer,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.autoClear=!1,this.renderer.setClearColor(0,1);var s=i.getTech(n);if(this.supportVideoTexture=r.default.supportVideoTexture(),this.liveStreamOnSafari=r.default.isLiveStreamOnSafari(s),this.liveStreamOnSafari&&(this.supportVideoTexture=!1),this.supportVideoTexture)this.texture=new t.Texture(s);else{this.helperCanvas=n.addChild("HelperCanvas",{video:s,width:a.helperCanvas.width?a.helperCanvas.width:this.width,height:a.helperCanvas.height?a.helperCanvas.height:this.height});var o=this.helperCanvas.el();this.texture=new t.Texture(o)}s.style.display="none",this.texture.generateMipmaps=!1,this.texture.minFilter=t.LinearFilter,this.texture.maxFilter=t.LinearFilter,this.texture.format=t.RGBFormat,this.el_=this.renderer.domElement,this.el_.classList.add("vjs-video-canvas"),a.el=this.el_,e.call(this,n,a),this.attachControlEvents(),this.player().on("play",function(){this.time=(new Date).getTime(),this.animate()}.bind(this))},attachControlEvents:function(){this.on("mousemove",this.handleMouseMove.bind(this)),this.on("touchmove",this.handleMouseMove.bind(this)),this.on("mousedown",this.handleMouseDown.bind(this)),this.on("touchstart",this.handleMouseDown.bind(this)),this.on("mouseup",this.handleMouseUp.bind(this)),this.on("touchend",this.handleMouseUp.bind(this)),this.settings.scrollable&&(this.on("mousewheel",this.handleMouseWheel.bind(this)),this.on("MozMousePixelScroll",this.handleMouseWheel.bind(this))),this.on("mouseenter",this.handleMouseEnter.bind(this)),this.on("mouseleave",this.handleMouseLease.bind(this))},handleResize:function(){this.width=this.player().el().offsetWidth,this.height=this.player().el().offsetHeight,this.renderer.setSize(this.width,this.height)},handleMouseUp:function(e){if(this.mouseDown=!1,this.clickToToggle){var t=e.clientX||e.changedTouches&&e.changedTouches[0].clientX,i=e.clientY||e.changedTouches&&e.changedTouches[0].clientY;if("undefined"==typeof t||"undefined"===i)return;var n=Math.abs(t-this.onPointerDownPointerX),a=Math.abs(i-this.onPointerDownPointerY);n<.1&&a<.1&&(this.player().paused()?this.player().play():this.player().pause())}},handleMouseDown:function(e){e.preventDefault();var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;"undefined"!=typeof t&&"undefined"!==i&&(this.mouseDown=!0,this.onPointerDownPointerX=t,this.onPointerDownPointerY=i,this.onPointerDownLon=this.lon,this.onPointerDownLat=this.lat)},handleMouseMove:function(e){var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;if("undefined"!=typeof t&&"undefined"!==i)if(this.settings.clickAndDrag)this.mouseDown&&(this.lon=.2*(this.onPointerDownPointerX-t)+this.onPointerDownLon,this.lat=.2*(i-this.onPointerDownPointerY)+this.onPointerDownLat);else{var n=e.pageX-this.el_.offsetLeft,a=e.pageY-this.el_.offsetTop;this.lon=n/this.width*430-225,this.lat=a/this.height*-180+90}},handleMobileOrientation:function(e){if("undefined"!=typeof e.rotationRate){var t=e.rotationRate.alpha,i=e.rotationRate.beta,n="undefined"!=typeof e.portrait?e.portrait:window.matchMedia("(orientation: portrait)").matches,a="undefined"!=typeof e.landscape?e.landscape:window.matchMedia("(orientation: landscape)").matches,r=e.orientation||window.orientation;if(n)this.lon=this.lon-i*this.settings.mobileVibrationValue,this.lat=this.lat+t*this.settings.mobileVibrationValue;else if(a){var s=-90;"undefined"!=typeof r&&(s=r),this.lon=s==-90?this.lon+t*this.settings.mobileVibrationValue:this.lon-t*this.settings.mobileVibrationValue,this.lat=s==-90?this.lat+i*this.settings.mobileVibrationValue:this.lat-i*this.settings.mobileVibrationValue}}},handleMouseWheel:function(e){e.stopPropagation(),e.preventDefault()},handleMouseEnter:function(e){this.isUserInteracting=!0},handleMouseLease:function(e){this.isUserInteracting=!1,this.mouseDown&&(this.mouseDown=!1)},animate:function(){if(this.requestAnimationId=requestAnimationFrame(this.animate.bind(this)),!this.player().paused()&&"undefined"!=typeof this.texture&&(!this.isPlayOnMobile&&this.player().readyState()>=h||this.isPlayOnMobile&&this.player().hasClass("vjs-playing"))){var e=(new Date).getTime();if(e-this.time>=30&&(this.texture.needsUpdate=!0,this.time=e),this.isPlayOnMobile){var t=this.player().currentTime();o.default.isBuffering(t)?this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")||this.player().addClass("vjs-panorama-mobile-inline-video-buffering"):this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")&&this.player().removeClass("vjs-panorama-mobile-inline-video-buffering")}}this.render()},render:function(){if(!this.isUserInteracting){var e=this.lat>this.settings.initLat?-1:1,i=this.lon>this.settings.initLon?-1:1;this.settings.backToVerticalCenter&&(this.lat=this.lat>this.settings.initLat-Math.abs(this.settings.returnStepLat)&&this.latthis.settings.initLon-Math.abs(this.settings.returnStepLon)&&this.lon2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene,this.camera=new t.PerspectiveCamera(i.initFov,this.width/this.height,1,2e3),this.camera.target=new t.Vector3(0,0,0);var a="equirectangular"===this.videoType?new t.SphereGeometry(500,60,40):new t.SphereBufferGeometry(500,60,40).toNonIndexed();if("fisheye"===this.videoType){for(var r=a.attributes.normal.array,s=a.attributes.uv.array,o=0,h=r.length/3;o=13},isLiveStreamOnSafari:function(e){for(var t=e.querySelectorAll("source"),i=!1,n=0;nWebGL.
','Find out how to get it here.'].join("\n"):['Your browser does not seem to support WebGL.
','Find out how to get it here.'].join("\n")),e},addGetWebGLMessage:function(e){var t,i,a;e=e||{},t=void 0!==e.parent?e.parent:document.body,i=void 0!==e.id?e.id:"oldie",a=n.getWebGLErrorMessage(),a.id=i,t.appendChild(a)}};i.default=n},{}],7:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=document.createElement("canvas");n.className="vjs-video-helper-canvas";var a=function(e){return{constructor:function(t,i){this.videoElement=i.video,this.width=i.width,this.height=i.height,n.width=this.width,n.height=this.height,n.style.display="none",i.el=n,this.context=n.getContext("2d"),this.context.drawImage(this.videoElement,0,0,this.width,this.height),e.call(this,t,i)},getContext:function(){return this.context},update:function(){this.context.drawImage(this.videoElement,0,0,this.width,this.height)},el:function(){return n}}};i.default=a},{}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={prev_currentTime:0,counter:0,isBuffering:function(e){return e==this.prev_currentTime?this.counter++:this.counter=0,this.prev_currentTime=e,this.counter>10&&(this.counter=10,!0)}};i.default=n},{}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e){var t=document.createElement("div");return t.className="vjs-video-notice-label",{constructor:function(i,a){"object"==n(a.NoticeMessage)?(t=a.NoticeMessage,a.el=a.NoticeMessage):"string"==typeof a.NoticeMessage&&(t.innerHTML=a.NoticeMessage,a.el=t),e.call(this,i,a)},el:function(){return t}}};i.default=a},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("./BaseCanvas"),r=n(a),s=e("./Util"),o=n(s),h=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene;var a=this.width/this.height;this.cameraL=new t.PerspectiveCamera(i.initFov,a,1,2e3),this.cameraL.target=new t.Vector3(0,0,0),this.cameraR=new t.PerspectiveCamera(i.initFov,a/2,1,2e3),this.cameraR.position.set(1e3,0,0),this.cameraR.target=new t.Vector3(1e3,0,0);for(var r=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),s=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),o=r.attributes.uv.array,h=r.attributes.normal.array,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i]);return t}function c(e){var t={};for(var i in e)t[i]=e[i];return t}Object.defineProperty(i,"__esModule",{value:!0}),i.default={whichTransitionEvent:n,mobileAndTabletcheck:a,isIos:r,isRealIphone:s,fovToProjection:l,extend:d,deepCopy:c}},{}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e){return{constructor:function(t,i){e.call(this,t,i)},buildCSSClass:function(){return"vjs-VR-control "+e.prototype.buildCSSClass.call(this)},handleClick:function(){var e=this.player().getChild("Canvas");e.VRMode?e.disableVR():e.enableVR(),e.VRMode?this.addClass("enable"):this.removeClass("enable"),e.VRMode?this.player().trigger("VRModeOn"):this.player().trigger("VRModeOff")},controlText_:"VR"}};i.default=n},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.getChild("Canvas");return function(){e.el().style.width=window.innerWidth+"px",e.el().style.height=window.innerHeight+"px",t.handleResize()}}function r(e,t){var i=a(e);e.controlBar.fullscreenToggle.off("tap",t),e.controlBar.fullscreenToggle.on("tap",function(){var t=e.getChild("Canvas");e.isFullscreen()?(e.isFullscreen(!1),e.exitFullWindow(),e.el().style.width="",e.el().style.height="",t.handleResize(),window.removeEventListener("devicemotion",i)):(e.isFullscreen(!0),e.enterFullWindow(),i(),window.addEventListener("devicemotion",i))})}Object.defineProperty(i,"__esModule",{value:!0});var s=e("./lib/Util"),o=n(s),h=e("./lib/Detector"),l=n(h),d=e("iphone-inline-video"),c=n(d),u=o.default.mobileAndTabletcheck(),f={clickAndDrag:u,showNotice:!0,NoticeMessage:"Please use your mouse drag and drop the video.",autoHideNotice:3e3,scrollable:!0,initFov:75,maxFov:105,minFov:51,initLat:0,initLon:-180,returnStepLat:.5,returnStepLon:2,backToVerticalCenter:!u,backToHorizonCenter:!u,clickToToggle:!1,minLat:-85,maxLat:85,minLon:-(1/0),maxLon:1/0,videoType:"equirectangular",rotateX:0,rotateY:0,rotateZ:0,autoMobileOrientation:!1,mobileVibrationValue:o.default.isIos()?.022:1,VREnable:!0,VRGapDegree:2.5,closePanorama:!1,helperCanvas:{},dualFish:{width:1920,height:1080,circle1:{x:.240625,y:.553704,rx:.23333,ry:.43148,coverX:.913,coverY:.9},circle2:{x:.757292,y:.553704,rx:.232292,ry:.4296296,coverX:.913,coverY:.9308}}},p=function(e,t,i){if(e.addClass("vjs-panorama"),!l.default.webgl)return v(e,{NoticeMessage:l.default.getWebGLErrorMessage(),autoHideNotice:t.autoHideNotice}),void(t.callback&&t.callback());e.addChild("Canvas",o.default.deepCopy(t));var n=e.getChild("Canvas");if(u){var a=i.getTech(e);o.default.isRealIphone()&&(a.setAttribute("playsinline",""),(0,c.default)(a,!0)),o.default.isIos()&&r(e,i.getFullscreenToggleClickFn(e)),e.addClass("vjs-panorama-mobile-inline-video"),e.removeClass("vjs-using-native-controls"),n.playOnMobile()}t.showNotice&&e.on("playing",function(){v(e,o.default.deepCopy(t))}),t.VREnable&&e.controlBar.addChild("VRButton",{},e.controlBar.children().length-1),n.hide(),e.on("play",function(){n.show()}),e.on("fullscreenchange",function(){n.handleResize()}),t.callback&&t.callback()},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{NoticeMessage:""},i=e.addChild("Notice",t);t.autoHideNotice>0&&setTimeout(function(){i.addClass("vjs-video-notice-fadeOut");var e=o.default.whichTransitionEvent(),t=function t(){i.hide(),i.removeClass("vjs-video-notice-fadeOut"),i.off(e,t)};i.on(e,t)},t.autoHideNotice)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["equirectangular","fisheye","3dVideo","dual_fisheye"],i=function(i){var n=this;return e.mergeOption&&(i=e.mergeOption(f,i)),"undefined"==typeof e._init||"function"!=typeof e._init?void console.error("plugin must implement init function()."):(t.indexOf(i.videoType)==-1&&(i.videoType=f.videoType),e._init(i),void this.ready(function(){p(n,i,e)}))};return i.VERSION="0.1.3",i};i.default=m},{"./lib/Detector":6,"./lib/Util":11,"iphone-inline-video":2}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return e.tech({IWillNotUseThisInPlugins:!0}).el()}function r(e){return e.controlBar.fullscreenToggle.handleClick}var s=e("./lib/Canvas"),o=n(s),h=e("./lib/ThreeCanvas"),l=n(h),d=e("./lib/Notice"),c=n(d),u=e("./lib/HelperCanvas"),f=n(u),p=e("./lib/VRButton"),v=n(p),m=e("./plugin"),g=n(m),b=videojs.getComponent("Component"),w=(0,c.default)(b);videojs.registerComponent("Notice",videojs.extend(b,w));var y=(0,f.default)(b);videojs.registerComponent("HelperCanvas",videojs.extend(b,y));var M=videojs.getComponent("Button"),x=(0,v.default)(M);videojs.registerComponent("VRButton",videojs.extend(M,x)),videojs.plugin("panorama",(0,g.default)({_init:function(e){var t="3dVideo"!==e.videoType?(0,o.default)(b,window.THREE,{getTech:a}):(0,l.default)(b,window.THREE,{getTech:a});videojs.registerComponent("Canvas",videojs.extend(b,t))},mergeOption:function(e,t){return videojs.mergeOptions(e,t)},getTech:a,getFullscreenToggleClickFn:r}))},{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]); \ No newline at end of file +!function e(t,i,n){function a(s,o){if(!i[s]){if(!t[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,function(e){var i=t[s][1][e];return a(i?i:e)},c,c.exports,e,t,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s=e.video.duration}function d(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&c(t)&&(t.driver.currentTime=0)),l(t.video,t.driver.currentTime)):t.video.networkState!==t.video.NETWORK_IDLE||t.video.buffered.length||t.video.load(),t.video.ended&&(delete t.video[T],t.video.pause(!0))}function u(){var e=this,t=e[y];return e.webkitDisplayingFullscreen?void e[x]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(l(e,0,!0),t.driver.src=e.src),void(e.paused&&(t.paused=!1,e.buffered.length||e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(o(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&o(e,"playing")))))}function f(e){var t=this,i=t[y];i.driver.pause(),i.updater.stop(),t.webkitDisplayingFullscreen&&t[L](),i.paused&&!e||(i.paused=!0,i.hasAudio||o(t,"pause"),t.ended&&(t[T]=!0,o(t,"ended")))}function v(e,t){var i=e[y]={};i.paused=!0,i.hasAudio=t,i.video=e,i.updater=w.frameIntervalometer(d.bind(i)),t?i.driver=h(e):(e.addEventListener("canplay",function(){e.paused||o(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,c(i)&&l(e,0)},get ended(){return c(i)}}),e.addEventListener("emptied",function(){var t=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(l(e,0,!0),i.driver.src=e.src,t?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?t&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[x]())}),t&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){R.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function p(e){var t=e[y];e[x]=e.play,e[L]=e.pause,e.play=u,e.pause=f,r(e,"paused",t.driver),r(e,"muted",t.driver,!0),r(e,"playbackRate",t.driver,!0),r(e,"ended",t.driver),r(e,"loop",t.driver,!0),a(e,"seeking"),a(e,"seeked"),a(e,"timeupdate",T,!1),a(e,"ended",T,!1)}function m(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),i&&!M||e[y]||(v(e,t),p(e),e.classList.add("IIV"),!t&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var g,b=n(e("poor-mans-symbol")),w=e("intervalometer"),M=/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,y=b(),T=b(),x=b("nativeplay"),L=b("nativepause"),R=[],C=0;m.isWhitelisted=M,t.exports=m},{intervalometer:1,"poor-mans-symbol":3}],3:[function(e,t,i){"use strict";var n="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol;t.exports=n},{}],4:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("../lib/Detector"),r=n(a),s=e("../lib/MobileBuffering"),o=n(s),h=e("../lib/Util"),l=n(h),c=2,d=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{constructor:function(n,a){this.settings=a,this.width=n.el().offsetWidth,this.height=n.el().offsetHeight,this.lon=a.initLon,this.lat=a.initLat,this.phi=0,this.theta=0,this.videoType=a.videoType,this.clickToToggle=a.clickToToggle,this.mouseDown=!1,this.isUserInteracting=!1,this.renderer=new t.WebGLRenderer,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.autoClear=!1,this.renderer.setClearColor(0,1);var s=i.getTech(n);if(this.supportVideoTexture=r.default.supportVideoTexture(),this.liveStreamOnSafari=r.default.isLiveStreamOnSafari(s),this.liveStreamOnSafari&&(this.supportVideoTexture=!1),this.supportVideoTexture)this.texture=new t.Texture(s);else{this.helperCanvas=n.addChild("HelperCanvas",{video:s,width:a.helperCanvas.width?a.helperCanvas.width:this.width,height:a.helperCanvas.height?a.helperCanvas.height:this.height});var o=this.helperCanvas.el();this.texture=new t.Texture(o)}s.style.display="none",this.texture.generateMipmaps=!1,this.texture.minFilter=t.LinearFilter,this.texture.maxFilter=t.LinearFilter,this.texture.format=t.RGBFormat,this.el_=this.renderer.domElement,this.el_.classList.add("vjs-video-canvas"),a.el=this.el_,e.call(this,n,a),this.attachControlEvents(),this.player().on("play",function(){this.time=(new Date).getTime(),this.animate()}.bind(this))},attachControlEvents:function(){this.on("mousemove",this.handleMouseMove.bind(this)),this.on("touchmove",this.handleTouchMove.bind(this)),this.on("mousedown",this.handleMouseDown.bind(this)),this.on("touchstart",this.handleTouchStart.bind(this)),this.on("mouseup",this.handleMouseUp.bind(this)),this.on("touchend",this.handleTouchEnd.bind(this)),this.settings.scrollable&&(this.on("mousewheel",this.handleMouseWheel.bind(this)),this.on("MozMousePixelScroll",this.handleMouseWheel.bind(this))),this.on("mouseenter",this.handleMouseEnter.bind(this)),this.on("mouseleave",this.handleMouseLease.bind(this))},handleResize:function(){this.width=this.player().el().offsetWidth,this.height=this.player().el().offsetHeight,this.renderer.setSize(this.width,this.height)},handleMouseUp:function(e){if(this.mouseDown=!1,this.clickToToggle){var t=e.clientX||e.changedTouches&&e.changedTouches[0].clientX,i=e.clientY||e.changedTouches&&e.changedTouches[0].clientY;if("undefined"==typeof t||"undefined"===i)return;var n=Math.abs(t-this.onPointerDownPointerX),a=Math.abs(i-this.onPointerDownPointerY);n<.1&&a<.1&&(this.player().paused()?this.player().play():this.player().pause())}},handleMouseDown:function(e){e.preventDefault();var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;"undefined"!=typeof t&&"undefined"!==i&&(this.mouseDown=!0,this.onPointerDownPointerX=t,this.onPointerDownPointerY=i,this.onPointerDownLon=this.lon,this.onPointerDownLat=this.lat)},handleTouchStart:function(e){e.touches.length>1&&(this.isUserPinch=!0,this.multiTouchDistance=l.default.getTouchesDistance(e.touches)),this.handleMouseDown(e)},handleTouchEnd:function(e){this.isUserPinch=!1,this.handleMouseUp(e)},handleMouseMove:function(e){var t=e.clientX||e.touches&&e.touches[0].clientX,i=e.clientY||e.touches&&e.touches[0].clientY;if("undefined"!=typeof t&&"undefined"!==i)if(this.settings.clickAndDrag)this.mouseDown&&(this.lon=.2*(this.onPointerDownPointerX-t)+this.onPointerDownLon,this.lat=.2*(i-this.onPointerDownPointerY)+this.onPointerDownLat);else{var n=e.pageX-this.el_.offsetLeft,a=e.pageY-this.el_.offsetTop;this.lon=n/this.width*430-225,this.lat=a/this.height*-180+90}},handleTouchMove:function(e){(!this.isUserPinch||e.touches.length<=1)&&this.handleMouseMove(e)},handleMobileOrientation:function(e){if("undefined"!=typeof e.rotationRate){var t=e.rotationRate.alpha,i=e.rotationRate.beta,n="undefined"!=typeof e.portrait?e.portrait:window.matchMedia("(orientation: portrait)").matches,a="undefined"!=typeof e.landscape?e.landscape:window.matchMedia("(orientation: landscape)").matches,r=e.orientation||window.orientation;if(n)this.lon=this.lon-i*this.settings.mobileVibrationValue,this.lat=this.lat+t*this.settings.mobileVibrationValue;else if(a){var s=-90;"undefined"!=typeof r&&(s=r),this.lon=s==-90?this.lon+t*this.settings.mobileVibrationValue:this.lon-t*this.settings.mobileVibrationValue,this.lat=s==-90?this.lat+i*this.settings.mobileVibrationValue:this.lat-i*this.settings.mobileVibrationValue}}},handleMouseWheel:function(e){e.stopPropagation(),e.preventDefault()},handleMouseEnter:function(e){this.isUserInteracting=!0},handleMouseLease:function(e){this.isUserInteracting=!1,this.mouseDown&&(this.mouseDown=!1)},animate:function(){if(this.requestAnimationId=requestAnimationFrame(this.animate.bind(this)),!this.player().paused()&&"undefined"!=typeof this.texture&&(!this.isPlayOnMobile&&this.player().readyState()>=c||this.isPlayOnMobile&&this.player().hasClass("vjs-playing"))){var e=(new Date).getTime();if(e-this.time>=30&&(this.texture.needsUpdate=!0,this.time=e),this.isPlayOnMobile){var t=this.player().currentTime();o.default.isBuffering(t)?this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")||this.player().addClass("vjs-panorama-mobile-inline-video-buffering"):this.player().hasClass("vjs-panorama-mobile-inline-video-buffering")&&this.player().removeClass("vjs-panorama-mobile-inline-video-buffering")}}this.render()},render:function(){if(!this.isUserInteracting){var e=this.lat>this.settings.initLat?-1:1,i=this.lon>this.settings.initLon?-1:1;this.settings.backToVerticalCenter&&(this.lat=this.lat>this.settings.initLat-Math.abs(this.settings.returnStepLat)&&this.latthis.settings.initLon-Math.abs(this.settings.returnStepLon)&&this.lon2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene,this.camera=new t.PerspectiveCamera(i.initFov,this.width/this.height,1,2e3),this.camera.target=new t.Vector3(0,0,0);var a="equirectangular"===this.videoType?new t.SphereGeometry(500,60,40):new t.SphereBufferGeometry(500,60,40).toNonIndexed();if("fisheye"===this.videoType){for(var r=a.attributes.normal.array,s=a.attributes.uv.array,o=0,h=r.length/3;o=13},isLiveStreamOnSafari:function(e){for(var t=e.querySelectorAll("source"),i=!1,n=0;nWebGL.
','Find out how to get it here.'].join("\n"):['Your browser does not seem to support WebGL.
','Find out how to get it here.'].join("\n")),e},addGetWebGLMessage:function(e){var t,i,a;e=e||{},t=void 0!==e.parent?e.parent:document.body,i=void 0!==e.id?e.id:"oldie",a=n.getWebGLErrorMessage(),a.id=i,t.appendChild(a)}};i.default=n},{}],7:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=document.createElement("canvas");n.className="vjs-video-helper-canvas";var a=function(e){return{constructor:function(t,i){this.videoElement=i.video,this.width=i.width,this.height=i.height,n.width=this.width,n.height=this.height,n.style.display="none",i.el=n,this.context=n.getContext("2d"),this.context.drawImage(this.videoElement,0,0,this.width,this.height),e.call(this,t,i)},getContext:function(){return this.context},update:function(){this.context.drawImage(this.videoElement,0,0,this.width,this.height)},el:function(){return n}}};i.default=a},{}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={prev_currentTime:0,counter:0,isBuffering:function(e){return e==this.prev_currentTime?this.counter++:this.counter=0,this.prev_currentTime=e,this.counter>10&&(this.counter=10,!0)}};i.default=n},{}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e){var t=document.createElement("div");return t.className="vjs-video-notice-label",{constructor:function(i,a){"object"==n(a.NoticeMessage)?(t=a.NoticeMessage,a.el=a.NoticeMessage):"string"==typeof a.NoticeMessage&&(t.innerHTML=a.NoticeMessage,a.el=t),e.call(this,i,a)},el:function(){return t}}};i.default=a},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var a=e("./BaseCanvas"),r=n(a),s=e("./Util"),o=n(s),h=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,r.default)(e,t,i);return o.default.extend(n,{constructor:function(e,i){n.constructor.call(this,e,i),this.VRMode=!1,this.scene=new t.Scene;var a=this.width/this.height;this.cameraL=new t.PerspectiveCamera(i.initFov,a,1,2e3),this.cameraL.target=new t.Vector3(0,0,0),this.cameraR=new t.PerspectiveCamera(i.initFov,a/2,1,2e3),this.cameraR.position.set(1e3,0,0),this.cameraR.target=new t.Vector3(1e3,0,0);for(var r=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),s=new t.SphereBufferGeometry(500,60,40).toNonIndexed(),o=r.attributes.uv.array,h=r.attributes.normal.array,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i]);return t}function d(e){var t={};for(var i in e)t[i]=e[i];return t}function u(e){return Math.sqrt((e[0].clientX-e[1].clientX)*(e[0].clientX-e[1].clientX)+(e[0].clientY-e[1].clientY)*(e[0].clientY-e[1].clientY))}Object.defineProperty(i,"__esModule",{value:!0}),i.default={whichTransitionEvent:n,mobileAndTabletcheck:a,isIos:r,isRealIphone:s,fovToProjection:l,extend:c,deepCopy:d,getTouchesDistance:u}},{}],12:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e){return{constructor:function(t,i){e.call(this,t,i)},buildCSSClass:function(){return"vjs-VR-control "+e.prototype.buildCSSClass.call(this)},handleClick:function(){var e=this.player().getChild("Canvas");e.VRMode?e.disableVR():e.enableVR(),e.VRMode?this.addClass("enable"):this.removeClass("enable"),e.VRMode?this.player().trigger("VRModeOn"):this.player().trigger("VRModeOff")},controlText_:"VR"}};i.default=n},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.getChild("Canvas");return function(){e.el().style.width=window.innerWidth+"px",e.el().style.height=window.innerHeight+"px",t.handleResize()}}function r(e,t){var i=a(e);e.controlBar.fullscreenToggle.off("tap",t),e.controlBar.fullscreenToggle.on("tap",function(){var t=e.getChild("Canvas");e.isFullscreen()?(e.isFullscreen(!1),e.exitFullWindow(),e.el().style.width="",e.el().style.height="",t.handleResize(),window.removeEventListener("devicemotion",i)):(e.isFullscreen(!0),e.enterFullWindow(),i(),window.addEventListener("devicemotion",i))})}Object.defineProperty(i,"__esModule",{value:!0});var s=e("./lib/Util"),o=n(s),h=e("./lib/Detector"),l=n(h),c=e("iphone-inline-video"),d=n(c),u=o.default.mobileAndTabletcheck(),f={clickAndDrag:u,showNotice:!0,NoticeMessage:"Please use your mouse drag and drop the video.",autoHideNotice:3e3,scrollable:!0,initFov:75,maxFov:105,minFov:51,initLat:0,initLon:-180,returnStepLat:.5,returnStepLon:2,backToVerticalCenter:!u,backToHorizonCenter:!u,clickToToggle:!1,minLat:-85,maxLat:85,minLon:-(1/0),maxLon:1/0,videoType:"equirectangular",rotateX:0,rotateY:0,rotateZ:0,autoMobileOrientation:!1,mobileVibrationValue:o.default.isIos()?.022:1,VREnable:!0,VRGapDegree:2.5,closePanorama:!1,helperCanvas:{},dualFish:{width:1920,height:1080,circle1:{x:.240625,y:.553704,rx:.23333,ry:.43148,coverX:.913,coverY:.9},circle2:{x:.757292,y:.553704,rx:.232292,ry:.4296296,coverX:.913,coverY:.9308}}},v=function(e,t,i){if(e.addClass("vjs-panorama"),!l.default.webgl)return p(e,{NoticeMessage:l.default.getWebGLErrorMessage(),autoHideNotice:t.autoHideNotice}),void(t.callback&&t.callback());e.addChild("Canvas",o.default.deepCopy(t));var n=e.getChild("Canvas");if(u){var a=i.getTech(e);o.default.isRealIphone()&&(a.setAttribute("playsinline",""),(0,d.default)(a,!0)),o.default.isIos()&&r(e,i.getFullscreenToggleClickFn(e)),e.addClass("vjs-panorama-mobile-inline-video"),e.removeClass("vjs-using-native-controls"),n.playOnMobile()}t.showNotice&&e.on("playing",function(){p(e,o.default.deepCopy(t))}),t.VREnable&&e.controlBar.addChild("VRButton",{},e.controlBar.children().length-1),n.hide(),e.on("play",function(){n.show()}),e.on("fullscreenchange",function(){n.handleResize()}),t.callback&&t.callback()},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{NoticeMessage:""},i=e.addChild("Notice",t);t.autoHideNotice>0&&setTimeout(function(){i.addClass("vjs-video-notice-fadeOut");var e=o.default.whichTransitionEvent(),t=function t(){i.hide(),i.removeClass("vjs-video-notice-fadeOut"),i.off(e,t)};i.on(e,t)},t.autoHideNotice)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=["equirectangular","fisheye","3dVideo","dual_fisheye"],i=function(i){var n=this;return e.mergeOption&&(i=e.mergeOption(f,i)),"undefined"==typeof e._init||"function"!=typeof e._init?void console.error("plugin must implement init function()."):(t.indexOf(i.videoType)==-1&&(i.videoType=f.videoType),e._init(i),void this.ready(function(){v(n,i,e)}))};return i.VERSION="0.1.3",i};i.default=m},{"./lib/Detector":6,"./lib/Util":11,"iphone-inline-video":2}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return e.tech({IWillNotUseThisInPlugins:!0}).el()}function r(e){return e.controlBar.fullscreenToggle.handleClick}var s=e("./lib/Canvas"),o=n(s),h=e("./lib/ThreeCanvas"),l=n(h),c=e("./lib/Notice"),d=n(c),u=e("./lib/HelperCanvas"),f=n(u),v=e("./lib/VRButton"),p=n(v),m=e("./plugin"),g=n(m),b=videojs.getComponent("Component"),w=(0,d.default)(b);videojs.registerComponent("Notice",videojs.extend(b,w));var M=(0,f.default)(b);videojs.registerComponent("HelperCanvas",videojs.extend(b,M));var y=videojs.getComponent("Button"),T=(0,p.default)(y);videojs.registerComponent("VRButton",videojs.extend(y,T)),videojs.plugin("panorama",(0,g.default)({_init:function(e){var t="3dVideo"!==e.videoType?(0,o.default)(b,window.THREE,{getTech:a}):(0,l.default)(b,window.THREE,{getTech:a});videojs.registerComponent("Canvas",videojs.extend(b,t))},mergeOption:function(e,t){return videojs.mergeOptions(e,t)},getTech:a,getFullscreenToggleClickFn:r}))},{"./lib/Canvas":5,"./lib/HelperCanvas":7,"./lib/Notice":9,"./lib/ThreeCanvas":10,"./lib/VRButton":12,"./plugin":13}]},{},[14]); \ No newline at end of file diff --git a/index.html b/index.html index e7a68e9..f811d6b 100644 --- a/index.html +++ b/index.html @@ -71,7 +71,8 @@ }); player.on("VRModeOn", function(){ - player.controlBar.fullscreenToggle.trigger("tap"); + if(!player.isFullscreen()) + player.controlBar.fullscreenToggle.trigger("tap"); }); }(window, window.videojs)); diff --git a/index_3d.html b/index_3d.html index f53a3b2..01a5db5 100644 --- a/index_3d.html +++ b/index_3d.html @@ -76,7 +76,8 @@ }); player.on("VRModeOn", function(){ - player.controlBar.fullscreenToggle.trigger("tap"); + if(!player.isFullscreen()) + player.controlBar.fullscreenToggle.trigger("tap"); }); }(window, window.videojs)); diff --git a/index_v4.html b/index_v4.html index 90c5f7b..7c9106f 100644 --- a/index_v4.html +++ b/index_v4.html @@ -70,7 +70,8 @@ }); player.on("VRModeOn", function(){ - player.controlBar.fullscreenToggle.trigger("tap"); + if(!player.isFullscreen()) + player.controlBar.fullscreenToggle.trigger("tap"); }); }(window, window.videojs)); diff --git a/package.json b/package.json index 4b3c127..e6d74de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "videojs-panorama", - "version": "0.1.4", + "version": "0.1.5", "description": "a plugin for videojs run a full 360 degree panorama video. ", "keywords": [ "videojs", diff --git a/src/scripts/lib/BaseCanvas.js b/src/scripts/lib/BaseCanvas.js index 5ca8ee0..fe896cf 100644 --- a/src/scripts/lib/BaseCanvas.js +++ b/src/scripts/lib/BaseCanvas.js @@ -10,6 +10,7 @@ import Detector from '../lib/Detector'; import MobileBuffering from '../lib/MobileBuffering'; +import Util from '../lib/Util'; const HAVE_CURRENT_DATA = 2; @@ -71,11 +72,11 @@ var BaseCanvas = function (baseComponent, THREE, settings = {}) { attachControlEvents: function(){ this.on('mousemove', this.handleMouseMove.bind(this)); - this.on('touchmove', this.handleMouseMove.bind(this)); + this.on('touchmove', this.handleTouchMove.bind(this)); this.on('mousedown', this.handleMouseDown.bind(this)); - this.on('touchstart',this.handleMouseDown.bind(this)); + this.on('touchstart',this.handleTouchStart.bind(this)); this.on('mouseup', this.handleMouseUp.bind(this)); - this.on('touchend', this.handleMouseUp.bind(this)); + this.on('touchend', this.handleTouchEnd.bind(this)); if(this.settings.scrollable){ this.on('mousewheel', this.handleMouseWheel.bind(this)); this.on('MozMousePixelScroll', this.handleMouseWheel.bind(this)); @@ -114,6 +115,19 @@ var BaseCanvas = function (baseComponent, THREE, settings = {}) { this.onPointerDownLat = this.lat; }, + handleTouchStart: function(event){ + if(event.touches.length > 1){ + this.isUserPinch = true; + this.multiTouchDistance = Util.getTouchesDistance(event.touches); + } + this.handleMouseDown(event); + }, + + handleTouchEnd: function(event){ + this.isUserPinch = false; + this.handleMouseUp(event); + }, + handleMouseMove: function(event){ var clientX = event.clientX || event.touches && event.touches[0].clientX; var clientY = event.clientY || event.touches && event.touches[0].clientY; @@ -131,6 +145,13 @@ var BaseCanvas = function (baseComponent, THREE, settings = {}) { } }, + handleTouchMove: function(event){ + //handle single touch event, + if(!this.isUserPinch || event.touches.length <= 1){ + this.handleMouseMove(event); + } + }, + handleMobileOrientation: function (event) { if(typeof event.rotationRate === "undefined") return; var x = event.rotationRate.alpha; diff --git a/src/scripts/lib/Canvas.js b/src/scripts/lib/Canvas.js index 886c941..19309ac 100644 --- a/src/scripts/lib/Canvas.js +++ b/src/scripts/lib/Canvas.js @@ -129,6 +129,16 @@ var Canvas = function (baseComponent, THREE, settings = {}) { } }, + handleTouchMove: function (event) { + parent.handleTouchMove.call(this, event); + if(this.isUserPinch){ + let currentDistance = Util.getTouchesDistance(event.touches); + event.wheelDeltaY = (currentDistance - this.multiTouchDistance) * 2; + this.handleMouseWheel.call(this, event); + this.multiTouchDistance = currentDistance; + } + }, + render: function(){ parent.render.call(this); this.camera.target.x = 500 * Math.sin( this.phi ) * Math.cos( this.theta ); diff --git a/src/scripts/lib/Util.js b/src/scripts/lib/Util.js index 1b2b995..fbbaa5d 100644 --- a/src/scripts/lib/Util.js +++ b/src/scripts/lib/Util.js @@ -121,6 +121,12 @@ function deepCopy(obj) { return to; } +function getTouchesDistance(touches){ + return Math.sqrt( + (touches[0].clientX-touches[1].clientX) * (touches[0].clientX-touches[1].clientX) + + (touches[0].clientY-touches[1].clientY) * (touches[0].clientY-touches[1].clientY)); +} + export default { whichTransitionEvent: whichTransitionEvent, mobileAndTabletcheck: mobileAndTabletcheck, @@ -128,5 +134,6 @@ export default { isRealIphone: isRealIphone, fovToProjection: fovToProjection, extend: extend, - deepCopy: deepCopy + deepCopy: deepCopy, + getTouchesDistance: getTouchesDistance }; \ No newline at end of file