/** * Minified by jsDelivr using Terser v3.14.1. * Original file: /npm/photo-sphere-viewer@4.0.7/dist/photo-sphere-viewer.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("three"),require("uevent")):"function"==typeof define&&define.amd?define(["exports","three","uevent"],e):e((t=t||self).PhotoSphereViewer={},t.THREE,t.uEvent)}(this,function(t,e,o){"use strict";var i=[0,2,4,5,3,1],n=["left","right","top","bottom","back","front"],r="photoSphereViewer",s={ROTATE_LAT_UP:"rotateLatitudeUp",ROTATE_LAT_DOWN:"rotateLatitudeDown",ROTATE_LONG_RIGHT:"rotateLongitudeRight",ROTATE_LONG_LEFT:"rotateLongitudeLeft",ZOOM_IN:"zoomIn",ZOOM_OUT:"zoomOut",TOGGLE_AUTOROTATE:"toggleAutorotate"},a={AUTOROTATE:"autorotate",BEFORE_RENDER:"before-render",BEFORE_ROTATE:"before-rotate",CLICK:"click",CLOSE_PANEL:"close-panel",CONFIG_CHANGED:"config-changed",DOUBLE_CLICK:"dblclick",FULLSCREEN_UPDATED:"fullscreen-updated",HIDE_NOTIFICATION:"hide-notification",HIDE_OVERLAY:"hide-overlay",HIDE_TOOLTIP:"hide-tooltip",OPEN_PANEL:"open-panel",PANORAMA_LOADED:"panorama-loaded",POSITION_UPDATED:"position-updated",READY:"ready",RENDER:"render",SHOW_NOTIFICATION:"show-notification",SHOW_OVERLAY:"show-overlay",SHOW_TOOLTIP:"show-tooltip",SIZE_UPDATED:"size-updated",STOP_ALL:"stop-all",ZOOM_UPDATED:"zoom-updated"},c={GET_ANIMATE_POSITION:"get-animate-position",GET_ROTATE_POSITION:"get-rotate-position"},h={MENU:"menu",TWO_FINGERS:"twoFingers",ERROR:"error"},p={linear:function(t){return t},inQuad:function(t){return t*t},outQuad:function(t){return t*(2-t)},inOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},inCubic:function(t){return t*t*t},outCubic:function(t){return--t*t*t+1},inOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},inQuart:function(t){return t*t*t*t},outQuart:function(t){return 1- --t*t*t*t},inOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},inQuint:function(t){return t*t*t*t*t},outQuint:function(t){return 1+--t*t*t*t*t},inOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},inSine:function(t){return 1-Math.cos(t*(Math.PI/2))},outSine:function(t){return Math.sin(t*(Math.PI/2))},inOutSine:function(t){return.5-.5*Math.cos(Math.PI*t)},inExpo:function(t){return Math.pow(2,10*(t-1))},outExpo:function(t){return 1-Math.pow(2,-10*t)},inOutExpo:function(t){return(t=2*t-1)<0?.5*Math.pow(2,10*t):1-.5*Math.pow(2,-10*t)},inCirc:function(t){return 1-Math.sqrt(1-t*t)},outCirc:function(t){return Math.sqrt(1-(t-1)*(t-1))},inOutCirc:function(t){return(t*=2)<1?.5-.5*Math.sqrt(1-t*t):.5+.5*Math.sqrt(1-(t-=2)*t)}},l=Object.freeze({__proto__:null,MOVE_THRESHOLD:4,DBLCLICK_DELAY:300,LONGTOUCH_DELAY:500,TWOFINGERSOVERLAY_DELAY:100,INERTIA_WINDOW:300,SPHERE_RADIUS:100,SPHERE_VERTICES:64,CUBE_VERTICES:8,CUBE_MAP:i,CUBE_HASHMAP:n,BUTTON_DATA:"psvButton",VIEWER_DATA:r,ACTIONS:s,EVENTS:a,CHANGE_EVENTS:c,IDS:h,EASINGS:p});function u(t,e,o){if(t.classList)void 0===o?t.classList.toggle(e):o&&!t.classList.contains(e)?t.classList.add(e):o||t.classList.remove(e);else{var i=t.getAttribute("class")||"",n=-1!==i.indexOf(e),r=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)");void 0!==o&&!o||n?o||(i=i.replace(r," ")):i+=i.length>0?" "+e:e,t.setAttribute("class",i)}}function d(t,e){e&&e.split(" ").forEach(function(e){u(t,e,!0)})}function v(t,e){var o=t.matches||t.msMatchesSelector,i=t;if(!o)return null;do{if(o.bind(i)(e))return i;i=i instanceof SVGElement?i.parentNode:i.parentElement}while(i);return null}var f={13:"Enter",27:"Escape",32:" ",33:"PageUp",34:"PageDown",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",46:"Delete",107:"+",109:"-"},m={Add:"+",Del:"Delete",Down:"ArrowDown",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Spacebar:" ",Subtract:"-",Up:"ArrowUp"};function g(t){var e=t.key||f[t.keyCode||t.which];return e&&m[e]&&(e=m[e]),e}function w(t){return(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)===t}function _(t){(t.requestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen||t.msRequestFullscreen).call(t)}function b(){(document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen).call(document)}function E(t,e){return window.getComputedStyle(t,null)[e]}function y(t){var e=0,o=0,i=0,n=0;return"detail"in t&&(o=t.detail),"wheelDelta"in t&&(o=-t.wheelDelta/120),"wheelDeltaY"in t&&(o=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=o,o=0),i=10*e,n=10*o,"deltaY"in t&&(n=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||n)&&t.deltaMode&&(1===t.deltaMode?(i*=40,n*=40):(i*=800,n*=800)),i&&!e&&(e=i<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:e,spinY:o,pixelX:i,pixelY:n}}function T(t,e,o){return Math.max(e,Math.min(o,t))}function x(t){return t.reduce(function(t,e){return t+e},0)}function L(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function M(t,e){return[0,2*Math.PI,2*-Math.PI].reduce(function(o,i){var n=e-t+i;return Math.abs(n)0?"-":"")+t.toLowerCase()})}function A(t,e){var o,i,n,r,s=0,a=function(){s=Date.now(),r=void 0,n=t.apply(o,i),r||(o=i=null)};return function(){var c=Date.now();s||(s=c);var h=e-(c-s);return o=this,i=arguments,h<=0||h>e?(r&&(clearTimeout(r),r=void 0),s=c,n=t.apply(o,i),r||(o=i=null)):r||(r=setTimeout(a,h)),n}}function P(t){if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1}function z(t,e){var o=e;return function t(e,i){return Array.isArray(i)?(e&&Array.isArray(e)?e.length=0:e=[],i.forEach(function(o,i){e[i]=t(null,o)})):"object"==typeof i?(e&&!Array.isArray(e)||(e={}),Object.keys(i).forEach(function(n){"object"==typeof i[n]&&i[n]&&P(i[n])?i[n]!=o&&(e[n]?t(e[n],i[n]):e[n]=t(null,i[n])):e[n]=i[n]})):e=i,e}(t,e)}function I(t){return z(null,t)}function R(t,e){Object.keys(t).forEach(function(o){e(t[o],o)})}function k(t){this.message=t,"captureStackTrace"in Error?Error.captureStackTrace(this,k):this.stack=(new Error).stack}function S(t){console.warn("PhotoSphereViewer: "+t)}function D(t,e){var o=t.match("(.*)");return null!==o?o[1]:null!==(o=t.match("GPano:"+e+'="(.*?)"'))?o[1]:null}k.prototype=Object.create(Error.prototype),k.prototype.name="PSVError",k.prototype.constructor=k;var H={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"};function N(t){if(!t)return{x:.5,y:.5};if("object"==typeof t)return t;var e=t.toLocaleLowerCase().split(" ").slice(0,2);1===e.length&&(e=void 0!==H[e[0]]?[e[0],"center"]:[e[0],e[0]]);var o="left"!==e[1]&&"right"!==e[1]&&"top"!==e[0]&&"bottom"!==e[0];e=e.map(function(t){return H[t]||t}),o||e.reverse();var i=e.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/);return i?{x:parseFloat(i[1])/100,y:parseFloat(i[2])/100}:{x:.5,y:.5}}function F(t){var o;if("string"==typeof t){var i=t.toString().trim(),n=parseFloat(i.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/,"$1")),r=i.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/,"$1").trim();switch(r.match(/(pm|per minute)$/)&&(n/=60),r){case"dpm":case"degrees per minute":case"dps":case"degrees per second":o=e.Math.degToRad(n);break;case"rdpm":case"radians per minute":case"rdps":case"radians per second":o=n;break;case"rpm":case"revolutions per minute":case"rps":case"revolutions per second":o=n*Math.PI*2;break;default:throw new k('Unknown speed unit "'+r+'"')}}else o=t;return o}function U(t,o,i){var n;if(void 0===o&&(o=!1),void 0===i&&(i=o),"string"==typeof t){var r=t.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);if(!r)throw new k('Unknown angle "'+t+'"');var s=parseFloat(r[1]),a=r[2];if(a)switch(a){case"deg":case"degs":n=e.Math.degToRad(s);break;case"rad":case"rads":n=s;break;default:throw new k('Unknown angle unit "'+a+'"')}else n=s}else{if("number"!=typeof t||Number.isNaN(t))throw new k('Unknown angle "'+t+'"');n=t}return(n=(o?n+Math.PI:n)%(2*Math.PI))<0&&(n+=2*Math.PI),o?T(n-Math.PI,-Math.PI/(i?2:1),Math.PI/(i?2:1)):n}var W=Object.freeze({__proto__:null,toggleClass:u,addClasses:d,removeClasses:function(t,e){e&&e.split(" ").forEach(function(e){u(t,e,!1)})},hasParent:function(t,e){var o=t;do{if(o===e)return!0;o=o.parentNode}while(o);return!1},getClosest:v,getEventKey:g,isFullscreenEnabled:w,requestFullscreen:_,exitFullscreen:b,getStyle:E,normalizeWheel:y,bound:T,isInteger:function(t){return Number.isInteger?Number.isInteger(t):"number"==typeof t&&Number.isFinite(t)&&Math.floor(t)===t},sum:x,distance:L,getShortestArc:M,getAngle:C,greatArcDistance:function(t,e){var o=t[0],i=t[1],n=e[0],r=e[1],s=(n-o)*Math.cos((i+r)/2),a=r-i;return Math.sqrt(s*s+a*a)},dasherize:O,throttle:A,isPlainObject:P,deepmerge:z,clone:I,isEmpty:function(t){return!t||0===Object.keys(t).length&&t.constructor===Object},each:R,intersect:function(t,e){return t.filter(function(t){return-1!==e.indexOf(t)})},logWarn:S,getXMPValue:D,parsePosition:N,parseSpeed:F,parseAngle:U}),V=function(){function t(t){var e=this;this.__cancelled=!1,this.__resolved=!1,this.__promise=new Promise(function(t,o){e.__resolve=t,e.__reject=o}),t&&(t.easing&&"string"!=typeof t.easing||(t.easing=p[t.easing||"linear"]),this.__start=null,this.options=t,t.delay?this.__delayTimeout=setTimeout(function(){e.__delayTimeout=null,window.requestAnimationFrame(function(t){return e.__run(t)})},t.delay):window.requestAnimationFrame(function(t){return e.__run(t)}))}var e=t.prototype;return e.__run=function(t){var e=this;if(!this.__cancelled){null===this.__start&&(this.__start=t);var o=(t-this.__start)/this.options.duration,i={};o<1?(R(this.options.properties,function(t,n){t&&(i[n]=t.start+(t.end-t.start)*e.options.easing(o))}),this.options.onTick(i,o),window.requestAnimationFrame(function(t){return e.__run(t)})):(R(this.options.properties,function(t,e){t&&(i[e]=t.end)}),this.options.onTick(i,1),window.requestAnimationFrame(function(){e.__resolved=!0,e.__resolve()}))}},e.then=function(e,o){var i=this;void 0===e&&(e=null),void 0===o&&(o=null);var n=new t;return n.__promise.then(null,function(){return i.cancel()}),this.__promise.then(function(){return n.__resolve(e?e():void 0)},function(){return n.__reject(o?o():void 0)}),n},e.catch=function(t){return this.then(void 0,t)},e.finally=function(t){return this.then(t,t)},e.cancel=function(){this.__cancelled||this.__resolved||(this.__cancelled=!0,this.__reject(),this.__delayTimeout&&(window.cancelAnimationFrame(this.__delayTimeout),this.__delayTimeout=null))},t.resolve=function(){var t=Promise.resolve();return t.cancel=function(){},t.finally=function(e){return t.then(e,e)},t},t}();function Y(){return(Y=Object.assign||function(t){for(var e=1;e\x3c!--Created by Nick Bluth from the Noun Project--\x3e\n',j.iconActive='\x3c!--Created by Nick Bluth from the Noun Project--\x3e\n';var q=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-custom-button",!1!==o.collapsable)||this).config=o,i.config.id?i.prop.id=i.config.id:i.prop.id="psvButton-"+Math.random().toString(36).substr(2,9),i.config.className&&d(i.container,i.config.className),i.config.title&&(i.container.title=i.config.title),i.config.content&&(i.container.innerHTML=i.config.content),i.width=i.container.offsetWidth,!1===i.config.enabled&&i.disable(),!1===i.config.visible&&i.hide(),i}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.config,t.prototype.destroy.call(this)},o.onClick=function(){this.config.onClick&&this.config.onClick.apply(this.psv)},e}(G),K=function(t){function e(e){return t.call(this,e,"psv-button--hover-scale psv-download-button",!0)||this}return X(e,t),e.prototype.onClick=function(){var t=this,e=document.createElement("a");e.href=this.psv.config.panorama,e.download=this.psv.config.panorama,this.psv.container.appendChild(e),e.click(),setTimeout(function(){t.psv.container.removeChild(e)},100)},e}(G);K.id="download",K.icon='\x3c!--Created by Michael Zenaty from the Noun Project--\x3e\n';var $=function(t){function e(e){var o;return(o=t.call(this,e,"psv-button--hover-scale psv-fullscreen-button")||this).psv.on(a.FULLSCREEN_UPDATED,B(o)),o}X(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(a.FULLSCREEN_UPDATED,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case a.FULLSCREEN_UPDATED:this.toggleActive(t.args[0])}},o.onClick=function(){this.psv.toggleFullscreen()},e}(G);$.id="fullscreen",$.icon='\x3c!--Created by Garrett Knoll from the Noun Project--\x3e\n',$.iconActive='\x3c!--Created by Garrett Knoll from the Noun Project--\x3e\n';var Q="data-"+O("psvButton"),J=function(t){function e(e){var o;return(o=t.call(this,e,"psv-button--hover-scale psv-menu-button")||this).psv.on(a.OPEN_PANEL,B(o)),o.psv.on(a.CLOSE_PANEL,B(o)),o.hide(),o}X(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(a.OPEN_PANEL,this),this.psv.off(a.CLOSE_PANEL,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case a.OPEN_PANEL:this.toggleActive(t.args[0]===h.MENU);break;case a.CLOSE_PANEL:this.toggleActive(!1)}},o.hide=function(e){t.prototype.hide.call(this,e),this.__hideMenu()},o.show=function(e){t.prototype.show.call(this,e),this.prop.active&&this.__showMenu()},o.onClick=function(){this.prop.active?this.__hideMenu():this.__showMenu()},o.__showMenu=function(){var t,e,o=this;this.psv.panel.show({id:h.MENU,content:(t=this.parent.collapsed,e=this.psv,'\n
\n

'+e.config.lang.menu+'

\n
    \n '+t.map(function(t){return"\n
  • \n '+t.container.innerHTML+'\n

    '+t.container.title+"

    \n
  • \n "}).join("")+"\n
\n
\n"),noMargin:!0,clickHandler:function(t){var e=t.target?v(t.target,"li"):void 0,i=e?e.dataset.psvButton:void 0;i&&(o.parent.getButton(i).onClick(),o.__hideMenu())}})},o.__hideMenu=function(){this.psv.panel&&this.psv.panel.hide(h.MENU)},e}(G);J.id="menu",J.icon='\x3c!-- Created by Richard Kunák from the Noun Project--\x3e\n';var tt={loaded:!1,pixelRatio:1,isWebGLSupported:!1,isTouchEnabled:null,maxTextureWidth:0,maxCanvasWidth:0,mouseWheelEvent:null,fullscreenEvent:null};tt.load=function(){if(!tt.loaded){var t=function(){var t=document.createElement("canvas"),e=null;if(!t.getContext)return null;return["webgl","experimental-webgl","moz-webgl","webkit-3d"].some(function(o){try{return null!==(e=t.getContext(o))}catch(t){return!1}})?e:null}();tt.loaded=!0,tt.pixelRatio=window.devicePixelRatio||1,tt.isWebGLSupported=null!=t,tt.isTouchEnabled=new Promise(function(t){var e=function e(o){t(!!o),window.removeEventListener("touchstart",e)};window.addEventListener("touchstart",e,!1),setTimeout(e,1e4)}),tt.maxTextureWidth=function(t){return null!==t?t.getParameter(t.MAX_TEXTURE_SIZE):0}(t),tt.maxCanvasWidth=function(t){var e=document.createElement("canvas"),o=e.getContext("2d");e.width=t,e.height=t/2;for(;e.width>1024;){o.fillStyle="white",o.fillRect(0,0,1,1);try{if(255===o.getImageData(0,0,1,1).data[0])return e.width}catch(t){}e.width/=2,e.height/=2}return 0}(tt.maxTextureWidth),tt.mouseWheelEvent="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",tt.fullscreenEvent=(e=Object.keys(et).filter(function(t){return t in document})).length?et[e[0]]:null}var e};var et={exitFullscreen:"fullscreenchange",webkitExitFullscreen:"webkitfullscreenchange",mozCancelFullScreen:"mozfullscreenchange",msExitFullscreen:"MSFullscreenChange"};var ot=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-button--hover-scale psv-zoom-button",!0)||this).prop=Y({},i.prop,{value:o,buttondown:!1,longPressTimeout:null,longPressAnimation:null}),i.container.addEventListener("mousedown",B(i)),i.psv.container.addEventListener("mouseup",B(i)),i.psv.container.addEventListener("touchend",B(i)),i}X(e,t);var o=e.prototype;return o.destroy=function(){this.__onMouseUp(),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp()}},o.isSupported=function(){return{initial:!0,promise:tt.isTouchEnabled.then(function(t){return!t})}},o.onClick=function(){},o.__onMouseDown=function(){var t=this;this.prop.enabled&&(this.prop.buttondown=!0,this.prop.longPressTimeout=setTimeout(function(){return t.__startLongPressInterval()},100))},o.__startLongPressInterval=function(){var t=this;if(this.prop.buttondown){var e=this.prop.value<0?0:100;this.prop.longPressAnimation=new V({properties:{zoom:{start:this.psv.prop.zoomLvl,end:e}},duration:1500*Math.abs(this.psv.prop.zoomLvl-e)/100,easing:"linear",onTick:function(e){t.psv.zoom(e.zoom)}}).catch(function(){})}},o.__onMouseUp=function(){this.prop.enabled&&this.prop.buttondown&&(this.prop.longPressAnimation?(this.prop.longPressAnimation.cancel(),this.prop.longPressAnimation=null):this.psv.zoom(this.psv.prop.zoomLvl+this.prop.value*this.psv.config.zoomButtonIncrement),this.prop.longPressTimeout&&clearTimeout(this.prop.longPressTimeout),this.prop.buttondown=!1)},e}(G),it=function(t){function e(e){return t.call(this,e,1)||this}return X(e,t),e}(ot);it.id="zoomIn",it.icon='\x3c!--Created by Ryan Canning from the Noun Project--\x3e\n';var nt=function(t){function e(e){return t.call(this,e,-1)||this}return X(e,t),e}(ot);nt.id="zoomOut",nt.icon='\x3c!--Created by Ryan Canning from the Noun Project--\x3e\n';var rt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-zoom-range")||this).prop=Y({},o.prop,{mousedown:!1,mediaMinWidth:0}),o.zoomRange=document.createElement("div"),o.zoomRange.className="psv-zoom-range-line",o.container.appendChild(o.zoomRange),o.zoomValue=document.createElement("div"),o.zoomValue.className="psv-zoom-range-handle",o.zoomRange.appendChild(o.zoomValue),o.prop.mediaMinWidth=parseInt(E(o.container,"maxWidth"),10),o.container.addEventListener("mousedown",B(o)),o.container.addEventListener("touchstart",B(o)),o.psv.container.addEventListener("mousemove",B(o)),o.psv.container.addEventListener("touchmove",B(o)),o.psv.container.addEventListener("mouseup",B(o)),o.psv.container.addEventListener("touchend",B(o)),o.psv.on(a.ZOOM_UPDATED,B(o)),o.psv.prop.ready?o.__moveZoomValue(o.psv.prop.zoomLvl):o.psv.once(a.READY,B(o)),o.refreshUi(),o}X(e,t);var o=e.prototype;return o.destroy=function(){this.__stopZoomChange(),this.psv.container.removeEventListener("mousemove",this),this.psv.container.removeEventListener("touchmove",this),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),delete this.zoomRange,delete this.zoomValue,this.psv.off(a.ZOOM_UPDATED,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"mousedown":this.__initZoomChangeWithMouse(t);break;case"touchstart":this.__initZoomChangeByTouch(t);break;case"mousemove":this.__changeZoomWithMouse(t);break;case"touchmove":this.__changeZoomByTouch(t);break;case"mouseup":case"touchend":this.__stopZoomChange(t);break;case a.ZOOM_UPDATED:this.__moveZoomValue(t.args[0]);break;case a.READY:this.__moveZoomValue(this.psv.prop.zoomLvl)}},o.isSupported=function(){return{initial:!0,promise:tt.isTouchEnabled.then(function(t){return!t})}},o.refreshUi=function(){this.prop.supported&&(this.psv.prop.size.width<=this.prop.mediaMinWidth&&this.prop.visible?this.hide():this.psv.prop.size.width>this.prop.mediaMinWidth&&!this.prop.visible&&this.show())},o.onClick=function(){},o.__moveZoomValue=function(t){this.zoomValue.style.left=t/100*this.zoomRange.offsetWidth-this.zoomValue.offsetWidth/2+"px"},o.__initZoomChangeWithMouse=function(t){this.prop.enabled&&(this.prop.mousedown=!0,this.__changeZoom(t.clientX))},o.__initZoomChangeByTouch=function(t){this.prop.enabled&&(this.prop.mousedown=!0,this.__changeZoom(t.changedTouches[0].clientX))},o.__stopZoomChange=function(){this.prop.enabled&&(this.prop.mousedown=!1,this.prop.buttondown=!1)},o.__changeZoomWithMouse=function(t){this.prop.enabled&&this.prop.mousedown&&(t.preventDefault(),this.__changeZoom(t.clientX))},o.__changeZoomByTouch=function(t){this.prop.enabled&&this.prop.mousedown&&this.__changeZoom(t.changedTouches[0].clientX)},o.__changeZoom=function(t){var e=(t-this.zoomRange.getBoundingClientRect().left)/this.zoomRange.offsetWidth*100;this.psv.zoom(e)},e}(G);rt.id="zoomRange";var st={panorama:null,container:null,caption:null,loadingImg:null,loadingTxt:"Loading...",size:null,fisheye:!1,minFov:30,maxFov:90,defaultZoomLvl:50,defaultLong:0,defaultLat:0,sphereCorrection:{pan:0,tilt:0,roll:0},moveSpeed:1,zoomButtonIncrement:2,autorotateDelay:null,autorotateSpeed:"2rpm",autorotateLat:null,moveInertia:!0,mousewheel:!0,mousewheelSpeed:1,mousemove:!0,captureCursor:!1,touchmoveTwoFingers:!1,useXmpData:!0,panoData:null,withCredentials:!1,navbar:["autorotate","zoomOut","zoomRange","zoomIn","download","caption","fullscreen"],lang:{autorotate:"Automatic rotation",zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",download:"Download",fullscreen:"Fullscreen",menu:"Menu",twoFingers:["Use two fingers to navigate"],loadError:"The panorama can't be loaded"},keyboard:{ArrowUp:s.ROTATE_LAT_UP,ArrowDown:s.ROTATE_LAT_DOWN,ArrowRight:s.ROTATE_LONG_RIGHT,ArrowLeft:s.ROTATE_LONG_LEFT,PageUp:s.ZOOM_IN,PageDown:s.ZOOM_OUT,"+":s.ZOOM_IN,"-":s.ZOOM_OUT," ":s.TOGGLE_AUTOROTATE},plugins:[]},at={panorama:"Use setPanorama method to change the panorama",panoData:"Use setPanorama method to change the panorama",container:"Cannot change viewer container",plugins:"Cannot change plugins"},ct={container:function(t){if(!t)throw new k("No value given for container.");return t},defaultLat:function(t){return U(t,!0)},minFov:function(t,e){return e.maxFov\x3c!--Created by Arafat Uddin from the Noun Project--\x3e';var pt=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-caption")||this).button=new ht(B(i)),i.button.hide(),i.prop=Y({},i.prop,{id:i.constructor.id,collapsable:!1,width:i.button.prop.width,caption:"",contentVisible:!0,contentWidth:0}),i.content=document.createElement("div"),i.content.className="psv-caption-content",i.container.appendChild(i.content),i.setCaption(o),i}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.button,delete this.content,t.prototype.destroy.call(this)},o.setCaption=function(t){this.prop.caption=t||"",this.content.innerHTML=this.prop.caption,t?(this.show(!1),this.content.style.display="",this.prop.contentWidth=this.content.offsetWidth,this.refreshUi()):this.hide()},o.refreshUi=function(){var t=this.container.offsetWidth;t>=this.prop.contentWidth&&!this.prop.contentVisible?(this.content.style.display="",this.prop.contentVisible=!0,this.button.hide(!1)):t0?(n.forEach(function(t){return t.collapse()}),this.collapsed=n,this.getButton(J.id).show(!1)):e>=o&&this.collapsed.length>0&&(this.collapsed.forEach(function(t){return t.uncollapse()}),this.collapsed=[],this.getButton(J.id).hide(!1));var r=this.getButton(pt.id,!1);r&&r.refreshUi()}},o.__cleanButtons=function(t){return!0===t?I(st.navbar):"string"==typeof t?t.split(/[ ,]/):t||[]},e}(Z),vt=function(t){function e(e){var o;return(o=t.call(this)||this).psv=e,o}return X(e,t),e.prototype.destroy=function(){delete this.psv},e}(o.EventEmitter);vt.id=null;var ft=function(t){function e(e){var o;return(o=t.call(this,e,"psv-loader-container")||this).loader=document.createElement("div"),o.loader.className="psv-loader",o.container.appendChild(o.loader),o.canvas=document.createElement("canvas"),o.canvas.className="psv-loader-canvas",o.canvas.width=o.loader.clientWidth*tt.pixelRatio,o.canvas.height=o.loader.clientWidth*tt.pixelRatio,o.loader.appendChild(o.canvas),o.prop=Y({},o.prop,{tickness:(o.loader.offsetWidth-o.loader.clientWidth)/2*tt.pixelRatio,current:null}),o.refreshUi(),o.hide(),o}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.loader,delete this.canvas,t.prototype.destroy.call(this)},o.refreshUi=function(){if(this.prop.current!==(this.psv.config.loadingImg||this.psv.config.loadingTxt)){var t;if(this.prop.current&&this.loader.removeChild(this.loader.lastChild),this.psv.config.loadingImg?((t=document.createElement("img")).className="psv-loader-image",t.src=this.psv.config.loadingImg):this.psv.config.loadingTxt&&((t=document.createElement("div")).className="psv-loader-text",t.innerHTML=this.psv.config.loadingTxt),t){var e=Math.round(Math.sqrt(2*Math.pow((this.canvas.width/2-this.prop.tickness/2)/tt.pixelRatio,2)));t.style.maxWidth=e+"px",t.style.maxHeight=e+"px",this.loader.appendChild(t)}this.prop.current=this.psv.config.loadingImg||this.psv.config.loadingTxt}},o.setProgress=function(t){var e=this.canvas.getContext("2d");e.clearRect(0,0,this.canvas.width,this.canvas.height),e.lineWidth=this.prop.tickness,e.strokeStyle=E(this.loader,"color"),e.beginPath(),e.arc(this.canvas.width/2,this.canvas.height/2,this.canvas.width/2-this.prop.tickness/2,-Math.PI/2,t/100*2*Math.PI-Math.PI/2),e.stroke()},e}(Z),mt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-notification")||this).prop=Y({},o.prop,{visible:!1,timeout:null}),o.content=document.createElement("div"),o.content.className="psv-notification-content",o.container.appendChild(o.content),o.content.addEventListener("click",function(){return o.hide()}),o}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.content,t.prototype.destroy.call(this)},o.show=function(t){var e=this;this.prop.timeout&&(clearTimeout(this.prop.timeout),this.prop.timeout=null),"string"==typeof t&&(t={content:t}),this.content.innerHTML=t.content,this.prop.visible=!0,this.container.classList.add("psv-notification--visible"),this.psv.trigger(a.SHOW_NOTIFICATION),t.timeout&&(this.prop.timeout=setTimeout(function(){return e.hide()},t.timeout))},o.hide=function(){this.prop.visible&&(this.container.classList.remove("psv-notification--visible"),this.prop.visible=!1,this.psv.trigger(a.HIDE_NOTIFICATION))},e}(Z),gt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-overlay")||this).prop=Y({},o.prop,{contentId:void 0,dissmisable:!0}),o.image=document.createElement("div"),o.image.className="psv-overlay-image",o.container.appendChild(o.image),o.text=document.createElement("div"),o.text.className="psv-overlay-text",o.container.appendChild(o.text),o.subtext=document.createElement("div"),o.subtext.className="psv-overlay-subtext",o.container.appendChild(o.subtext),o.container.addEventListener("mouseup",function(t){t.stopPropagation(),o.prop.dissmisable&&o.hide()},!0),t.prototype.hide.call(B(o)),o}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.image,delete this.text,delete this.subtext,t.prototype.destroy.call(this)},o.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},o.toggle=function(){throw new k("Overlay cannot be toggled")},o.show=function(e){"string"==typeof e&&(e={text:e}),this.prop.contentId=e.id,this.prop.dissmisable=!1!==e.dissmisable,this.image.innerHTML=e.image||"",this.text.innerHTML=e.text||"",this.subtext.innerHTML=e.subtext||"",t.prototype.show.call(this),this.psv.trigger(a.SHOW_OVERLAY,e.id)},o.hide=function(e){if(this.isVisible()&&(!e||!this.prop.contentId||this.prop.contentId===e)){var o=this.prop.contentId;t.prototype.hide.call(this),this.prop.contentId=void 0,this.psv.trigger(a.HIDE_OVERLAY,o)}},e}(Z),wt=function(t){function e(e){var o;(o=t.call(this,e,"psv-panel")||this).prop=Y({},o.prop,{visible:!1,contentId:void 0,mouseX:0,mouseY:0,mousedown:!1,clickHandler:null});var i=document.createElement("div");i.className="psv-panel-resizer",o.container.appendChild(i);var n=document.createElement("div");return n.className="psv-panel-close-button",o.container.appendChild(n),o.content=document.createElement("div"),o.content.className="psv-panel-content",o.container.appendChild(o.content),o.container.addEventListener(tt.mouseWheelEvent,function(t){return t.stopPropagation()}),n.addEventListener("click",function(){return o.hide()}),i.addEventListener("mousedown",B(o)),i.addEventListener("touchstart",B(o)),o.psv.container.addEventListener("mouseup",B(o)),o.psv.container.addEventListener("touchend",B(o)),o.psv.container.addEventListener("mousemove",B(o)),o.psv.container.addEventListener("touchmove",B(o)),o}X(e,t);var o=e.prototype;return o.destroy=function(){this.psv.container.removeEventListener("mousemove",this),this.psv.container.removeEventListener("touchmove",this),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),delete this.prop,delete this.content,t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown(t);break;case"touchstart":this.__onTouchStart(t);break;case"mousemove":this.__onMouseMove(t);break;case"touchmove":this.__onTouchMove(t);break;case"mouseup":case"touchend":this.__onMouseUp(t)}},o.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},o.toggle=function(){throw new k("Panel cannot be toggled")},o.show=function(t){"string"==typeof t&&(t={content:t}),this.prop.contentId=t.id,this.prop.visible=!0,this.prop.clickHandler&&(this.content.removeEventListener("click",this.prop.clickHandler),this.prop.clickHandler=null),this.content.innerHTML=t.content,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),u(this.content,"psv-panel-content--no-margin",!0===t.noMargin),t.clickHandler&&(this.prop.clickHandler=t.clickHandler,this.content.addEventListener("click",t.clickHandler)),this.psv.trigger(a.OPEN_PANEL,t.id)},o.hide=function(t){if(this.isVisible(t)){var e=this.prop.contentId;this.prop.visible=!1,this.prop.contentId=void 0,this.content.innerHTML=null,this.container.classList.remove("psv-panel--open"),this.prop.clickHandler&&(this.content.removeEventListener("click",this.prop.clickHandler),this.prop.clickHandler=null),this.psv.trigger(a.CLOSE_PANEL,e)}},o.__onMouseDown=function(t){t.stopPropagation(),this.__startResize(t)},o.__onTouchStart=function(t){t.stopPropagation(),this.__startResize(t.changedTouches[0])},o.__onMouseUp=function(t){this.prop.mousedown&&(t.stopPropagation(),this.prop.mousedown=!1,this.content.classList.remove("psv-panel-content--no-interaction"))},o.__onMouseMove=function(t){this.prop.mousedown&&(t.stopPropagation(),this.__resize(t))},o.__onTouchMove=function(t){this.prop.mousedown&&this.__resize(t.touches[0])},o.__startResize=function(t){this.prop.mouseX=t.clientX,this.prop.mouseY=t.clientY,this.prop.mousedown=!0,this.content.classList.add("psv-panel-content--no-interaction")},o.__resize=function(t){var e=t.clientX,o=t.clientY;this.container.style.width=Math.max(200,this.container.offsetWidth-(e-this.prop.mouseX))+"px",this.prop.mouseX=e,this.prop.mouseY=o},e}(Z),_t=function(){function t(t){this.psv=t,this.config=t.config,this.prop=t.prop}return t.prototype.destroy=function(){delete this.psv,delete this.config,delete this.prop},t}(),bt=function(t){function o(e){return t.call(this,e)||this}X(o,t);var i=o.prototype;return i.fovToZoomLevel=function(t){var e=Math.round((t-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return e-2*(e-50)},i.zoomLevelToFov=function(t){return this.config.maxFov+t/100*(this.config.minFov-this.config.maxFov)},i.vFovToHFov=function(t){return e.Math.radToDeg(2*Math.atan(Math.tan(e.Math.degToRad(t)/2)*this.prop.aspect))},i.speedToDuration=function(t,e){if(t&&"number"==typeof t)return Math.abs(t);var o=t?F(t):this.config.autorotateSpeed;return e/Math.abs(o)*1e3},i.textureCoordsToSphericalCoords=function(t){if(this.prop.isCubemap)throw new k("Unable to use texture coords with cubemap.");var e=this.prop.panoData,o=(t.x+e.croppedX)/e.fullWidth*Math.PI*2,i=(t.y+e.croppedY)/e.fullHeight*Math.PI;return{longitude:o>=Math.PI?o-Math.PI:o+Math.PI,latitude:Math.PI/2-i}},i.sphericalCoordsToTextureCoords=function(t){if(this.prop.isCubemap)throw new k("Unable to use texture coords with cubemap.");var e=this.prop.panoData,o=t.longitude/Math.PI/2*e.fullWidth,i=t.latitude/Math.PI*e.fullHeight;return{x:Math.round(t.longitude\x3c!--Created by AomAm from the Noun Project--\x3e\n',text:e.config.lang.twoFingers[0]})},100)):(t.preventDefault(),this.__move(t.touches[0])):2===t.touches.length&&(t.preventDefault(),this.__moveZoom(t),this.config.touchmoveTwoFingers&&this.__cancelTwoFingersOverlay()))},o.__cancelLongTouch=function(){this.prop.longtouchTimeout&&(clearTimeout(this.prop.longtouchTimeout),this.prop.longtouchTimeout=null)},o.__cancelTwoFingersOverlay=function(){this.prop.twofingersTimeout&&(clearTimeout(this.prop.twofingersTimeout),this.prop.twofingersTimeout=null)},o.__onMouseWheel=function(t){if(this.config.mousewheel){t.preventDefault(),t.stopPropagation();var e=5*y(t).spinY;0!==e&&this.psv.zoom(this.prop.zoomLvl-e*this.config.mousewheelSpeed)}},o.__fullscreenToggled=function(t){this.prop.fullscreen=void 0!==t?t:w(this.psv.container),this.config.keyboard&&(this.prop.fullscreen?this.psv.startKeyboardControl():this.psv.stopKeyboardControl()),this.psv.trigger(a.FULLSCREEN_UPDATED,this.prop.fullscreen)},o.__startMove=function(t){var e=this;this.psv.stopAutorotate(),this.psv.stopAnimation().then(function(){e.state.mouseX=t.clientX,e.state.mouseY=t.clientY,e.state.startMouseX=e.state.mouseX,e.state.startMouseY=e.state.mouseY,e.state.moving=!0,e.state.zooming=!1,e.state.mouseHistory.length=0,e.__logMouseMove(t)})},o.__startMoveZoom=function(t){var e={x:t.touches[0].clientX,y:t.touches[0].clientY},o={x:t.touches[1].clientX,y:t.touches[1].clientY};this.state.pinchDist=L(e,o),this.state.mouseX=(e.x+o.x)/2,this.state.mouseY=(e.y+o.y)/2,this.state.startMouseX=this.state.mouseX,this.state.startMouseY=this.state.mouseY,this.state.moving=!0,this.state.zooming=!0},o.__stopMove=function(t){if(!v(t.target,".psv-container"))return this.state.moving=!1,void(this.state.mouseHistory.length=0);this.state.moving&&(Math.abs(t.clientX-this.state.startMouseX)<4&&Math.abs(t.clientY-this.state.startMouseY)<4?(this.__click(t),this.state.moving=!1):this.config.moveInertia?(this.__logMouseMove(t),this.__stopMoveInertia(t)):this.state.moving=!1,this.state.mouseHistory.length=0)},o.__stopMoveZoom=function(){this.state.mouseHistory.length=0,this.state.moving=!1,this.state.zooming=!1},o.__stopMoveInertia=function(t){var e=this,o=t.clientX-this.state.mouseHistory[0][1],i=t.clientY-this.state.mouseHistory[0][2],n=Math.sqrt(o*o+i*i);this.prop.animationPromise=new V({properties:{clientX:{start:t.clientX,end:t.clientX+o},clientY:{start:t.clientY,end:t.clientY+i}},duration:300*n/100,easing:"outCirc",onTick:function(t){e.__move(t,!1)}}).finally(function(){e.state.moving=!1})},o.__click=function(t,e){var o=this;void 0===e&&(e=!1);var i=this.psv.container.getBoundingClientRect(),n={rightclick:e||2===t.button,target:t.target,clientX:t.clientX,clientY:t.clientY,viewerX:t.clientX-i.left,viewerY:t.clientY-i.top},r=this.psv.dataHelper.viewerCoordsToVector3({x:n.viewerX,y:n.viewerY});if(r){var s=this.psv.dataHelper.vector3ToSphericalCoords(r);if(n.longitude=s.longitude,n.latitude=s.latitude,!this.prop.isCubemap){var c=this.psv.dataHelper.sphericalCoordsToTextureCoords(n);n.textureX=c.x,n.textureY=c.y}this.state.dblclickTimeout?(Math.abs(this.state.dblclickData.clientX-n.clientX)<4&&Math.abs(this.state.dblclickData.clientY-n.clientY)<4&&this.psv.trigger(a.DOUBLE_CLICK,this.state.dblclickData),clearTimeout(this.state.dblclickTimeout),this.state.dblclickTimeout=null,this.state.dblclickData=null):(this.psv.trigger(a.CLICK,n),this.state.dblclickData=I(n),this.state.dblclickTimeout=setTimeout(function(){o.state.dblclickTimeout=null,o.state.dblclickData=null},300))}},o.__move=function(t,e){if(this.state.moving){var o=t.clientX,i=t.clientY,n={longitude:(o-this.state.mouseX)/this.prop.size.width*this.prop.moveSpeed*this.prop.hFov*tt.pixelRatio,latitude:(i-this.state.mouseY)/this.prop.size.height*this.prop.moveSpeed*this.prop.vFov*tt.pixelRatio};this.psv.rotate({longitude:this.prop.position.longitude-n.longitude,latitude:this.prop.position.latitude+n.latitude}),this.state.mouseX=o,this.state.mouseY=i,!1!==e&&this.__logMouseMove(t)}},o.__moveAbsolute=function(t){if(this.state.moving){var e=this.psv.container.getBoundingClientRect();this.psv.rotate({longitude:((t.clientX-e.left)/e.width-.5)*Math.PI*2,latitude:-((t.clientY-e.top)/e.height-.5)*Math.PI})}},o.__moveZoom=function(t){if(this.state.zooming&&this.state.moving){var e={x:t.touches[0].clientX,y:t.touches[0].clientY},o={x:t.touches[1].clientX,y:t.touches[1].clientY},i=L(e,o),n=80*(i-this.state.pinchDist)/this.prop.size.width;this.psv.zoom(this.prop.zoomLvl+n),this.__move({clientX:(e.x+o.x)/2,clientY:(e.y+o.y)/2}),this.state.pinchDist=i}},o.__logMouseMove=function(t){var e=Date.now();this.state.mouseHistory.push([e,t.clientX,t.clientY]);for(var o=null,i=0;i30?(this.state.mouseHistory.splice(0,i),i=0,o=this.state.mouseHistory[0][i]):(i++,o=this.state.mouseHistory[0][i])},e}(_t),yt=function(t){function o(e){var o;return(o=t.call(this,e)||this).mainReqid=void 0,o.renderer=null,o.scene=null,o.camera=null,o.mesh=null,o.raycaster=null,o.canvasContainer=document.createElement("div"),o.canvasContainer.className="psv-canvas-container",o.canvasContainer.style.cursor=o.psv.config.mousemove?"move":"default",o.psv.container.appendChild(o.canvasContainer),e.on(a.SIZE_UPDATED,function(t,e){o.renderer&&o.renderer.setSize(e.width,e.height)}),e.on(a.CONFIG_CHANGED,function(){o.canvasContainer.style.cursor=o.psv.config.mousemove?"move":"default"}),o.hide(),o}X(o,t);var i=o.prototype;return i.destroy=function(){this.mainReqid&&window.cancelAnimationFrame(this.mainReqid),this.scene&&this.__cleanTHREEScene(this.scene),this.psv.container.removeChild(this.canvasContainer),delete this.canvasContainer,delete this.renderer,delete this.scene,delete this.camera,delete this.mesh,delete this.raycaster,t.prototype.destroy.call(this)},i.hide=function(){this.canvasContainer.style.opacity=0},i.show=function(){this.canvasContainer.style.opacity=1},i.__renderLoop=function(t){var e=this;this.psv.trigger(a.BEFORE_RENDER,t),this.prop.needsUpdate&&(this.render(),this.prop.needsUpdate=!1),this.mainReqid=window.requestAnimationFrame(function(t){return e.__renderLoop(t)})},i.render=function(){this.prop.direction=this.psv.dataHelper.sphericalCoordsToVector3(this.prop.position),this.camera.position.set(0,0,0),this.camera.lookAt(this.prop.direction),this.config.fisheye&&this.camera.position.copy(this.prop.direction).multiplyScalar(this.config.fisheye/2).negate(),this.camera.aspect=this.prop.aspect,this.camera.fov=this.prop.vFov,this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera),this.psv.trigger(a.RENDER)},i.setTexture=function(t){var e=t.texture,o=t.panoData;if(this.prop.panoData=o,this.scene||this.__createScene(),this.prop.isCubemap)for(var i=0;i<6;i++)this.mesh.material[i].map&&this.mesh.material[i].map.dispose(),this.mesh.material[i].map=e[i];else this.mesh.material.map&&this.mesh.material.map.dispose(),this.mesh.material.map=e;this.psv.needsUpdate(),this.psv.trigger(a.PANORAMA_LOADED)},i.setSphereCorrection=function(t,e){void 0===e&&(e=this.mesh);var o=this.psv.dataHelper.cleanSphereCorrection(t);e.rotation.set(o.tilt,o.pan,o.roll)},i.__createScene=function(){this.raycaster=new e.Raycaster,this.renderer=new e.WebGLRenderer,this.renderer.setSize(this.prop.size.width,this.prop.size.height),this.renderer.setPixelRatio(tt.pixelRatio),this.camera=new e.PerspectiveCamera(this.prop.vFov,this.prop.size.width/this.prop.size.height,1,300),this.camera.position.set(0,0,0),this.scene=new e.Scene,this.scene.add(this.camera),this.prop.isCubemap?this.mesh=this.__createCubemap():this.mesh=this.__createSphere(),this.scene.add(this.mesh),this.renderer.domElement.className="psv-canvas",this.canvasContainer.appendChild(this.renderer.domElement)},i.__createSphere=function(t){void 0===t&&(t=1);var o=new e.SphereGeometry(100*t,64,64,-Math.PI/2),i=new e.MeshBasicMaterial({side:e.BackSide}),n=new e.Mesh(o,i);return n.scale.set(-1,1,1),n},i.__createCubemap=function(t){void 0===t&&(t=1);for(var o=200*t,i=new e.BoxGeometry(o,o,o,8,8,8),n=[],r=0;r<6;r++)n.push(new e.MeshBasicMaterial({side:e.BackSide}));var s=new e.Mesh(i,n);return s.scale.set(1,1,-1),s},i.transition=function(t,o){var i,n=this,r=t.texture,s=this.psv.dataHelper.isExtendedPosition(o),a="zoom"in o;if(this.prop.isCubemap?(s&&(S("cannot perform cubemap transition to different position"),s=!1),(i=this.__createCubemap(.9)).material.forEach(function(t,e){t.map=r[e],t.transparent=!0,t.opacity=0})):((i=this.__createSphere(.9)).material.map=r,i.material.transparent=!0,i.material.opacity=0,o.sphereCorrection&&this.setSphereCorrection(o.sphereCorrection,i)),s){var c=this.psv.dataHelper.cleanPosition(o),h=new e.Vector3(0,1,0);i.rotateOnWorldAxis(h,c.longitude-this.prop.position.longitude);var p=new e.Vector3(0,1,0).cross(this.camera.getWorldDirection(new e.Vector3)).normalize();i.rotateOnWorldAxis(p,c.latitude-this.prop.position.latitude),(this.config.latitudeRange||this.config.longitudeRange)&&(this.config.longitudeRange=null,this.config.latitudeRange=null,S("trying to perform transition with longitudeRange and/or latitudeRange, ranges cleared"))}return this.scene.add(i),this.psv.needsUpdate(),new V({properties:{opacity:{start:0,end:1},zoom:a?{start:this.prop.zoomLvl,end:o.zoom}:void 0},duration:o.transition,easing:"outCubic",onTick:function(t){if(n.prop.isCubemap)for(var e=0;e<6;e++)i.material[e].opacity=t.opacity;else i.material.opacity=t.opacity;a&&n.psv.zoom(t.zoom),n.psv.needsUpdate()}}).then(function(){n.setTexture(t),n.scene.remove(i),i.geometry.dispose(),i.geometry=null,o.sphereCorrection?n.setSphereCorrection(o.sphereCorrection):n.setSphereCorrection({}),s&&n.psv.rotate(o)})},i.__cleanTHREEScene=function(t){var e=this;t.traverse(function(o){o.geometry&&o.geometry.dispose(),o.material&&(Array.isArray(o.material)?o.material.forEach(function(t){t.map&&t.map.dispose(),t.dispose()}):(o.material.map&&o.material.map.dispose(),o.material.dispose())),o.dispose&&o.dispose(),o!==t&&e.__cleanTHREEScene(o)})},o}(_t),Tt=function(t){function o(e){var o;return(o=t.call(this,e)||this).requests=[],o}X(o,t);var r=o.prototype;return r.destroy=function(){this.abortLoading(),t.prototype.destroy.call(this)},r.loadTexture=function(t,e){var o=[];if(Array.isArray(t)){if(6!==t.length)throw new k("Must provide exactly 6 image paths when using cubemap.");for(var r=0;r<6;r++)o[r]=t[i[r]];return this.__loadCubemapTexture(o)}if("object"==typeof t){if(!n.every(function(e){return!!t[e]}))throw new k("Must provide exactly left, front, right, back, top, bottom when using cubemap.");return n.forEach(function(e,i){o[i]=t[e]}),this.__loadCubemapTexture(o)}return this.__loadEquirectangularTexture(t,e)},r.abortLoading=function(){[].concat(this.requests).forEach(function(t){return t.abort()})},r.__loadFile=function(t,o){var i=this;return new Promise(function(n,r){var s=0;o&&o(s);var a=new e.FileLoader;i.config.withCredentials&&a.setWithCredentials(!0),a.setResponseType("blob");var c=a.load(t,function(t){var e=i.requests.indexOf(c);-1!==e&&i.requests.splice(e,1),s=100,o&&o(s),n(t)},function(t){if(t.lengthComputable){var e=t.loaded/t.total*100;e>s&&(s=e,o&&o(s))}},function(t){var e=i.requests.indexOf(c);-1!==e&&i.requests.splice(e,1),r(t)});c instanceof XMLHttpRequest&&i.requests.push(c)})},r.__loadImage=function(t,e){return this.__loadFile(t,e).then(function(t){return new Promise(function(e,o){var i=document.createElementNS("http://www.w3.org/1999/xhtml","img");i.onload=function(){URL.revokeObjectURL(i.src),e(i)},i.onerror=o,i.src=URL.createObjectURL(t)})})},r.__loadBlobAsString=function(t){return new Promise(function(e,o){var i=new FileReader;i.onload=function(){return e(i.result)},i.onerror=o,i.readAsText(t)})},r.__loadEquirectangularTexture=function(t,e){var o=this;if(!0===this.prop.isCubemap)throw new k("The viewer was initialized with an cubemap, cannot switch to equirectangular panorama.");return this.prop.isCubemap=!1,(e||!this.config.useXmpData?this.__loadImage(t,function(t){return o.psv.loader.setProgress(t)}).then(function(t){return{img:t,newPanoData:e}}):this.__loadXMP(t,function(t){return o.psv.loader.setProgress(t)}).then(function(e){return o.__loadImage(t).then(function(t){return{img:t,newPanoData:e}})})).then(function(t){var e=t.img,i=t.newPanoData;"function"==typeof i&&(i=i(e));var n=i||{fullWidth:e.width,fullHeight:e.height,croppedWidth:e.width,croppedHeight:e.height,croppedX:0,croppedY:0};return n.croppedWidth===e.width&&n.croppedHeight===e.height||S("Invalid panoData, croppedWidth and/or croppedHeight is not coherent with loaded image\n panoData: "+n.croppedWidth+"x"+n.croppedHeight+", image: "+e.width+"x"+e.height),{texture:o.__createEquirectangularTexture(e,n),panoData:n}})},r.__loadXMP=function(t,e){var o=this;return this.__loadFile(t,e).then(function(t){return o.__loadBlobAsString(t)}).then(function(t){var e=t.indexOf(""),i=t.substring(e,o),n=null;return-1!==e&&-1!==o&&-1!==i.indexOf("GPano:")&&((n={fullWidth:parseInt(D(i,"FullPanoWidthPixels"),10),fullHeight:parseInt(D(i,"FullPanoHeightPixels"),10),croppedWidth:parseInt(D(i,"CroppedAreaImageWidthPixels"),10),croppedHeight:parseInt(D(i,"CroppedAreaImageHeightPixels"),10),croppedX:parseInt(D(i,"CroppedAreaLeftPixels"),10),croppedY:parseInt(D(i,"CroppedAreaTopPixels"),10)}).fullWidth&&n.fullHeight&&n.croppedWidth&&n.croppedHeight||(S("invalid XMP data"),n=null)),n})},r.__createEquirectangularTexture=function(t,o){var i;if(o.fullWidth>tt.maxTextureWidth||o.croppedWidth!==o.fullWidth||o.croppedHeight!==o.fullHeight){var n=Y({},o),r=tt.maxCanvasWidth/o.fullWidth;n.fullWidth*=r,n.fullHeight*=r,n.croppedWidth*=r,n.croppedHeight*=r,n.croppedX*=r,n.croppedY*=r;var s=document.createElement("canvas");s.width=n.fullWidth,s.height=n.fullHeight,s.getContext("2d").drawImage(t,n.croppedX,n.croppedY,n.croppedWidth,n.croppedHeight),i=new e.Texture(s)}else i=new e.Texture(t);return i.needsUpdate=!0,i.minFilter=e.LinearFilter,i.generateMipmaps=!1,i},r.__loadCubemapTexture=function(t){var e=this;if(!1===this.prop.isCubemap)throw new k("The viewer was initialized with an equirectangular panorama, cannot switch to cubemap.");this.config.fisheye&&S("fisheye effect with cubemap texture can generate distorsion"),this.prop.isCubemap=!0;for(var o=[],i=[0,0,0,0,0,0],n=function(n){o.push(e.__loadImage(t[n],function(t){i[n]=t,e.psv.loader.setProgress(x(i)/6)}).then(function(t){return e.__createCubemapTexture(t)}))},r=0;r<6;r++)n(r);return Promise.all(o).then(function(t){return{texture:t}})},r.__createCubemapTexture=function(t){var o;if(t.width>tt.maxTextureWidth){var i=document.createElement("canvas"),n=tt.maxCanvasWidth/t.width;i.width=t.width*n,i.height=t.height*n,i.getContext("2d").drawImage(t,0,0,i.width,i.height),o=new e.Texture(i)}else o=new e.Texture(t);return o.needsUpdate=!0,o.minFilter=e.LinearFilter,o.generateMipmaps=!1,o},r.preloadPanorama=function(t){return this.loadTexture(t)},o}(_t),xt={0:"left",.5:"center",1:"right"},Lt={0:"top",.5:"center",1:"bottom"},Mt={NONE:0,SHOWING:1,HIDING:2,READY:3},Ct=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-tooltip")||this).prop=Y({},i.prop,{},o,{state:Mt.NONE,width:0,height:0,pos:"",data:null}),i.content=document.createElement("div"),i.content.className="psv-tooltip-content",i.container.appendChild(i.content),i.arrow=document.createElement("div"),i.arrow.className="psv-tooltip-arrow",i.container.appendChild(i.arrow),i.container.addEventListener("transitionend",B(i)),i.container.style.top="-1000px",i.container.style.left="-1000px",i}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.arrow,delete this.content,t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"transitionend":this.__onTransitionEnd(t)}},o.toggle=function(){throw new k("Tooltip cannot be toggled")},o.show=function(t){if(this.prop.state!==Mt.NONE)throw new k("Initialized tooltip cannot be re-initialized");t.className&&d(this.container,t.className),this.content.innerHTML=t.content;var e=this.container.getBoundingClientRect();this.prop.width=e.right-e.left,this.prop.height=e.bottom-e.top,this.prop.state=Mt.READY,this.move(t),this.prop.data=t.data,this.prop.state=Mt.SHOWING,this.psv.trigger(a.SHOW_TOOLTIP,this.prop.data,this)},o.move=function(t){if(this.prop.state!==Mt.SHOWING&&this.prop.state!==Mt.READY)throw new k("Uninitialized tooltip cannot be moved");var e=this.container,o=this.arrow;if(t.position||(t.position=["top","center"]),"string"==typeof t.position){var i=N(t.position);if(!(i.x in xt&&i.y in Lt))throw new k('Unable to parse tooltip position "'+t.position+'"');t.position=[Lt[i.y],xt[i.x]]}if("center"===t.position[0]&&"center"===t.position[1])throw new k('Unable to parse tooltip position "center center"');var n={posClass:t.position.slice(),width:this.prop.width,height:this.prop.height,top:0,left:0,arrowTop:0,arrowLeft:0};this.__computeTooltipPosition(n,t);var r=!1;n.topthis.psv.prop.size.height-this.prop.offset&&(n.posClass[0]="top",r=!0),n.leftthis.psv.prop.size.width-this.prop.offset&&(n.posClass[1]="left",r=!0),r&&this.__computeTooltipPosition(n,t),e.style.top=n.top+"px",e.style.left=n.left+"px",o.style.top=n.arrowTop+"px",o.style.left=n.arrowLeft+"px";var s=n.posClass.join("-");s!==this.prop.pos&&(e.classList.remove("psv-tooltip--"+this.prop.pos),this.prop.pos=s,e.classList.add("psv-tooltip--"+this.prop.pos))},o.hide=function(){this.container.classList.remove("psv-tooltip--visible"),this.prop.state=Mt.HIDING,this.psv.trigger(a.HIDE_TOOLTIP,this.prop.data)},o.__onTransitionEnd=function(t){if("transform"===t.propertyName)switch(this.prop.state){case Mt.SHOWING:this.container.classList.add("psv-tooltip--visible"),this.prop.state=Mt.READY;break;case Mt.HIDING:this.prop.state=Mt.NONE,this.destroy()}},o.__computeTooltipPosition=function(t,e){var o=!1;switch(e.box||(e.box={width:0,height:0}),t.posClass[0]){case"bottom":t.top=e.top+e.box.height+this.prop.offset+this.prop.arrow,t.arrowTop=2*-this.prop.arrow,o=!0;break;case"center":t.top=e.top+e.box.height/2-t.height/2,t.arrowTop=t.height/2-this.prop.arrow;break;case"top":t.top=e.top-t.height-this.prop.offset-this.prop.arrow,t.arrowTop=t.height,o=!0}switch(t.posClass[1]){case"right":o?(t.left=e.left+e.box.width/2-this.prop.offset-this.prop.arrow,t.arrowLeft=this.prop.offset):(t.left=e.left+e.box.width+this.prop.offset+this.prop.arrow,t.arrowLeft=2*-this.prop.arrow);break;case"center":t.left=e.left+e.box.width/2-t.width/2,t.arrowLeft=t.width/2-this.prop.arrow;break;case"left":o?(t.left=e.left-t.width+e.box.width/2+this.prop.offset+this.prop.arrow,t.arrowLeft=t.width-this.prop.offset-2*this.prop.arrow):(t.left=e.left-t.width-this.prop.offset-this.prop.arrow,t.arrowLeft=t.width)}},e}(Z),Ot=function(t){function e(e){var o;o=t.call(this,e)||this;var i=new Ct(o.psv);return o.size={arrow:parseInt(E(i.arrow,"borderTopWidth"),10),offset:parseInt(E(i.container,"outlineWidth"),10)},i.destroy(),o}X(e,t);var o=e.prototype;return o.destroy=function(){delete this.size,t.prototype.destroy.call(this)},o.create=function(t){var e=new Ct(this.psv,this.size);return e.show(t),e},e}(_t);e.Cache.enabled=!0;var At=function(t){function o(o){var i;if(i=t.call(this)||this,tt.load(),!tt.isWebGLSupported)throw new k("WebGL is not supported.");if(0===tt.maxCanvasWidth||0===tt.maxTextureWidth)throw new k("Unable to detect system capabilities");return i.prop={ready:!1,uiRefresh:!1,needsUpdate:!1,fullscreen:!1,isCubemap:void 0,position:{longitude:0,latitude:0},direction:null,zoomLvl:null,vFov:null,hFov:null,aspect:null,moveSpeed:.1,autorotateCb:null,animationPromise:null,loadingPromise:null,startTimeout:null,size:{width:0,height:0},panoData:{fullWidth:0,fullHeight:0,croppedWidth:0,croppedHeight:0,croppedX:0,croppedY:0}},i.config=function(t){var e=I(st);z(e,t);var o={};return R(e,function(t,i){if(!Object.prototype.hasOwnProperty.call(st,i))throw new k("Unknown option "+i);ct[i]?o[i]=ct[i](t,e):o[i]=t}),o}(o),i.parent="string"==typeof o.container?document.getElementById(o.container):o.container,i.parent[r]=B(i),i.container=document.createElement("div"),i.container.classList.add("psv-container"),i.parent.appendChild(i.container),i.children=[],i.plugins={},i.renderer=new yt(B(i)),i.textureLoader=new Tt(B(i)),i.eventsHandler=new Et(B(i)),i.dataHelper=new bt(B(i)),i.loader=new ft(B(i)),i.navbar=new dt(B(i)),i.panel=new wt(B(i)),i.tooltip=new Ot(B(i)),i.notification=new mt(B(i)),i.overlay=new gt(B(i)),i.eventsHandler.init(),i.__resizeRefresh=A(function(){return i.refreshUi("resize")},500),i.resize(i.config.size),i.prop.moveSpeed=e.Math.degToRad(i.config.moveSpeed/tt.pixelRatio),i.config.plugins.forEach(function(t){var e=t[0],o=t[1];i.plugins[e.id]=new e(B(i),o)}),i.navbar.setButtons(i.config.navbar),i.config.panorama&&i.setPanorama(i.config.panorama),tt.isTouchEnabled.then(function(t){return u(i.container,"psv--is-touch",t)}),i.once(a.RENDER,function(){i.config.navbar&&(i.container.classList.add("psv--has-navbar"),i.navbar.show()),i.config.autorotateDelay&&(i.prop.startTimeout=setTimeout(function(){return i.startAutorotate()},i.config.autorotateDelay)),i.prop.ready=!0,setTimeout(function(){i.refreshUi("init"),i.trigger(a.READY)},0)}),i}X(o,t);var i=o.prototype;return i.destroy=function(){this.__stopAll(),this.stopKeyboardControl(),this.exitFullscreen(),this.eventsHandler.destroy(),this.renderer.destroy(),this.textureLoader.destroy(),this.dataHelper.destroy(),this.children.slice().forEach(function(t){return t.destroy()}),this.children.length=0,R(this.plugins,function(t){return t.destroy()}),delete this.plugins,this.parent.removeChild(this.container),delete this.parent[r],delete this.parent,delete this.container,delete this.loader,delete this.navbar,delete this.panel,delete this.tooltip,delete this.notification,delete this.overlay,delete this.config},i.refreshUi=function(t){var e=this;this.prop.ready&&(this.prop.uiRefresh?"new"!==this.prop.uiRefresh&&(this.prop.uiRefresh="new",setTimeout(function(){e.prop.uiRefresh=!1,e.refreshUi(t)})):(this.prop.uiRefresh=!0,this.children.every(function(t){return t.refreshUi(),!0===e.prop.uiRefresh}),this.prop.uiRefresh=!1))},i.getPlugin=function(t){return t?this.plugins["function"==typeof t?t.id:t]:null},i.getPosition=function(){return{longitude:this.prop.position.longitude,latitude:this.prop.position.latitude}},i.getZoomLevel=function(){return this.prop.zoomLvl},i.getSize=function(){return{width:this.prop.size.width,height:this.prop.size.height}},i.isAutorotateEnabled=function(){return!!this.prop.autorotateCb},i.isFullscreenEnabled=function(){return tt.fullscreenEvent?w(this.container):this.prop.fullscreen},i.needsUpdate=function(){this.prop.needsUpdate=!0,!this.renderer.mainReqid&&this.renderer.renderer&&this.renderer.__renderLoop(+new Date)},i.autoSize=function(){this.container.clientWidth===this.prop.size.width&&this.container.clientHeight===this.prop.size.height||(this.prop.size.width=Math.round(this.container.clientWidth),this.prop.size.height=Math.round(this.container.clientHeight),this.prop.aspect=this.prop.size.width/this.prop.size.height,this.prop.hFov=this.dataHelper.vFovToHFov(this.prop.vFov),this.needsUpdate(),this.trigger(a.SIZE_UPDATED,this.getSize()),this.__resizeRefresh())},i.setPanorama=function(t,e){var o=this;void 0===e&&(e={}),null!==this.prop.loadingPromise&&this.textureLoader.abortLoading(),this.prop.ready||("longitude"in e||this.prop.isCubemap||(e.longitude=this.config.defaultLong),"latitude"in e||this.prop.isCubemap||(e.latitude=this.config.defaultLat),"zoom"in e||(e.zoom=this.config.defaultZoomLvl),"sphereCorrection"in e||(e.sphereCorrection=this.config.sphereCorrection),"panoData"in e||(e.panoData=this.config.panoData)),void 0!==e.transition&&!0!==e.transition||(e.transition=1500),void 0===e.showLoader&&(e.showLoader=!0);var i=this.dataHelper.isExtendedPosition(e),n="zoom"in e;(i||n)&&this.__stopAll(),this.hideError(),this.config.panorama=t;var r=function(t){return t&&"abort"===t.type?console.warn(t):t&&(o.showError(o.config.lang.loadError),console.error(t)),o.loader.hide(),o.renderer.show(),o.prop.loadingPromise=null,!t||Promise.reject(t)};return e.transition&&this.prop.ready?(e.showLoader&&this.loader.show(),this.prop.loadingPromise=this.textureLoader.loadTexture(this.config.panorama).then(function(t){return o.loader.hide(),o.renderer.transition(t,e)}).then(r,r)):(!e.showLoader&&this.prop.ready||this.loader.show(),this.prop.loadingPromise=this.textureLoader.loadTexture(this.config.panorama,e.panoData).then(function(t){o.renderer.setTexture(t),e.sphereCorrection&&o.renderer.setSphereCorrection(e.sphereCorrection),n&&o.zoom(e.zoom),i&&o.rotate(e)}).then(r,r)),this.prop.loadingPromise},i.setOptions=function(t){var o=this;R(t,function(i,n){if(!Object.prototype.hasOwnProperty.call(st,n))throw new k("Unknown option "+n);if(at[n])throw new k(at[n]);switch(ct[n]?o.config[n]=ct[n](i,t):o.config[n]=i,n){case"caption":o.navbar.setCaption(i);break;case"size":o.resize(i);break;case"sphereCorrection":o.renderer.setSphereCorrection(i);break;case"navbar":case"lang":o.navbar.setButtons(o.config.navbar);break;case"moveSpeed":o.prop.moveSpeed=e.Math.degToRad(i/tt.pixelRatio);break;case"minFov":case"maxFov":o.prop.zoomLvl=o.dataHelper.fovToZoomLevel(o.prop.vFov),o.trigger(a.ZOOM_UPDATED,o.getZoomLevel())}}),this.needsUpdate(),this.refreshUi("set options"),this.trigger(a.CONFIG_CHANGED,Object.keys(t))},i.setOption=function(t,e){var o;this.setOptions(((o={})[t]=e,o))},i.startAutorotate=function(){var t,e,o=this;this.__stopAll(),this.prop.autorotateCb=function(i,n){e=void 0===t?0:n-t,t=n,o.rotate({longitude:o.prop.position.longitude+o.config.autorotateSpeed*e/1e3,latitude:o.prop.position.latitude-(o.prop.position.latitude-o.config.autorotateLat)/200})},this.on(a.BEFORE_RENDER,this.prop.autorotateCb),this.trigger(a.AUTOROTATE,!0)},i.stopAutorotate=function(){this.prop.startTimeout&&(clearTimeout(this.prop.startTimeout),this.prop.startTimeout=null),this.isAutorotateEnabled()&&(this.off(a.BEFORE_RENDER,this.prop.autorotateCb),this.prop.autorotateCb=null,this.trigger(a.AUTOROTATE,!1))},i.toggleAutorotate=function(){this.isAutorotateEnabled()?this.stopAutorotate():this.startAutorotate()},i.showError=function(t){this.overlay.show({id:h.ERROR,image:'\x3c!--Created by Shastry from the Noun Project--\x3e\n',text:t,dissmisable:!1})},i.hideError=function(){this.overlay.hide(h.ERROR)},i.rotate=function(t){if(!this.trigger(a.BEFORE_ROTATE,t).isDefaultPrevented()){var e=this.change(c.GET_ROTATE_POSITION,this.dataHelper.cleanPosition(t));this.prop.position.longitude===e.longitude&&this.prop.position.latitude===e.latitude||(this.prop.position.longitude=e.longitude,this.prop.position.latitude=e.latitude,this.needsUpdate(),this.trigger(a.POSITION_UPDATED,this.getPosition()))}},i.animate=function(t){var e=this;this.__stopAll();var o,i=this.dataHelper.isExtendedPosition(t),n="zoom"in t,r={};if(i){var s=this.change(c.GET_ANIMATE_POSITION,this.dataHelper.cleanPosition(t)),a=M(this.prop.position.longitude,s.longitude);r.longitude={start:this.prop.position.longitude,end:this.prop.position.longitude+a},r.latitude={start:this.prop.position.latitude,end:s.latitude},o=this.dataHelper.speedToDuration(t.speed,C(this.prop.position,s))}if(n){var h=Math.abs(t.zoom-this.prop.zoomLvl);r.zoom={start:this.prop.zoomLvl,end:t.zoom},o||(o=this.dataHelper.speedToDuration(t.speed,Math.PI/4*h/100))}return o?(this.prop.animationPromise=new V({properties:r,duration:o,easing:"inOutSine",onTick:function(t){i&&e.rotate(t),n&&e.zoom(t.zoom)}}),this.prop.animationPromise):(i&&this.rotate(t),n&&this.zoom(t.zoom),V.resolve())},i.stopAnimation=function(){var t=this;return this.prop.animationPromise?new Promise(function(e){t.prop.animationPromise.finally(e),t.prop.animationPromise.cancel(),t.prop.animationPromise=null}):Promise.resolve()},i.zoom=function(t){var e=T(t,0,100);this.prop.zoomLvl!==e&&(this.prop.zoomLvl=e,this.prop.vFov=this.dataHelper.zoomLevelToFov(this.prop.zoomLvl),this.prop.hFov=this.dataHelper.vFovToHFov(this.prop.vFov),this.needsUpdate(),this.trigger(a.ZOOM_UPDATED,this.getZoomLevel()),this.rotate(this.prop.position))},i.zoomIn=function(){this.zoom(this.prop.zoomLvl+this.config.zoomButtonIncrement)},i.zoomOut=function(){this.zoom(this.prop.zoomLvl-this.config.zoomButtonIncrement)},i.resize=function(t){var e=this;["width","height"].forEach(function(o){t&&t[o]&&(/^[0-9.]+$/.test(t[o])&&(t[o]+="px"),e.parent.style[o]=t[o])}),this.autoSize()},i.enterFullscreen=function(){tt.fullscreenEvent?_(this.container):(this.container.classList.add("psv-container--fullscreen"),this.autoSize(),this.eventsHandler.__fullscreenToggled(!0))},i.exitFullscreen=function(){this.isFullscreenEnabled()&&(tt.fullscreenEvent?b():(this.container.classList.remove("psv-container--fullscreen"),this.autoSize(),this.eventsHandler.__fullscreenToggled(!1)))},i.toggleFullscreen=function(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()},i.startKeyboardControl=function(){this.eventsHandler.enableKeyboard()},i.stopKeyboardControl=function(){this.eventsHandler.disableKeyboard()},i.__stopAll=function(){this.stopAutorotate(),this.stopAnimation(),this.trigger(a.STOP_ALL)},o}(o.EventEmitter);t.AbstractButton=G,t.AbstractPlugin=vt,t.Animation=V,t.CONSTANTS=l,t.DEFAULTS=st,t.PSVError=k,t.SYSTEM=tt,t.Viewer=At,t.registerButton=ut,t.utils=W,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=/sm/2503706bc3bad5ee806a4dc863db6a385e734b24eea820abaf4314e16f95f95d.map