https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/smbparts.co.id/public_html/theme/js/vendor/manual-loaded/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/smbparts.co.id/public_html/theme/js/vendor/manual-loaded/panolens.min.js
var PANOLENS={REVISION:"9"},enableInlineVideo=function(){"use strict";function t(t,e,n,i){function o(n){r=e(o,i),t(n-(a||n)),a=n}var r,a;return{start:function(){r||o(0)},stop:function(){n(r),r=null,a=0}}}function e(e){return t(e,requestAnimationFrame,cancelAnimationFrame)}function n(t,e,n){function i(i){n&&!n(t,e)||i.stopImmediatePropagation()}return t.addEventListener(e,i),i}function i(t,e,n,i){function o(){return n[e]}function r(t){n[e]=t}i&&r(t[e]),Object.defineProperty(t,e,{get:o,set:r})}function o(t,e,n){n.addEventListener(e,function(){return t.dispatchEvent(new Event(e))})}function r(t,e){Promise.resolve().then(function(){t.dispatchEvent(new Event(e))})}function a(t){var e=new Audio;return o(t,"play",e),o(t,"playing",e),o(t,"pause",e),e.crossOrigin=t.crossOrigin,e.src=t.src||t.currentSrc||"data:",e}function s(t,e,n){(m||0)+200<Date.now()&&(t[y]=!0,m=Date.now()),n||(t.currentTime=e),b[++L%3]=100*e|0}function h(t){return t.driver.currentTime>=t.video.duration}function c(t){var e=this;e.video.readyState>=e.video.HAVE_FUTURE_DATA?(e.hasAudio||(e.driver.currentTime=e.video.currentTime+t*e.video.playbackRate/1e3,e.video.loop&&h(e)&&(e.driver.currentTime=0)),s(e.video,e.driver.currentTime)):e.video.networkState===e.video.NETWORK_IDLE&&0===e.video.buffered.length&&e.video.load(),e.video.ended&&(delete e.video[y],e.video.pause(!0))}function l(){var t=this,e=t[g];if(t.webkitDisplayingFullscreen)return void t[N]();"data:"!==e.driver.src&&e.driver.src!==t.src&&(s(t,0,!0),e.driver.src=t.src),t.paused&&(e.paused=!1,0===t.buffered.length&&t.load(),e.driver.play(),e.updater.start(),e.hasAudio||(r(t,"play"),e.video.readyState>=e.video.HAVE_ENOUGH_DATA&&r(t,"playing")))}function u(t){var e=this,n=e[g];n.driver.pause(),n.updater.stop(),e.webkitDisplayingFullscreen&&e[w](),n.paused&&!t||(n.paused=!0,n.hasAudio||r(e,"pause"),e.ended&&!e.webkitDisplayingFullscreen&&(e[y]=!0,r(e,"ended")))}function d(t,n){var i={};t[g]=i,i.paused=!0,i.hasAudio=n,i.video=t,i.updater=e(c.bind(i)),n?i.driver=a(t):(t.addEventListener("canplay",function(){t.paused||r(t,"playing")}),i.driver={src:t.src||t.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,h(i)&&s(t,0)},get ended(){return h(i)}}),t.addEventListener("emptied",function(){var e=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==t.src&&(s(t,0,!0),i.driver.src=t.src,e||!n&&t.autoplay?i.driver.play():i.updater.stop())},!1),t.addEventListener("webkitbeginfullscreen",function(){t.paused?n&&0===i.driver.buffered.length&&i.driver.load():(t.pause(),t[N]())}),n&&(t.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=t.currentTime}),t.addEventListener("seeking",function(){b.indexOf(100*t.currentTime|0)<0&&(i.driver.currentTime=t.currentTime)}))}function p(t){var e=t[y];return delete t[y],!t.webkitDisplayingFullscreen&&!e}function f(t){var e=t[g];t[N]=t.play,t[w]=t.pause,t.play=l,t.pause=u,i(t,"paused",e.driver),i(t,"muted",e.driver,!0),i(t,"playbackRate",e.driver,!0),i(t,"ended",e.driver),i(t,"loop",e.driver,!0),n(t,"seeking",function(t){return!t.webkitDisplayingFullscreen}),n(t,"seeked",function(t){return!t.webkitDisplayingFullscreen}),n(t,"timeupdate",p),n(t,"ended",p)}function E(t,e){if(void 0===e&&(e={}),!t[g]){if(!e.everywhere){if(!v)return;if(!(e.iPad||e.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}t.pause();var n=t.autoplay;t.autoplay=!1,d(t,!t.muted),f(t),t.classList.add("IIV"),t.muted&&n&&(t.play(),t.addEventListener("playing",function e(){t.autoplay=!0,t.removeEventListener("playing",e)})),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}}var m,v="object"==typeof document&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,g="bfred-it:iphone-inline-video",y="bfred-it:iphone-inline-video:event",N="bfred-it:iphone-inline-video:nativeplay",w="bfred-it:iphone-inline-video:nativepause",b=[],L=0;return E}(),TWEEN=TWEEN||function(){var t=[];return{getAll:function(){return t},removeAll:function(){t=[]},add:function(e){t.push(e)},remove:function(e){var n=t.indexOf(e);n!==-1&&t.splice(n,1)},update:function(e,n){if(0===t.length)return!1;var i=0;for(e=void 0!==e?e:TWEEN.now();i<t.length;)t[i].update(e)||n?i++:t.splice(i,1);return!0}}}();"undefined"==typeof window&&"undefined"!=typeof process?TWEEN.now=function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?TWEEN.now=window.performance.now.bind(window.performance):void 0!==Date.now?TWEEN.now=Date.now:TWEEN.now=function(){return(new Date).getTime()},TWEEN.Tween=function(t){var e,n=t,i={},o={},r={},a=1e3,s=0,h=!1,c=!1,l=!1,u=0,d=null,p=TWEEN.Easing.Linear.None,f=TWEEN.Interpolation.Linear,E=[],m=null,v=!1,g=null,y=null,N=null;this.to=function(t,e){return o=t,void 0!==e&&(a=e),this},this.start=function(t){TWEEN.add(this),c=!0,v=!1,d=void 0!==t?t:TWEEN.now(),d+=u;for(var e in o){if(o[e]instanceof Array){if(0===o[e].length)continue;o[e]=[n[e]].concat(o[e])}void 0!==n[e]&&(i[e]=n[e],i[e]instanceof Array==!1&&(i[e]*=1),r[e]=i[e]||0)}return this},this.stop=function(){return c?(TWEEN.remove(this),c=!1,null!==N&&N.call(n,n),this.stopChainedTweens(),this):this},this.end=function(){return this.update(d+a),this},this.stopChainedTweens=function(){for(var t=0,e=E.length;t<e;t++)E[t].stop()},this.delay=function(t){return u=t,this},this.repeat=function(t){return s=t,this},this.repeatDelay=function(t){return e=t,this},this.yoyo=function(t){return h=t,this},this.easing=function(t){return p=t,this},this.interpolation=function(t){return f=t,this},this.chain=function(){return E=arguments,this},this.onStart=function(t){return m=t,this},this.onUpdate=function(t){return g=t,this},this.onComplete=function(t){return y=t,this},this.onStop=function(t){return N=t,this},this.update=function(t){var c,N,w;if(t<d)return!0;v===!1&&(null!==m&&m.call(n,n),v=!0),N=(t-d)/a,N=N>1?1:N,w=p(N);for(c in o)if(void 0!==i[c]){var b=i[c]||0,L=o[c];L instanceof Array?n[c]=f(L,w):("string"==typeof L&&(L="+"===L.charAt(0)||"-"===L.charAt(0)?b+parseFloat(L):parseFloat(L)),"number"==typeof L&&(n[c]=b+(L-b)*w))}if(null!==g&&g.call(n,w),1===N){if(s>0){isFinite(s)&&s--;for(c in r){if("string"==typeof o[c]&&(r[c]=r[c]+parseFloat(o[c])),h){var O=r[c];r[c]=o[c],o[c]=O}i[c]=r[c]}return h&&(l=!l),d=void 0!==e?t+e:t+u,!0}null!==y&&y.call(n,n);for(var A=0,P=E.length;A<P;A++)E[A].start(d+a);return!1}return!0}},TWEEN.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1)}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-TWEEN.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*TWEEN.Easing.Bounce.In(2*t):.5*TWEEN.Easing.Bounce.Out(2*t-1)+.5}}},TWEEN.Interpolation={Linear:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),r=TWEEN.Interpolation.Utils.Linear;return e<0?r(t[0],t[1],i):e>1?r(t[n],t[n-1],n-i):r(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,r=TWEEN.Interpolation.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-e,i-a)*o(e,a)*t[a]*r(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),r=TWEEN.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),r(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(r(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(r(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):r(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=TWEEN.Interpolation.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:function(){var t=[1];return function(e){var n=1;if(t[e])return t[e];for(var i=e;i>1;i--)n*=i;return t[e]=n,n}}(),CatmullRom:function(t,e,n,i,o){var r=.5*(n-t),a=.5*(i-e),s=o*o;return(2*e-2*n+r+a)*(o*s)+(-3*e+3*n-2*r-a)*s+r*o+e}}},function(t){"function"==typeof define&&define.amd?define([],function(){return TWEEN}):"undefined"!=typeof module&&"object"==typeof exports?module.exports=TWEEN:void 0!==t&&(t.TWEEN=TWEEN)}(this),THREE.OrbitControls=function(t,e){function n(){return 2*Math.PI/60/60*N.autoRotateSpeed}function i(){return Math.pow(.95,N.zoomSpeed)}function o(t){if(j=!1,U=k=0,N.enabled!==!1){if(t.preventDefault(),t.button===N.mouseButtons.ORBIT){if(N.noRotate===!0)return;F=B.ROTATE,w.set(t.clientX,t.clientY)}else if(t.button===N.mouseButtons.ZOOM){if(N.noZoom===!0)return;F=B.DOLLY,R.set(t.clientX,t.clientY)}else if(t.button===N.mouseButtons.PAN){if(N.noPan===!0)return;F=B.PAN,O.set(t.clientX,t.clientY)}F!==B.NONE&&(document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",a,!1),N.dispatchEvent(X)),N.update()}}function r(t){if(N.enabled!==!1){t.preventDefault();var e=N.domElement===document?N.domElement.body:N.domElement;if(F===B.ROTATE){if(N.noRotate===!0)return;b.set(t.clientX,t.clientY),L.subVectors(b,w),N.rotateLeft(2*Math.PI*L.x/e.clientWidth*N.rotateSpeed),N.rotateUp(2*Math.PI*L.y/e.clientHeight*N.rotateSpeed),w.copy(b),E&&(U=t.clientX-E.clientX,k=t.clientY-E.clientY),E=t}else if(F===B.DOLLY){if(N.noZoom===!0)return;x.set(t.clientX,t.clientY),M.subVectors(x,R),M.y>0?N.dollyIn():M.y<0&&N.dollyOut(),R.copy(x)}else if(F===B.PAN){if(N.noPan===!0)return;A.set(t.clientX,t.clientY),P.subVectors(A,O),N.pan(P.x,P.y),O.copy(A)}F!==B.NONE&&N.update()}}function a(){j=!0,E=void 0,N.enabled!==!1&&(document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",a,!1),N.dispatchEvent(q),F=B.NONE)}function s(t){if(N.enabled!==!1&&N.noZoom!==!0&&F===B.NONE){t.preventDefault(),t.stopPropagation();var e=0;void 0!==t.wheelDelta?e=t.wheelDelta:void 0!==t.detail&&(e=-t.detail),e>0?(N.object.fov=N.object.fov<N.maxFov?N.object.fov+1:N.maxFov,N.object.updateProjectionMatrix()):e<0&&(N.object.fov=N.object.fov>N.minFov?N.object.fov-1:N.minFov,N.object.updateProjectionMatrix()),N.update(),N.dispatchEvent(Y),N.dispatchEvent(X),N.dispatchEvent(q)}}function h(t){switch(t.keyCode){case N.keys.UP:m=!1;break;case N.keys.BOTTOM:v=!1;break;case N.keys.LEFT:g=!1;break;case N.keys.RIGHT:y=!1}}function c(t){if(N.enabled!==!1&&N.noKeys!==!0&&N.noRotate!==!0){switch(t.keyCode){case N.keys.UP:m=!0;break;case N.keys.BOTTOM:v=!0;break;case N.keys.LEFT:g=!0;break;case N.keys.RIGHT:y=!0}(m||v||g||y)&&(j=!0,m&&(k=-N.rotateSpeed*N.momentumKeydownFactor),v&&(k=N.rotateSpeed*N.momentumKeydownFactor),g&&(U=-N.rotateSpeed*N.momentumKeydownFactor),y&&(U=N.rotateSpeed*N.momentumKeydownFactor))}}function l(t){if(j=!1,U=k=0,N.enabled!==!1){switch(t.touches.length){case 1:if(N.noRotate===!0)return;F=B.TOUCH_ROTATE,w.set(t.touches[0].pageX,t.touches[0].pageY);break;case 2:if(N.noZoom===!0)return;F=B.TOUCH_DOLLY;var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY;Math.sqrt(e*e+n*n);break;case 3:if(N.noPan===!0)return;F=B.TOUCH_PAN,O.set(t.touches[0].pageX,t.touches[0].pageY);break;default:F=B.NONE}F!==B.NONE&&N.dispatchEvent(X)}}function u(t){if(N.enabled!==!1){t.preventDefault(),t.stopPropagation();var e=N.domElement===document?N.domElement.body:N.domElement;switch(t.touches.length){case 1:if(N.noRotate===!0)return;if(F!==B.TOUCH_ROTATE)return;b.set(t.touches[0].pageX,t.touches[0].pageY),L.subVectors(b,w),N.rotateLeft(2*Math.PI*L.x/e.clientWidth*N.rotateSpeed),N.rotateUp(2*Math.PI*L.y/e.clientHeight*N.rotateSpeed),w.copy(b),E&&(U=t.touches[0].pageX-E.pageX,k=t.touches[0].pageY-E.pageY),E={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},N.update();break;case 2:if(N.noZoom===!0)return;if(F!==B.TOUCH_DOLLY)return;var n=t.touches[0].pageX-t.touches[1].pageX,i=t.touches[0].pageY-t.touches[1].pageY;Math.sqrt(n*n+i*i);t.scale<1?(N.object.fov=N.object.fov<N.maxFov?N.object.fov+1:N.maxFov,N.object.updateProjectionMatrix()):t.scale>1&&(N.object.fov=N.object.fov>N.minFov?N.object.fov-1:N.minFov,N.object.updateProjectionMatrix()),N.update(),N.dispatchEvent(Y);break;case 3:if(N.noPan===!0)return;if(F!==B.TOUCH_PAN)return;A.set(t.touches[0].pageX,t.touches[0].pageY),P.subVectors(A,O),N.pan(P.x,P.y),O.copy(A),N.update();break;default:F=B.NONE}}}function d(){j=!0,E=void 0,N.enabled!==!1&&(N.dispatchEvent(q),F=B.NONE)}this.object=t,this.domElement=void 0!==e?e:document,this.frameId,this.enabled=!0,this.target=new THREE.Vector3,this.center=this.target,this.noZoom=!1,this.zoomSpeed=1,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.noRotate=!1,this.rotateSpeed=-.15,this.noPan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.momentumDampingFactor=.9,this.momentumScalingFactor=-.005,this.momentumKeydownFactor=20,this.minFov=30,this.maxFov=120,this.minAzimuthAngle=-(1/0),this.maxAzimuthAngle=1/0,this.noKeys=!1,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT};var p,f,E,m,v,g,y,N=this,w=new THREE.Vector2,b=new THREE.Vector2,L=new THREE.Vector2,O=new THREE.Vector2,A=new THREE.Vector2,P=new THREE.Vector2,S=new THREE.Vector3,T=new THREE.Vector3,R=new THREE.Vector2,x=new THREE.Vector2,M=new THREE.Vector2,I=0,C=0,H=1,D=new THREE.Vector3,V=new THREE.Vector3,_=new THREE.Quaternion,U=0,k=0,j=!1,B={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},F=B.NONE;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom;var W=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),z=W.clone().inverse(),Y={type:"change"},X={type:"start"},q={type:"end"};this.setLastQuaternion=function(t){_.copy(t),N.object.quaternion.copy(t)},this.getLastPosition=function(){return V},this.rotateLeft=function(t){void 0===t&&(t=n()),C-=t},this.rotateUp=function(t){void 0===t&&(t=n()),I-=t},this.panLeft=function(t){var e=this.object.matrix.elements;S.set(e[0],e[1],e[2]),S.multiplyScalar(-t),D.add(S)},this.panUp=function(t){var e=this.object.matrix.elements;S.set(e[4],e[5],e[6]),S.multiplyScalar(t),D.add(S)},this.pan=function(t,e){var n=N.domElement===document?N.domElement.body:N.domElement;if(N.object instanceof THREE.PerspectiveCamera){var i=N.object.position,o=i.clone().sub(N.target),r=o.length();r*=Math.tan(N.object.fov/2*Math.PI/180),N.panLeft(2*t*r/n.clientHeight),N.panUp(2*e*r/n.clientHeight)}else N.object instanceof THREE.OrthographicCamera?(N.panLeft(t*(N.object.right-N.object.left)/n.clientWidth),N.panUp(e*(N.object.top-N.object.bottom)/n.clientHeight)):console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.")},this.momentum=function(){if(j){if(Math.abs(U)<1e-4&&Math.abs(k)<1e-4)return void(j=!1);k*=this.momentumDampingFactor,U*=this.momentumDampingFactor,C-=this.momentumScalingFactor*U,I-=this.momentumScalingFactor*k}},this.dollyIn=function(t){void 0===t&&(t=i()),N.object instanceof THREE.PerspectiveCamera?H/=t:N.object instanceof THREE.OrthographicCamera?(N.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom*t)),N.object.updateProjectionMatrix(),N.dispatchEvent(Y)):console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.")},this.dollyOut=function(t){void 0===t&&(t=i()),N.object instanceof THREE.PerspectiveCamera?H*=t:N.object instanceof THREE.OrthographicCamera?(N.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/t)),N.object.updateProjectionMatrix(),N.dispatchEvent(Y)):console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.")},this.update=function(t){var e=this.object.position;T.copy(e).sub(this.target),T.applyQuaternion(W),p=Math.atan2(T.x,T.z),f=Math.atan2(Math.sqrt(T.x*T.x+T.z*T.z),T.y),this.autoRotate&&F===B.NONE&&this.rotateLeft(n()),this.momentum(),p+=C,f+=I,p=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,p)),f=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,f)),f=Math.max(1e-7,Math.min(Math.PI-1e-7,f));var i=T.length()*H;i=Math.max(this.minDistance,Math.min(this.maxDistance,i)),this.target.add(D),T.x=i*Math.sin(f)*Math.sin(p),T.y=i*Math.cos(f),T.z=i*Math.sin(f)*Math.cos(p),T.applyQuaternion(z),e.copy(this.target).add(T),this.object.lookAt(this.target),C=0,I=0,H=1,D.set(0,0,0),(V.distanceToSquared(this.object.position)>1e-7||8*(1-_.dot(this.object.quaternion))>1e-7)&&(t!==!0&&this.dispatchEvent(Y),V.copy(this.object.position),_.copy(this.object.quaternion))},this.reset=function(){F=B.NONE,this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Y),this.update()},this.getPolarAngle=function(){return f},this.getAzimuthalAngle=function(){return p},this.domElement.addEventListener("mousedown",o,!1),this.domElement.addEventListener("mousewheel",s,!1),this.domElement.addEventListener("DOMMouseScroll",s,!1),this.domElement.addEventListener("touchstart",l,!1),this.domElement.addEventListener("touchend",d,!1),this.domElement.addEventListener("touchmove",u,!1),window.addEventListener("keyup",h,!1),window.addEventListener("keydown",c,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,THREE.DeviceOrientationControls=function(t,e){var n=this,i={type:"change"},o=0,r=0,a=0,s=0;this.camera=t,this.camera.rotation.reorder("YXZ"),this.domElement=void 0!==e?e:document,this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alpha=0,this.alphaOffsetAngle=0;var h=function(t){n.deviceOrientation=t},c=function(){n.screenOrientation=window.orientation||0},l=function(t){t.preventDefault(),t.stopPropagation(),a=t.touches[0].pageX,s=t.touches[0].pageY},u=function(t){t.preventDefault(),t.stopPropagation(),o+=THREE.Math.degToRad((t.touches[0].pageX-a)/4),r+=THREE.Math.degToRad((s-t.touches[0].pageY)/4),n.updateAlphaOffsetAngle(o),a=t.touches[0].pageX,s=t.touches[0].pageY},d=function(t,e,i,o,a){var s,h=new THREE.Vector3(0,0,1),c=new THREE.Euler,l=new THREE.Quaternion,u=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),d=new THREE.Quaternion,p=new THREE.Quaternion;0==n.screenOrientation?(s=new THREE.Vector3(1,0,0),d.setFromAxisAngle(s,-r)):180==n.screenOrientation?(s=new THREE.Vector3(1,0,0),d.setFromAxisAngle(s,r)):90==n.screenOrientation?(s=new THREE.Vector3(0,1,0),d.setFromAxisAngle(s,r)):n.screenOrientation==-90&&(s=new THREE.Vector3(0,1,0),d.setFromAxisAngle(s,-r)),u.multiply(d),u.multiply(p),c.set(i,e,-o,"YXZ"),t.setFromEuler(c),t.multiply(u),t.multiply(l.setFromAxisAngle(h,-a))};this.connect=function(){c(),window.addEventListener("orientationchange",c,!1),window.addEventListener("deviceorientation",h,!1),window.addEventListener("deviceorientation",this.update.bind(this),!1),n.domElement.addEventListener("touchstart",l,!1),n.domElement.addEventListener("touchmove",u,!1),n.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",c,!1),window.removeEventListener("deviceorientation",h,!1),window.removeEventListener("deviceorientation",this.update.bind(this),!1),n.domElement.removeEventListener("touchstart",l,!1),n.domElement.removeEventListener("touchmove",u,!1),n.enabled=!1},this.update=function(t){if(n.enabled!==!1){var e=n.deviceOrientation.alpha?THREE.Math.degToRad(n.deviceOrientation.alpha)+this.alphaOffsetAngle:0,o=n.deviceOrientation.beta?THREE.Math.degToRad(n.deviceOrientation.beta):0,r=n.deviceOrientation.gamma?THREE.Math.degToRad(n.deviceOrientation.gamma):0,a=n.screenOrientation?THREE.Math.degToRad(n.screenOrientation):0;d(n.camera.quaternion,e,o,r,a),this.alpha=e,t!==!0&&this.dispatchEvent(i)}},this.updateAlphaOffsetAngle=function(t){this.alphaOffsetAngle=t,this.update()},this.dispose=function(){this.disconnect()},this.connect()},THREE.DeviceOrientationControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.DeviceOrientationControls.prototype.constructor=THREE.DeviceOrientationControls,THREE.BendModifier=function(){},THREE.BendModifier.prototype={constructor:THREE.BendModifier,set:function(t,e,n){return this.direction=new THREE.Vector3,this.direction.copy(t),this.axis=new THREE.Vector3,this.axis.copy(e),this.angle=n,this},_sign:function(t){return 0>t?-1:0<t?1:0},_cosh:function(t){return(Math.exp(t)+Math.exp(-t))/2},_sinhInverse:function(t){return Math.log(Math.abs(t)+Math.sqrt(t*t+1))},modify:function(t){var e=new THREE.Vector3;e.crossVectors(this.direction,this.axis);var n=new THREE.Matrix4;n.set(e.x,e.y,e.z,0,this.direction.x,this.direction.y,this.direction.z,0,this.axis.x,this.axis.y,this.axis.z,0,0,0,0,1).transpose();for(var i=(new THREE.Matrix4).getInverse(n),o=[],r=[],a=[],s=0,h=0,c=0,l=0,u=0;u<t.vertices.length;u++)o[u]=new THREE.Vector3,o[u].copy(t.vertices[u]).applyMatrix4(i),o[u].x>s&&(s=o[u].x),o[u].x<h&&(h=o[u].x),o[u].y>c&&(c=o[u].y),o[u].y<l&&(l=o[u].y);for(var d=s-h,p=c-l,f=2*this._sinhInverse(Math.tan(this.angle))/d,E=(s+h)/2,m=(c+l)/2,u=0;u<t.vertices.length;u++)r[u]=new THREE.Vector3,r[u].copy(o[u]),o[u].x=1*this._sign(o[u].x-E)/f*this._sinhInverse((o[u].x-E)*f);var v=2/f*this._sinhInverse(d/2*f),g=2*this._sinhInverse(Math.tan(this.angle))/v,y=new THREE.Vector3(v/2,-p/2,0);y.y=1/g*this._cosh(g*y.x)-1/g-p/2;for(var N=new THREE.Vector3(0,y.y+y.x/Math.tan(this.angle),0),u=0;u<t.vertices.length;u++){var w=1*this._sign(r[u].x-E)/f*this._sinhInverse((r[u].x-E)*f),b=1/g*this._cosh(g*w)-1/g,L=new THREE.Vector3(N.x-w,N.y-(b-p/2),N.z).normalize(),O=new THREE.Vector3;O.addVectors(new THREE.Vector3(w,b-p/2,r[u].z),L.multiplyScalar(r[u].y+p/2)),o[u].x=O.x,o[u].y=O.y}for(var A=E*v/d,u=0;u<t.vertices.length;u++){var P=new THREE.Vector3(E,m,r[u].z);(new THREE.Vector3).subVectors(r[u],P);(new THREE.Vector3).subVectors(o[u],P),a[u]=Math.acos(1/this._cosh(f*o[u].x))*this._sign(o[u].x),o[u].x=o[u].x+A,t.vertices[u].copy(o[u].applyMatrix4(n))}t.computeFaceNormals(),t.verticesNeedUpdate=!0,t.normalsNeedUpdate=!0;for(var S=["a","b","c","d"],T=0,R=t.faces.length;T<R;T++){var x=t.faces[T];if(void 0!==x.vertexNormals)for(var M=0,I=x.vertexNormals.length;M<I;M++){var C=a[x[S[M]]],H=this.axis.x,D=this.axis.y,V=this.axis.z,_=new THREE.Matrix3;_.set(Math.cos(C)+(1-Math.cos(C))*H*H,(1-Math.cos(C))*H*D-Math.sin(C)*V,(1-Math.cos(C))*H*V+Math.sin(C)*D,(1-Math.cos(C))*D*H+Math.sin(C)*V,Math.cos(C)+(1-Math.cos(C))*D*D,(1-Math.cos(C))*D*V-Math.sin(C)*H,(1-Math.cos(C))*V*H-Math.sin(C)*D,(1-Math.cos(C))*V*D+Math.sin(C)*H,Math.cos(C)+(1-Math.cos(C))*V*V),x.vertexNormals[M].applyMatrix3(_)}}return this}},THREE.CardboardEffect=function(t){var e=new THREE.OrthographicCamera(-1,1,1,-1,0,1),n=new THREE.Scene,i=new THREE.StereoCamera;i.aspect=.5;var o={minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat},r=new THREE.WebGLRenderTarget(512,512,o);r.scissorTest=!0,r.texture.generateMipmaps=!1;var a=new THREE.Vector2(.441,.156),s=new THREE.PlaneBufferGeometry(1,1,10,20).removeAttribute("normal").toNonIndexed(),h=s.attributes.position.array,c=s.attributes.uv.array;s.attributes.position.count*=2,s.attributes.uv.count*=2;var l=new Float32Array(2*h.length);l.set(h),l.set(h,h.length);var u=new Float32Array(2*c.length);u.set(c),u.set(c,c.length);for(var d=new THREE.Vector2,p=h.length/3,f=0,E=l.length/3;f<E;f++){d.x=l[3*f+0],d.y=l[3*f+1];var m=d.dot(d),v=1.5+(a.x+a.y*m)*m,g=f<p?0:1;l[3*f+0]=d.x/v*1.5-.5+g,l[3*f+1]=d.y/v*3,u[2*f]=.5*(u[2*f]+g)}s.attributes.position.array=l,s.attributes.uv.array=u;var y=new THREE.MeshBasicMaterial({map:r.texture}),N=new THREE.Mesh(s,y);n.add(N),this.setSize=function(e,n){t.setSize(e,n);var i=t.getPixelRatio();r.setSize(e*i,n*i)},this.render=function(o,a){o.updateMatrixWorld(),null===a.parent&&a.updateMatrixWorld(),i.update(a);var s=r.width/2,h=r.height;r.scissor.set(0,0,s,h),r.viewport.set(0,0,s,h),t.render(o,i.cameraL,r),r.scissor.set(s,0,s,h),r.viewport.set(s,0,s,h),t.render(o,i.cameraR,r),t.render(n,e)}},THREE.StereoEffect=function(t){var e=new THREE.StereoCamera;e.aspect=.5,this.setEyeSeparation=function(t){e.eyeSep=t},this.setSize=function(e,n){t.setSize(e,n)},this.render=function(n,i){n.updateMatrixWorld(),null===i.parent&&i.updateMatrixWorld(),e.update(i);var o=t.getSize();t.autoClear&&t.clear(),t.setScissorTest(!0),t.setScissor(0,0,o.width/2,o.height),t.setViewport(0,0,o.width/2,o.height),t.render(n,e.cameraL),t.setScissor(o.width/2,0,o.width/2,o.height),t.setViewport(o.width/2,0,o.width/2,o.height),t.render(n,e.cameraR),t.setScissorTest(!1)}};var GSVPANO=GSVPANO||{};GSVPANO.PanoLoader=function(t){"use strict";var e,n,i=t||{},o=new google.maps.StreetViewService,r=0,a=0,s=[],h=[],c=0,l=0,u="",d=[1,2,4,7,13,26],p=[1,1,2,4,7,13],f=[416,832,1664,3328,6656,13312],E=[416,416,832,1664,3328,6656],m=null;try{var v=document.createElement("canvas");m=v.getContext("experimental-webgl"),null==m&&(m=v.getContext("webgl"))}catch(t){}var g=1024,y=1024;if(m){var N=Math.max(m.getParameter(m.MAX_TEXTURE_SIZE),6656);g=y=N}this.setProgress=function(t,e){this.onProgress&&this.onProgress({loaded:t,total:e})},this.throwError=function(t){this.onError?this.onError(t):console.error(t)},this.adaptTextureToZoom=function(){var t=416*d[e],n=416*p[e];t=f[e],n=E[e],c=Math.ceil(t/g),l=Math.ceil(n/y),s=[],h=[];for(var i=0,o=0;o<l;o++)for(var r=0;r<c;r++){var a=document.createElement("canvas");a.width=r<c-1?g:t-g*r,a.height=o<l-1?y:n-y*o,s.push(a),h.push(a.getContext("2d")),i++}},this.composeFromTile=function(t,e,n){t*=512,e*=512;var i=Math.floor(t/g),o=Math.floor(e/y);t-=i*g,e-=o*y,h[o*c+i].drawImage(n,0,0,n.width,n.height,t,e,512,512),this.progress()},this.progress=function(){r++;Math.round(100*r/a);this.setProgress(r,a),r===a&&(this.canvas=s,this.panoId=n,this.zoom=e,this.onPanoramaLoad&&this.onPanoramaLoad(s[0]))},this.loadFromId=function(t){n=t,this.composePanorama()},this.composePanorama=function(){this.setProgress(0,1);var t,o,s,h=d[e],c=p[e],l=this;r=0,a=h*c;for(var l=this,s=0;s<c;s++)for(var o=0;o<h;o++){var t="https://geo0.ggpht.com/cbk?cb_client=maps_sv.tactile&authuser=0&hl=en&output=tile&zoom="+e+"&x="+o+"&y="+s+"&panoid="+n+"&nbt&fover=2";!function(e,n){if(i.useWebGL)var o=THREE.ImageUtils.loadTexture(t,null,function(){l.composeFromTile(e,n,o)});else{var r=new Image;r.addEventListener("load",function(){l.composeFromTile(e,n,this)}),r.crossOrigin="",r.src=t}}(o,s)}},this.load=function(t){this.loadPano(t)},this.loadPano=function(t){var e=this;o.getPanoramaById(t,function(t,i){i===google.maps.StreetViewStatus.OK?(e.result=t,e.onPanoramaData&&e.onPanoramaData(t),u=t.copyright,e.copyright=t.copyright,n=t.location.pano,e.location=location,e.composePanorama()):(e.onNoPanoramaData&&e.onNoPanoramaData(i),e.throwError("Could not retrieve panorama for the following reason: "+i))})},this.setZoom=function(t){e=t,this.adaptTextureToZoom()},this.setZoom(i.zoom||1)},function(){"use strict";PANOLENS.DataImageSource="https://pchen66.github.io/Panolens/asset/icon/",PANOLENS.DataImage={Info:PANOLENS.DataImageSource+"information.png",Arrow:PANOLENS.DataImageSource+"arrow-up.png",FullscreenEnter:PANOLENS.DataImageSource+"fullscreen.png",FullscreenLeave:PANOLENS.DataImageSource+"fullscreen-exit.png",VideoPlay:PANOLENS.DataImageSource+"video-play.png",VideoPause:PANOLENS.DataImageSource+"pause.png",WhiteTile:PANOLENS.DataImageSource+"tiles.png",ReticleIdle:PANOLENS.DataImageSource+"reticle-idle.png",Setting:PANOLENS.DataImageSource+"setting.png",ChevronRight:PANOLENS.DataImageSource+"chevron-right.png",Check:PANOLENS.DataImageSource+"check.png",ViewIndicator:PANOLENS.DataImageSource+"view-indicator.svg",ReticleDwell:PANOLENS.DataImageSource+"reticle-animation.png"}}(),function(){"use strict";PANOLENS.Controls={ORBIT:0,DEVICEORIENTATION:1},PANOLENS.Modes={UNKNOWN:0,NORMAL:1,CARDBOARD:2,STEREO:3}}(),function(){"use strict";PANOLENS.Utils={},PANOLENS.Utils.checkTouchSupported=function(){return!!window&&("ontouchstart"in window||window.navigator.msMaxTouchPoints)}}(),function(){"use strict";PANOLENS.Utils.ImageLoader={},PANOLENS.Utils.ImageLoader.load=function(t,e,n,i){function o(){c.revokeObjectURL(l.src),e&&e(l)}var r,a,s,h,c,l,u;for(var d in PANOLENS.DataImage)PANOLENS.DataImage.hasOwnProperty(d)&&t===PANOLENS.DataImage[d]&&(u=d);return void 0!==(r=THREE.Cache.get(u||t))?(e&&setTimeout(function(){n&&n({loaded:1,total:1}),e(r)},0),r):(c=window.URL||window.webkitURL,l=document.createElementNS("http://www.w3.org/1999/xhtml","img"),THREE.Cache.add(u||t,l),0===t.indexOf("data:")?(l.addEventListener("load",o,!1),l.src=t,l):(l.crossOrigin=void 0!==this.crossOrigin?this.crossOrigin:"",a=new XMLHttpRequest,a.open("GET",t,!0),a.responseType="arraybuffer",a.onprogress=function(t){t.lengthComputable&&n&&n({loaded:t.loaded,total:t.total})},a.onloadend=function(t){s=new Uint8Array(this.response),h=new Blob([s]),l.addEventListener("load",o,!1),l.src=c.createObjectURL(h)},void a.send(null)))},THREE.Cache.enabled=!0}(),function(){"use strict";PANOLENS.Utils.TextureLoader={},PANOLENS.Utils.TextureLoader.load=function(t,e,n,i){var o=new THREE.Texture;return PANOLENS.Utils.ImageLoader.load(t,function(t){o.image=t,o.needsUpdate=!0,e&&e(o)},n,i),o}}(),function(){"use strict";PANOLENS.Utils.CubeTextureLoader={},PANOLENS.Utils.CubeTextureLoader.load=function(t,e,n,i){var o,r,a,s,h;return o=new THREE.CubeTexture([]),r=0,a={},s={},t.map(function(t,c){PANOLENS.Utils.ImageLoader.load(t,function(t){o.images[c]=t,6===++r&&(o.needsUpdate=!0,e&&e(o))},function(t){a[c]={loaded:t.loaded,total:t.total},s.loaded=0,s.total=0,h=0;for(var e in a)h++,s.loaded+=a[e].loaded,s.total+=a[e].total;h<6&&(s.total=s.total/h*6),n&&n(s)},i)}),o}}(),PANOLENS.StereographicShader={uniforms:{tDiffuse:{value:new THREE.Texture},resolution:{value:1},transform:{value:new THREE.Matrix4},zoom:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = vec4( position, 1.0 );","}"].join("\n"),
fragmentShader:["uniform sampler2D tDiffuse;","uniform float resolution;","uniform mat4 transform;","uniform float zoom;","varying vec2 vUv;","const float PI = 3.141592653589793;","void main(){","vec2 position = -1.0 +  2.0 * vUv;","position *= vec2( zoom * resolution, zoom * 0.5 );","float x2y2 = position.x * position.x + position.y * position.y;","vec3 sphere_pnt = vec3( 2. * position, x2y2 - 1. ) / ( x2y2 + 1. );","sphere_pnt = vec3( transform * vec4( sphere_pnt, 1.0 ) );","vec2 sampleUV = vec2(","(atan(sphere_pnt.y, sphere_pnt.x) / PI + 1.0) * 0.5,","(asin(sphere_pnt.z) / PI + 0.5)",");","gl_FragColor = texture2D( tDiffuse, sampleUV );","}"].join("\n")},function(){"use strict";PANOLENS.Panorama=function(t,e){THREE.Mesh.call(this),this.type="panorama",this.ImageQualityLow=1,this.ImageQualityFair=2,this.ImageQualityMedium=3,this.ImageQualityHigh=4,this.ImageQualitySuperHigh=5,this.animationDuration=1e3,this.defaultInfospotSize=350,this.container=void 0,this.loaded=!1,this.linkedSpots=[],this.isInfospotVisible=!1,this.linkingImageURL=void 0,this.linkingImageScale=void 0,this.geometry=t,this.material=e,this.material.side=THREE.DoubleSide,this.material.visible=!1,this.scale.x*=-1,this.infospotAnimation=new TWEEN.Tween(this).to({},this.animationDuration/2),this.addEventListener("load",this.fadeIn.bind(this)),this.addEventListener("panolens-container",this.setContainer.bind(this)),this.addEventListener("click",this.onClick.bind(this)),this.setupTransitions()},PANOLENS.Panorama.prototype=Object.create(THREE.Mesh.prototype),PANOLENS.Panorama.prototype.constructor=PANOLENS.Panorama,PANOLENS.Panorama.prototype.add=function(t){var e,n;if(e=this,arguments.length>1){for(var i=0;i<arguments.length;i++)this.add(arguments[i]);return this}t instanceof PANOLENS.Infospot?(n=t,t.dispatchEvent&&(this.container&&t.dispatchEvent({type:"panolens-container",container:this.container}),t.dispatchEvent({type:"panolens-infospot-focus",method:function(t,n,i){e.dispatchEvent({type:"panolens-viewer-handler",method:"tweenControlCenter",data:[t,n,i]})}}))):(n=new THREE.Object3D,n.scale.x=-1,n.scalePlaceHolder=!0,n.add(t)),THREE.Object3D.prototype.add.call(this,n)},PANOLENS.Panorama.prototype.load=function(){this.onLoad()},PANOLENS.Panorama.prototype.onClick=function(t){t.intersects&&0===t.intersects.length&&this.traverse(function(t){t.dispatchEvent({type:"dismiss"})})},PANOLENS.Panorama.prototype.setContainer=function(t){var e;t instanceof HTMLElement?e=t:t&&t.container&&(e=t.container),e&&(this.children.forEach(function(t){t instanceof PANOLENS.Infospot&&t.dispatchEvent&&t.dispatchEvent({type:"panolens-container",container:e})}),this.container=e)},PANOLENS.Panorama.prototype.onLoad=function(){this.loaded=!0,this.dispatchEvent({type:"load"})},PANOLENS.Panorama.prototype.onProgress=function(t){this.dispatchEvent({type:"progress",progress:t})},PANOLENS.Panorama.prototype.onError=function(){this.dispatchEvent({type:"error"})},PANOLENS.Panorama.prototype.getZoomLevel=function(){return window.innerWidth<=800?this.ImageQualityFair:window.innerWidth>800&&window.innerWidth<=1280?this.ImageQualityMedium:window.innerWidth>1280&&window.innerWidth<=1920?this.ImageQualityHigh:window.innerWidth>1920?this.ImageQualitySuperHigh:this.ImageQualityLow},PANOLENS.Panorama.prototype.updateTexture=function(t){this.material.map=t,this.material.needsUpdate=!0},PANOLENS.Panorama.prototype.toggleInfospotVisibility=function(t,e){e=void 0!==e?e:0;var n,i;n=this,i=void 0!==t?t:!this.isInfospotVisible,this.traverse(function(t){t instanceof PANOLENS.Infospot&&(i?t.show(e):t.hide(e))}),this.isInfospotVisible=i,this.infospotAnimation.onComplete(function(){n.dispatchEvent({type:"infospot-animation-complete",visible:i})}).delay(e).start()},PANOLENS.Panorama.prototype.setLinkingImage=function(t,e){this.linkingImageURL=t,this.linkingImageScale=e},PANOLENS.Panorama.prototype.link=function(t,e,n,i){var o,r,a,s=this;if(this.visible=!0,!e)return void console.warn("Please specify infospot position for linking");r=void 0!==n?n:void 0!==t.linkingImageScale?t.linkingImageScale:300,a=i||(t.linkingImageURL?t.linkingImageURL:PANOLENS.DataImage.Arrow),o=new PANOLENS.Infospot(r,a),o.position.copy(e),o.toPanorama=t,o.addEventListener("click",function(){s.dispatchEvent({type:"panolens-viewer-handler",method:"setPanorama",data:t})}),this.linkedSpots.push(o),this.add(o),this.visible=!1},PANOLENS.Panorama.prototype.reset=function(){this.children.length=0},PANOLENS.Panorama.prototype.setupTransitions=function(){this.fadeInAnimation=new TWEEN.Tween(this.material).easing(TWEEN.Easing.Quartic.Out).onStart(function(){this.visible=!0,this.material.visible=!0,this.dispatchEvent({type:"enter-fade-start"})}.bind(this)),this.fadeOutAnimation=new TWEEN.Tween(this.material).easing(TWEEN.Easing.Quartic.Out).onComplete(function(){this.visible=!1,this.material.visible=!0,this.dispatchEvent({type:"leave-complete"})}.bind(this)),this.enterTransition=new TWEEN.Tween(this).easing(TWEEN.Easing.Quartic.Out).onComplete(function(){this.dispatchEvent({type:"enter-animation-complete"})}.bind(this)).start(),this.leaveTransition=new TWEEN.Tween(this).easing(TWEEN.Easing.Quartic.Out)},PANOLENS.Panorama.prototype.fadeIn=function(t){t=t>=0?t:this.animationDuration,this.fadeOutAnimation.stop(),this.fadeInAnimation.to({opacity:1},t).onComplete(function(){this.toggleInfospotVisibility(!0,t/2),this.dispatchEvent({type:"enter-fade-complete"})}.bind(this)).start()},PANOLENS.Panorama.prototype.fadeOut=function(t){t=t>=0?t:this.animationDuration,this.fadeInAnimation.stop(),this.fadeOutAnimation.to({opacity:0},t).start()},PANOLENS.Panorama.prototype.onEnter=function(){var t=this.animationDuration;this.leaveTransition.stop(),this.enterTransition.to({},t).onStart(function(){this.dispatchEvent({type:"enter-animation-start"}),this.loaded?this.fadeIn(t):this.load()}.bind(this)).start(),this.dispatchEvent({type:"enter"})},PANOLENS.Panorama.prototype.onLeave=function(){var t=this.animationDuration;this.enterTransition.stop(),this.leaveTransition.to({},t).onStart(function(){this.dispatchEvent({type:"leave-animation-start"}),this.fadeOut(t),this.toggleInfospotVisibility(!1)}.bind(this)).start(),this.dispatchEvent({type:"leave"})},PANOLENS.Panorama.prototype.dispose=function(){function t(e){for(var n=e.children.length-1;n>=0;n--)t(e.children[n]),e.remove(e.children[n]);e instanceof PANOLENS.Infospot&&e.dispose(),e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}this.dispatchEvent({type:"panolens-viewer-handler",method:"onPanoramaDispose",data:this}),t(this),this.parent&&this.parent.remove(this)}}(),function(){"use strict";PANOLENS.ImagePanorama=function(t,e){e=e||5e3;var n=new THREE.SphereGeometry(e,60,40),i=new THREE.MeshBasicMaterial({opacity:0,transparent:!0});PANOLENS.Panorama.call(this,n,i),this.src=t},PANOLENS.ImagePanorama.prototype=Object.create(PANOLENS.Panorama.prototype),PANOLENS.ImagePanorama.prototype.constructor=PANOLENS.ImagePanorama,PANOLENS.ImagePanorama.prototype.load=function(t){if(!(t=t||this.src))return void console.warn("Image source undefined");"string"==typeof t?PANOLENS.Utils.TextureLoader.load(t,this.onLoad.bind(this),this.onProgress.bind(this),this.onError.bind(this)):t instanceof HTMLImageElement&&this.onLoad(new THREE.Texture(t))},PANOLENS.ImagePanorama.prototype.onLoad=function(t){t.minFilter=t.magFilter=THREE.LinearFilter,t.needsUpdate=!0,this.updateTexture(t),window.requestAnimationFrame(function(){window.requestAnimationFrame(function(){PANOLENS.Panorama.prototype.onLoad.call(this)}.bind(this))}.bind(this))},PANOLENS.ImagePanorama.prototype.reset=function(){PANOLENS.Panorama.prototype.reset.call(this)}}(),function(){"use strict";PANOLENS.GoogleStreetviewPanorama=function(t,e){PANOLENS.ImagePanorama.call(this,void 0,e),this.panoId=t,this.gsvLoader=void 0,this.loadRequested=!1,this.setupGoogleMapAPI()},PANOLENS.GoogleStreetviewPanorama.prototype=Object.create(PANOLENS.ImagePanorama.prototype),PANOLENS.GoogleStreetviewPanorama.constructor=PANOLENS.GoogleStreetviewPanorama,PANOLENS.GoogleStreetviewPanorama.prototype.load=function(t){this.loadRequested=!0,t=t||this.panoId||{},t&&this.gsvLoader?this.loadGSVLoader(t):this.gsvLoader={}},PANOLENS.GoogleStreetviewPanorama.prototype.setupGoogleMapAPI=function(){var t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js",t.onreadystatechange=this.setGSVLoader.bind(this),t.onload=this.setGSVLoader.bind(this),document.getElementsByTagName("head")[0].appendChild(t)},PANOLENS.GoogleStreetviewPanorama.prototype.setGSVLoader=function(){this.gsvLoader=new GSVPANO.PanoLoader,(this.gsvLoader==={}||this.loadRequested)&&this.load()},PANOLENS.GoogleStreetviewPanorama.prototype.getGSVLoader=function(){return this.gsvLoader},PANOLENS.GoogleStreetviewPanorama.prototype.loadGSVLoader=function(t){this.loadRequested=!1,this.gsvLoader.onProgress=this.onProgress.bind(this),this.gsvLoader.onPanoramaLoad=this.onLoad.bind(this),this.gsvLoader.setZoom(this.getZoomLevel()),this.gsvLoader.load(t),this.gsvLoader.loaded=!0},PANOLENS.GoogleStreetviewPanorama.prototype.onLoad=function(t){this.gsvLoader&&PANOLENS.ImagePanorama.prototype.onLoad.call(this,new THREE.Texture(t))},PANOLENS.GoogleStreetviewPanorama.prototype.reset=function(){this.gsvLoader=void 0,PANOLENS.ImagePanorama.prototype.reset.call(this)}}(),function(){"use strict";PANOLENS.CubePanorama=function(t,e){var n,i,o;this.images=t||[],e=e||1e4,n=JSON.parse(JSON.stringify(THREE.ShaderLib.cube)),i=new THREE.BoxGeometry(e,e,e),o=new THREE.ShaderMaterial({fragmentShader:n.fragmentShader,vertexShader:n.vertexShader,uniforms:n.uniforms,side:THREE.BackSide}),PANOLENS.Panorama.call(this,i,o)},PANOLENS.CubePanorama.prototype=Object.create(PANOLENS.Panorama.prototype),PANOLENS.CubePanorama.prototype.constructor=PANOLENS.CubePanorama,PANOLENS.CubePanorama.prototype.load=function(){PANOLENS.Utils.CubeTextureLoader.load(this.images,this.onLoad.bind(this),this.onProgress.bind(this),this.onError.bind(this))},PANOLENS.CubePanorama.prototype.onLoad=function(t){this.material.uniforms.tCube.value=t,PANOLENS.Panorama.prototype.onLoad.call(this)}}(),function(){"use strict";PANOLENS.BasicPanorama=function(t){var e=PANOLENS.DataImage.WhiteTile;PANOLENS.CubePanorama.call(this,[e,e,e,e,e,e],t)},PANOLENS.BasicPanorama.prototype=Object.create(PANOLENS.CubePanorama.prototype),PANOLENS.BasicPanorama.prototype.constructor=PANOLENS.BasicPanorama}(),function(){"use strict";PANOLENS.VideoPanorama=function(t,e,n){n=n||5e3;var i=new THREE.SphereGeometry(n,60,40),o=new THREE.MeshBasicMaterial({opacity:0,transparent:!0});PANOLENS.Panorama.call(this,i,o),this.src=t,this.options=e||{},this.options.playsinline=this.options.playsinline!==!1,this.videoElement=void 0,this.videoRenderObject=void 0,this.videoProgress=0,this.isIOS=/iPhone|iPad|iPod/i.test(navigator.userAgent),this.isMobile=this.isIOS||/Android|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent),this.addEventListener("leave",this.pauseVideo.bind(this)),this.addEventListener("enter-fade-start",this.resumeVideoProgress.bind(this)),this.addEventListener("video-toggle",this.toggleVideo.bind(this)),this.addEventListener("video-time",this.setVideoCurrentTime.bind(this))},PANOLENS.VideoPanorama.prototype=Object.create(PANOLENS.Panorama.prototype),PANOLENS.VideoPanorama.constructor=PANOLENS.VideoPanorama,PANOLENS.VideoPanorama.prototype.load=function(t,e){var n=this;t=t||this.src||"",e=e||this.options||{},this.videoElement=e.videoElement||document.createElement("video"),this.videoElement.muted=e.muted||!1,this.videoElement.loop=void 0===e.loop||e.loop,this.videoElement.autoplay=void 0!==e.autoplay&&e.autoplay,this.videoElement.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:"anonymous",e.playsinline&&(this.videoElement.setAttribute("playsinline",""),this.videoElement.setAttribute("webkit-playsinline",""));var i=function(){n.onProgress({loaded:1,total:1}),n.setVideoTexture(n.videoElement),n.videoElement.autoplay&&n.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!1}),n.isMobile&&(n.videoElement.autoplay&&n.videoElement.muted?n.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!1}):n.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!0})),n.onLoad()};this.videoElement.readyState>2?i():(this.videoElement.querySelectorAll("source").length&&this.videoElement.src||(this.videoElement.src=t),this.videoElement.load()),this.videoElement.onloadeddata=i,this.videoElement.ontimeupdate=function(t){n.videoProgress=this.duration>=0?this.currentTime/this.duration:0,n.dispatchEvent({type:"panolens-viewer-handler",method:"onVideoUpdate",data:n.videoProgress})},this.videoElement.addEventListener("ended",function(){n.options.loop||(n.resetVideo(),n.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!0}))},!1)},PANOLENS.VideoPanorama.prototype.setVideoTexture=function(t){var e,n;t&&(e=new THREE.VideoTexture(t),e.minFilter=THREE.LinearFilter,e.magFilter=THREE.LinearFilter,e.format=THREE.RGBFormat,n={video:t,videoTexture:e},this.isIOS&&enableInlineVideo(t),this.updateTexture(e),this.videoRenderObject=n)},PANOLENS.VideoPanorama.prototype.reset=function(){this.videoElement=void 0,PANOLENS.Panorama.prototype.reset.call(this)},PANOLENS.VideoPanorama.prototype.isVideoPaused=function(){return this.videoRenderObject.video.paused},PANOLENS.VideoPanorama.prototype.toggleVideo=function(){this.videoRenderObject&&this.videoRenderObject.video&&(this.isVideoPaused()?this.videoRenderObject.video.play():this.videoRenderObject.video.pause())},PANOLENS.VideoPanorama.prototype.setVideoCurrentTime=function(t){this.videoRenderObject&&this.videoRenderObject.video&&!Number.isNaN(t.percentage)&&1!==t.percentage&&(this.videoRenderObject.video.currentTime=this.videoRenderObject.video.duration*t.percentage,this.dispatchEvent({type:"panolens-viewer-handler",method:"onVideoUpdate",data:t.percentage}))},PANOLENS.VideoPanorama.prototype.playVideo=function(){this.videoRenderObject&&this.videoRenderObject.video&&this.isVideoPaused()&&this.videoRenderObject.video.play(),this.dispatchEvent({type:"play"})},PANOLENS.VideoPanorama.prototype.pauseVideo=function(){this.videoRenderObject&&this.videoRenderObject.video&&!this.isVideoPaused()&&this.videoRenderObject.video.pause(),this.dispatchEvent({type:"pause"})},PANOLENS.VideoPanorama.prototype.resumeVideoProgress=function(){this.videoElement.autoplay&&!this.isMobile?(this.playVideo(),this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!1})):(this.pauseVideo(),this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!0})),this.setVideoCurrentTime({percentage:this.videoProgress})},PANOLENS.VideoPanorama.prototype.resetVideo=function(){this.videoRenderObject&&this.videoRenderObject.video&&this.setVideoCurrentTime({percentage:0})},PANOLENS.VideoPanorama.prototype.isVideoMuted=function(){return this.videoRenderObject.video.muted},PANOLENS.VideoPanorama.prototype.muteVideo=function(){this.videoRenderObject&&this.videoRenderObject.video&&!this.isVideoMuted()&&(this.videoRenderObject.video.muted=!0),this.dispatchEvent({type:"volumechange"})},PANOLENS.VideoPanorama.prototype.unmuteVideo=function(){this.videoRenderObject&&this.videoRenderObject.video&&this.isVideoMuted()&&(this.videoRenderObject.video.muted=!1),this.dispatchEvent({type:"volumechange"})},PANOLENS.VideoPanorama.prototype.getVideoElement=function(){return this.videoRenderObject.video},PANOLENS.VideoPanorama.prototype.dispose=function(){this.resetVideo(),this.pauseVideo(),this.removeEventListener("leave",this.pauseVideo.bind(this)),this.removeEventListener("enter-fade-start",this.resumeVideoProgress.bind(this)),this.removeEventListener("video-toggle",this.toggleVideo.bind(this)),this.removeEventListener("video-time",this.setVideoCurrentTime.bind(this)),PANOLENS.Panorama.prototype.dispose.call(this)}}(),function(){"use strict";PANOLENS.EmptyPanorama=function(t){t=t||5e3;var e=new THREE.Geometry,n=new THREE.MeshBasicMaterial({color:0,opacity:1,transparent:!0});PANOLENS.Panorama.call(this,e,n)},PANOLENS.EmptyPanorama.prototype=Object.create(PANOLENS.Panorama.prototype),PANOLENS.EmptyPanorama.prototype.constructor=PANOLENS.EmptyPanorama}(),function(){PANOLENS.LittlePlanet=function(t,e,n,i){t=t||"image","image"===t&&PANOLENS.ImagePanorama.call(this,e,n),this.size=n||1e4,this.ratio=i||.5,this.EPS=1e-6,this.frameId,this.geometry=this.createGeometry(),this.material=this.createMaterial(this.size),this.dragging=!1,this.userMouse=new THREE.Vector2,this.quatA=new THREE.Quaternion,this.quatB=new THREE.Quaternion,this.quatCur=new THREE.Quaternion,this.quatSlerp=new THREE.Quaternion,this.vectorX=new THREE.Vector3(1,0,0),this.vectorY=new THREE.Vector3(0,1,0),this.addEventListener("window-resize",this.onWindowResize)},PANOLENS.LittlePlanet.prototype=Object.create(PANOLENS.ImagePanorama.prototype),PANOLENS.LittlePlanet.prototype.constructor=PANOLENS.LittlePlanet,PANOLENS.LittlePlanet.prototype.createGeometry=function(){return new THREE.PlaneGeometry(this.size,this.size*this.ratio)},PANOLENS.LittlePlanet.prototype.createMaterial=function(t){var e=PANOLENS.StereographicShader.uniforms;return e.zoom.value=t,new THREE.ShaderMaterial({uniforms:e,vertexShader:PANOLENS.StereographicShader.vertexShader,fragmentShader:PANOLENS.StereographicShader.fragmentShader})},PANOLENS.LittlePlanet.prototype.registerMouseEvents=function(){this.container.addEventListener("mousedown",this.onMouseDown.bind(this),!1),this.container.addEventListener("mousemove",this.onMouseMove.bind(this),!1),this.container.addEventListener("mouseup",this.onMouseUp.bind(this),!1),this.container.addEventListener("touchstart",this.onMouseDown.bind(this),!1),this.container.addEventListener("touchmove",this.onMouseMove.bind(this),!1),this.container.addEventListener("touchend",this.onMouseUp.bind(this),!1),this.container.addEventListener("mousewheel",this.onMouseWheel.bind(this),!1),this.container.addEventListener("DOMMouseScroll",this.onMouseWheel.bind(this),!1),this.container.addEventListener("contextmenu",this.onContextMenu.bind(this),!1)},PANOLENS.LittlePlanet.prototype.unregisterMouseEvents=function(){this.container.removeEventListener("mousedown",this.onMouseDown.bind(this),!1),this.container.removeEventListener("mousemove",this.onMouseMove.bind(this),!1),this.container.removeEventListener("mouseup",this.onMouseUp.bind(this),!1),this.container.removeEventListener("touchstart",this.onMouseDown.bind(this),!1),this.container.removeEventListener("touchmove",this.onMouseMove.bind(this),!1),this.container.removeEventListener("touchend",this.onMouseUp.bind(this),!1),this.container.removeEventListener("mousewheel",this.onMouseWheel.bind(this),!1),this.container.removeEventListener("DOMMouseScroll",this.onMouseWheel.bind(this),!1),this.container.removeEventListener("contextmenu",this.onContextMenu.bind(this),!1)},PANOLENS.LittlePlanet.prototype.onMouseDown=function(t){var e=t.clientX>=0?t.clientX:t.touches[0].clientX,n=t.clientY>=0?t.clientY:t.touches[0].clientY;switch(t.touches&&t.touches.length||1){case 1:this.dragging=!0,this.userMouse.set(e,n);break;case 2:var i=t.touches[0].pageX-t.touches[1].pageX,o=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(i*i+o*o);this.userMouse.pinchDistance=r}this.onUpdateCallback()},PANOLENS.LittlePlanet.prototype.onMouseMove=function(t){var e=t.clientX>=0?t.clientX:t.touches[0].clientX,n=t.clientY>=0?t.clientY:t.touches[0].clientY;switch(t.touches&&t.touches.length||1){case 1:var i=.4*THREE.Math.degToRad(e-this.userMouse.x),o=.4*THREE.Math.degToRad(n-this.userMouse.y);this.dragging&&(this.quatA.setFromAxisAngle(this.vectorY,i),this.quatB.setFromAxisAngle(this.vectorX,o),this.quatCur.multiply(this.quatA).multiply(this.quatB),this.userMouse.set(e,n));break;case 2:var r=(this.material.uniforms,t.touches[0].pageX-t.touches[1].pageX),a=t.touches[0].pageY-t.touches[1].pageY,s=Math.sqrt(r*r+a*a);this.addZoomDelta(this.userMouse.pinchDistance-s)}},PANOLENS.LittlePlanet.prototype.onMouseUp=function(t){this.dragging=!1},PANOLENS.LittlePlanet.prototype.onMouseWheel=function(t){t.preventDefault(),t.stopPropagation();var e=0;void 0!==t.wheelDelta?e=t.wheelDelta:void 0!==t.detail&&(e=-t.detail),this.addZoomDelta(e),this.onUpdateCallback()},PANOLENS.LittlePlanet.prototype.addZoomDelta=function(t){var e=this.material.uniforms,n=.1*this.size,i=10*this.size;e.zoom.value+=t,e.zoom.value<=n?e.zoom.value=n:e.zoom.value>=i&&(e.zoom.value=i)},PANOLENS.LittlePlanet.prototype.onUpdateCallback=function(){this.frameId=window.requestAnimationFrame(this.onUpdateCallback.bind(this)),this.quatSlerp.slerp(this.quatCur,.1),this.material.uniforms.transform.value.makeRotationFromQuaternion(this.quatSlerp),!this.dragging&&1-this.quatSlerp.clone().dot(this.quatCur)<this.EPS&&window.cancelAnimationFrame(this.frameId)},PANOLENS.LittlePlanet.prototype.reset=function(){this.quatCur.set(0,0,0,1),this.quatSlerp.set(0,0,0,1),this.onUpdateCallback()},PANOLENS.LittlePlanet.prototype.onLoad=function(){this.material.uniforms.resolution.value=this.container.clientWidth/this.container.clientHeight,this.registerMouseEvents(),this.onUpdateCallback(),this.dispatchEvent({type:"panolens-viewer-handler",method:"disableControl"})},PANOLENS.LittlePlanet.prototype.onLeave=function(){this.unregisterMouseEvents(),this.dispatchEvent({type:"panolens-viewer-handler",method:"enableControl",data:PANOLENS.Controls.ORBIT}),window.cancelAnimationFrame(this.frameId),PANOLENS.Panorama.prototype.onLeave.call(this)},PANOLENS.LittlePlanet.prototype.onWindowResize=function(){this.material.uniforms.resolution.value=this.container.clientWidth/this.container.clientHeight},PANOLENS.LittlePlanet.prototype.onContextMenu=function(){this.dragging=!1}}(),function(){PANOLENS.ImageLittlePlanet=function(t,e,n){PANOLENS.LittlePlanet.call(this,"image",t,e,n)},PANOLENS.ImageLittlePlanet.prototype=Object.create(PANOLENS.LittlePlanet.prototype),PANOLENS.ImageLittlePlanet.prototype.constructor=PANOLENS.ImageLittlePlanet,PANOLENS.ImageLittlePlanet.prototype.onLoad=function(t){this.updateTexture(t),PANOLENS.ImagePanorama.prototype.onLoad.call(this,t),PANOLENS.LittlePlanet.prototype.onLoad.call(this)},PANOLENS.ImageLittlePlanet.prototype.updateTexture=function(t){t.minFilter=t.magFilter=THREE.LinearFilter,this.material.uniforms.tDiffuse.value=t}}(),function(){PANOLENS.Reticle=function(t,e,n,i,o,r){t=t||16777215,this.autoSelect=void 0==e||e,this.dwellTime=o||1500,this.dwellSpriteAmount=r||45,this.dwellInterval=this.dwellTime/this.dwellSpriteAmount,this.IDLE=0,this.DWELLING=1,this.status,this.scaleIdle=new THREE.Vector3(.2,.2,1),this.scaleDwell=new THREE.Vector3(1,.8,1),this.textureLoaded=!1,this.idleImageUrl=n||PANOLENS.DataImage.ReticleIdle,this.dwellImageUrl=i||PANOLENS.DataImage.ReticleDwell,this.idleTexture=new THREE.Texture,this.dwellTexture=new THREE.Texture,THREE.Sprite.call(this,new THREE.SpriteMaterial({color:t,depthTest:!1})),this.currentTile=0,this.startTime=0,this.visible=!1,this.renderOrder=10,this.timerId,this.updateStatus(this.IDLE)},PANOLENS.Reticle.prototype=Object.create(THREE.Sprite.prototype),PANOLENS.Reticle.prototype.constructor=PANOLENS.Reticle,PANOLENS.Reticle.prototype.show=function(){this.visible=!0},PANOLENS.Reticle.prototype.hide=function(){this.visible=!1},PANOLENS.Reticle.prototype.loadTextures=function(){this.idleTexture=PANOLENS.Utils.TextureLoader.load(this.idleImageUrl),this.dwellTexture=PANOLENS.Utils.TextureLoader.load(this.dwellImageUrl),this.material.map=this.idleTexture,this.setupDwellSprite(this.dwellTexture),this.textureLoaded=!0},PANOLENS.Reticle.prototype.select=function(t){performance.now()-this.startTime>=this.dwellTime?(this.completeDwelling(),t()):this.autoSelect&&(this.updateDwelling(performance.now()),this.timerId=window.requestAnimationFrame(this.select.bind(this,t)))},PANOLENS.Reticle.prototype.clearTimer=function(){window.cancelAnimationFrame(this.timerId),this.timerId=null},PANOLENS.Reticle.prototype.setupDwellSprite=function(t){t.wrapS=THREE.RepeatWrapping,t.repeat.set(1/this.dwellSpriteAmount,1)},PANOLENS.Reticle.prototype.updateStatus=function(t){this.status=t,t===this.IDLE?(this.scale.copy(this.scaleIdle),this.material.map=this.idleTexture):t===this.DWELLING&&(this.scale.copy(this.scaleDwell),this.material.map=this.dwellTexture),this.currentTile=0,this.material.map.offset.x=0},PANOLENS.Reticle.prototype.startDwelling=function(t){this.autoSelect&&(this.startTime=performance.now(),this.updateStatus(this.DWELLING),this.select(t))},PANOLENS.Reticle.prototype.updateDwelling=function(t){var e=t-this.startTime;this.currentTile<=this.dwellSpriteAmount?(this.currentTile=Math.floor(e/this.dwellTime*this.dwellSpriteAmount),this.material.map.offset.x=this.currentTile/this.dwellSpriteAmount):this.updateStatus(this.IDLE)},PANOLENS.Reticle.prototype.cancelDwelling=function(){this.clearTimer(),this.updateStatus(this.IDLE)},PANOLENS.Reticle.prototype.completeDwelling=function(){this.clearTimer(),this.updateStatus(this.IDLE)}}(),function(){PANOLENS.Tile=function(t,e,n,i,o,r,a){this.parameters={width:t,height:e,widthSegments:n,heightSegments:i,forceDirection:o,forceAxis:r,forceAngle:a},t=t||10,e=e||5,n=n||1,i=i||1,o=o||new THREE.Vector3(0,0,1),r=r||new THREE.Vector3(0,1,0),a=void 0!==a?a:0,THREE.Mesh.call(this,new THREE.PlaneGeometry(t,e,n,i),new THREE.MeshBasicMaterial({color:16777215,transparent:!0})),this.bendModifier=new THREE.BendModifier,this.entity=void 0,this.animationDuration=500,this.animationFadeOut=void 0,this.animationFadeIn=void 0,this.animationTranslation=void 0,this.tweens={},0!==a&&this.bend(o,r,a),this.originalGeometry=this.geometry.clone()},PANOLENS.Tile.prototype=Object.create(THREE.Mesh.prototype),PANOLENS.Tile.prototype.constructor=PANOLENS.Tile,PANOLENS.Tile.prototype.clone=function(){var t,e=this.parameters;return t=new PANOLENS.Tile(e.width,e.height,e.widthSegments,e.heightSegments,e.forceDirection,e.forceAxis,e.forceAngle),t.setEntity(this.entity),t.material=this.material.clone(),t},PANOLENS.Tile.prototype.bend=function(t,e,n){this.bendModifier.set(t,e,n).modify(this.geometry)},PANOLENS.Tile.prototype.unbend=function(){var t=this.geometry;this.geometry=this.originalGeometry,this.originalGeometry=this.geometry.clone(),t.dispose(),t=null},PANOLENS.Tile.prototype.tween=function(t,e,n,i,o,r,a,s,h){return e=e||this,n=n||{},i=i||this.animationDuration,o=o||TWEEN.Easing.Exponential.Out,r=void 0!==r?r:0,a=a||null,s=s||null,h=h||null,this.tweens[t]||(this.tweens[t]=new TWEEN.Tween(e).to(n,i).easing(o).delay(r).onStart(a).onUpdate(s).onComplete(h)),this.tweens[t]},PANOLENS.Tile.prototype.ripple=function(t,e,n){t=t||2,e=e||200,n=n||TWEEN.Easing.Cubic.Out;var i=this,o=this.clone();new TWEEN.Tween(o.scale).to({x:t,y:t},e).easing(n).start(),new TWEEN.Tween(o.material).to({opacity:0},e).easing(n).onComplete(function(){i.remove(o),o.geometry.dispose(),o.material.dispose()}).start(),this.add(o)},PANOLENS.Tile.prototype.setEntity=function(t){this.entity=t}}(),function(){"use strict";PANOLENS.TileGroup=function(t,e,n,i,o){var r=this;THREE.Object3D.call(this),this.tileArray=t||[],this.offset=void 0!==o?o:0,this.v_gap=void 0!==e?e:6,this.d_gap=void 0!==n?n:2,this.animationDuration=void 0!==i?i:200,this.animationEasing=TWEEN.Easing.Exponential.Out,this.visibleDelta=2,this.tileArray.map(function(t,e){t.image&&PANOLENS.Utils.TextureLoader.load(t.image,r.setTexture.bind(t)),t.position.set(0,e*-r.v_gap,e*-r.d_gap),t.originalPosition=t.position.clone(),t.setEntity(r),r.add(t)}),this.updateVisbility()},PANOLENS.TileGroup.prototype=Object.create(THREE.Object3D.prototype),PANOLENS.TileGroup.prototype.constructor=PANOLENS.TileGroup,PANOLENS.TileGroup.prototype.updateTexture=function(t){var e=this;t=t||[],this.children.map(function(n,i){n instanceof PANOLENS.Tile&&t[i]&&(PANOLENS.Utils.TextureLoader.load(t[i],e.setTexture.bind(n)),n.outline&&(n.outline.material.visible=!0))})},PANOLENS.TileGroup.prototype.updateAllTexture=function(t){if(this.updateTexture(t),t.length<this.children.length)for(var e=t.length;e<this.children.length;e++)this.children[e]instanceof PANOLENS.Tile&&(this.children[e].material.visible=!1,this.children[e].outline&&(this.children[e].outline.material.visible=!1))},PANOLENS.TileGroup.prototype.setTexture=function(t){t.minFilter=THREE.LinearFilter,t.magFilter=THREE.LinearFilter,this.material.visible=!0,this.material.map=t,this.material.needsUpdate=!0},PANOLENS.TileGroup.prototype.updateVisbility=function(){this.children[this.offset].visible=!0,new TWEEN.Tween(this.children[this.offset].material).to({opacity:1},this.animationDuration).easing(this.animationEasing).start(),this.children[this.offset].outline&&(this.children[this.offset].outline.visible=!0);for(var t=this.offset-1;t>=0;t--)this.tileArray.indexOf(this.children[t])!==-1&&(this.offset-t<=this.visibleDelta?(this.children[t].visible=!0,new TWEEN.Tween(this.children[t].material).to({opacity:1/(this.offset-t)*.5},this.animationDuration).easing(this.animationEasing).start()):this.children[t].visible=!1,this.children[t].outline&&(this.children[t].outline.visible=!1));for(var t=this.offset+1;t<this.children.length;t++)this.tileArray.indexOf(this.children[t])!==-1&&(t-this.offset<=this.visibleDelta?(this.children[t].visible=!0,new TWEEN.Tween(this.children[t].material).to({opacity:1/(t-this.offset)*.5},this.animationDuration).easing(this.animationEasing).start()):this.children[t].visible=!1,this.children[t].outline&&(this.children[t].outline.visible=!1))},PANOLENS.TileGroup.prototype.scrollUp=function(t){var e,n=this.tileArray;if(t=void 0!==t?t:this.animationDuration,e=this.offset+1,this.offset<n.length-1&&n[this.offset+1].material.visible){for(var i=n.length-1;i>=0;i--)new TWEEN.Tween(n[i].position).to({y:(i-e)*-this.v_gap,z:Math.abs(i-e)*-this.d_gap},t).easing(this.animationEasing).start();this.offset++,this.updateVisbility(),this.dispatchEvent({type:"scroll",direction:"up"})}},PANOLENS.TileGroup.prototype.scrollDown=function(t){var e,n=this.tileArray;if(t=void 0!==t?t:this.animationDuration,e=this.offset-1,this.offset>0&&n[this.offset-1].material.visible){for(var i=0;i<n.length;i++)new TWEEN.Tween(n[i].position).to({y:(i-e)*-this.v_gap,z:Math.abs(i-e)*-this.d_gap},t).easing(this.animationEasing).start();this.offset--,this.updateVisbility(),this.dispatchEvent({type:"scroll",direction:"down"})}},PANOLENS.TileGroup.prototype.reset=function(){this.tileArray.map(function(t,e){t.position.copy(t.originalPosition)}),this.offset=0,this.updateVisbility()},PANOLENS.TileGroup.prototype.getIndex=function(){return this.offset},PANOLENS.TileGroup.prototype.getTileCount=function(){var t=0;return this.tileArray.map(function(e){e.material.visible&&t++}),t}}(),function(){"use strict";var t,e,n=[];PANOLENS.SpriteText=function(t,e,n,i,o){THREE.Object3D.call(this),this.text=t||"",this.maxWidth=e||2e3,this.color=n||16777215,this.opacity=void 0!==i?i:1,this.options=o||{},this.animationDuration=500,this.animationFadeOut=void 0,this.animationFadeIn=void 0,this.tweens={},this.addText(t)},PANOLENS.SpriteText.prototype=Object.create(THREE.Object3D.prototype),PANOLENS.SpriteText.prototype.constructor=PANOLENS.SpriteText,PANOLENS.SpriteText.prototype.generateTextGeometry=function(){},PANOLENS.SpriteText.prototype.generateSDFShader=function(){},PANOLENS.SpriteText.prototype.setBMFont=function(i,o,r){r.needsUpdate=!0,r.minFilter=THREE.LinearMipMapLinearFilter,r.magFilter=THREE.LinearFilter,r.generateMipmaps=!0,r.anisotropy=8,t=o,e=r;for(var a=n.length-1;a>=0;a--)n[a].target.addText(n[a].text);for(;n.length>0;)n.pop();i&&i()},PANOLENS.SpriteText.prototype.addText=function(i){if(!t||!e)return void n.push({target:this,text:i});var o=new THREE.Object3D;this.options.text=i,this.options.font=t,this.options.width=this.maxWidth;var r=this.generateTextGeometry(this.options);r.computeBoundingBox(),r.computeBoundingSphere();var a=new THREE.RawShaderMaterial(this.generateSDFShader({
map:e,side:THREE.DoubleSide,transparent:!0,color:this.color,opacity:this.opacity})),s=r.layout,h=new THREE.Mesh(r,a);h.entity=this,h.position.x=-s.width/2,h.position.y=1.035*s.height,o.scale.x=o.scale.y=-.05,o.add(h),this.mesh=h,this.add(o)},PANOLENS.SpriteText.prototype.update=function(t){var e;t=t||{},e=this.mesh,e.geometry.update(t),e.position.x=-e.geometry.layout.width/2,e.position.y=1.035*e.geometry.layout.height},PANOLENS.SpriteText.prototype.tween=function(t,e,n,i,o,r,a,s,h){return e=e||this,n=n||{},i=i||this.animationDuration,o=o||TWEEN.Easing.Exponential.Out,r=void 0!==r?r:0,a=a||null,s=s||null,h=h||null,this.tweens[t]||(this.tweens[t]=new TWEEN.Tween(e).to(n,i).easing(o).delay(r).onStart(a).onUpdate(s).onComplete(h)),this.tweens[t]},PANOLENS.SpriteText.prototype.getLayout=function(){return this.mesh&&this.mesh.geometry&&this.mesh.geometry.layout||{}},PANOLENS.SpriteText.prototype.setEntity=function(t){this.entity=t}}(),function(){PANOLENS.Widget=function(t){THREE.EventDispatcher.call(this),this.DEFAULT_TRANSITION="all 0.27s ease",this.TOUCH_ENABLED=PANOLENS.Utils.checkTouchSupported(),this.PREVENT_EVENT_HANDLER=function(t){t.preventDefault(),t.stopPropagation()},this.container=t,this.barElement,this.fullscreenElement,this.videoElement,this.settingElement,this.mainMenu,this.activeMainItem,this.activeSubMenu,this.mask},PANOLENS.Widget.prototype=Object.create(THREE.EventDispatcher.prototype),PANOLENS.Widget.prototype.constructor=PANOLENS.Widget,PANOLENS.Widget.prototype.addControlBar=function(){if(!this.container)return void console.warn("Widget container not set");var t,e,n,i,o=this;i="linear-gradient(bottom, rgba(0,0,0,0.2), rgba(0,0,0,0))",t=document.createElement("div"),t.style.width="100%",t.style.height="44px",t.style.float="left",t.style.transform=t.style.webkitTransform=t.style.msTransform="translateY(-100%)",t.style.background="-webkit-"+i,t.style.background="-moz-"+i,t.style.background="-o-"+i,t.style.background="-ms-"+i,t.style.background=i,t.style.transition=this.DEFAULT_TRANSITION,t.style.pointerEvents="none",t.isHidden=!1,t.toggle=function(){t.isHidden=!t.isHidden,e=t.isHidden?"translateY(0)":"translateY(-100%)",n=t.isHidden?0:1,t.style.transform=t.style.webkitTransform=t.style.msTransform=e,t.style.opacity=n};var r=this.createDefaultMenu();this.mainMenu=this.createMainMenu(r),t.appendChild(this.mainMenu);var a=this.createMask();this.mask=a,this.container.appendChild(a),t.dispose=function(){o.fullscreenElement&&(t.removeChild(o.fullscreenElement),o.fullscreenElement.dispose(),o.fullscreenElement=null),o.settingElement&&(t.removeChild(o.settingElement),o.settingElement.dispose(),o.settingElement=null),o.videoElement&&(t.removeChild(o.videoElement),o.videoElement.dispose(),o.videoElement=null)},this.container.appendChild(t),this.mask.addEventListener("mousemove",this.PREVENT_EVENT_HANDLER,!0),this.mask.addEventListener("mouseup",this.PREVENT_EVENT_HANDLER,!0),this.mask.addEventListener("mousedown",this.PREVENT_EVENT_HANDLER,!0),this.mask.addEventListener(o.TOUCH_ENABLED?"touchend":"click",function(t){t.preventDefault(),t.stopPropagation(),o.mask.hide(),o.settingElement.deactivate()},!1),this.addEventListener("control-bar-toggle",t.toggle),this.barElement=t},PANOLENS.Widget.prototype.createDefaultMenu=function(){var t,e=this;return t=function(t,n){return function(){e.dispatchEvent({type:"panolens-viewer-handler",method:t,data:n})}},[{title:"Control",subMenu:[{title:this.TOUCH_ENABLED?"Touch":"Mouse",handler:t("enableControl",PANOLENS.Controls.ORBIT)},{title:"Sensor",handler:t("enableControl",PANOLENS.Controls.DEVICEORIENTATION)}]},{title:"Mode",subMenu:[{title:"Normal",handler:t("disableEffect")},{title:"Cardboard",handler:t("enableEffect",PANOLENS.Modes.CARDBOARD)},{title:"Stereoscopic",handler:t("enableEffect",PANOLENS.Modes.STEREO)}]}]},PANOLENS.Widget.prototype.addControlButton=function(t){var e;switch(t){case"fullscreen":e=this.createFullscreenButton(),this.fullscreenElement=e;break;case"setting":e=this.createSettingButton(),this.settingElement=e;break;case"video":e=this.createVideoControl(),this.videoElement=e;break;default:return}e&&this.barElement.appendChild(e)},PANOLENS.Widget.prototype.createMask=function(){var t=document.createElement("div");return t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.width="100%",t.style.height="100%",t.style.background="transparent",t.style.display="none",t.show=function(){this.style.display="block"},t.hide=function(){this.style.display="none"},t},PANOLENS.Widget.prototype.createSettingButton=function(){function t(t){t.preventDefault(),t.stopPropagation(),n.mainMenu.toggle(),this.activated?this.deactivate():this.activate()}var e,n=this;return e=this.createCustomItem({style:{backgroundImage:'url("'+PANOLENS.DataImage.Setting+'")',webkitTransition:this.DEFAULT_TRANSITION,transition:this.DEFAULT_TRANSITION},onTap:t}),e.activate=function(){this.style.transform="rotate3d(0,0,1,90deg)",this.activated=!0,n.mask.show()},e.deactivate=function(){this.style.transform="rotate3d(0,0,0,0)",this.activated=!1,n.mask.hide(),n.mainMenu&&n.mainMenu.visible&&n.mainMenu.hide(),n.activeSubMenu&&n.activeSubMenu.visible&&n.activeSubMenu.hide(),n.mainMenu&&n.mainMenu._width&&(n.mainMenu.changeSize(n.mainMenu._width),n.mainMenu.unslideAll())},e.activated=!1,e},PANOLENS.Widget.prototype.createFullscreenButton=function(){function t(t){t.preventDefault(),t.stopPropagation(),a=!1,r?(document.exitFullscreen&&document.exitFullscreen(),document.msExitFullscreen&&document.msExitFullscreen(),document.mozCancelFullScreen&&document.mozCancelFullScreen(),document.webkitExitFullscreen&&document.webkitExitFullscreen(),r=!1):(o.container.requestFullscreen&&o.container.requestFullscreen(),o.container.msRequestFullscreen&&o.container.msRequestFullscreen(),o.container.mozRequestFullScreen&&o.container.mozRequestFullScreen(),o.container.webkitRequestFullscreen&&o.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),r=!0),this.style.backgroundImage=r?'url("'+PANOLENS.DataImage.FullscreenLeave+'")':'url("'+PANOLENS.DataImage.FullscreenEnter+'")'}function e(t){a&&(r=!r,n.style.backgroundImage=r?'url("'+PANOLENS.DataImage.FullscreenLeave+'")':'url("'+PANOLENS.DataImage.FullscreenEnter+'")'),o.dispatchEvent({type:"panolens-viewer-handler",method:"onWindowResize",data:!1}),a=!0}var n,i,o=this,r=!1,a=!0;if(i="panolens-style-addon",document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled){if(document.addEventListener("fullscreenchange",e,!1),document.addEventListener("webkitfullscreenchange",e,!1),document.addEventListener("mozfullscreenchange",e,!1),document.addEventListener("MSFullscreenChange",e,!1),n=this.createCustomItem({style:{backgroundImage:'url("'+PANOLENS.DataImage.FullscreenEnter+'")'},onTap:t}),!document.querySelector(i)){var s=document.createElement("style");s.id=i,s.innerHTML=":-webkit-full-screen { width: 100% !important; height: 100% !important }",document.body.appendChild(s)}return n}},PANOLENS.Widget.prototype.createVideoControl=function(){var t;return t=document.createElement("span"),t.style.display="none",t.show=function(){t.style.display=""},t.hide=function(){t.style.display="none",t.controlButton.paused=!0,t.controlButton.update()},t.controlButton=this.createVideoControlButton(),t.seekBar=this.createVideoControlSeekbar(),t.appendChild(t.controlButton),t.appendChild(t.seekBar),t.dispose=function(){t.removeChild(t.controlButton),t.removeChild(t.seekBar),t.controlButton.dispose(),t.controlButton=null,t.seekBar.dispose(),t.seekBar=null},this.addEventListener("video-control-show",t.show),this.addEventListener("video-control-hide",t.hide),t},PANOLENS.Widget.prototype.createVideoControlButton=function(){function t(t){t.preventDefault(),t.stopPropagation(),n.dispatchEvent({type:"panolens-viewer-handler",method:"toggleVideoPlay",data:!this.paused}),this.paused=!this.paused,e.update()}var e,n=this;return e=this.createCustomItem({style:{float:"left",backgroundImage:'url("'+PANOLENS.DataImage.VideoPlay+'")'},onTap:t}),e.paused=!0,e.update=function(t){this.paused=void 0!==t?t:this.paused,this.style.backgroundImage='url("'+(this.paused?PANOLENS.DataImage.VideoPlay:PANOLENS.DataImage.VideoPause)+'")'},e},PANOLENS.Widget.prototype.createVideoControlSeekbar=function(){function t(t){t.stopPropagation(),f=!0,l=t.clientX||t.changedTouches&&t.changedTouches[0].clientX,u=parseInt(h.style.width)/100,i()}function e(t){var e;f&&(e=t.clientX||t.changedTouches&&t.changedTouches[0].clientX,d=(e-l)/s.clientWidth,d=u+d,d=d>1?1:d<0?0:d,s.setProgress(d),p.dispatchEvent({type:"panolens-viewer-handler",method:"setVideoCurrentTime",data:d}))}function n(t){t.stopPropagation(),f=!1,o()}function i(){p.container.addEventListener("mousemove",e,!1),p.container.addEventListener("mouseup",n,!1),p.container.addEventListener("touchmove",e,!1),p.container.addEventListener("touchend",n,!1)}function o(){p.container.removeEventListener("mousemove",e,!1),p.container.removeEventListener("mouseup",n,!1),p.container.removeEventListener("touchmove",e,!1),p.container.removeEventListener("touchend",n,!1)}function r(t){t.preventDefault(),t.stopPropagation();var e;t.target!==c&&(e=t.changedTouches&&t.changedTouches.length>0?(t.changedTouches[0].pageX-t.target.getBoundingClientRect().left)/this.clientWidth:t.offsetX/this.clientWidth,p.dispatchEvent({type:"panolens-viewer-handler",method:"setVideoCurrentTime",data:e}),s.setProgress(t.offsetX/this.clientWidth))}function a(){o(),h=null,c=null}var s,h,c,l,u,d,p=this,f=!1;return h=document.createElement("div"),h.style.width="0%",h.style.height="100%",h.style.backgroundColor="#fff",c=document.createElement("div"),c.style.float="right",c.style.width="14px",c.style.height="14px",c.style.transform="translate(7px, -5px)",c.style.borderRadius="50%",c.style.backgroundColor="#ddd",c.addEventListener("mousedown",t,!1),c.addEventListener("touchstart",t,!1),h.appendChild(c),s=this.createCustomItem({style:{float:"left",width:"30%",height:"4px",marginTop:"20px",backgroundColor:"rgba(188,188,188,0.8)"},onTap:r,onDispose:a}),s.appendChild(h),s.setProgress=function(t){h.style.width=100*t+"%"},this.addEventListener("video-update",function(t){s.setProgress(t.percentage)}),s},PANOLENS.Widget.prototype.createMenuItem=function(t){var e=this,n=document.createElement("a");return n.textContent=t,n.style.display="block",n.style.padding="10px",n.style.textDecoration="none",n.style.cursor="pointer",n.style.pointerEvents="auto",n.style.transition=this.DEFAULT_TRANSITION,n.slide=function(t){this.style.transform="translateX("+(t?"":"-")+"100%)"},n.unslide=function(){this.style.transform="translateX(0)"},n.setIcon=function(t){this.icon&&(this.icon.style.backgroundImage="url("+t+")")},n.setSelectionTitle=function(t){this.selection&&(this.selection.textContent=t)},n.addSelection=function(t){var e=document.createElement("span");return e.style.fontSize="13px",e.style.fontWeight="300",e.style.float="right",this.selection=e,this.setSelectionTitle(t),this.appendChild(e),this},n.addIcon=function(t,e,n){t=t||PANOLENS.DataImage.ChevronRight,e=e||!1,n=n||!1;var i=document.createElement("span");return i.style.float=e?"left":"right",i.style.width="17px",i.style.height="17px",i.style["margin"+(e?"Right":"Left")]="12px",i.style.backgroundSize="cover",n&&(i.style.transform="rotateZ(180deg)"),this.icon=i,this.setIcon(t),this.appendChild(i),this},n.addSubMenu=function(t,n){return this.subMenu=e.createSubMenu(t,n),this},n.addEventListener("mouseenter",function(){this.style.backgroundColor="#e0e0e0"},!1),n.addEventListener("mouseleave",function(){this.style.backgroundColor="#fafafa"},!1),n},PANOLENS.Widget.prototype.createMenuItemHeader=function(t){var e=this.createMenuItem(t);return e.style.borderBottom="1px solid #333",e.style.paddingBottom="15px",e},PANOLENS.Widget.prototype.createMainMenu=function(t){function e(t){function e(){i.changeSize(o.clientWidth),o.show(),o.unslideAll()}t.preventDefault(),t.stopPropagation();var i=n.mainMenu,o=this.subMenu;i.hide(),i.slideAll(),i.parentElement.appendChild(o),n.activeMainItem=this,n.activeSubMenu=o,window.requestAnimationFrame(e)}var n=this,i=this.createMenu();i._width=200,i.changeSize(i._width);for(var o=0;o<t.length;o++){var r=i.addItem(t[o].title);if(r.style.paddingLeft="20px",r.addIcon().addEventListener(n.TOUCH_ENABLED?"touchend":"click",e,!1),t[o].subMenu&&t[o].subMenu.length>0){var a=t[o].subMenu[0].title;r.addSelection(a).addSubMenu(t[o].title,t[o].subMenu)}}return i},PANOLENS.Widget.prototype.createSubMenu=function(t,e){function n(t){t.preventDefault(),t.stopPropagation(),i=o.mainMenu,i.changeSize(i._width),i.unslideAll(),i.show(),r.slideAll(!0),r.hide(),"header"!==this.type&&(r.setActiveItem(this),o.activeMainItem.setSelectionTitle(this.textContent),this.handler&&this.handler())}var i,o=this,r=this.createMenu();r.items=e,r.activeItem,r.addHeader(t).addIcon(void 0,!0,!0).addEventListener(o.TOUCH_ENABLED?"touchend":"click",n,!1);for(var a=0;a<e.length;a++){var s=r.addItem(e[a].title);s.style.fontWeight=300,s.handler=e[a].handler,s.addIcon(" ",!0),s.addEventListener(o.TOUCH_ENABLED?"touchend":"click",n,!1),r.activeItem||r.setActiveItem(s)}return r.slideAll(!0),r},PANOLENS.Widget.prototype.createMenu=function(){var t,e=this,n=document.createElement("span");return t=n.style,t.padding="5px 0",t.position="fixed",t.bottom="100%",t.right="14px",t.backgroundColor="#fafafa",t.fontFamily="Helvetica Neue",t.fontSize="14px",t.visibility="hidden",t.opacity=0,t.boxShadow="0 0 12pt rgba(0,0,0,0.25)",t.borderRadius="2px",t.overflow="hidden",t.willChange="width, height, opacity",t.pointerEvents="auto",t.transition=this.DEFAULT_TRANSITION,n.visible=!1,n.changeSize=function(t,e){t&&(this.style.width=t+"px"),e&&(this.style.height=e+"px")},n.show=function(){this.style.opacity=1,this.style.visibility="visible",this.visible=!0},n.hide=function(){this.style.opacity=0,this.style.visibility="hidden",this.visible=!1},n.toggle=function(){this.visible?this.hide():this.show()},n.slideAll=function(t){for(var e=0;e<n.children.length;e++)n.children[e].slide&&n.children[e].slide(t)},n.unslideAll=function(){for(var t=0;t<n.children.length;t++)n.children[t].unslide&&n.children[t].unslide()},n.addHeader=function(t){var n=e.createMenuItemHeader(t);return n.type="header",this.appendChild(n),n},n.addItem=function(t){var n=e.createMenuItem(t);return n.type="item",this.appendChild(n),n},n.setActiveItem=function(t){this.activeItem&&this.activeItem.setIcon(" "),t.setIcon(PANOLENS.DataImage.Check),this.activeItem=t},n.addEventListener("mousemove",this.PREVENT_EVENT_HANDLER,!0),n.addEventListener("mouseup",this.PREVENT_EVENT_HANDLER,!0),n.addEventListener("mousedown",this.PREVENT_EVENT_HANDLER,!0),n},PANOLENS.Widget.prototype.createCustomItem=function(t){t=t||{};var e=this,n=t.element||document.createElement("span");return n.style.cursor="pointer",n.style.float="right",n.style.width="44px",n.style.height="100%",n.style.backgroundSize="60%",n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="center",n.style.webkitUserSelect=n.style.MozUserSelect=n.style.userSelect="none",n.style.position="relative",n.style.pointerEvents="auto",n.addEventListener(e.TOUCH_ENABLED?"touchstart":"mouseenter",function(){n.style.filter=n.style.webkitFilter="drop-shadow(0 0 5px rgba(255,255,255,1))"}),n.addEventListener(e.TOUCH_ENABLED?"touchend":"mouseleave",function(){n.style.filter=n.style.webkitFilter=""}),n=this.mergeStyleOptions(n,t.style),t.onTap&&n.addEventListener(e.TOUCH_ENABLED?"touchend":"click",t.onTap,!1),n.dispose=function(){n.removeEventListener(e.TOUCH_ENABLED?"touchend":"click",t.onTap,!1),t.onDispose&&t.onDispose()},n},PANOLENS.Widget.prototype.mergeStyleOptions=function(t,e){e=e||{};for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t},PANOLENS.Widget.prototype.dispose=function(){this.barElement&&(this.container.removeChild(this.barElement),this.barElement.dispose(),this.barElement=null)}}(),function(){PANOLENS.Infospot=function(t,e,n){function i(e){e.wrapS=THREE.RepeatWrapping,e.repeat.x=-1,e.image.width=e.image.naturalWidth||64,e.image.height=e.image.naturalHeight||64,a=e.image.width/e.image.height,c.scale.set(a*t,t,1),s=c.scale.clone(),c.scaleUpAnimation=new TWEEN.Tween(c.scale).to({x:s.x*c.scaleFactor,y:s.y*c.scaleFactor},h).easing(TWEEN.Easing.Elastic.Out),c.scaleDownAnimation=new TWEEN.Tween(c.scale).to({x:s.x,y:s.y},h).easing(TWEEN.Easing.Elastic.Out),c.material.side=THREE.DoubleSide,c.material.map=e,c.material.depthTest=!1,c.material.needsUpdate=!0}function o(){this.visible=!0}function r(){this.visible=!1}var a,s,h,c=this;t=t||300,e=e||PANOLENS.DataImage.Info,h=500,THREE.Sprite.call(this),this.type="infospot",this.animated=void 0===n||n,this.isHovering=!1,this.visible=!1,this.element,this.toPanorama,this.cursorStyle,this.mode=PANOLENS.Modes.UNKNOWN,this.scale.set(t,t,1),this.rotation.y=Math.PI,this.scaleFactor=1.3,this.container,this.HANDLER_FOCUS,PANOLENS.Utils.TextureLoader.load(e,i),this.showAnimation=new TWEEN.Tween(this.material).to({opacity:1},h).onStart(o.bind(this)).easing(TWEEN.Easing.Quartic.Out),this.hideAnimation=new TWEEN.Tween(this.material).to({opacity:0},h).onComplete(r.bind(this)).easing(TWEEN.Easing.Quartic.Out),this.addEventListener("click",this.onClick),this.addEventListener("hover",this.onHover),this.addEventListener("hoverenter",this.onHoverStart),this.addEventListener("hoverleave",this.onHoverEnd),this.addEventListener("panolens-dual-eye-effect",this.onDualEyeEffect),this.addEventListener("panolens-container",this.setContainer.bind(this)),this.addEventListener("dismiss",this.onDismiss),this.addEventListener("panolens-infospot-focus",this.setFocusMethod)},PANOLENS.Infospot.prototype=Object.create(THREE.Sprite.prototype),PANOLENS.Infospot.prototype.setContainer=function(t){var e;t instanceof HTMLElement?e=t:t&&t.container&&(e=t.container),e&&this.element&&e.appendChild(this.element),this.container=e},PANOLENS.Infospot.prototype.getContainer=function(){return this.container},PANOLENS.Infospot.prototype.onClick=function(t){this.element&&this.getContainer()&&(this.onHoverStart(t),this.lockHoverElement())},PANOLENS.Infospot.prototype.onDismiss=function(t){this.element&&(this.unlockHoverElement(),this.onHoverEnd())},PANOLENS.Infospot.prototype.onHover=function(t){},PANOLENS.Infospot.prototype.onHoverStart=function(t){if(this.getContainer()){var e=this.cursorStyle||(this.mode===PANOLENS.Modes.NORMAL?"pointer":"default");this.isHovering=!0,this.container.style.cursor=e,this.animated&&(this.scaleDownAnimation&&this.scaleDownAnimation.stop(),this.scaleUpAnimation&&this.scaleUpAnimation.start()),this.element&&t.mouseEvent.clientX>=0&&t.mouseEvent.clientY>=0&&(this.mode===PANOLENS.Modes.CARDBOARD||this.mode===PANOLENS.Modes.STEREO?(this.element.style.display="none",this.element.left&&(this.element.left.style.display="block"),this.element.right&&(this.element.right.style.display="block"),this.element._width=this.element.left.clientWidth,this.element._height=this.element.left.clientHeight):(this.element.style.display="block",this.element.left&&(this.element.left.style.display="none"),this.element.right&&(this.element.right.style.display="none"),this.element._width=this.element.clientWidth,this.element._height=this.element.clientHeight))}},PANOLENS.Infospot.prototype.onHoverEnd=function(){this.getContainer()&&(this.isHovering=!1,this.container.style.cursor="default",this.animated&&(this.scaleUpAnimation&&this.scaleUpAnimation.stop(),this.scaleDownAnimation&&this.scaleDownAnimation.start()),this.element&&!this.element.locked&&(this.element.style.display="none",this.element.left&&(this.element.left.style.display="none"),this.element.right&&(this.element.right.style.display="none"),this.unlockHoverElement()))},PANOLENS.Infospot.prototype.onDualEyeEffect=function(t){if(this.getContainer()){var e,n,i;this.mode=t.mode,e=this.element,n=this.container.clientWidth/2,i=this.container.clientHeight/2,e&&(e.left&&e.right||(e.left=e.cloneNode(!0),e.right=e.cloneNode(!0)),this.mode===PANOLENS.Modes.CARDBOARD||this.mode===PANOLENS.Modes.STEREO?(e.left.style.display=e.style.display,e.right.style.display=e.style.display,e.style.display="none"):(e.style.display=e.left.style.display,e.left.style.display="none",e.right.style.display="none"),this.translateElement(n,i),this.container.appendChild(e.left),this.container.appendChild(e.right))}},PANOLENS.Infospot.prototype.translateElement=function(t,e){if(this.element._width&&this.element._height&&this.getContainer()){var n,i,o,r,a,s,h;h=this.container,o=this.element,r=o._width/2,a=o._height/2,s=void 0!==o.verticalDelta?o.verticalDelta:40,n=t-r,i=e-a-s,this.mode!==PANOLENS.Modes.CARDBOARD&&this.mode!==PANOLENS.Modes.STEREO||!o.left||!o.right||t===h.clientWidth/2&&e===h.clientHeight/2?this.setElementStyle("transform",o,"translate("+n+"px, "+i+"px)"):(n=h.clientWidth/4-r+(t-h.clientWidth/2),i=h.clientHeight/2-a-s+(e-h.clientHeight/2),this.setElementStyle("transform",o.left,"translate("+n+"px, "+i+"px)"),n+=h.clientWidth/2,this.setElementStyle("transform",o.right,"translate("+n+"px, "+i+"px)"))}},PANOLENS.Infospot.prototype.setElementStyle=function(t,e,n){var i=e.style;"transform"===t&&(i.webkitTransform=i.msTransform=i.transform=n)},PANOLENS.Infospot.prototype.setText=function(t){this.element&&(this.element.textContent=t)},PANOLENS.Infospot.prototype.setCursorHoverStyle=function(t){this.cursorStyle=t},PANOLENS.Infospot.prototype.addHoverText=function(t,e){this.element||(this.element=document.createElement("div"),this.element.style.display="none",this.element.style.color="#fff",this.element.style.top=0,this.element.style.maxWidth="50%",this.element.style.maxHeight="50%",this.element.style.textShadow="0 0 3px #000000",this.element.style.fontFamily='"Trebuchet MS", Helvetica, sans-serif',this.element.style.position="absolute",this.element.classList.add("panolens-infospot"),this.element.verticalDelta=void 0!==e?e:40),this.setText(t)},PANOLENS.Infospot.prototype.addHoverElement=function(t,e){this.element||(this.element=t.cloneNode(!0),this.element.style.display="none",this.element.style.top=0,this.element.style.position="absolute",this.element.classList.add("panolens-infospot"),this.element.verticalDelta=void 0!==e?e:40)},PANOLENS.Infospot.prototype.removeHoverElement=function(){this.element&&(this.element.left&&(this.container.removeChild(this.element.left),this.element.left=null),this.element.right&&(this.container.removeChild(this.element.right),this.element.right=null),this.container.removeChild(this.element),this.element=null)},PANOLENS.Infospot.prototype.lockHoverElement=function(){this.element&&(this.element.locked=!0)},PANOLENS.Infospot.prototype.unlockHoverElement=function(){this.element&&(this.element.locked=!1)},PANOLENS.Infospot.prototype.show=function(t){t=t||0,this.animated&&(this.hideAnimation&&this.hideAnimation.stop(),this.showAnimation&&this.showAnimation.delay(t).start())},PANOLENS.Infospot.prototype.hide=function(t){t=t||0,this.animated&&(this.showAnimation&&this.showAnimation.stop(),this.hideAnimation&&this.hideAnimation.delay(t).start())},PANOLENS.Infospot.prototype.setFocusMethod=function(t){t&&(this.HANDLER_FOCUS=t.method)},PANOLENS.Infospot.prototype.focus=function(t,e){this.HANDLER_FOCUS&&(this.HANDLER_FOCUS(this.position,t,e),this.onDismiss())},PANOLENS.Infospot.prototype.dispose=function(){this.removeHoverElement(),this.material.dispose(),this.parent&&this.parent.remove(this)}}(),function(){"use strict";PANOLENS.Viewer=function(t){if(THREE.EventDispatcher.call(this),!THREE)return void console.error("Three.JS not found");var e;t=t||{},t.controlBar=void 0===t.controlBar||t.controlBar,t.controlButtons=t.controlButtons||["fullscreen","setting","video"],t.autoHideControlBar=void 0!==t.autoHideControlBar&&t.autoHideControlBar,t.autoHideInfospot=void 0===t.autoHideInfospot||t.autoHideInfospot,t.horizontalView=void 0!==t.horizontalView&&t.horizontalView,t.clickTolerance=t.clickTolerance||10,t.cameraFov=t.cameraFov||60,t.reverseDragging=t.reverseDragging||!1,t.enableReticle=t.enableReticle||!1,t.dwellTime=t.dwellTime||1500,t.autoReticleSelect=void 0===t.autoReticleSelect||t.autoReticleSelect,t.viewIndicator=void 0!==t.viewIndicator&&t.viewIndicator,t.indicatorSize=t.indicatorSize||30,t.output=t.output?t.output:"none",this.options=t,t.container?(e=t.container,e._width=e.clientWidth,e._height=e.clientHeight):(e=document.createElement("div"),e.classList.add("panolens-container"),e.style.width="100%",e.style.height="100%",e._width=window.innerWidth,e._height=window.innerHeight,document.body.appendChild(e)),this.container=e,this.camera=t.camera||new THREE.PerspectiveCamera(this.options.cameraFov,this.container.clientWidth/this.container.clientHeight,1,1e4),this.scene=t.scene||new THREE.Scene,this.renderer=t.renderer||new THREE.WebGLRenderer({alpha:!0,antialias:!1}),this.viewIndicatorSize=t.indicatorSize,this.reticle={},this.tempEnableReticle=this.options.enableReticle,this.mode=PANOLENS.Modes.NORMAL,this.OrbitControls,this.DeviceOrientationControls,this.CardboardEffect,this.StereoEffect,this.controls,this.effect,this.panorama,this.widget,this.hoverObject,this.infospot,this.pressEntityObject,this.pressObject,this.raycaster=new THREE.Raycaster,this.raycasterPoint=new THREE.Vector2,this.userMouse=new THREE.Vector2,this.updateCallbacks=[],this.requestAnimationId,this.cameraFrustum=new THREE.Frustum,this.cameraViewProjectionMatrix=new THREE.Matrix4,this.outputDivElement,this.HANDLER_MOUSE_DOWN=this.onMouseDown.bind(this),this.HANDLER_MOUSE_UP=this.onMouseUp.bind(this),this.HANDLER_MOUSE_MOVE=this.onMouseMove.bind(this),this.HANDLER_WINDOW_RESIZE=this.onWindowResize.bind(this),this.HANDLER_KEY_DOWN=this.onKeyDown.bind(this),this.HANDLER_KEY_UP=this.onKeyUp.bind(this),this.HANDLER_TAP=this.onTap.bind(this,{clientX:this.container.clientWidth/2,clientY:this.container.clientHeight/2}),this.OUTPUT_INFOSPOT=!1,this.tweenLeftAnimation=new TWEEN.Tween,this.tweenUpAnimation=new TWEEN.Tween,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.container.clientWidth,this.container.clientHeight),this.renderer.setClearColor(0,1),this.renderer.sortObjects=!1,this.renderer.domElement.classList.add("panolens-canvas"),this.renderer.domElement.style.display="block",this.container.style.backgroundColor="#000",this.container.appendChild(this.renderer.domElement),this.OrbitControls=new THREE.OrbitControls(this.camera,this.container),this.OrbitControls.name="orbit",this.OrbitControls.minDistance=1,this.OrbitControls.noPan=!0,this.DeviceOrientationControls=new THREE.DeviceOrientationControls(this.camera,this.container),this.DeviceOrientationControls.name="device-orientation",this.DeviceOrientationControls.enabled=!1,this.camera.position.z=1,this.options.passiveRendering&&console.warn("passiveRendering is now deprecated"),this.controls=[this.OrbitControls,this.DeviceOrientationControls],this.control=this.OrbitControls,this.CardboardEffect=new THREE.CardboardEffect(this.renderer),this.CardboardEffect.setSize(this.container.clientWidth,this.container.clientHeight),this.StereoEffect=new THREE.StereoEffect(this.renderer),this.StereoEffect.setSize(this.container.clientWidth,this.container.clientHeight),this.effect=this.CardboardEffect,this.addReticle(),this.options.horizontalView&&(this.OrbitControls.minPolarAngle=Math.PI/2,this.OrbitControls.maxPolarAngle=Math.PI/2),this.options.controlBar!==!1&&this.addDefaultControlBar(this.options.controlButtons),this.options.viewIndicator&&this.addViewIndicator(),this.options.reverseDragging&&this.reverseDraggingDirection(),this.options.enableReticle?this.enableReticleControl():this.registerMouseAndTouchEvents(),"overlay"===this.options.output&&this.addOutputElement(),this.registerEventListeners(),this.animate.call(this)},PANOLENS.Viewer.prototype=Object.create(THREE.EventDispatcher.prototype),PANOLENS.Viewer.prototype.constructor=PANOLENS.Viewer,PANOLENS.Viewer.prototype.add=function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}this.scene.add(t),t.addEventListener&&t.addEventListener("panolens-viewer-handler",this.eventHandler.bind(this)),t instanceof PANOLENS.Panorama&&t.dispatchEvent&&t.dispatchEvent({type:"panolens-container",container:this.container}),"panorama"===t.type&&(this.addPanoramaEventListener(t),this.panorama||this.setPanorama(t))},PANOLENS.Viewer.prototype.remove=function(t){t.removeEventListener&&t.removeEventListener("panolens-viewer-handler",this.eventHandler.bind(this)),this.scene.remove(t)},PANOLENS.Viewer.prototype.addDefaultControlBar=function(t){var e=this;if(this.widget)return void console.warn("Default control bar exists");this.widget=new PANOLENS.Widget(this.container),this.widget.addEventListener("panolens-viewer-handler",this.eventHandler.bind(this)),this.widget.addControlBar(),t.forEach(function(t){e.widget.addControlButton(t)})},PANOLENS.Viewer.prototype.setPanorama=function(t){var e=this.panorama;if("panorama"===t.type&&e!==t){this.hideInfospot();var n=function(){e&&e.onLeave(),t.removeEventListener("enter-fade-start",n)};t.addEventListener("enter-fade-start",n),(this.panorama=t).onEnter()}},PANOLENS.Viewer.prototype.eventHandler=function(t){t.method&&this[t.method]&&this[t.method](t.data)},PANOLENS.Viewer.prototype.dispatchEventToChildren=function(t){this.scene.traverse(function(e){e.dispatchEvent&&e.dispatchEvent(t)})},PANOLENS.Viewer.prototype.activateWidgetItem=function(t,e){var n,i=this.widget.mainMenu,o=i.children[0],r=i.children[1];if(void 0!==t){switch(t){case 0:n=o.subMenu.children[1];break;case 1:n=o.subMenu.children[2];break;default:n=o.subMenu.children[1]}o.subMenu.setActiveItem(n),o.setSelectionTitle(n.textContent)}if(void 0!==e){switch(e){case PANOLENS.Modes.CARDBOARD:n=r.subMenu.children[2];break;case PANOLENS.Modes.STEREO:n=r.subMenu.children[3];break;default:n=r.subMenu.children[1]}r.subMenu.setActiveItem(n),r.setSelectionTitle(n.textContent)}},PANOLENS.Viewer.prototype.enableEffect=function(t){if(this.mode!==t){if(t===PANOLENS.Modes.NORMAL)return void this.disableEffect();this.mode=t;var e=this.camera.fov;switch(t){case PANOLENS.Modes.CARDBOARD:this.effect=this.CardboardEffect,this.enableReticleControl();break;case PANOLENS.Modes.STEREO:this.effect=this.StereoEffect,this.enableReticleControl();break;default:this.effect=null,this.disableReticleControl()}this.activateWidgetItem(void 0,this.mode),this.dispatchEventToChildren({type:"panolens-dual-eye-effect",mode:this.mode}),this.camera.fov=e+.01,this.effect.setSize(this.container.clientWidth,this.container.clientHeight),this.render(),this.camera.fov=e}},PANOLENS.Viewer.prototype.disableEffect=function(){this.mode!==PANOLENS.Modes.NORMAL&&(this.mode=PANOLENS.Modes.NORMAL,this.disableReticleControl(),this.activateWidgetItem(void 0,this.mode),this.dispatchEventToChildren({type:"panolens-dual-eye-effect",mode:this.mode}),this.renderer.setSize(this.container.clientWidth,this.container.clientHeight),this.render())},PANOLENS.Viewer.prototype.enableReticleControl=function(){this.reticle.visible||(this.reticle.textureLoaded||this.reticle.loadTextures(),this.tempEnableReticle=!0,this.unregisterMouseAndTouchEvents(),this.reticle.show(),this.registerReticleEvent(),this.updateReticleEvent())},PANOLENS.Viewer.prototype.disableReticleControl=function(){this.tempEnableReticle=!1,this.options.enableReticle?this.updateReticleEvent():(this.reticle.hide(),this.unregisterReticleEvent(),this.registerMouseAndTouchEvents())},PANOLENS.Viewer.prototype.toggleVideoPlay=function(t){this.panorama instanceof PANOLENS.VideoPanorama&&this.panorama.dispatchEvent({type:"video-toggle",pause:t})},PANOLENS.Viewer.prototype.setVideoCurrentTime=function(t){this.panorama instanceof PANOLENS.VideoPanorama&&this.panorama.dispatchEvent({type:"video-time",percentage:t})},PANOLENS.Viewer.prototype.onVideoUpdate=function(t){this.widget&&this.widget.dispatchEvent({type:"video-update",percentage:t})},
PANOLENS.Viewer.prototype.addUpdateCallback=function(t){t&&this.updateCallbacks.push(t)},PANOLENS.Viewer.prototype.removeUpdateCallback=function(t){var e=this.updateCallbacks.indexOf(t);t&&e>=0&&this.updateCallbacks.splice(e,1)},PANOLENS.Viewer.prototype.showVideoWidget=function(){this.widget&&this.widget.dispatchEvent({type:"video-control-show"})},PANOLENS.Viewer.prototype.hideVideoWidget=function(){this.widget&&this.widget.dispatchEvent({type:"video-control-hide"})},PANOLENS.Viewer.prototype.updateVideoPlayButton=function(t){this.widget&&this.widget.videoElement&&this.widget.videoElement.controlButton&&this.widget.videoElement.controlButton.update(t)},PANOLENS.Viewer.prototype.addPanoramaEventListener=function(t){t.addEventListener("enter-fade-start",this.setCameraControl.bind(this)),t instanceof PANOLENS.VideoPanorama&&(t.addEventListener("enter-fade-start",this.showVideoWidget.bind(this)),t.addEventListener("leave",function(){this.panorama instanceof PANOLENS.VideoPanorama||this.hideVideoWidget.call(this)}.bind(this)))},PANOLENS.Viewer.prototype.setCameraControl=function(){this.OrbitControls.target.copy(this.panorama.position)},PANOLENS.Viewer.prototype.getControl=function(){return this.control},PANOLENS.Viewer.prototype.getScene=function(){return this.scene},PANOLENS.Viewer.prototype.getCamera=function(){return this.camera},PANOLENS.Viewer.prototype.getRenderer=function(){return this.renderer},PANOLENS.Viewer.prototype.getContainer=function(){return this.container},PANOLENS.Viewer.prototype.getControlName=function(){return this.control.name},PANOLENS.Viewer.prototype.getNextControlName=function(){return this.controls[this.getNextControlIndex()].name},PANOLENS.Viewer.prototype.getNextControlIndex=function(){var t,e,n;return t=this.controls,e=this.control,n=t.indexOf(e)+1,n>=t.length?0:n},PANOLENS.Viewer.prototype.setCameraFov=function(t){this.camera.fov=t,this.camera.updateProjectionMatrix()},PANOLENS.Viewer.prototype.enableControl=function(t){switch(t=t>=0&&t<this.controls.length?t:0,this.control.enabled=!1,this.control=this.controls[t],this.control.enabled=!0,t){case PANOLENS.Controls.ORBIT:this.camera.position.copy(this.panorama.position),this.camera.position.z+=1;break;case PANOLENS.Controls.DEVICEORIENTATION:this.camera.position.copy(this.panorama.position)}this.control.update(),this.activateWidgetItem(t,void 0)},PANOLENS.Viewer.prototype.disableControl=function(){this.control.enabled=!1},PANOLENS.Viewer.prototype.toggleNextControl=function(){this.enableControl(this.getNextControlIndex())},PANOLENS.Viewer.prototype.getScreenVector=function(t){var e=t.clone(),n=this.container.clientWidth/2,i=this.container.clientHeight/2;return e.project(this.camera),e.x=e.x*n+n,e.y=-(e.y*i)+i,e.z=0,e},PANOLENS.Viewer.prototype.checkSpriteInViewport=function(t){return this.camera.matrixWorldInverse.getInverse(this.camera.matrixWorld),this.cameraViewProjectionMatrix.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.cameraFrustum.setFromMatrix(this.cameraViewProjectionMatrix),t.visible&&this.cameraFrustum.intersectsSprite(t)},PANOLENS.Viewer.prototype.reverseDraggingDirection=function(){this.OrbitControls.rotateSpeed*=-1,this.OrbitControls.momentumScalingFactor*=-1},PANOLENS.Viewer.prototype.addReticle=function(){this.reticle=new PANOLENS.Reticle(16777215,this.options.autoReticleSelect,PANOLENS.DataImage.ReticleIdle,PANOLENS.DataImage.ReticleDwell,this.options.dwellTime,45),this.reticle.position.z=-10,this.camera.add(this.reticle),this.scene.add(this.camera)},PANOLENS.Viewer.prototype.tweenControlCenter=function(t,e,n){if(this.control===this.OrbitControls){t instanceof Array&&(e=t[1],n=t[2],t=t[0]),e=void 0!==e?e:1e3,n=n||TWEEN.Easing.Exponential.Out;var i,o,r,a,s,h,c,l,u,d;i=this,a=this.camera.getWorldDirection(),s=a.clone(),l=this.panorama.getWorldPosition().sub(this.camera.getWorldPosition()),h=t.clone(),h.x*=-1,h.add(l).normalize(),c=h.clone(),a.y=0,h.y=0,o=Math.atan2(h.z,h.x)-Math.atan2(a.z,a.x),o=o>Math.PI?o-2*Math.PI:o,o=o<-Math.PI?o+2*Math.PI:o,r=Math.abs(s.angleTo(a)+(s.y*c.y<=0?c.angleTo(h):-c.angleTo(h))),r*=c.y<s.y?1:-1,u={left:0,up:0},d={left:0,up:0},this.tweenLeftAnimation.stop(),this.tweenUpAnimation.stop(),this.tweenLeftAnimation=new TWEEN.Tween(u).to({left:o},e).easing(n).onUpdate(function(){i.control.rotateLeft(this.left-d.left),d.left=this.left}).start(),this.tweenUpAnimation=new TWEEN.Tween(u).to({up:r},e).easing(n).onUpdate(function(){i.control.rotateUp(this.up-d.up),d.up=this.up}).start()}},PANOLENS.Viewer.prototype.tweenControlCenterByObject=function(t,e,n){var i=!1;if(t.traverseAncestors(function(t){t.scalePlaceHolder&&(i=!0)}),i){var o=new THREE.Vector3(-1,1,1);this.tweenControlCenter(t.getWorldPosition().multiply(o),e,n)}else this.tweenControlCenter(t.getWorldPosition(),e,n)},PANOLENS.Viewer.prototype.onWindowResize=function(t,e){var n,i,o;o=this.container.classList.contains("panolens-container")||this.container.isFullscreen,void 0!==t&&void 0!==e?(n=t,i=e,this.container._width=t,this.container._height=e):(n=o?Math.max(document.documentElement.clientWidth,window.innerWidth||0):this.container.clientWidth,i=o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):this.container.clientHeight,this.container._width=n,this.container._height=i),this.camera.aspect=n/i,this.camera.updateProjectionMatrix(),this.renderer.setSize(n,i),(this.options.enableReticle||this.tempEnableReticle)&&this.updateReticleEvent(),this.dispatchEvent({type:"window-resize",width:n,height:i}),this.scene.traverse(function(t){t.dispatchEvent&&t.dispatchEvent({type:"window-resize",width:n,height:i})})},PANOLENS.Viewer.prototype.addOutputElement=function(){var t=document.createElement("div");t.style.position="absolute",t.style.right="10px",t.style.top="10px",t.style.color="#fff",this.container.appendChild(t),this.outputDivElement=t},PANOLENS.Viewer.prototype.outputInfospotPosition=function(){var t,e,n,i;if(t=this.raycaster.intersectObject(this.panorama,!0),t.length>0)switch(e=t[0].point,n=this.panorama.getWorldPosition(),i=new THREE.Vector3(-(e.x-n.x).toFixed(2),(e.y-n.y).toFixed(2),(e.z-n.z).toFixed(2)),this.options.output){case"console":console.info(i.x+", "+i.y+", "+i.z);break;case"overlay":this.outputDivElement.textContent=i.x+", "+i.y+", "+i.z}},PANOLENS.Viewer.prototype.onMouseDown=function(t){t.preventDefault(),this.userMouse.x=t.clientX>=0?t.clientX:t.touches[0].clientX,this.userMouse.y=t.clientY>=0?t.clientY:t.touches[0].clientY,this.userMouse.type="mousedown",this.onTap(t)},PANOLENS.Viewer.prototype.onMouseMove=function(t){t.preventDefault(),this.userMouse.type="mousemove",this.onTap(t)},PANOLENS.Viewer.prototype.onMouseUp=function(t){var e,n=!1;this.userMouse.type="mouseup",e=this.userMouse.x>=t.clientX-this.options.clickTolerance&&this.userMouse.x<=t.clientX+this.options.clickTolerance&&this.userMouse.y>=t.clientY-this.options.clickTolerance&&this.userMouse.y<=t.clientY+this.options.clickTolerance||t.changedTouches&&this.userMouse.x>=t.changedTouches[0].clientX-this.options.clickTolerance&&this.userMouse.x<=t.changedTouches[0].clientX+this.options.clickTolerance&&this.userMouse.y>=t.changedTouches[0].clientY-this.options.clickTolerance&&this.userMouse.y<=t.changedTouches[0].clientY+this.options.clickTolerance?"click":void 0,t&&t.target&&!t.target.classList.contains("panolens-canvas")||(t.preventDefault(),n=t.changedTouches&&1===t.changedTouches.length?this.onTap({clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY},e):this.onTap(t,e),this.userMouse.type="none",n||"click"===e&&(this.options.autoHideInfospot&&this.panorama&&this.panorama.toggleInfospotVisibility(),this.options.autoHideControlBar&&this.toggleControlBar()))},PANOLENS.Viewer.prototype.onTap=function(t,e){var n,i,o;if(this.raycasterPoint.x=(t.clientX-this.container.offsetLeft)/this.container.clientWidth*2-1,this.raycasterPoint.y=2*-((t.clientY-this.container.offsetTop)/this.container.clientHeight)+1,this.raycaster.setFromCamera(this.raycasterPoint,this.camera),this.panorama)if(("mousedown"!==t.type&&PANOLENS.Utils.checkTouchSupported()||this.OUTPUT_INFOSPOT)&&this.outputInfospotPosition(),n=this.raycaster.intersectObjects(this.panorama.children,!0),i=this.getConvertedIntersect(n),o=n.length>0?n[0].object:o,"mouseup"===this.userMouse.type&&(i&&this.pressEntityObject===i&&this.pressEntityObject.dispatchEvent&&this.pressEntityObject.dispatchEvent({type:"pressstop-entity",mouseEvent:t}),this.pressEntityObject=void 0),"mouseup"===this.userMouse.type&&(o&&this.pressObject===o&&this.pressObject.dispatchEvent&&this.pressObject.dispatchEvent({type:"pressstop",mouseEvent:t}),this.pressObject=void 0),"click"===e?(this.panorama.dispatchEvent({type:"click",intersects:n,mouseEvent:t}),i&&i.dispatchEvent&&i.dispatchEvent({type:"click-entity",mouseEvent:t}),o&&o.dispatchEvent&&o.dispatchEvent({type:"click",mouseEvent:t})):(this.panorama.dispatchEvent({type:"hover",intersects:n,mouseEvent:t}),(this.hoverObject&&n.length>0&&this.hoverObject!==i||this.hoverObject&&0===n.length)&&(this.hoverObject.dispatchEvent&&(this.hoverObject.dispatchEvent({type:"hoverleave",mouseEvent:t}),this.reticle.cancelDwelling()),this.hoverObject=void 0),i&&n.length>0&&(this.hoverObject!==i&&(this.hoverObject=i,this.hoverObject.dispatchEvent&&(this.hoverObject.dispatchEvent({type:"hoverenter",mouseEvent:t}),(this.options.autoReticleSelect&&this.options.enableReticle||this.tempEnableReticle)&&this.reticle.startDwelling(this.onTap.bind(this,t,"click")))),"mousedown"===this.userMouse.type&&this.pressEntityObject!=i&&(this.pressEntityObject=i,this.pressEntityObject.dispatchEvent&&this.pressEntityObject.dispatchEvent({type:"pressstart-entity",mouseEvent:t})),"mousedown"===this.userMouse.type&&this.pressObject!=o&&(this.pressObject=o,this.pressObject.dispatchEvent&&this.pressObject.dispatchEvent({type:"pressstart",mouseEvent:t})),("mousemove"===this.userMouse.type||this.options.enableReticle)&&(o&&o.dispatchEvent&&o.dispatchEvent({type:"hover",mouseEvent:t}),this.pressEntityObject&&this.pressEntityObject.dispatchEvent&&this.pressEntityObject.dispatchEvent({type:"pressmove-entity",mouseEvent:t}),this.pressObject&&this.pressObject.dispatchEvent&&this.pressObject.dispatchEvent({type:"pressmove",mouseEvent:t}))),!i&&this.pressEntityObject&&this.pressEntityObject.dispatchEvent&&(this.pressEntityObject.dispatchEvent({type:"pressstop-entity",mouseEvent:t}),this.pressEntityObject=void 0),!o&&this.pressObject&&this.pressObject.dispatchEvent&&(this.pressObject.dispatchEvent({type:"pressstop",mouseEvent:t}),this.pressObject=void 0)),o&&o instanceof PANOLENS.Infospot){if(this.infospot=o,"click"===e)return!0}else this.infospot&&this.hideInfospot()},PANOLENS.Viewer.prototype.getConvertedIntersect=function(t){for(var e,n=0;n<t.length;n++)if(t[n].distance>=0&&t[n].object&&!t[n].object.passThrough){if(t[n].object.entity&&t[n].object.entity.passThrough)continue;if(t[n].object.entity&&!t[n].object.entity.passThrough){e=t[n].object.entity;break}e=t[n].object;break}return e},PANOLENS.Viewer.prototype.hideInfospot=function(t){this.infospot&&(this.infospot.onHoverEnd(),this.infospot=void 0)},PANOLENS.Viewer.prototype.toggleControlBar=function(){this.widget&&this.widget.dispatchEvent({type:"control-bar-toggle"})},PANOLENS.Viewer.prototype.onKeyDown=function(t){this.options.output&&"none"!==this.options.output&&"Control"===t.key&&(this.OUTPUT_INFOSPOT=!0)},PANOLENS.Viewer.prototype.onKeyUp=function(t){this.OUTPUT_INFOSPOT=!1},PANOLENS.Viewer.prototype.update=function(){TWEEN.update(),this.updateCallbacks.forEach(function(t){t()}),this.control.update(),this.scene.traverse(function(t){if(t instanceof PANOLENS.Infospot&&t.element&&(this.hoverObject===t||"none"!==t.element.style.display||t.element.left&&"none"!==t.element.left.style.display||t.element.right&&"none"!==t.element.right.style.display))if(this.checkSpriteInViewport(t)){var e=this.getScreenVector(t.getWorldPosition());t.translateElement(e.x,e.y)}else t.onDismiss()}.bind(this))},PANOLENS.Viewer.prototype.render=function(){this.mode===PANOLENS.Modes.CARDBOARD||this.mode===PANOLENS.Modes.STEREO?this.effect.render(this.scene,this.camera):this.renderer.render(this.scene,this.camera)},PANOLENS.Viewer.prototype.animate=function(){this.requestAnimationId=window.requestAnimationFrame(this.animate.bind(this)),this.onChange()},PANOLENS.Viewer.prototype.onChange=function(){this.update(),this.render()},PANOLENS.Viewer.prototype.registerMouseAndTouchEvents=function(){this.container.addEventListener("mousedown",this.HANDLER_MOUSE_DOWN,!1),this.container.addEventListener("mousemove",this.HANDLER_MOUSE_MOVE,!1),this.container.addEventListener("mouseup",this.HANDLER_MOUSE_UP,!1),this.container.addEventListener("touchstart",this.HANDLER_MOUSE_DOWN,!1),this.container.addEventListener("touchend",this.HANDLER_MOUSE_UP,!1)},PANOLENS.Viewer.prototype.unregisterMouseAndTouchEvents=function(){this.container.removeEventListener("mousedown",this.HANDLER_MOUSE_DOWN,!1),this.container.removeEventListener("mousemove",this.HANDLER_MOUSE_MOVE,!1),this.container.removeEventListener("mouseup",this.HANDLER_MOUSE_UP,!1),this.container.removeEventListener("touchstart",this.HANDLER_MOUSE_DOWN,!1),this.container.removeEventListener("touchend",this.HANDLER_MOUSE_UP,!1)},PANOLENS.Viewer.prototype.registerReticleEvent=function(){this.addUpdateCallback(this.HANDLER_TAP)},PANOLENS.Viewer.prototype.unregisterReticleEvent=function(){this.removeUpdateCallback(this.HANDLER_TAP)},PANOLENS.Viewer.prototype.updateReticleEvent=function(){var t,e;t=this.container.clientWidth/2+this.container.offsetLeft,e=this.container.clientHeight/2,this.removeUpdateCallback(this.HANDLER_TAP),this.HANDLER_TAP=this.onTap.bind(this,{clientX:t,clientY:e}),this.addUpdateCallback(this.HANDLER_TAP)},PANOLENS.Viewer.prototype.registerEventListeners=function(){window.addEventListener("resize",this.HANDLER_WINDOW_RESIZE,!0),window.addEventListener("keydown",this.HANDLER_KEY_DOWN,!0),window.addEventListener("keyup",this.HANDLER_KEY_UP,!0)},PANOLENS.Viewer.prototype.unregisterEventListeners=function(){window.removeEventListener("resize",this.HANDLER_WINDOW_RESIZE,!0),window.removeEventListener("keydown",this.HANDLER_KEY_DOWN,!0),window.removeEventListener("keyup",this.HANDLER_KEY_UP,!0)},PANOLENS.Viewer.prototype.dispose=function(){function t(e){for(var n=e.children.length-1;n>=0;n--)t(e.children[n]),e.remove(e.children[n]);e instanceof PANOLENS.Infospot&&e.dispose(),e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}this.unregisterEventListeners(),t(this.scene),this.widget&&(this.widget.dispose(),this.widget=null),THREE.Cache&&THREE.Cache.enabled&&THREE.Cache.clear()},PANOLENS.Viewer.prototype.destory=function(){this.dispose(),this.render(),window.cancelAnimationFrame(this.requestAnimationId)},PANOLENS.Viewer.prototype.onPanoramaDispose=function(t){t instanceof PANOLENS.VideoPanorama&&this.hideVideoWidget(),t===this.panorama&&(this.panorama=null)},PANOLENS.Viewer.prototype.loadAsyncRequest=function(t,e){var n=new XMLHttpRequest;n.onloadend=function(t){e&&e(t)},n.open("GET",t,!0),n.send(null)},PANOLENS.Viewer.prototype.addViewIndicator=function(){function t(t){if(0!==t.loaded){var n=t.target.responseXML.documentElement;n.style.width=e.viewIndicatorSize+"px",n.style.height=e.viewIndicatorSize+"px",n.style.position="absolute",n.style.top="10px",n.style.left="10px",n.style.opacity="0.5",n.style.cursor="pointer",n.id="panolens-view-indicator-container",e.container.appendChild(n);var i=n.querySelector("#indicator"),o=function(){e.radius=.225*e.viewIndicatorSize,e.currentPanoAngle=e.camera.rotation.y-THREE.Math.degToRad(90),e.fovAngle=THREE.Math.degToRad(e.camera.fov),e.leftAngle=-e.currentPanoAngle-e.fovAngle/2,e.rightAngle=-e.currentPanoAngle+e.fovAngle/2,e.leftX=e.radius*Math.cos(e.leftAngle),e.leftY=e.radius*Math.sin(e.leftAngle),e.rightX=e.radius*Math.cos(e.rightAngle),e.rightY=e.radius*Math.sin(e.rightAngle),e.indicatorD="M "+e.leftX+" "+e.leftY+" A "+e.radius+" "+e.radius+" 0 0 1 "+e.rightX+" "+e.rightY,e.leftX&&e.leftY&&e.rightX&&e.rightY&&e.radius&&i.setAttribute("d",e.indicatorD)};e.addUpdateCallback(o);var r=function(){this.style.opacity="1"},a=function(){this.style.opacity="0.5"};n.addEventListener("mouseenter",r),n.addEventListener("mouseleave",a)}}var e=this;this.loadAsyncRequest(PANOLENS.DataImage.ViewIndicator,t)},PANOLENS.Viewer.prototype.appendControlItem=function(t){var e=this.widget.createCustomItem(t);return"video"===t.group?this.widget.videoElement.appendChild(e):this.widget.barElement.appendChild(e),e}}(),function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var h="function"==typeof require&&require;if(!s&&h)return h(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n||t)},l,l.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){function i(t){u.call(this),"string"==typeof t&&(t={text:t}),this._opt=h({},t),t&&this.update(t)}var o=t("layout-bmfont-text"),r=t("inherits"),a=t("quad-indices"),s=t("three-buffer-vertex-data"),h=t("object-assign"),c=t("./lib/vertices"),l=t("./lib/utils"),u=THREE.BufferGeometry;e.exports=function(t){return new i(t)},r(i,u),i.prototype.update=function(t){if("string"==typeof t&&(t={text:t}),t=h({},this._opt,t),!t.font)throw new TypeError("must specify a { font } in options");this.layout=o(t);var e=t.flipY!==!1,n=t.font,i=n.common.scaleW,r=n.common.scaleH,l=this.layout.glyphs.filter(function(t){var e=t.data;return e.width*e.height>0});this.visibleGlyphs=l;var u=c.positions(l),d=c.uvs(l,i,r,e),p=a({clockwise:!0,type:"uint16",count:l.length});if(s.index(this,p,1,"uint16"),s.attr(this,"position",u,2),s.attr(this,"uv",d,2),!t.multipage&&"page"in this.attributes)this.removeAttribute("page");else if(t.multipage){var f=c.pages(l);s.attr(this,"page",f,1)}},i.prototype.computeBoundingSphere=function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var t=this.attributes.position.array,e=this.attributes.position.itemSize;if(!t||!e||t.length<2)return this.boundingSphere.radius=0,void this.boundingSphere.center.set(0,0,0);l.computeSphere(t,this.boundingSphere),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.')},i.prototype.computeBoundingBox=function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var t=this.boundingBox,e=this.attributes.position.array,n=this.attributes.position.itemSize;if(!e||!n||e.length<2)return void t.makeEmpty();l.computeBox(e,t)}},{"./lib/utils":2,"./lib/vertices":3,inherits:4,"layout-bmfont-text":5,"object-assign":26,"quad-indices":27,"three-buffer-vertex-data":31}],2:[function(t,e,n){function i(t){var e=t.length/o;r.min[0]=t[0],r.min[1]=t[1],r.max[0]=t[0],r.max[1]=t[1];for(var n=0;n<e;n++){var i=t[n*o+0],a=t[n*o+1];r.min[0]=Math.min(i,r.min[0]),r.min[1]=Math.min(a,r.min[1]),r.max[0]=Math.max(i,r.max[0]),r.max[1]=Math.max(a,r.max[1])}}var o=2,r={min:[0,0],max:[0,0]};e.exports.computeBox=function(t,e){i(t),e.min.set(r.min[0],r.min[1],0),e.max.set(r.max[0],r.max[1],0)},e.exports.computeSphere=function(t,e){i(t);var n=r.min[0],o=r.min[1],a=r.max[0],s=r.max[1],h=a-n,c=s-o,l=Math.sqrt(h*h+c*c);e.center.set(n+h/2,o+c/2,0),e.radius=l/2}},{}],3:[function(t,e,n){e.exports.pages=function(t){var e=new Float32Array(4*t.length*1),n=0;return t.forEach(function(t){var i=t.data.page||0;e[n++]=i,e[n++]=i,e[n++]=i,e[n++]=i}),e},e.exports.uvs=function(t,e,n,i){var o=new Float32Array(4*t.length*2),r=0;return t.forEach(function(t){var a=t.data,s=a.x+a.width,h=a.y+a.height,c=a.x/e,l=a.y/n,u=s/e,d=h/n;i&&(l=(n-a.y)/n,d=(n-h)/n),o[r++]=c,o[r++]=l,o[r++]=c,o[r++]=d,o[r++]=u,o[r++]=d,o[r++]=u,o[r++]=l}),o},e.exports.positions=function(t){var e=new Float32Array(4*t.length*2),n=0;return t.forEach(function(t){var i=t.data,o=t.position[0]+i.xoffset,r=t.position[1]+i.yoffset,a=i.width,s=i.height;e[n++]=o,e[n++]=r,e[n++]=o,e[n++]=r+s,e[n++]=o+a,e[n++]=r+s,e[n++]=o+a,e[n++]=r}),e}},{}],4:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],5:[function(t,e,n){function i(t){this.glyphs=[],this._measure=this.computeMetrics.bind(this),this.update(t)}function o(t){Object.defineProperty(i.prototype,t,{get:r(t),configurable:!0})}function r(t){return new Function(["return function "+t+"() {","  return this._"+t,"}"].join("\n"))()}function a(t,e){if(!t.chars||0===t.chars.length)return null;var n=f(t.chars,e);return n>=0?t.chars[n]:null}function s(t){for(var e=0;e<m.length;e++){var n=m[e].charCodeAt(0),i=f(t.chars,n);if(i>=0)return t.chars[i].height}return 0}function h(t){for(var e=0;e<v.length;e++){var n=v[e].charCodeAt(0),i=f(t.chars,n);if(i>=0)return t.chars[i]}return 0}function c(t){for(var e=0;e<g.length;e++){var n=g[e].charCodeAt(0),i=f(t.chars,n);if(i>=0)return t.chars[i].height}return 0}function l(t,e,n){if(!t.kernings||0===t.kernings.length)return 0;for(var i=t.kernings,o=0;o<i.length;o++){var r=i[o];if(r.first===e&&r.second===n)return r.amount}return 0}function u(t){return"center"===t?b:"right"===t?L:w}var d=t("word-wrapper"),p=t("xtend"),f=t("indexof-property")("id"),E=t("as-number"),m=["x","e","a","o","n","s","r","c","u","m","v","w","z"],v=["m","w"],g=["H","I","N","E","F","K","L","T","U","V","W","X","Y","Z"],y="\t".charCodeAt(0),N=" ".charCodeAt(0),w=0,b=1,L=2;e.exports=function(t){return new i(t)},i.prototype.update=function(t){if(t=p({measure:this._measure},t),this._opt=t,this._opt.tabSize=E(this._opt.tabSize,4),!t.font)throw new Error("must provide a valid bitmap font");var e=this.glyphs,n=t.text||"",i=t.font;this._setupSpaceGlyphs(i);var o=d.lines(n,t),r=t.width||0;e.length=0;var a=o.reduce(function(t,e){return Math.max(t,e.width,r)},0),h=0,f=0,m=E(t.lineHeight,i.common.lineHeight),v=i.common.base,g=m-v,y=t.letterSpacing||0,N=m*o.length-g,w=u(this._opt.align);f-=N,this._width=a,this._height=N,this._descender=m-v,this._baseline=v,this._xHeight=s(i),this._capHeight=c(i),this._lineHeight=m,this._ascender=m-g-this._xHeight;var O=this;o.forEach(function(t,o){for(var r,s=t.start,c=t.end,u=t.width,d=s;d<c;d++){var p=n.charCodeAt(d),E=O.getGlyph(i,p);if(E){r&&(h+=l(i,r.id,E.id));var v=h;w===b?v+=(a-u)/2:w===L&&(v+=a-u),e.push({position:[v,f],data:E,index:d,line:o}),h+=E.xadvance+y,r=E}}f+=m,h=0}),this._linesTotal=o.length},i.prototype._setupSpaceGlyphs=function(t){if(this._fallbackSpaceGlyph=null,this._fallbackTabGlyph=null,t.chars&&0!==t.chars.length){var e=a(t,N)||h(t)||t.chars[0],n=this._opt.tabSize*e.xadvance;this._fallbackSpaceGlyph=e,this._fallbackTabGlyph=p(e,{x:0,y:0,xadvance:n,id:y,xoffset:0,yoffset:0,width:0,height:0})}},i.prototype.getGlyph=function(t,e){var n=a(t,e);return n||(e===y?this._fallbackTabGlyph:e===N?this._fallbackSpaceGlyph:null)},i.prototype.computeMetrics=function(t,e,n,i){var o,r,a=this._opt.letterSpacing||0,s=this._opt.font,h=0,c=0,u=0;if(!s.chars||0===s.chars.length)return{start:e,end:e,width:0};n=Math.min(t.length,n);for(var d=e;d<n;d++){var p=t.charCodeAt(d),o=this.getGlyph(s,p);if(o){o.xoffset;h+=r?l(s,r.id,o.id):0;var f=h+o.xadvance+a,E=h+o.width;if(E>=i||f>=i)break;h=f,c=E,r=o}u++}return r&&(c+=r.xoffset),{start:e,end:e+u,width:c}},["width","height","descender","ascender","xHeight","baseline","capHeight","lineHeight"].forEach(o)},{"as-number":6,"indexof-property":7,"word-wrapper":8,xtend:9}],6:[function(t,e,n){e.exports=function(t,e){return"number"==typeof t?t:"number"==typeof e?e:0}},{}],7:[function(t,e,n){e.exports=function(t){if(!t||"string"!=typeof t)throw new Error("must specify property for indexof search");return new Function("array","value","start",["start = start || 0","for (var i=start; i<array.length; i++)",'  if (array[i]["'+t+'"] === value)',"      return i","return -1"].join("\n"))}},{}],8:[function(t,e,n){function i(t,e,n,i){var o=t.indexOf(e,n);return o===-1||o>i?i:o}function o(t){return l.test(t)}function r(t,e,n,i,o){for(var r=[],a=n,s=n;s<i&&s<e.length;s++){var c=e.charAt(s),l=h.test(c);if(l||s===i-1){var u=l?s:s+1,d=t(e,a,u,o);r.push(d),a=s+1}}return r}function a(t,e,n,r,a,s){var h=[],l=a;for("nowrap"===s&&(l=Number.MAX_VALUE);n<r&&n<e.length;){for(var u=i(e,c,n,r);n<u&&o(e.charAt(n));)n++;var d=t(e,n,u,l),p=n+(d.end-d.start),f=p+c.length;if(p<u){for(;p>n&&!o(e.charAt(p));)p--;if(p===n)f>n+c.length&&f--,p=f;else for(f=p;p>n&&o(e.charAt(p-c.length));)p--}if(p>=n){var E=t(e,n,p,l);h.push(E)}n=f}return h}function s(t,e,n,i){return{start:e,end:e+Math.min(i,n-e)}}var h=/\n/,c="\n",l=/\s/;e.exports=function(t,n){return e.exports.lines(t,n).map(function(e){return t.substring(e.start,e.end)}).join("\n")},e.exports.lines=function(t,e){if(e=e||{},0===e.width&&"nowrap"!==e.mode)return[];t=t||"";var n="number"==typeof e.width?e.width:Number.MAX_VALUE,i=Math.max(0,e.start||0),o="number"==typeof e.end?e.end:t.length,h=e.mode,c=e.measure||s;return"pre"===h?r(c,t,i,o,n):a(c,t,i,o,n,h)}},{}],9:[function(t,e,n){function i(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)o.call(n,i)&&(t[i]=n[i])}return t}e.exports=i;var o=Object.prototype.hasOwnProperty},{}],10:[function(t,e,n){(function(n){function i(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}function o(t){if(d)return u(t,{responseType:"arraybuffer"});if(void 0===window.XMLHttpRequest)throw new Error("your browser does not support XHR loading");var e=new window.XMLHttpRequest;return e.overrideMimeType("text/plain; charset=x-user-defined"),u({xhr:e},t)}var r=t("xhr"),a=function(){},s=t("parse-bmfont-ascii"),h=t("parse-bmfont-xml"),c=t("parse-bmfont-binary"),l=t("./lib/is-binary"),u=t("xtend"),d=function(){return window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}();e.exports=function(t,e){e="function"==typeof e?e:a,"string"==typeof t?t={uri:t}:t||(t={}),t.binary&&(t=o(t)),r(t,function(o,r,u){if(o)return e(o);if(!/^2/.test(r.statusCode))return e(new Error("http status code: "+r.statusCode));if(!u)return e(new Error("no body result"));var d=!1;if(i(u)){var p=new Uint8Array(u);u=new n(p,"binary")}l(u)&&(d=!0,"string"==typeof u&&(u=new n(u,"binary"))),d||(n.isBuffer(u)&&(u=u.toString(t.encoding)),u=u.trim());var f;try{var E=r.headers["content-type"];f=d?c(u):/json/.test(E)||"{"===u.charAt(0)?JSON.parse(u):/xml/.test(E)||"<"===u.charAt(0)?h(u):s(u)}catch(t){e(new Error("error parsing font "+t.message)),e=a}e(null,f)})}}).call(this,t("buffer").Buffer)},{"./lib/is-binary":11,buffer:37,"parse-bmfont-ascii":13,"parse-bmfont-binary":14,"parse-bmfont-xml":15,xhr:18,xtend:25}],11:[function(t,e,n){(function(n){var i=t("buffer-equal"),o=new n([66,77,70,3]);e.exports=function(t){return"string"==typeof t?"BMF"===t.substring(0,3):t.length>4&&i(t.slice(0,4),o)}}).call(this,t("buffer").Buffer)},{buffer:37,"buffer-equal":12}],12:[function(t,e,n){var i=t("buffer").Buffer;e.exports=function(t,e){if(i.isBuffer(t)&&i.isBuffer(e)){if("function"==typeof t.equals)return t.equals(e);if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}}},{buffer:37}],13:[function(t,e,n){function i(t,e){if(!(t=t.replace(/\t+/g," ").trim()))return null;var n=t.indexOf(" ");if(n===-1)throw new Error("no named row at line "+e);var i=t.substring(0,n);t=t.substring(n+1),t=t.replace(/letter=[\'\"]\S+[\'\"]/gi,""),t=t.split("="),t=t.map(function(t){return t.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)});for(var r=[],a=0;a<t.length;a++){var s=t[a];0===a?r.push({key:s[0],data:""}):a===t.length-1?r[r.length-1].data=o(s[0]):(r[r.length-1].data=o(s[0]),r.push({key:s[1],data:""}))}var h={key:i,data:{}};return r.forEach(function(t){h.data[t.key]=t.data}),h}function o(t){return t&&0!==t.length?0===t.indexOf('"')||0===t.indexOf("'")?t.substring(1,t.length-1):t.indexOf(",")!==-1?r(t):parseInt(t,10):""}function r(t){return t.split(",").map(function(t){return parseInt(t,10)})}e.exports=function(t){if(!t)throw new Error("no data provided");t=t.toString().trim();var e={pages:[],chars:[],kernings:[]},n=t.split(/\r\n?|\n/g);if(0===n.length)throw new Error("no data in BMFont file");for(var o=0;o<n.length;o++){var r=i(n[o],o);if(r)if("page"===r.key){if("number"!=typeof r.data.id)throw new Error("malformed file at line "+o+" -- needs page id=N");if("string"!=typeof r.data.file)throw new Error("malformed file at line "+o+' -- needs page file="path"');e.pages[r.data.id]=r.data.file}else"chars"===r.key||"kernings"===r.key||("char"===r.key?e.chars.push(r.data):"kerning"===r.key?e.kernings.push(r.data):e[r.key]=r.data)}return e}},{}],14:[function(t,e,n){function i(t,e,n){if(n>e.length-1)return 0;var i=e.readUInt8(n++),c=e.readInt32LE(n);switch(n+=4,i){case 1:t.info=o(e,n);break;case 2:t.common=r(e,n);break;case 3:t.pages=a(e,n,c);break;case 4:t.chars=s(e,n,c);break;case 5:t.kernings=h(e,n,c)}return 5+c}function o(t,e){var n={};n.size=t.readInt16LE(e);var i=t.readUInt8(e+2);return n.smooth=i>>7&1,n.unicode=i>>6&1,n.italic=i>>5&1,n.bold=i>>4&1,i>>3&1&&(n.fixedHeight=1),n.charset=t.readUInt8(e+3)||"",n.stretchH=t.readUInt16LE(e+4),n.aa=t.readUInt8(e+6),n.padding=[t.readInt8(e+7),t.readInt8(e+8),t.readInt8(e+9),t.readInt8(e+10)],n.spacing=[t.readInt8(e+11),t.readInt8(e+12)],n.outline=t.readUInt8(e+13),n.face=l(t,e+14),n}function r(t,e){var n={};n.lineHeight=t.readUInt16LE(e),n.base=t.readUInt16LE(e+2),n.scaleW=t.readUInt16LE(e+4),n.scaleH=t.readUInt16LE(e+6),n.pages=t.readUInt16LE(e+8);t.readUInt8(e+10);return n.packed=0,n.alphaChnl=t.readUInt8(e+11),n.redChnl=t.readUInt8(e+12),n.greenChnl=t.readUInt8(e+13),n.blueChnl=t.readUInt8(e+14),n}function a(t,e,n){for(var i=[],o=c(t,e),r=o.length+1,a=n/r,s=0;s<a;s++)i[s]=t.slice(e,e+o.length).toString("utf8"),e+=r;return i}function s(t,e,n){for(var i=[],o=n/20,r=0;r<o;r++){var a={},s=20*r;a.id=t.readUInt32LE(e+0+s),a.x=t.readUInt16LE(e+4+s),a.y=t.readUInt16LE(e+6+s),a.width=t.readUInt16LE(e+8+s),a.height=t.readUInt16LE(e+10+s),a.xoffset=t.readInt16LE(e+12+s),a.yoffset=t.readInt16LE(e+14+s),a.xadvance=t.readInt16LE(e+16+s),a.page=t.readUInt8(e+18+s),a.chnl=t.readUInt8(e+19+s),i[r]=a}return i}function h(t,e,n){for(var i=[],o=n/10,r=0;r<o;r++){var a={},s=10*r;a.first=t.readUInt32LE(e+0+s),a.second=t.readUInt32LE(e+4+s),a.amount=t.readInt16LE(e+8+s),i[r]=a}return i}function c(t,e){for(var n=e;n<t.length&&0!==t[n];n++);return t.slice(e,n)}function l(t,e){return c(t,e).toString("utf8")}var u=[66,77,70];e.exports=function(t){if(t.length<6)throw new Error("invalid buffer length for BMFont");if(!u.every(function(e,n){return t.readUInt8(n)===e}))throw new Error("BMFont missing BMF byte header");var e=3;if(t.readUInt8(e++)>3)throw new Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var n={kernings:[],chars:[]},o=0;o<5;o++)e+=i(n,t,e);return n}},{}],15:[function(t,e,n){function i(t){return o(t).reduce(function(t,e){return t[r(e.nodeName)]=e.nodeValue,t},{})}function o(t){for(var e=[],n=0;n<t.attributes.length;n++)e.push(t.attributes[n]);return e}function r(t){return h[t.toLowerCase()]||t}var a=t("./parse-attribs"),s=t("xml-parse-from-string"),h={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"};e.exports=function(t){t=t.toString();var e=s(t),n={pages:[],chars:[],kernings:[]};["info","common"].forEach(function(t){var o=e.getElementsByTagName(t)[0];o&&(n[t]=a(i(o)))});var o=e.getElementsByTagName("pages")[0];if(!o)throw new Error("malformed file -- no <pages> element");for(var r=o.getElementsByTagName("page"),h=0;h<r.length;h++){var c=r[h],l=parseInt(c.getAttribute("id"),10),u=c.getAttribute("file")
;if(isNaN(l))throw new Error('malformed file -- page "id" attribute is NaN');if(!u)throw new Error('malformed file -- needs page "file" attribute');n.pages[parseInt(l,10)]=u}return["chars","kernings"].forEach(function(t){var o=e.getElementsByTagName(t)[0];if(o)for(var r=t.substring(0,t.length-1),s=o.getElementsByTagName(r),h=0;h<s.length;h++){var c=s[h];n[t].push(a(i(c)))}}),n}},{"./parse-attribs":16,"xml-parse-from-string":17}],16:[function(t,e,n){function i(t){return t.split(",").map(function(t){return parseInt(t,10)})}e.exports=function(t){"chasrset"in t&&(t.charset=t.chasrset,delete t.chasrset);for(var e in t)"face"!==e&&"charset"!==e&&(t[e]="padding"===e||"spacing"===e?i(t[e]):parseInt(t[e],10));return t}},{}],17:[function(t,e,n){e.exports=function(){return void 0!==window.DOMParser?function(t){return(new window.DOMParser).parseFromString(t,"application/xml")}:void 0!==window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")?function(t){var e=new window.ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e}:function(t){var e=document.createElement("div");return e.innerHTML=t,e}}()},{}],18:[function(t,e,n){"use strict";function i(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function o(t,e,n){var i=t;return l(e)?(n=e,"string"==typeof t&&(i={uri:t})):i=d(e,{uri:t}),i.callback=n,i}function r(t,e,n){return e=o(t,e,n),a(e)}function a(t){function e(){4===l.readyState&&a()}function n(){var t=void 0;if(l.response?t=l.response:"text"!==l.responseType&&l.responseType||(t=l.responseText||l.responseXML),N)try{t=JSON.parse(t)}catch(t){}return t}function o(t){clearTimeout(f),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,h)}function a(){if(!p){var e;clearTimeout(f),e=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=h,o=null;0!==e?(i={body:n(),statusCode:e,method:m,headers:{},url:E,rawRequest:l},l.getAllResponseHeaders&&(i.headers=u(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),s(o,i,i.body)}}var s=t.callback;if(void 0===s)throw new Error("callback argument missing");s=c(s);var h={body:void 0,headers:{},statusCode:0,method:m,url:E,rawRequest:l},l=t.xhr||null;l||(l=t.cors||t.useXDR?new r.XDomainRequest:new r.XMLHttpRequest);var d,p,f,E=l.url=t.uri||t.url,m=l.method=t.method||"GET",v=t.body||t.data||null,g=l.headers=t.headers||{},y=!!t.sync,N=!1;if("json"in t&&(N=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==m&&"HEAD"!==m&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),v=JSON.stringify(t.json))),l.onreadystatechange=e,l.onload=a,l.onerror=o,l.onprogress=function(){},l.ontimeout=o,l.open(m,E,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(f=setTimeout(function(){p=!0,l.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",o(t)},t.timeout)),l.setRequestHeader)for(d in g)g.hasOwnProperty(d)&&l.setRequestHeader(d,g[d]);else if(t.headers&&!i(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(v),l}function s(){}var h=t("global/window"),c=t("once"),l=t("is-function"),u=t("parse-headers"),d=t("xtend");e.exports=r,r.XMLHttpRequest=h.XMLHttpRequest||s,r.XDomainRequest="withCredentials"in new r.XMLHttpRequest?r.XMLHttpRequest:h.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){r["delete"===t?"del":t]=function(e,n,i){return n=o(e,n,i),n.method=t.toUpperCase(),a(n)}})},{"global/window":19,"is-function":20,once:21,"parse-headers":24,xtend:25}],19:[function(t,e,n){(function(t){"undefined"!=typeof window?e.exports=window:void 0!==t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(t,e,n){function i(t){var e=o.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}e.exports=i;var o=Object.prototype.toString},{}],21:[function(t,e,n){function i(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}e.exports=i,i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0})})},{}],22:[function(t,e,n){function i(t,e,n){if(!s(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===h.call(t)?o(t,e,n):"string"==typeof t?r(t,e,n):a(t,e,n)}function o(t,e,n){for(var i=0,o=t.length;i<o;i++)c.call(t,i)&&e.call(n,t[i],i,t)}function r(t,e,n){for(var i=0,o=t.length;i<o;i++)e.call(n,t.charAt(i),i,t)}function a(t,e,n){for(var i in t)c.call(t,i)&&e.call(n,t[i],i,t)}var s=t("is-function");e.exports=i;var h=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":20}],23:[function(t,e,n){function i(t){return t.replace(/^\s*|\s*$/g,"")}n=e.exports=i,n.left=function(t){return t.replace(/^\s*/,"")},n.right=function(t){return t.replace(/\s*$/,"")}},{}],24:[function(t,e,n){var i=t("trim"),o=t("for-each"),r=function(t){return"[object Array]"===Object.prototype.toString.call(t)};e.exports=function(t){if(!t)return{};var e={};return o(i(t).split("\n"),function(t){var n=t.indexOf(":"),o=i(t.slice(0,n)).toLowerCase(),a=i(t.slice(n+1));void 0===e[o]?e[o]=a:r(e[o])?e[o].push(a):e[o]=[e[o],a]}),e}},{"for-each":22,trim:23}],25:[function(t,e,n){arguments[4][9][0].apply(n,arguments)},{dup:9}],26:[function(t,e,n){"use strict";function i(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=Object.assign||function(t,e){for(var n,a,s=i(t),h=1;h<arguments.length;h++){n=Object(arguments[h]);for(var c in n)o.call(n,c)&&(s[c]=n[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(n);for(var l=0;l<a.length;l++)r.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},{}],27:[function(t,e,n){var i=t("dtype"),o=t("an-array"),r=t("is-buffer"),a=[0,2,3],s=[2,1,3];e.exports=function(t,e){t&&(o(t)||r(t))||(e=t||{},t=null),e="number"==typeof e?{count:e}:e||{};for(var n="string"==typeof e.type?e.type:"uint16",h="number"==typeof e.count?e.count:1,c=e.start||0,l=e.clockwise!==!1?a:s,u=l[0],d=l[1],p=l[2],f=6*h,E=t||new(i(n))(f),m=0,v=0;m<f;m+=6,v+=4){var g=m+c;E[g+0]=v+0,E[g+1]=v+1,E[g+2]=v+2,E[g+3]=v+u,E[g+4]=v+d,E[g+5]=v+p}return E}},{"an-array":28,dtype:29,"is-buffer":30}],28:[function(t,e,n){function i(t){return t.BYTES_PER_ELEMENT&&"[object ArrayBuffer]"===o.call(t.buffer)||Array.isArray(t)}var o=Object.prototype.toString;e.exports=i},{}],29:[function(t,e,n){e.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],30:[function(t,e,n){e.exports=function(t){return!(null==t||!(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)))}},{}],31:[function(t,e,n){function i(t,e,n,i){"number"!=typeof n&&(n=1),"number"!=typeof i&&(i="uint16");var o=!t.index&&"function"!=typeof t.setIndex,a=o?t.getAttribute("index"):t.index,s=r(a,e,n,i);s&&(o?t.addAttribute("index",s):t.index=s)}function o(t,e,n,i,o){if("number"!=typeof i&&(i=3),"number"!=typeof o&&(o="float32"),Array.isArray(n)&&Array.isArray(n[0])&&n[0].length!==i)throw new Error("Nested vertex array has unexpected size; expected "+i+" but found "+n[0].length);var a=t.getAttribute(e),s=r(a,n,i,o);s&&t.addAttribute(e,s)}function r(t,e,n,i){return e=e||[],!t||a(t,e,n)?(e=s(e,i),t=new THREE.BufferAttribute(e,n),t.needsUpdate=!0,t):(s(e,t.array),t.needsUpdate=!0,null)}function a(t,e,n){if(t.itemSize!==n)return!0;if(!t.array)return!0;var i=t.array.length;return Array.isArray(e)&&Array.isArray(e[0])?i!==e.length*n:i!==e.length}var s=t("flatten-vertex-data");e.exports.attr=o,e.exports.index=i},{"flatten-vertex-data":32}],32:[function(t,e,n){function i(t,e,n){if(!t)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(t)&&Array.isArray(t[0])){var i=t[0].length,r=t.length*i;e&&"string"!=typeof e||(e=new(o(e||"float32"))(r+n));var a=e.length-n;if(r!==a)throw new Error("source length "+r+" ("+i+"x"+t.length+") does not match destination length "+a);for(var s=0,h=n;s<t.length;s++)for(var c=0;c<i;c++)e[h++]=t[s][c]}else if(e&&"string"!=typeof e)e.set(t,n);else{var l=o(e||"float32");0===n?e=new l(t):(e=new l(t.length+n),e.set(t,n))}return e}var o=t("dtype");e.exports=i},{dtype:33}],33:[function(t,e,n){arguments[4][29][0].apply(n,arguments)},{dup:29}],34:[function(t,e,n){var i=t("object-assign");e.exports=function(t){t=t||{};var e="number"==typeof t.opacity?t.opacity:1,n="number"==typeof t.alphaTest?t.alphaTest:1e-4,o=t.precision||"highp",r=t.color,a=t.map;return delete t.map,delete t.color,delete t.precision,delete t.opacity,i({uniforms:{opacity:{type:"f",value:e},map:{type:"t",value:a||new THREE.Texture},color:{type:"c",value:new THREE.Color(r)}},vertexShader:["attribute vec2 uv;","attribute vec4 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * position;","}"].join("\n"),fragmentShader:["#ifdef GL_OES_standard_derivatives","#extension GL_OES_standard_derivatives : enable","#endif","precision "+o+" float;","uniform float opacity;","uniform vec3 color;","uniform sampler2D map;","varying vec2 vUv;","float aastep(float value) {","  #ifdef GL_OES_standard_derivatives","    float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757;","  #else","    float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));","  #endif","  return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);","}","void main() {","  vec4 texColor = texture2D(map, vUv);","  float alpha = aastep(texColor.a);","  gl_FragColor = vec4(color, opacity * alpha);",0===n?"":"  if (gl_FragColor.a < "+n+") discard;","}"].join("\n")},t)}},{"object-assign":26}],35:[function(t,e,n){var i=t("load-bmfont");e.exports=function(t,e){i(t.font,function(n,i){if(n)throw n;PANOLENS.Utils.TextureLoader.load(t.image,function(t){e(i,t)})})}},{"load-bmfont":10}],36:[function(t,e,n){var i=t("../"),o=t("../shaders/sdf");PANOLENS&&PANOLENS.Utils&&PANOLENS.SpriteText&&(PANOLENS.Utils.loadBMFont=function(e,n){t("./load")(e,PANOLENS.SpriteText.prototype.setBMFont.bind(PANOLENS.SpriteText.prototype,n))},PANOLENS.SpriteText.prototype.generateTextGeometry=i,PANOLENS.SpriteText.prototype.generateSDFShader=o)},{"../":1,"../shaders/sdf":34,"./load":35}],37:[function(t,e,n){(function(e){"use strict";function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t){return this instanceof o?(o.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?r(this,t):"string"==typeof t?a(this,t,arguments.length>1?arguments[1]:"utf8"):s(this,t)):arguments.length>1?new o(t,arguments[1]):new o(t)}function r(t,e){if(t=f(t,e<0?0:0|E(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;n++)t[n]=0;return t}function a(t,e,n){return"string"==typeof n&&""!==n||(n="utf8"),t=f(t,0|v(e,n)),t.write(e,n),t}function s(t,e){if(o.isBuffer(e))return h(t,e);if(Q(e))return c(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return l(t,e);if(e instanceof ArrayBuffer)return u(t,e)}return e.length?d(t,e):p(t,e)}function h(t,e){var n=0|E(e.length);return t=f(t,n),e.copy(t,0,0,n),t}function c(t,e){var n=0|E(e.length);t=f(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function l(t,e){var n=0|E(e.length);t=f(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function u(t,e){return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):t=l(t,new Uint8Array(e)),t}function d(t,e){var n=0|E(e.length);t=f(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function p(t,e){var n,i=0;"Buffer"===e.type&&Q(e.data)&&(n=e.data,i=0|E(n.length)),t=f(t,i);for(var o=0;o<i;o+=1)t[o]=255&n[o];return t}function f(t,e){return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):t.length=e,0!==e&&e<=o.poolSize>>>1&&(t.parent=Z),t}function E(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function m(t,e){if(!(this instanceof m))return new m(t,e);var n=new o(t,e);return delete n.parent,n}function v(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return F(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){var i=!1;if(e|=0,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),e<0&&(e=0),n>this.length&&(n=this.length),n<=e)return"";for(;;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return T(this,e,n);case"binary":return R(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,n,i){n=Number(n)||0;var o=t.length-n;i?(i=Number(i))>o&&(i=o):i=o;var r=e.length;if(r%2!=0)throw new Error("Invalid hex string");i>r/2&&(i=r/2);for(var a=0;a<i;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[n+a]=s}return a}function N(t,e,n,i){return X(F(e,t.length-n),t,n,i)}function w(t,e,n,i){return X(W(e),t,n,i)}function b(t,e,n,i){return w(t,e,n,i)}function L(t,e,n,i){return X(Y(e),t,n,i)}function O(t,e,n,i){return X(z(e,t.length-n),t,n,i)}function A(t,e,n){return 0===e&&n===t.length?q.fromByteArray(t):q.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var i=[],o=e;o<n;){var r=t[o],a=null,s=r>239?4:r>223?3:r>191?2:1;if(o+s<=n){var h,c,l,u;switch(s){case 1:r<128&&(a=r);break;case 2:h=t[o+1],128==(192&h)&&(u=(31&r)<<6|63&h)>127&&(a=u);break;case 3:h=t[o+1],c=t[o+2],128==(192&h)&&128==(192&c)&&(u=(15&r)<<12|(63&h)<<6|63&c)>2047&&(u<55296||u>57343)&&(a=u);break;case 4:h=t[o+1],c=t[o+2],l=t[o+3],128==(192&h)&&128==(192&c)&&128==(192&l)&&(u=(15&r)<<18|(63&h)<<12|(63&c)<<6|63&l)>65535&&u<1114112&&(a=u)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),o+=s}return S(i)}function S(t){var e=t.length;if(e<=K)return String.fromCharCode.apply(String,t);for(var n="",i=0;i<e;)n+=String.fromCharCode.apply(String,t.slice(i,i+=K));return n}function T(t,e,n){var i="";n=Math.min(t.length,n);for(var o=e;o<n;o++)i+=String.fromCharCode(127&t[o]);return i}function R(t,e,n){var i="";n=Math.min(t.length,n);for(var o=e;o<n;o++)i+=String.fromCharCode(t[o]);return i}function x(t,e,n){var i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);for(var o="",r=e;r<n;r++)o+=B(t[r]);return o}function M(t,e,n){for(var i=t.slice(e,n),o="",r=0;r<i.length;r+=2)o+=String.fromCharCode(i[r]+256*i[r+1]);return o}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,i,r,a){if(!o.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>r||e<a)throw new RangeError("value is out of bounds");if(n+i>t.length)throw new RangeError("index out of range")}function H(t,e,n,i){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-n,2);o<r;o++)t[n+o]=(e&255<<8*(i?o:1-o))>>>8*(i?o:1-o)}function D(t,e,n,i){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-n,4);o<r;o++)t[n+o]=e>>>8*(i?o:3-o)&255}function V(t,e,n,i,o,r){if(e>o||e<r)throw new RangeError("value is out of bounds");if(n+i>t.length)throw new RangeError("index out of range");if(n<0)throw new RangeError("index out of range")}function _(t,e,n,i,o){return o||V(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(t,e,n,i,23,4),n+4}function U(t,e,n,i,o){return o||V(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(t,e,n,i,52,8),n+8}function k(t){if(t=j(t).replace(J,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function j(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){e=e||1/0;for(var n,i=t.length,o=null,r=[],a=0;a<i;a++){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function W(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function z(t,e){for(var n,i,o,r=[],a=0;a<t.length&&!((e-=2)<0);a++)n=t.charCodeAt(a),i=n>>8,o=n%256,r.push(o),r.push(i);return r}function Y(t){return q.toByteArray(k(t))}function X(t,e,n,i){for(var o=0;o<i&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}var q=t("base64-js"),G=t("ieee754"),Q=t("isarray");n.Buffer=o,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,o.poolSize=8192;var Z={};o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),o.TYPED_ARRAY_SUPPORT?(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array):(o.prototype.length=void 0,o.prototype.parent=void 0),o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,a=Math.min(n,i);r<a&&t[r]===e[r];)++r;return r!==a&&(n=t[r],i=e[r]),n<i?-1:i<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Q(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new o(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;n++)e+=t[n].length;var i=new o(e),r=0;for(n=0;n<t.length;n++){var a=t[n];a.copy(i,r),r+=a.length}return i},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):g.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:o.compare(this,t)},o.prototype.indexOf=function(t,e){function n(t,e,n){for(var i=-1,o=0;n+o<t.length;o++)if(t[n+o]===e[i===-1?0:o-i]){if(i===-1&&(i=o),o-i+1===e.length)return n+i}else i=-1;return-1}if(e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(e<0&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(o.isBuffer(t))return n(this,t,e);if("number"==typeof t)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):n(this,[t],e);throw new TypeError("val must be string, number or Buffer")},o.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else if(isFinite(e))e|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0);else{var o=i;i=e,e=0|n,n=o}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return N(this,t,e,n);case"ascii":return w(this,t,e,n);case"binary":return b(this,t,e,n);case"base64":return L(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var i;if(o.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=o.prototype;else{var r=e-t;i=new o(r,void 0);for(var a=0;a<r;a++)i[a]=this[a+t]}return i.length&&(i.parent=this.parent||this),i},o.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var i=this[t],o=1,r=0;++r<e&&(o*=256);)i+=this[t+r]*o;return i},o.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i},o.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var i=this[t],o=1,r=0;++r<e&&(o*=256);)i+=this[t+r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var i=e,o=1,r=this[t+--i];i>0&&(o*=256);)r+=this[t+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},o.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},o.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||C(this,t,e,n,Math.pow(2,8*n),0);var o=1,r=0;for(this[e]=255&t;++r<n&&(o*=256);)this[e+r]=t/o&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,i){t=+t,e|=0,n|=0,i||C(this,t,e,n,Math.pow(2,8*n),0);var o=n-1,r=1;for(this[e+o]=255&t;--o>=0&&(r*=256);)this[e+o]=t/r&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):H(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):H(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var o=Math.pow(2,8*n-1);C(this,t,e,n,o-1,-o)}var r=0,a=1,s=t<0?1:0;for(this[e]=255&t;++r<n&&(a*=256);)this[e+r]=(t/a>>0)-s&255;return e+n},o.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var o=Math.pow(2,8*n-1);C(this,t,e,n,o-1,-o)}var r=n-1,a=1,s=t<0?1:0;for(this[e+r]=255&t;--r>=0&&(a*=256);)this[e+r]=(t/a>>0)-s&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):H(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):H(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return _(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return _(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,a=i-n;if(this===t&&n<e&&e<i)for(r=a-1;r>=0;r--)t[r+e]=this[r+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r<a;r++)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),n<e)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(e<0||e>=this.length)throw new RangeError("start out of bounds");if(n<0||n>this.length)throw new RangeError("end out of bounds");var i;if("number"==typeof t)for(i=e;i<n;i++)this[i]=t;else{var o=F(t.toString()),r=o.length;for(i=e;i<n;i++)this[i]=o[i%r]}return this}};var J=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":38,ieee754:39,isarray:40}],38:[function(t,e,n){!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a||e===u?62:e===s||e===d?63:e<h?-1:e<h+10?e-h+26+26:e<l+26?e-l:e<c+26?e-c+26:void 0}function n(t){function n(t){c[u++]=t}var i,o,a,s,h,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;h="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,c=new r(3*t.length/4-h),a=h>0?t.length-4:t.length;var u=0;for(i=0,o=0;i<a;i+=4,o+=3)s=e(t.charAt(i))<<18|e(t.charAt(i+1))<<12|e(t.charAt(i+2))<<6|e(t.charAt(i+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===h?(s=e(t.charAt(i))<<2|e(t.charAt(i+1))>>4,n(255&s)):1===h&&(s=e(t.charAt(i))<<10|e(t.charAt(i+1))<<4|e(t.charAt(i+2))>>2,n(s>>8&255),n(255&s)),c}function i(t){function e(t){return o.charAt(t)}var n,i,r,a=t.length%3,s="";for(n=0,r=t.length-a;n<r;n+=3)i=(t[n]<<16)+(t[n+1]<<8)+t[n+2],s+=function(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}(i);switch(a){case 1:i=t[t.length-1],s+=e(i>>2),s+=e(i<<4&63),s+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],s+=e(i>>10),s+=e(i>>4&63),s+=e(i<<2&63),s+="="}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),h="0".charCodeAt(0),c="a".charCodeAt(0),l="A".charCodeAt(0),u="-".charCodeAt(0),d="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}(void 0===n?this.base64js={}:n)},{}],39:[function(t,e,n){n.read=function(t,e,n,i,o){var r,a,s=8*o-i-1,h=(1<<s)-1,c=h>>1,l=-7,u=n?o-1:0,d=n?-1:1,p=t[e+u];for(u+=d,r=p&(1<<-l)-1,p>>=-l,l+=s;l>0;r=256*r+t[e+u],u+=d,l-=8);for(a=r&(1<<-l)-1,r>>=-l,l+=i;l>0;a=256*a+t[e+u],u+=d,l-=8);if(0===r)r=1-c;else{if(r===h)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),r-=c}return(p?-1:1)*a*Math.pow(2,r-i)},n.write=function(t,e,n,i,o,r){var a,s,h,c=8*r-o-1,l=(1<<c)-1,u=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:r-1,f=i?1:-1,E=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),e+=a+u>=1?d/h:d*Math.pow(2,1-u),e*h>=2&&(a++,h/=2),a+u>=l?(s=0,a=l):a+u>=1?(s=(e*h-1)*Math.pow(2,o),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,o),a=0));o>=8;t[n+p]=255&s,p+=f,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[n+p]=255&a,p+=f,a/=256,c-=8);t[n+p-f]|=128*E}},{}],40:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}]},{},[36]);

https://t.me/RX1948 - 2025