bitmovin-player 8.280.0 → 8.281.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitmovinplayer-serviceworker.js +2 -2
- package/bitmovinplayer-serviceworker.prod.js +2 -2
- package/bitmovinplayer-ui.js +1 -1
- package/bitmovinplayer.js +2 -2
- package/bitmovinplayer.prod.js +2 -2
- package/modules/bitmovinplayer-abr.js +2 -2
- package/modules/bitmovinplayer-abr.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-core.js +2 -2
- package/modules/bitmovinplayer-advertising-core.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.prod.js +2 -2
- package/modules/bitmovinplayer-analytics.js +2 -2
- package/modules/bitmovinplayer-analytics.prod.js +2 -2
- package/modules/bitmovinplayer-container-mp4.js +2 -2
- package/modules/bitmovinplayer-container-mp4.prod.js +2 -2
- package/modules/bitmovinplayer-container-ts.js +2 -2
- package/modules/bitmovinplayer-container-ts.prod.js +2 -2
- package/modules/bitmovinplayer-container-webm.js +2 -2
- package/modules/bitmovinplayer-container-webm.prod.js +2 -2
- package/modules/bitmovinplayer-core.js +2 -2
- package/modules/bitmovinplayer-core.prod.js +2 -2
- package/modules/bitmovinplayer-crypto.js +2 -2
- package/modules/bitmovinplayer-crypto.prod.js +2 -2
- package/modules/bitmovinplayer-dash.js +2 -2
- package/modules/bitmovinplayer-dash.prod.js +2 -2
- package/modules/bitmovinplayer-drm.js +2 -2
- package/modules/bitmovinplayer-drm.prod.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-engine-native.js +2 -2
- package/modules/bitmovinplayer-engine-native.prod.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.prod.js +2 -2
- package/modules/bitmovinplayer-envivio.js +1 -1
- package/modules/bitmovinplayer-envivio.prod.js +1 -1
- package/modules/bitmovinplayer-hls.js +2 -2
- package/modules/bitmovinplayer-hls.prod.js +2 -2
- package/modules/bitmovinplayer-lowlatency.js +2 -2
- package/modules/bitmovinplayer-lowlatency.prod.js +2 -2
- package/modules/bitmovinplayer-mserenderer.js +2 -2
- package/modules/bitmovinplayer-mserenderer.prod.js +2 -2
- package/modules/bitmovinplayer-patch.js +1 -1
- package/modules/bitmovinplayer-patch.prod.js +1 -1
- package/modules/bitmovinplayer-playstation4.js +2 -2
- package/modules/bitmovinplayer-playstation4.prod.js +2 -2
- package/modules/bitmovinplayer-playstation5.js +2 -2
- package/modules/bitmovinplayer-playstation5.prod.js +2 -2
- package/modules/bitmovinplayer-polyfill.js +1 -1
- package/modules/bitmovinplayer-polyfill.prod.js +1 -1
- package/modules/bitmovinplayer-reactnative.js +1 -1
- package/modules/bitmovinplayer-reactnative.prod.js +1 -1
- package/modules/bitmovinplayer-remotecontrol.js +2 -2
- package/modules/bitmovinplayer-remotecontrol.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker.js +2 -2
- package/modules/bitmovinplayer-serviceworker.prod.js +2 -2
- package/modules/bitmovinplayer-sgai.js +2 -2
- package/modules/bitmovinplayer-sgai.prod.js +2 -2
- package/modules/bitmovinplayer-smooth.js +2 -2
- package/modules/bitmovinplayer-smooth.prod.js +2 -2
- package/modules/bitmovinplayer-style.js +2 -2
- package/modules/bitmovinplayer-style.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles.js +2 -2
- package/modules/bitmovinplayer-subtitles.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail.js +2 -2
- package/modules/bitmovinplayer-thumbnail.prod.js +2 -2
- package/modules/bitmovinplayer-tizen.js +2 -2
- package/modules/bitmovinplayer-tizen.prod.js +2 -2
- package/modules/bitmovinplayer-ui.js +2 -2
- package/modules/bitmovinplayer-ui.prod.js +2 -2
- package/modules/bitmovinplayer-vidaa.js +2 -2
- package/modules/bitmovinplayer-vidaa.prod.js +2 -2
- package/modules/bitmovinplayer-vr.js +2 -2
- package/modules/bitmovinplayer-vr.prod.js +2 -2
- package/modules/bitmovinplayer-webos.js +2 -2
- package/modules/bitmovinplayer-webos.prod.js +2 -2
- package/modules/bitmovinplayer-wpe.js +2 -2
- package/modules/bitmovinplayer-wpe.prod.js +2 -2
- package/modules/bitmovinplayer-xml.js +1 -1
- package/modules/bitmovinplayer-xml.prod.js +1 -1
- package/package.json +1 -1
- package/types/advertising/API.d.ts +9 -0
- package/types/advertising/ConfigAPI.d.ts +6 -5
- package/types/core/BufferSettings.d.ts +58 -0
- package/types/core/LogLevels.d.ts +54 -0
- package/types/core/Logger.d.ts +51 -0
- package/types/core/Settings.d.ts +856 -0
- package/types/core/network/ManifestMimeType.d.ts +5 -0
- package/types/core/util/MimeTypeHelper.d.ts +52 -0
- package/types/sgai/SgaiConfigAPI.d.ts +1 -1
- package/types/sgai/SgaiErrorCode.d.ts +6 -1
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.281.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
16
16
|
(function() {
|
|
17
|
-
"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vr=e():(t.bitmovin=t.bitmovin||{},t.bitmovin.player=t.bitmovin.player||{},t.bitmovin.player.vr=e())}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ByteBuffer=void 0;var i=function(){function t(){}return t.stringToBytes=function(t,e){e=!!e;for(var i=t.length,n=new Uint8Array(e?4*i:i),r=0,o=0;o<i;o++){var s=t.charCodeAt(o);if(e&&55296<=s&&s<=56319){if(++o>=i)throw new Error("Malformed string, low surrogate expected at position "+o);s=(55296^s)<<10|65536|56320^t.charCodeAt(o)}else if(!e&&s>>>8)throw new Error("Wide characters are not allowed.");!e||s<=127?n[r++]=s:s<=2047?(n[r++]=192|s>>6,n[r++]=128|63&s):s<=65535?(n[r++]=224|s>>12,n[r++]=128|s>>6&63,n[r++]=128|63&s):(n[r++]=240|s>>18,n[r++]=128|s>>12&63,n[r++]=128|s>>6&63,n[r++]=128|63&s)}return n.subarray(0,r)},t.bytesToHex=function(t){for(var e="",i=0;i<t.length;i++){var n=(255&t[i]).toString(16);n.length<2&&(e+="0"),e+=n}return e},t.hexToBytes=function(t){var e=t.length;1&e&&(t="0"+t,e++);for(var i=new Uint8Array(e>>1),n=0;n<e;n+=2)i[n>>1]=parseInt(t.substr(n,2),16);return i},t.base64ToBytes=function(e){return t.stringToBytes(atob(e))},t}();e.ByteBuffer=i},5357:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Cardboard=void 0;var n=i(57160),r=i(50879),o=function(){function t(){}return t.decode=function(e){return new n.ProtoBuf(r.ByteBuffer.base64ToBytes(e),t.proto).readAll()},t.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},t}();e.Cardboard=o},7247:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CardboardViewer=void 0;var n=i(67392),r=function(){return function(t){this.label=t.model,this.fov=t.left_eye_field_of_view_angles[0],this.interLensDistance=t.inter_lens_distance,this.baselineLensDistance=t.tray_to_lens_distance,this.screenLensDistance=t.screen_to_lens_distance,this.distortion=new n.Distortion(t.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}}();e.CardboardViewer=r},95433:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Device=void 0;var i=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],n=function(){function t(e){this.width=e.width||t.getScreenWidth(),this.height=e.height||t.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}return t.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},t.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},t.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},t.detect=function(e){for(var n=navigator.userAgent||navigator.vendor||window.opera,s=t.getScreenWidth(),a=t.getScreenHeight(),h=0;h<i.length;h++){var u=i[h];if(u.rules&&("ios"===u.type||"android"===u.type)&&t.isIOS()===("ios"===u.type)){for(var l=!1,c=0;c<u.rules.length;c++){var d=u.rules[c];if(t.matchRule(d,n,s,a)){l=!0;break}}if(l){var p=.0254;return new t({width:s,height:a,widthMeters:p/(u.dpi[0]||u.dpi)*s,heightMeters:p/(u.dpi[1]||u.dpi)*a,bevelMeters:.001*u.bw})}}}return t.isIOS()?o:r},t.matchRule=function(t,e,i,n){if(!t.ua&&!t.res)return!1;if(t.ua&&e.indexOf(t.ua)<0)return!1;if(t.res){if(!t.res[0]||!t.res[1])return!1;var r=t.res[0],o=t.res[1];if(Math.min(i,n)!==Math.min(r,o)||Math.max(i,n)!==Math.max(r,o))return!1}return!0},t}();e.Device=n;var r=new n({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),o=new n({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceInfo=void 0;var n=i(95433),r=i(44369),o=i(7247),s=function(){function t(t,e){this.J6=new o.CardboardViewer(t),this.K6=n.Device.detect(e)}return t.prototype.getDevice=function(){return this.K6},t.prototype.setViewer=function(t){this.J6=t},t.prototype.getDistortedFieldOfViewLeftEye=function(){var t=this.J6.screenLensDistance,e=this.J6.distortion,i=(this.K6.widthMeters-this.J6.interLensDistance)/2,n=this.J6.interLensDistance/2,o=this.J6.baselineLensDistance-this.K6.bevelMeters,s=this.K6.heightMeters-o,a=r.MathUtil.radToDeg(Math.atan(e.distort(i/t))),h=r.MathUtil.radToDeg(Math.atan(e.distort(n/t))),u=r.MathUtil.radToDeg(Math.atan(e.distort(o/t))),l=r.MathUtil.radToDeg(Math.atan(e.distort(s/t)));return{leftDegrees:Math.min(a,this.J6.fov),rightDegrees:Math.min(h,this.J6.fov),downDegrees:Math.min(u,this.J6.fov),upDegrees:Math.min(l,this.J6.fov)}},t.prototype.getLeftEyeVisibleTanAngles=function(){var t=this.J6.distortion,e=Math.tan(-r.MathUtil.degToRad(this.J6.fov)),i=Math.tan(r.MathUtil.degToRad(this.J6.fov)),n=Math.tan(r.MathUtil.degToRad(this.J6.fov)),o=Math.tan(-r.MathUtil.degToRad(this.J6.fov)),s=this.K6.widthMeters/4,a=this.K6.heightMeters/2,h=this.J6.baselineLensDistance-this.K6.bevelMeters-a,u=this.J6.interLensDistance/2-s,l=-h,c=this.J6.screenLensDistance,d=t.distort((u-s)/c),p=t.distort((l+a)/c),f=t.distort((u+s)/c),b=t.distort((l-a)/c),y=new Float32Array(4);return y[0]=Math.max(e,d),y[1]=Math.min(i,p),y[2]=Math.min(n,f),y[3]=Math.max(o,b),y},t.prototype.getLeftEyeNoLensTanAngles=function(){var t=this.J6.distortion,e=new Float32Array(4),i=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.J6.fov))),n=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.J6.fov))),o=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.J6.fov))),s=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.J6.fov))),a=this.K6.widthMeters/4,h=this.K6.heightMeters/2,u=this.J6.baselineLensDistance-this.K6.bevelMeters-h,l=this.J6.interLensDistance/2-a,c=-u,d=this.J6.screenLensDistance,p=(l-a)/d,f=(c+h)/d,b=(l+a)/d,y=(c-h)/d;return e[0]=Math.max(i,p),e[1]=Math.min(n,f),e[2]=Math.min(o,b),e[3]=Math.max(s,y),e},t.prototype.getLeftEyeVisibleScreenRect=function(t){var e=this.J6.screenLensDistance,i=(this.K6.widthMeters-this.J6.interLensDistance)/2,n=this.J6.baselineLensDistance-this.K6.bevelMeters,r=(t[0]*e+i)/this.K6.widthMeters,o=(t[1]*e+n)/this.K6.heightMeters,s=(t[2]*e+i)/this.K6.widthMeters,a=(t[3]*e+n)/this.K6.heightMeters;return{x:r,y:a,width:s-r,height:o-a}},t.prototype.getFieldOfViewLeftEye=function(t){return t?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},t.prototype.getFieldOfViewRightEye=function(t){var e=this.getFieldOfViewLeftEye(t);return{leftDegrees:e.leftDegrees,rightDegrees:e.rightDegrees,downDegrees:e.downDegrees,upDegrees:e.upDegrees}},t.prototype.getUndistortedFieldOfViewLeftEye=function(){var t=this.getUndistortedParams_();return{leftDegrees:r.MathUtil.radToDeg(Math.atan(t.outerDist)),rightDegrees:r.MathUtil.radToDeg(Math.atan(t.innerDist)),downDegrees:r.MathUtil.radToDeg(Math.atan(t.bottomDist)),upDegrees:r.MathUtil.radToDeg(Math.atan(t.topDist))}},t.prototype.getUndistortedViewportLeftEye=function(){var t=this.getUndistortedParams_(),e=this.J6.screenLensDistance,i=this.K6.widthMeters/e,n=this.K6.heightMeters/e,r=this.K6.width/i,o=this.K6.height/n,s=Math.round((t.eyePosX-t.outerDist)*r),a=Math.round((t.eyePosY-t.bottomDist)*o);return{x:s,y:a,width:Math.round((t.eyePosX+t.innerDist)*r)-s,height:Math.round((t.eyePosY+t.topDist)*o)-a}},t.prototype.getUndistortedParams_=function(){var t=this.J6.distortion,e=this.J6.screenLensDistance,i=this.J6.interLensDistance/2/e,n=this.K6.widthMeters/e,o=this.K6.heightMeters/e,s=n/2-i,a=(this.J6.baselineLensDistance-this.K6.bevelMeters)/e,h=this.J6.fov,u=t.distortInverse(Math.tan(r.MathUtil.degToRad(h))),l=Math.min(s,u),c=Math.min(i,u),d=Math.min(a,u);return{outerDist:l,innerDist:c,topDist:Math.min(o-a,u),bottomDist:d,eyePosX:s,eyePosY:a}},t}();e.DeviceInfo=s},67392:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Distortion=void 0;var i=function(){function t(t){this.Ieb=t}return t.prototype.distortInverse=function(t){for(var e=0,i=1,n=t-this.distort(e);Math.abs(i-e)>1e-4;){var r=t-this.distort(i),o=i-r*((i-e)/(r-n));e=i,i=o,n=r}return i},t.prototype.distort=function(t){for(var e=t*t,i=0,n=this.Ieb.length-1;n>=0;n--)i=e*(i+this.Ieb[n]);return(i+1)*t},t.solveLinear_=function(t,e){var i,n,r,o=t.length;for(n=0;n<o-1;++n)for(r=n+1;r<o;++r){var s=t[n][r]/t[n][n];for(i=n+1;i<o;++i)t[i][r]-=s*t[i][n];e[r]-=s*e[n]}var a=new Array(o);for(n=o-1;n>=0;--n){var h=e[n];for(i=n+1;i<o;++i)h-=t[i][n]*a[i];a[n]=h/t[n][n]}return a},t.solveLeastSquares_=function(e,i){var n,r,o,s,a=e.length,h=e[0].length;if(h!==i.length)throw new Error("Matrix / vector dimension mismatch");var u=new Array(a);for(o=0;o<a;++o)for(u[o]=new Array(a),r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*e[o][n];u[o][r]=s}var l=new Array(a);for(r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*i[n];l[r]=s}return t.solveLinear_(u,l)},t.prototype.approximateInverse=function(e,i){e=e||1,i=i||100;var n,r,o=new Array(12);for(r=0;r<12;++r)o[r]=new Array(i);var s=new Array(i);for(n=0;n<i;++n){var a=e*(n+1)/i,h=this.distort(a),u=h;for(r=0;r<12;++r)u*=h*h,o[r][n]=u;s[n]=a-h}return t.solveLeastSquares_(o,s)},t}();e.Distortion=i},44369:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Quat=e.Vec3=e.Mat4=e.MathUtil=void 0;var i=function(){function t(){}return t.degToRad=function(t){return t*Math.PI/180},t.radToDeg=function(t){return 180*t/Math.PI},t.hypot=function(t,e){return Math.sqrt(t*t+e*e)},t.getSum=function(t){return t.length>0?t.reduce(function(t,e){return t+e},0):0},t.getAverage=function(e){return e.length>0?t.getSum(e)/e.length:1/0},t.sign=function(t){return Math.sign&&Math.sign(t)||(t>0?1:t<0?-1:0)},t}();e.MathUtil=i;var n=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(16):new Array(16))[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotate=function(t,e,i){var n,r,o,s,a,h,u,l,c,d,p,f,b,y,g,v,m,w,T,E,M,O,D,R,_=i[0],K=i[1],V=i[2],P=Math.sqrt(_*_+K*K+V*V);return Math.abs(P)<1e-6?null:(_*=P=1/P,K*=P,V*=P,n=Math.sin(e),o=1-(r=Math.cos(e)),s=t[0],a=t[1],h=t[2],u=t[3],l=t[4],c=t[5],d=t[6],p=t[7],f=t[8],b=t[9],y=t[10],g=t[11],v=_*_*o+r,m=K*_*o+V*n,w=V*_*o-K*n,T=_*K*o-V*n,E=K*K*o+r,M=V*K*o+_*n,O=_*V*o+K*n,D=K*V*o-_*n,R=V*V*o+r,t[0]=s*v+l*m+f*w,t[1]=a*v+c*m+b*w,t[2]=h*v+d*m+y*w,t[3]=u*v+p*m+g*w,t[4]=s*T+l*E+f*M,t[5]=a*T+c*E+b*M,t[6]=h*T+d*E+y*M,t[7]=u*T+p*E+g*M,t[8]=s*O+l*D+f*R,t[9]=a*O+c*D+b*R,t[10]=h*O+d*D+y*R,t[11]=u*O+p*D+g*R,t)},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],p=e[10],f=e[11],b=e[12],y=e[13],g=e[14],v=e[15],m=i[0],w=i[1],T=i[2],E=i[3];return t[0]=m*n+w*a+T*c+E*b,t[1]=m*r+w*h+T*d+E*y,t[2]=m*o+w*u+T*p+E*g,t[3]=m*s+w*l+T*f+E*v,m=i[4],w=i[5],T=i[6],E=i[7],t[4]=m*n+w*a+T*c+E*b,t[5]=m*r+w*h+T*d+E*y,t[6]=m*o+w*u+T*p+E*g,t[7]=m*s+w*l+T*f+E*v,m=i[8],w=i[9],T=i[10],E=i[11],t[8]=m*n+w*a+T*c+E*b,t[9]=m*r+w*h+T*d+E*y,t[10]=m*o+w*u+T*p+E*g,t[11]=m*s+w*l+T*f+E*v,m=i[12],w=i[13],T=i[14],E=i[15],t[12]=m*n+w*a+T*c+E*b,t[13]=m*r+w*h+T*d+E*y,t[14]=m*o+w*u+T*p+E*g,t[15]=m*s+w*l+T*f+E*v,t},t.perspective=function(t,e,i,n,r){var o=1/Math.tan(e/2),s=1/(n-r);return t[0]=o/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+n)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*n*s,t[15]=0,t},t.invert=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],d=e[10],p=e[11],f=e[12],b=e[13],y=e[14],g=e[15],v=i*a-n*s,m=i*h-r*s,w=i*u-o*s,T=n*h-r*a,E=n*u-o*a,M=r*u-o*h,O=l*b-c*f,D=l*y-d*f,R=l*g-p*f,_=c*y-d*b,K=c*g-p*b,V=d*g-p*y,P=v*V-m*K+w*_+T*R-E*D+M*O;return P?(P=1/P,t[0]=(a*V-h*K+u*_)*P,t[1]=(r*K-n*V-o*_)*P,t[2]=(b*M-y*E+g*T)*P,t[3]=(d*E-c*M-p*T)*P,t[4]=(h*R-s*V-u*D)*P,t[5]=(i*V-r*R+o*D)*P,t[6]=(y*w-f*M-g*m)*P,t[7]=(l*M-d*w+p*m)*P,t[8]=(s*K-a*R+u*O)*P,t[9]=(n*R-i*K-o*O)*P,t[10]=(f*E-b*w+g*v)*P,t[11]=(c*w-l*E-p*v)*P,t[12]=(a*D-s*_-h*O)*P,t[13]=(i*_-n*D+r*O)*P,t[14]=(b*m-f*T-y*v)*P,t[15]=(l*T-c*m+d*v)*P,t):null},t}();e.Mat4=n;var r=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(3):new Array(3))[0]=0,t[1]=0,t[2]=0,t},t}();e.Vec3=r;var o=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=0,t[1]=0,t[2]=0,t[3]=1,t},t.fromValues=function(t,e,i,n){var r;return(r="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=t,r[1]=e,r[2]=i,r[3]=n,r},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=i[0],h=i[1],u=i[2],l=i[3];return t[0]=n*l+s*a+r*u-o*h,t[1]=r*l+s*h+o*a-n*u,t[2]=o*l+s*u+n*h-r*a,t[3]=s*l-n*a-r*h-o*u,t},t.toAngle=function(t){var e=r.create(),i=t[0]*t[0],n=t[1]*t[1],o=t[2]*t[2],s=t[0]*t[1]+t[2]*t[3];return s>.499?(e[2]=2*Math.atan2(t[0],t[3]),e[0]=Math.PI/2,e[1]=0):s<-.499?(e[2]=-2*Math.atan2(t[0],t[3]),e[0]=-Math.PI/2,e[1]=0):(e[2]=Math.atan2(2*t[1]*t[3]-2*t[0]*t[2],1-2*n-2*o),e[0]=Math.asin(2*s),e[1]=Math.atan2(2*t[0]*t[3]-2*t[1]*t[2],1-2*i-2*o)),{yaw:180*e[2]/Math.PI,pitch:180*e[1]/Math.PI,roll:180*e[0]/Math.PI}},t}();e.Quat=o},57160:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtoBuf=void 0;var i=function(){function t(t,e){this.ueb=t,this.xeb=e,this.veb=0,this.web=new DataView(this.ueb.buffer,0,this.ueb.length)}return t.prototype.readVarInt=function(){var t,e=0;for(t=0;this.veb<this.ueb.length&&(e|=(127&this.ueb[this.veb])<<t,128&this.ueb[this.veb]);this.veb++)t+=7;return this.veb++,e},t.prototype.readHeader=function(){var t=this.readVarInt();return{tag:t>>>3,type:7&t}},t.prototype.readString=function(){for(var t=this.readVarInt(),e=new Array(t),i=0,n=this.veb;n<this.veb+t;n++){var r=this.ueb[n];if(r<128)e[i++]=r;else if(r>=192&&r<224&&n+1<t)e[i++]=(31&r)<<6|63&this.ueb[++n];else if(r>=224&&r<240&&n+2<t)e[i++]=(15&r)<<12|(63&this.ueb[++n])<<6|63&this.ueb[++n];else{if(!(r>=240&&r<248&&n+3<t))throw new Error("Malformed UTF8 character at byte offset "+n);var o=(7&r)<<18|(63&this.ueb[++n])<<12|(63&this.ueb[++n])<<6|63&this.ueb[++n];o<=65535?e[i++]=o:(o^=65536,e[i++]=55296|o>>10,e[i++]=56320|1023&o)}}var s="",a=16384;for(n=0;n<i;n+=a)s+=String.fromCharCode.apply(String,e.slice(n,n+a<=i?n+a:i));return this.veb+=t,s},t.prototype.readPacked=function(t){var e=this.readVarInt(),i=[];switch(t){case"float":for(var n=0;n<e/4;n++)i.push(this.web.getFloat32(this.veb,!0)),this.veb+=4;break;case"int":for(var r=this.veb;this.veb<r+e;)i.push(this.readVarInt())}return i},t.prototype.yeb=function(t){for(var e=0,i=0;i<t;i++)e=(e<<8)+this.ueb[this.veb+i],this.veb++;return e},t.prototype.readNum32=function(){var t=this.web.getFloat32(this.veb,!0);return this.veb+=4,t},t.prototype.readNum64=function(){return this.yeb(8)},t.prototype.readField=function(t){var e;switch(t){case 0:e=this.readVarInt();break;case 1:e=this.readNum64();break;case 2:e=this.readString();break;case 5:e=this.readNum32()}return e},t.prototype.readAll=function(){for(var t={};this.veb<this.ueb.length;){var e=this.readHeader(),i=void 0;if(this.xeb.hasOwnProperty(e.tag))if(i=this.xeb[e.tag],2===e.type&&i&&i.hasOwnProperty("packed")&&i.packed)t[i.name]=this.readPacked(i.type);else{var n=this.readField(e.type);"boolean"===i.type?n=!!n:"object"==typeof i.type&&(n=i.type[n]),t[i.name]=n}}if(t.length>0)for(var r in this.xeb.defaults)this.xeb.defaults.hasOwnProperty(r)&&void 0===t[r]&&(t[r]=this.xeb.defaults[r]);return t},t}();e.ProtoBuf=i},43948:function(t,e){var i,n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingType=e.VRState=e.VRContentType=void 0,function(t){t.Single="single",t.TAB="tab",t.SBS="sbs"}(i||(e.VRContentType=i={})),function(t){t.Ready="ready",t.Playing="playing",t.Error="error",t.Uninitialized="uninitialized"}(n||(e.VRState=n={})),function(t){t.None="none",t.EaseIn="ease-in",t.EaseOut="ease-out",t.EaseInOut="ease-in-out"}(r||(e.TransitionTimingType=r={}))},61535:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.InternalVRHandler=void 0;var n=i(5357),r=i(3973),o=i(25926),s=i(4224),a=i(45202),h=i(3714),u=i(44468),l=i(21513),c=i(19274),d=i(43948),p=i(33639),f=i(85361),b=function(){function t(e,i,u,b,y,g,v,m){var w=this;this.hK=null,this.iK=null,this.jK=null,this.kK=null,this.lK=d.VRState.Uninitialized,this.mK=null,this.nK=!1,this.oK=!1,this.pK=null,this.qK=null,this.rK=null,this.sK=!1,this.IK=function(){w.tK=!0},this.MK=function(t){if(w.lK!==d.VRState.Playing)return w.vK&&Boolean(w.AK.onRenderingSuspended)&&w.AK.onRenderingSuspended(),void(w.vK=!1);w.JK(),w.oK!==w.nK&&(w.xK.getEventFunction()(h.PlayerEvent.VRStereoChanged,{stereo:w.nK}),w.oK=w.nK);var e=w.qK.update(t),i=!w.sK||w.tK||0===t;i||e||0===t||w.uK?(w.wK&&Boolean(w.AK.onStartRendering)&&w.AK.onStartRendering(),!w.vK&&Boolean(w.AK.onRenderingResumed)&&w.AK.onRenderingResumed(),w.pK.drawScene(w.qK.getProjectionInverse(),i),w.wK=!1,w.vK=!0):(w.vK&&Boolean(w.AK.onRenderingSuspended)&&w.AK.onRenderingSuspended(),w.vK=!1),null===w.mK&&(w.jK=requestAnimationFrame(w.MK)),w.tK=!1,w.uK=!1},this.NK=function(){w.HK().removeEventListener(c.MediaElementEvent.playing,w.NK),w.HK().removeEventListener(c.MediaElementEvent.seeked,w.NK),w.lK===d.VRState.Ready&&(w.JK(),w.lK=d.VRState.Playing,w.jK=requestAnimationFrame(w.MK))},this.OK=function(t){w.lK=d.VRState.Error,w.mK=t,w.LK(),w.jK&&(cancelAnimationFrame(w.jK),w.jK=null),w.xK.getEventFunction()(h.PlayerEvent.Warning,new o.PlayerWarning(s.WarningCode.VR_RENDERING_ERROR))},this.enableGyroscope=function(){return w.qK.enableGyroscope(),!0},this.disableGyroscope=function(){return w.qK.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return w.qK.isGyroscopeEnabled()},this.enableMouseControl=function(){return w.qK.enableMouseControl(),!0},this.disableMouseControl=function(){return w.qK.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return w.qK.isMouseControlEnabled()},this.enableKeyboardControl=function(){return w.qK.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return w.qK.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return w.qK.isKeyboardControlEnabled()},this.setViewingDirection=function(t){return!!w.qK&&(w.qK.setViewingDirection(t),!0)},this.pause=function(){w.sK=!0},this.PK=function(){var t=w.HK();4!==t.readyState?t.addEventListener(c.MediaElementEvent.playing,function(){return w.sK=!1}):w.sK=!1},this.QK=function(){w.xK.off(h.PlayerEvent.Playing,w.PK),w.xK.off(h.PlayerEvent.Paused,w.pause),w.xK.off(h.PlayerEvent.Destroy,w.QK),w.xK.off(h.PlayerEvent.SourceUnloaded,w.QK),w.xK=null;var t=w.HK();w.EK&&w.EK.removeEventListener(c.MediaElementEvent.seeked,w.IK),w.LK(),w.hK&&w.hK.parentNode&&(w.hK.parentNode.removeChild(w.hK),w.hK=null),w.iK&&w.iK.parentNode&&(w.iK.parentNode.removeChild(w.iK),w.iK=null),w.kK&&w.kK.parentNode&&(w.kK.parentNode.removeChild(w.kK),w.kK=null),w.lK=d.VRState.Uninitialized,w.jK&&(cancelAnimationFrame(w.jK),w.jK=null),w.qK&&w.qK.destroy(),w.qK=null,w.pK.destroy(),w.pK=null,t.removeEventListener(c.MediaElementEvent.playing,w.NK),t.removeEventListener(c.MediaElementEvent.seeked,w.NK)},this.xK=e.eventHandler,this.EK=e.videoElement,this.FK=b,this.yK=e.parentHtmlElement,this.id=i,this.zK=u,this.AK=m,this.BK=y,this.CK=g,this.DK=e.sourceContext.technology.streaming,this.GK=v,this.tK=!1,this.uK=!1,this.vK=!1,this.wK=!0,this.hK=document.createElement("canvas"),this.hK.setAttribute("id","bitmovinplayer-vr-canvas"),this.hK.style.display="none",this.hK.style.position="absolute";var T=this.yK.getElementsByClassName(a.Environment.idPrefix+"poster")[0];T?this.yK.insertBefore(this.hK,T):this.yK.appendChild(this.hK);var E=e.sourceContext.technology.player;if(t.isVideoTextureSupported(g,this.DK,E)||(this.iK=document.createElement("canvas"),this.iK.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.iK.style.display="none",this.iK.style.position="absolute",this.yK.insertBefore(this.iK,this.hK)),(0,l.getCapabilities)().isSafariIOS&&(this.EK.setAttribute("playsinline",""),this.EK.setAttribute("webkit-playsinline","")),this.kK=document.getElementById("bitmovinplayer-no-select-style-node"),this.kK||(this.kK=document.createElement("style"),this.kK.setAttribute("id","bitmovinplayer-no-select-style-node"),this.kK.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.kK)),this.nK=this.zK.stereo,this.oK=this.nK,this.zK.restrictedInlinePlayback||this.EK.addEventListener(c.MediaElementEvent.seeked,this.IK),"string"==typeof this.zK.cardboard){var M=n.Cardboard.decode(this.zK.cardboard);M.hasOwnProperty("distortion_coefficients")&&(this.rK=new r.DeviceInfo(M,this.BK))}this.lK=d.VRState.Ready,this.qK=new p.OrientationHandler(this.hK,this.yK,this.zK,this.AK,this.xK),this.pK=new f.Renderer(this.hK,this.iK,e,this.rK,this.OK,this.BK,this.GK,this.zK,this.AK),this.xK.on(h.PlayerEvent.Playing,this.PK),this.xK.on(h.PlayerEvent.Paused,this.pause),this.xK.on(h.PlayerEvent.Destroy,this.QK),this.xK.on(h.PlayerEvent.SourceUnloaded,this.QK),this.KK(),this.JK();var O=this.HK();4!==O.readyState&&O.paused?(O.addEventListener(c.MediaElementEvent.playing,this.NK),O.addEventListener(c.MediaElementEvent.seeked,this.NK)):this.NK()}return t.prototype.HK=function(){return this.zK.restrictedInlinePlayback&&this.FK?this.FK:this.EK},t.prototype.JK=function(){if(this.hK){var t,e,i,n;this.yK&&this.yK.clientWidth&&this.yK.clientHeight?(t=this.yK.clientWidth,e=this.yK.clientHeight):(t=window.innerWidth,e=window.innerHeight),this.EK&&this.EK.videoWidth&&this.EK.videoHeight?(i=this.EK.videoWidth,n=this.EK.videoHeight):(i=t,n=e);var r=(this.CK.devicePixelRatio||1)/this.pK.getBackingStoreRatio(),o=t*r,s=e*r,a=o/s;o>i&&(s=(o=i)/a),s>n&&(o=(s=n)*a),this.hK.width===o&&this.hK.height===s||(this.hK.width=o,this.hK.height=s),!this.iK||this.iK.width===i&&this.iK.height===n||(this.iK.width=i,this.iK.height=n)}},t.prototype.KK=function(){this.hK&&(this.hK.style.display="block"),this.iK&&(this.iK.style.display="block"),this.EK&&(this.EK.style.display="none")},t.prototype.LK=function(){this.hK&&(this.hK.style.display="none"),this.iK&&(this.iK.style.display="none"),this.EK&&this.EK.style&&(this.EK.style.display="block")},t.isVideoTextureSupported=function(t,e,i){var n=t.appName,r=t.userAgent,o=t.appVersion,s=(0,l.getCapabilities)().safariVersion,a=(s.major>10||10===s.major&&s.minor>=1)&&!(0,l.getCapabilities)().isSafariIOS,h=-1;return!(e===u.StreamType.Hls&&i===u.PlayerType.Native&&!a)&&("Microsoft Internet Explorer"===n?null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1)):"Netscape"===n&&(-1!==o.indexOf("Trident")?h=11:null!==new RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1))),-1===h||h>=13)},t.prototype.setStereo=function(t){return this.uK=this.nK!==t,this.nK=t,this.nK?(this.pK.enableStereo(),this.qK.enableStereo()):(this.pK.disableStereo(),this.qK.disableStereo()),!0},t.prototype.getStereo=function(){return this.nK},t.prototype.getState=function(){return this.lK===d.VRState.Ready?d.VRState.Ready:this.lK===d.VRState.Playing?d.VRState.Playing:this.lK===d.VRState.Error?d.VRState.Error:this.lK===d.VRState.Uninitialized?null:void 0},t.prototype.getLastError=function(){return this.mK},t.prototype.getViewingDirection=function(){return this.qK?this.qK.getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.moveViewingDirection=function(t){return!!this.qK&&(this.qK.moveViewingDirection(t),!0)},t.prototype.setViewingDirectionChangeEventInterval=function(t){return!!this.qK&&(this.qK.setViewingDirectionChangeEventInterval(t),!0)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.qK?this.qK.getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){return!!this.qK&&(this.qK.setViewingDirectionChangeThreshold(t),!0)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.qK?this.qK.getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.qK&&(this.qK.setVerticalFieldOfView(t),!0)},t.prototype.getVerticalFieldOfView=function(){return this.qK?this.qK.getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.qK&&(this.qK.setHorizontalFieldOfView(t),!0)},t.prototype.getHorizontalFieldOfView=function(){return this.qK?this.qK.getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.qK&&this.qK.zoom(t)},t.prototype.getZoom=function(){return this.qK?this.qK.getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return null!==(e=null===(t=this.qK)||void 0===t?void 0:t.permissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return null!==(e=null===(t=this.qK)||void 0===t?void 0:t.requestPermission())&&void 0!==e?e:Promise.resolve()},t}();e.InternalVRHandler=b},6463:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRState=e.TransitionTimingType=e.VRContentType=e.VRModuleDefinition=void 0;var n=i(62756),r=i(43948);Object.defineProperty(e,"TransitionTimingType",{enumerable:!0,get:function(){return r.TransitionTimingType}}),Object.defineProperty(e,"VRContentType",{enumerable:!0,get:function(){return r.VRContentType}}),Object.defineProperty(e,"VRState",{enumerable:!0,get:function(){return r.VRState}});var o=i(24180);e.VRModuleDefinition={name:n.ModuleName.VR,module:{VRHandler:o.VRHandler},exports:{VRContentType:r.VRContentType,TransitionTimingType:r.TransitionTimingType,VRState:r.VRState}},e.default=e.VRModuleDefinition},85361:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=void 0;var n=i(44369),r=i(3714),o=i(44468),s=i(43948),a=i(54479),h=i(17378),u=function(){function t(){this.Y5=[],this.Z5=[]}return t.prototype.getVideoWidths=function(){return this.Y5},t.prototype.getVideoHeights=function(){return this.Z5},t.prototype.add=function(t,e){this.Y5.indexOf(t)<0&&(this.Y5.push(t),this.Y5.sort(function(t,e){return t-e})),this.Z5.indexOf(e)<0&&(this.Z5.push(e),this.Z5.sort(function(t,e){return t-e}))},t}(),l=function(){function t(t,e,i,n,o,s,l,c,d){var p=this;this.a5=null,this.b5=null,this.c5=a.GL_ERROR.NO_ERROR,this.e5=-1,this.f5=!1,this.g5=-1,this.h5=-1,this.i5=-1,this.j5=-1,this.k5=-1,this.l5=[-1,-1,1,-1,1,1,-1,1],this.m5=[0,1,2,0,2,3],this.n5=-1,this.o5=new RegExp("mediump","g"),this.p5=!0,this.q5=[0,0,0,0,0,0,0,0,0,0,0,0],this.r5={LEFT:0,RIGHT:1},this.s5=[0,0,0,0,0,0,0,0,0,0,0,0],this.t5=1,this.u5=[[1,1],[1,1]],this.v5=[1,1],this.A5=null,this.B5=null,this.C5=null,this.D5=null,this.E5=null,this.F5=null,this.G5=-1,this.H5=-1,this.I5=null,this.J5=!1,this.K5=null,c.stereo?(this.f5=!0,this.e5=2):(this.f5=!1,this.e5=1),this.z5=i.eventHandler,this.A5=s,this.B5=t,this.C5=e,this.D5=i.videoElement,this.E5=o,this.F5=i.sourceContext.technology.streaming,this.K5=l,this.L5=c,this.M5=d,this.d5=[],this.z5.on(r.PlayerEvent.TimeChanged,function(){return p.p5=!1}),n&&(this.s5=this.x6(n),this.t5=this.y6(n),this.u5[this.r5.LEFT]=this.A6(n,this.r5.LEFT),this.u5[this.r5.RIGHT]=this.A6(n,this.r5.RIGHT),this.v5=this.B6(n)),this.I5=new u,this.y5=new h.FrameRateMonitor(1500,1e3),this.L5.enableFrameRateMeasurements?(this.y5.enable(),this.y5.subscribe(this)):this.y5.disable();try{this.n6(),this.m6(),this.o6(),this.p6(),this.q6(),this.r6(),this.s6(),this.t6()}catch(t){}}return t.prototype.j6=function(t){if(void 0===t&&(t=[]),null!==this.a5){var e=this.a5.getError();if(e===a.GL_ERROR.NO_ERROR)return this.c5=a.GL_ERROR.NO_ERROR,void(this.d5=[]);if(this.d5.push(e),t.indexOf(e)>-1&&this.p5)throw this.c5=a.GL_ERROR.NO_ERROR,this.d5=[],"STARTUP ERROR";if(!(this.d5.length>=this.K5.MAX_CONSECUTIVE_VR_ERRORS))return;this.c5=this.d5[this.d5.length-1]}var i="Unable to initialize WebGL";throw a.GL_ERROR_STR[this.c5]&&(i=a.GL_ERROR_STR[this.c5]),this.E5(i),i},t.prototype.k6=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=null;if(t&&"function"==typeof t[e]){try{r=t[e].apply(t,i)}catch(t){}this.j6()}return r},t.prototype.l6=function(t){throw this.c5=a.GL_ERROR.OTHER_ERROR,this.E5(t),t},t.prototype.m6=function(){this.x5=i(70415),this.w5=i(17913);var t=this.k6(this.a5,"getShaderPrecisionFormat",this.a5.FRAGMENT_SHADER,this.a5.HIGH_FLOAT);0!==t.precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.x5=this.x5.replace(this.o5,"highp")),0!==(t=this.k6(this.a5,"getShaderPrecisionFormat",this.a5.VERTEX_SHADER,this.a5.HIGH_FLOAT)).precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.w5=this.w5.replace(this.o5,"highp"))},t.prototype.n6=function(){this.C5&&(this.b5=this.C5.getContext("2d"));var t={failIfMajorPerformanceCaveat:!0};this.a5=this.B5.getContext("webgl",t)||this.B5.getContext("experimental-webgl",t),this.j6(),this.k6(this.a5,"clearColor",.5,.5,.5,1),this.k6(this.a5,"clearDepth",1),this.k6(this.a5,"disable",this.a5.DEPTH_TEST)},t.prototype.o6=function(){this.g5=this.k6(this.a5,"createShader",this.a5.VERTEX_SHADER),this.k6(this.a5,"shaderSource",this.g5,this.w5),this.k6(this.a5,"compileShader",this.g5),this.k6(this.a5,"getShaderParameter",this.g5,this.a5.COMPILE_STATUS)||this.l6("Vertex shader compilation failed ("+this.k6(this.a5,"getShaderInfoLog",this.g5)+")"),this.h5=this.k6(this.a5,"createShader",this.a5.FRAGMENT_SHADER),this.k6(this.a5,"shaderSource",this.h5,this.x5),this.k6(this.a5,"compileShader",this.h5),this.k6(this.a5,"getShaderParameter",this.h5,this.a5.COMPILE_STATUS)||this.l6("Fragment shader compilation failed ("+this.k6(this.a5,"getShaderInfoLog",this.h5)+")")},t.prototype.p6=function(){this.i5=this.k6(this.a5,"createProgram"),this.k6(this.a5,"attachShader",this.i5,this.g5),this.k6(this.a5,"attachShader",this.i5,this.h5),this.k6(this.a5,"linkProgram",this.i5),this.k6(this.a5,"getProgramParameter",this.i5,this.a5.LINK_STATUS)||this.l6("Unable to link program: "+this.k6(this.a5,"getProgramInfoLog",this.i5)),this.k6(this.a5,"useProgram",this.i5)},t.prototype.q6=function(){this.N5=new a.GLAttribute(this.a5,this.i5,"vertexPosition",null)},t.prototype.r6=function(){this.O5=new a.GLUniform(this.a5,this.i5,"eyeSelector",a.GLVariableType.UNIFORM_1I),this.P5=new a.GLUniform(this.a5,this.i5,"textureUnit",a.GLVariableType.UNIFORM_1I),this.R5=new a.GLUniform(this.a5,this.i5,"contentType",a.GLVariableType.UNIFORM_1I),this.S5=new a.GLUniform(this.a5,this.i5,"contentFieldOfView",a.GLVariableType.UNIFORM_1F),this.T5=new a.GLUniform(this.a5,this.i5,"videoWidth",a.GLVariableType.UNIFORM_1F),this.U5=new a.GLUniform(this.a5,this.i5,"videoHeight",a.GLVariableType.UNIFORM_1F),this.Q5=new a.GLUniform(this.a5,this.i5,"projectionInverse",a.GLVariableType.UNIFORM_MATRIX_4FV),this.V5=new a.GLUniform(this.a5,this.i5,"distortionCoefficients",a.GLVariableType.UNIFORM_1FV),this.W5=new a.GLUniform(this.a5,this.i5,"distortionMaxFovSquared",a.GLVariableType.UNIFORM_1F),this.X5=new a.GLUniform(this.a5,this.i5,"distortionFovOffset",a.GLVariableType.UNIFORM_2FV),this.i6=new a.GLUniform(this.a5,this.i5,"distortionFovScale",a.GLVariableType.UNIFORM_2FV)},t.prototype.s6=function(){this.j5=this.k6(this.a5,"createBuffer"),this.k6(this.a5,"bindBuffer",this.a5.ARRAY_BUFFER,this.j5),this.k6(this.a5,"bufferData",this.a5.ARRAY_BUFFER,new Float32Array(this.l5),this.a5.STATIC_DRAW),this.k5=this.k6(this.a5,"createBuffer"),this.k6(this.a5,"bindBuffer",this.a5.ELEMENT_ARRAY_BUFFER,this.k5),this.k6(this.a5,"bufferData",this.a5.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.m5),this.a5.STATIC_DRAW)},t.prototype.t6=function(){this.n5=this.k6(this.a5,"createTexture"),this.k6(this.a5,"bindTexture",this.a5.TEXTURE_2D,this.n5),this.k6(this.a5,"texParameteri",this.a5.TEXTURE_2D,this.a5.TEXTURE_MAG_FILTER,this.a5.LINEAR),this.k6(this.a5,"texParameteri",this.a5.TEXTURE_2D,this.a5.TEXTURE_MIN_FILTER,this.a5.LINEAR),this.k6(this.a5,"texParameteri",this.a5.TEXTURE_2D,this.a5.TEXTURE_WRAP_S,this.a5.CLAMP_TO_EDGE),this.k6(this.a5,"texParameteri",this.a5.TEXTURE_2D,this.a5.TEXTURE_WRAP_T,this.a5.CLAMP_TO_EDGE)},t.prototype.u6=function(t,e){var i,n,r=this.k6(this.b5,"getImageData",0,0,t,e);if(r){for(var o=this.I5.getVideoWidths(),s=this.I5.getVideoHeights(),a=0;a<o.length&&r.data[4*(o[a]-1)+3]>0;a++)i=Math.min(o[a],t);for(var h=0;h<s.length&&r.data[(s[h]-1)*this.D5.videoWidth*4+3]>0;h++)n=Math.min(s[h],e);i&&n&&(i!==t||n!==e)?this.k6(this.b5,"drawImage",this.C5,0,0,i,n,0,0,this.C5.width,this.C5.height):this.J5=!1}else this.J5=!1},t.prototype.v6=function(){if(!this.c5||this.c5===a.GL_ERROR.NO_ERROR){var t=this.D5.videoWidth,e=this.D5.videoHeight;if(this.C5&&this.b5){var i=0;this.F5!==o.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(i=.0555555*e);var n=e-2*i;this.k6(this.b5,"drawImage",this.D5.getWrappedElement(),0,i,t,n,0,0,this.C5.width,this.C5.height),this.I5.add(t,e);var r=this.G5!==t,s=this.H5!==e;!r&&!s||/Trident/.test(navigator.userAgent)||(this.J5=!0),this.J5&&this.u6(t,e),this.G5=t,this.H5=e}this.k6(this.a5,"activeTexture",this.a5.TEXTURE0),this.k6(this.a5,"bindTexture",this.a5.TEXTURE_2D,this.n5);try{var h=null!==this.M5.requestFakeInput?this.M5.requestFakeInput():null;null!==h?this.k6(this.a5,"texImage2D",this.a5.TEXTURE_2D,0,this.a5.RGB,this.a5.RGB,this.a5.UNSIGNED_BYTE,h):this.C5?this.k6(this.a5,"texImage2D",this.a5.TEXTURE_2D,0,this.a5.RGB,this.a5.RGB,this.a5.UNSIGNED_BYTE,this.C5):this.k6(this.a5,"texImage2D",this.a5.TEXTURE_2D,0,this.a5.RGB,this.a5.RGB,this.a5.UNSIGNED_BYTE,this.D5.getWrappedElement())}catch(t){this.l6(t.message)}}},t.prototype.onFrameRateAvailable=function(t,e,i){},t.prototype.w6=function(t,e){if(!this.c5||this.c5===a.GL_ERROR.NO_ERROR){switch(this.k6(this.a5,"useProgram",this.i5),this.k6(this.a5,"bindBuffer",this.a5.ARRAY_BUFFER,this.j5),this.k6(this.a5,"vertexAttribPointer",this.N5.loc,2,this.a5.FLOAT,!1,0,0),this.k6(this.a5,"activeTexture",this.a5.TEXTURE0),this.k6(this.a5,"bindTexture",this.a5.TEXTURE_2D,this.n5),this.O5.setValue(t),this.P5.setValue(0),this.S5.setValue(this.L5.contentFieldOfView),isFinite(this.D5.videoWidth)&&this.D5.videoWidth>0&&isFinite(this.D5.videoHeight)&&this.D5.videoHeight>0?(this.T5.setValue(this.D5.videoWidth),this.U5.setValue(this.D5.videoHeight)):(this.T5.setValue(4096),this.U5.setValue(2048)),this.L5.contentType){case s.VRContentType.Single:this.R5.setValue(0);break;case s.VRContentType.SBS:this.R5.setValue(1);break;case s.VRContentType.TAB:this.R5.setValue(2);break;default:this.l6("Invalid content type specified ("+this.L5.contentType+")")}this.V5.setValue(this.s5),this.W5.setValue(this.t5),this.X5.setValue(this.u5[t]),this.i6.setValue(this.v5),this.Q5.setValue(e),this.k6(this.a5,"viewport",this.B5.width/2*t,0,this.B5.width/this.e5,this.B5.height),this.k6(this.a5,"bindBuffer",this.a5.ELEMENT_ARRAY_BUFFER,this.k5),this.k6(this.a5,"drawElements",this.a5.TRIANGLES,6,this.a5.UNSIGNED_SHORT,0)}},t.prototype.x6=function(t){return t?t.viewer.inverseCoefficients:this.q5},t.prototype.y6=function(t){var e=this.z6(t),i=n.MathUtil.hypot(Math.tan(n.MathUtil.degToRad(Math.max(e.leftDegrees,e.rightDegrees))),Math.tan(n.MathUtil.degToRad(Math.max(e.downDegrees,e.upDegrees))));return i*i},t.prototype.z6=function(t,e){var i=e||this.r5.LEFT;return i===this.r5.LEFT?t.getFieldOfViewLeftEye(!0):i===this.r5.RIGHT?t.getFieldOfViewRightEye(!0):null},t.prototype.A6=function(t,e){var i=this.z6(t,e);return[Math.tan(n.MathUtil.degToRad(i.leftDegrees)),Math.tan(n.MathUtil.degToRad(i.downDegrees))]},t.prototype.B6=function(t){var e=this.z6(t);return[Math.tan(n.MathUtil.degToRad(e.leftDegrees))+Math.tan(n.MathUtil.degToRad(e.rightDegrees)),Math.tan(n.MathUtil.degToRad(e.upDegrees))+Math.tan(n.MathUtil.degToRad(e.downDegrees))]},t.prototype.getBackingStoreRatio=function(){var t=0;return this.c5===a.GL_ERROR.NO_ERROR&&(t=(t=(t=(t=(t=t||this.a5.webkitBackingStorePixelRatio)||this.a5.mozBackingStorePixelRatio)||this.a5.msBackingStorePixelRatio)||this.a5.oBackingStorePixelRatio)||this.a5.backingStorePixelRatio),t||1},t.prototype.enableStereo=function(){this.f5=!0,this.e5=2},t.prototype.disableStereo=function(){this.f5=!1,this.e5=1},t.prototype.drawScene=function(t,e){if((!this.c5||this.c5===a.GL_ERROR.NO_ERROR)&&this.a5&&this.D5.getWrappedElement()){this.y5.endAnimationFrame(),this.y5.startAnimationFrame(),this.y5.startDrawScene();try{this.y5.startUpdateTexture(),e&&this.v6(),this.y5.endUpdateTexture(),this.w6(this.r5.LEFT,t),this.f5&&this.w6(this.r5.RIGHT,t),null!==this.M5.onDrawScene&&this.M5.onDrawScene(this.a5),this.j6([a.GL_ERROR.INVALID_VALUE])}catch(t){}this.y5.endDrawScene()}},t.prototype.destroy=function(){this.y5.unsubscribe(this),this.y5.destroy(),this.y5=null,this.I5=null,this.a5=null,this.B5=null,this.b5=null,this.C5=null},t}();e.Renderer=l},24180:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRHandler=void 0;var n,r=i(61535),o=i(70372),s=function(){function t(t,e,i,s,a,h,u){var l=o.ConfigParser.parse(i),c=l[0],d=l[1],p=new r.InternalVRHandler(t,e,c,s,a,h,u,d);(n=n||new window.WeakMap).set(this,p)}return t.prototype.Nf=function(){return n.has(this)&&"error"!==n.get(this).getState()},t.prototype.setStereo=function(t){var e="boolean"==typeof t;return!(!this.Nf()||!e)&&n.get(this).setStereo(t)},t.prototype.enableGyroscope=function(){return!!this.Nf()&&n.get(this).enableGyroscope()},t.prototype.disableGyroscope=function(){return!!this.Nf()&&n.get(this).disableGyroscope()},t.prototype.isGyroscopeEnabled=function(){return!!this.Nf()&&n.get(this).isGyroscopeEnabled()},t.prototype.enableMouseControl=function(){return!!this.Nf()&&n.get(this).enableMouseControl()},t.prototype.disableMouseControl=function(){return!!this.Nf()&&n.get(this).disableMouseControl()},t.prototype.isMouseControlEnabled=function(){return!!this.Nf()&&n.get(this).isMouseControlEnabled()},t.prototype.enableKeyboardControl=function(){return!!this.Nf()&&n.get(this).enableKeyboardControl()},t.prototype.disableKeyboardControl=function(){return!!this.Nf()&&n.get(this).disableKeyboardControl()},t.prototype.isKeyboardControlEnabled=function(){return!!this.Nf()&&n.get(this).isKeyboardControlEnabled()},t.prototype.getStereo=function(){return!!this.Nf()&&n.get(this).getStereo()},t.prototype.getState=function(){return n.has(this)?n.get(this).getState():null},t.prototype.getLastError=function(){return n.has(this)?n.get(this).getLastError():null},t.prototype.getViewingDirection=function(){return this.Nf()?n.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.setViewingDirection=function(t){var e=t&&isFinite(t.yaw)&&isFinite(t.pitch)&&isFinite(t.roll);return!(!this.Nf()||!e)&&n.get(this).setViewingDirection(t)},t.prototype.moveViewingDirection=function(t){var e=isFinite(t.x)&&isFinite(t.y)&&isFinite(t.phi);return!(!this.Nf()||!e)&&n.get(this).moveViewingDirection(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){var e=isFinite(t);return!(!this.Nf()||!e)&&n.get(this).setViewingDirectionChangeEventInterval(t)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.Nf()?n.get(this).getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){var e=isFinite(t);return!(!this.Nf()||!e)&&n.get(this).setViewingDirectionChangeThreshold(t)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.Nf()?n.get(this).getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.Nf()&&n.get(this).setVerticalFieldOfView(t)},t.prototype.getVerticalFieldOfView=function(){return this.Nf()?n.get(this).getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.Nf()&&n.get(this).setHorizontalFieldOfView(t)},t.prototype.getHorizontalFieldOfView=function(){return this.Nf()?n.get(this).getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.Nf()&&n.get(this).zoom(t)},t.prototype.getZoom=function(){return this.Nf()?n.get(this).getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return this.Nf()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.deviceOrientationPermissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return this.Nf()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.requestDeviceOrientationPermission())&&void 0!==e?e:Promise.resolve()},t}();e.VRHandler=s},45698:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.ApiControl=void 0;var r=i(37485),o=function(t){function e(e,i,n){var o=t.call(this,e,i)||this;return o.setViewingDirectionChangeEventInterval(n),o.Kfb=new r.DisplacementVector,o.Lfb=new r.DisplacementVector,o.Nfb=0,o}return n(e,t),e.prototype.getDisplacementVector=function(t){return this.Nfb+=t,this.Nfb>this.Mfb?this.Lfb.update(0,0,0,!1,t):(r.DisplacementVector.clone(this.Kfb,this.Lfb),this.Lfb.length=this.Kfb.length*t,this.Lfb.phi=this.Kfb.phi*t,this.Lfb.update(this.Lfb.x,this.Lfb.y,this.Lfb.phi,!0,t)),this.Lfb},e.prototype.setTargetVector=function(t){this.Kfb.fromVec3(t,!0),this.Nfb=0},e.prototype.setViewingDirectionChangeEventInterval=function(t){this.Mfb=t},e.prototype.dispose=function(){this.disable()},e}(i(67982).Control);e.ApiControl=o},67982:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Control=void 0;var i=function(){function t(t,e){this.config=t,this.debugHooks=e}return t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t}();e.Control=i},22185:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardControl=void 0;var r=i(37485),o=i(67982),s=function(){function t(t){this.setKeyCombinations(t),this.Pfb=!1}return t.prototype.checkAndSetActiveState=function(t){return this.Ofb.some(function(e){return!e.some(function(e){return t.indexOf(e)<0})})?(this.Pfb=!0,!0):(this.Pfb=!1,!1)},t.prototype.isActive=function(){return this.Pfb},t.prototype.setKeyCombinations=function(t){for(var e=[],i=0,n=t;i<n.length;i++){var r=n[i].split(" ").filter(function(t){return t.length>0});r.length>0&&e.push(r)}this.Ofb=e},t}(),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.jgb=function(t){if(t&&"string"==typeof t.key){var e=t.key.replace(" ","Space"),i=n.hgb.indexOf(e);i>=0&&"keyup"===t.type?n.hgb.splice(i,1):i<0&&"keydown"===t.type&&n.hgb.push(e),n.Rfb.checkAndSetActiveState(n.hgb),n.Sfb.checkAndSetActiveState(n.hgb),n.Tfb.checkAndSetActiveState(n.hgb),n.egb.checkAndSetActiveState(n.hgb),n.fgb.checkAndSetActiveState(n.hgb),n.ggb.checkAndSetActiveState(n.hgb)}},n.Qfb=n.config.maxDisplacementSpeed,n.Rfb=new s(["w"]),n.Sfb=new s(["s"]),n.Tfb=new s(["a"]),n.egb=new s(["d"]),n.fgb=new s(["e"]),n.ggb=new s(["q"]),n.hgb=[],n.igb=new r.DisplacementVector,n.applyKeyMap(n.config.keyMap),n.enable(),n}return n(e,t),e.prototype.getDisplacementVector=function(t){if(this.enabled){var e=0,i=0,n=0;this.debugHooks.requestKeyActiveState?(i+=this.debugHooks.requestKeyActiveState("up")?this.Qfb*t:0,i-=this.debugHooks.requestKeyActiveState("down")?this.Qfb*t:0,e+=this.debugHooks.requestKeyActiveState("left")?this.Qfb*t:0,e-=this.debugHooks.requestKeyActiveState("right")?this.Qfb*t:0,n-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.Qfb*t:0,n+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.Qfb*t:0):(i+=this.Rfb.isActive()?this.Qfb*t:0,i-=this.Sfb.isActive()?this.Qfb*t:0,e+=this.Tfb.isActive()?this.Qfb*t:0,e-=this.egb.isActive()?this.Qfb*t:0,n-=this.fgb.isActive()?this.Qfb*t:0,n+=this.ggb.isActive()?this.Qfb*t:0);var r=0!==e||0!==i||0!==n;this.igb.update(e,i,n,r,t)}else this.igb.update(0,0,0,!1,t);return this.igb},e.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.jgb,!1),document.addEventListener("keyup",this.jgb,!1)},e.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.jgb,!1),document.removeEventListener("keyup",this.jgb,!1)},e.prototype.dispose=function(){this.disable()},e.prototype.applyKeyMap=function(t){t.hasOwnProperty("up")&&this.Rfb.setKeyCombinations(t.up),t.hasOwnProperty("down")&&this.Sfb.setKeyCombinations(t.down),t.hasOwnProperty("left")&&this.Tfb.setKeyCombinations(t.left),t.hasOwnProperty("right")&&this.egb.setKeyCombinations(t.right),t.hasOwnProperty("rotateClockwise")&&this.fgb.setKeyCombinations(t.rotateClockwise),t.hasOwnProperty("rotateCounterclockwise")&&this.ggb.setKeyCombinations(t.rotateCounterclockwise)},e}(o.Control);e.KeyboardControl=a},64419:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.MouseControl=void 0;var r=i(37485),o=i(51629),s=function(t){function e(i,n,s,a,h){void 0===h&&(h=90);var u=t.call(this,i,n)||this;return u.tgb=function(t){var i=e.getTouchPosition(t),n=0,r=0;u.mgb&&(n=i.x-u.pgb.x,r=i.y-u.pgb.y,u.qgb.x+=n,u.qgb.y+=r,u.pgb=i),Math.abs(n)+Math.abs(r)>0&&(u.ogb=!0),t.preventDefault()},u.ugb=function(t){t.stopPropagation(),t.preventDefault(),o.ElementHelper.removeEventListener(document,["click"],u.ugb,!0)},u.vgb=function(t){o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,u.tgb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,u.vgb,!1),o.ElementHelper.removeEventListener(u.kgb,o.ElementHelper.touchEvents.up,u.vgb,!1),o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),u.pgb=null,u.mgb=!1,u.ogb&&u.ngb&&t.target===u.ngb&&o.ElementHelper.addEventListener(document,["click"],u.ugb,!0),u.ogb=!1,u.ngb=null},u.wgb=function(t){u.pgb=e.getTouchPosition(t),u.qgb={x:0,y:0},u.mgb=!0,u.ogb=!1,u.ngb=t.target,o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.move,u.tgb,!1),o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.up,u.vgb,!1),o.ElementHelper.addEventListener(u.kgb,o.ElementHelper.touchEvents.up,u.vgb,!1),o.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},u.kgb=s,u.lgb=a,u.mgb=!1,u.pgb=null,u.qgb={x:0,y:0},u.rgb=h,u.sgb=new r.DisplacementVector,u.enable(),u}return n(e,t),e.prototype.getDisplacementVector=function(t){var e=this.lgb.clientWidth,i=this.lgb.clientHeight,n=Boolean(this.debugHooks.requestTraveledMouseDistance),r=this.rgb*(i/e);if(this.qgb=n?this.debugHooks.requestTraveledMouseDistance(t):this.qgb,this.enabled&&isFinite(r)&&r>0){var o=this.mgb||0!==this.qgb.x||0!==this.qgb.y;this.sgb.update(this.qgb.x/this.lgb.clientWidth*this.rgb,this.qgb.y/this.lgb.clientHeight*r,0,o,t),this.qgb={x:0,y:0}}else this.sgb.update(0,0,0,this.mgb,t);return this.sgb},e.prototype.enable=function(){this.enabled=!0,o.ElementHelper.addEventListener(this.kgb,o.ElementHelper.touchEvents.down,this.wgb,!1)},e.prototype.disable=function(){this.enabled=!1,o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,this.tgb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,this.vgb,!1),o.ElementHelper.removeEventListener(this.kgb,o.ElementHelper.touchEvents.up,this.vgb,!1),o.ElementHelper.removeEventListener(this.kgb,o.ElementHelper.touchEvents.down,this.wgb,!1),o.ElementHelper.removeEventListener(document,["click"],this.ugb,!0),this.pgb=null,this.mgb=!1,this.ogb=!1,this.ngb=null,o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},e.prototype.dispose=function(){this.disable(),this.kgb=null,this.lgb=null},e.getTouchPosition=function(t){var e={x:0,y:0};return"ms"===o.ElementHelper.touchEvents.type?(e.x=t.clientX||t.originalEvent.layerX,e.y=t.clientY||t.originalEvent.layerY):"mobile"===o.ElementHelper.touchEvents.type?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY):(e.x=t.clientX,e.y=t.clientY),e.x=e.x||0,e.y=e.y||0,e},e}(i(67982).Control);e.MouseControl=s},54479:function(t,e){var i,n,r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.GLUniform=e.GLAttribute=e.GLVariableType=e.GL_ERROR_STR=e.GL_ERROR=void 0,function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.OTHER_ERROR=1]="OTHER_ERROR",t[t.INVALID_ENUM=1280]="INVALID_ENUM",t[t.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",t[t.INVALID_OPERATION=1282]="INVALID_OPERATION",t[t.INVALID_VALUE=1281]="INVALID_VALUE"}(i||(e.GL_ERROR=i={})),e.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},function(t){t.UNIFORM_1I="uniform1i",t.UNIFORM_1F="uniform1f",t.UNIFORM_MATRIX_4FV="uniformMatrix4fv",t.UNIFORM_1FV="uniform1fv",t.UNIFORM_2FV="uniform2fv"}(n||(e.GLVariableType=n={}));var o=function(){function t(t,e,i,n){this.context=t,this.program=e,this.name=i,this.type=n}return Object.defineProperty(t.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),t}(),s=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getAttribLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){},e}(o);e.GLAttribute=s;var a=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getUniformLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,t):this.context[this.type].call(this.context,this.location,t)},e}(o);e.GLUniform=a},55443:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDeviceOrientationProvider=void 0;var r,o=i(44369),s=i(16404);!function(t){t.Granted="granted",t.Denied="denied"}(r||(r={}));var a=function(t){function e(){var i=t.call(this)||this;i.Uib=null,i.Vib=null,i.Wib=null,i.Xib=0,i.Yib=0,i.bib=function(t){var e=void 0!==t.alpha&&null!==t.alpha,n=void 0!==t.beta&&null!==t.beta,r=void 0!==t.gamma&&null!==t.gamma;e&&n&&r&&(i.Uib=t.alpha,i.Vib=t.gamma,i.Wib=t.beta),t.hasOwnProperty("screenOrientation")&&(i.Xib=i.aib(t))},i.cib=function(){i.bib(e.getDeviceOrientationFromWindow())},i.dib=function(t){t&&t.data&&i.bib(t.data)},window.top!==window?window.addEventListener("message",i.dib,!1):window.addEventListener("deviceorientation",i.bib);try{window.addEventListener("orientationchange",i.cib);var n=e.getDeviceOrientationFromWindow();i.bib(n)}catch(t){window.removeEventListener("orientationchange",i.cib)}return i.enable(),i}return n(e,t),e.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var t=o.MathUtil.degToRad(this.Uib)/2,e=o.MathUtil.degToRad(this.Wib)/2,i=o.MathUtil.degToRad(this.Vib)/2,n=Math.cos(e),r=Math.cos(i),s=Math.cos(t),a=Math.sin(e),h=Math.sin(i),u=Math.sin(t),l=n*r*s-a*h*u,c=a*r*s-n*h*u,d=n*h*s+a*r*u,p=n*r*u+a*h*s,f=o.Quat.fromValues(c,d,p,l),b=o.MathUtil.degToRad(this.Zib())/2,y=o.Quat.fromValues(0,0,-Math.sin(b),Math.cos(b)),g=o.Quat.create();o.Quat.multiply(g,f,y);var v=Math.sqrt(.5);return o.Quat.multiply(g,o.Quat.fromValues(-v,0,0,v),g),o.Quat.toAngle(g)},e.prototype.orientationDataAvailable=function(){return null!==this.Uib},e.supported=function(){return!!window.DeviceOrientationEvent},e.prototype.Zib=function(){return this.Xib},e.prototype.aib=function(t){var e;switch(t.screenOrientation.type){case"landscape-primary":e=90;break;case"landscape-secondary":e=-90;break;case"portrait-secondary":e=180;break;case"portrait-primary":e=0}return!e&&isNaN(e)&&(e=isNaN(t.screenOrientation.type)?t.orientation||0:t.screenOrientation.type),window.top!==window&&e===this.Yib&&t.orientation!==e&&(e=t.orientation||0),e},e.getDeviceOrientationFromWindow=function(){var t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation||{};return{screenOrientation:{type:e.type||e,angle:e.angle},orientation:window.orientation}},e.prototype.permissionRequired=function(){return"undefined"!=typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},e.prototype.requestPermission=function(){return"undefined"==typeof DeviceMotionEvent||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(t){return t===r.Granted?Promise.resolve():Promise.reject()})},e}(s.DeviceOrientationProvider);e.DefaultDeviceOrientationProvider=a},16404:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProvider=void 0;var i=function(){function t(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return t.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},t.supported=function(){return!1},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t.prototype.permissionRequired=function(){return!1},t.prototype.requestPermission=function(){return Promise.resolve()},t}();e.DeviceOrientationProvider=i},59324:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProviderFactory=void 0;var n=i(55443),r=i(11805),o=i(72458),s=function(){function t(){}return t.get=function(){return o.WebVRDeviceOrientationProvider.supported()?new o.WebVRDeviceOrientationProvider:n.DefaultDeviceOrientationProvider.supported()?new n.DefaultDeviceOrientationProvider:new r.NoDeviceOrientationProvider},t}();e.DeviceOrientationProviderFactory=s},37485:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DisplacementVector=void 0;var n=i(23068),r=Math.PI/180,o=180/Math.PI,s=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.Feb=null,this.update(t,e,i,n)}return Object.defineProperty(t.prototype,"x",{get:function(){return this.zeb},set:function(t){this.zeb!==t&&this.update(t,this.Aeb,this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.Aeb},set:function(t){this.Aeb!==t&&this.update(this.zeb,t,this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"phi",{get:function(){return this.Beb},set:function(t){this.Beb!==t&&this.update(this.zeb,this.Aeb,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.Deb},set:function(t){this.Deb!==t&&this.update(this.Ceb*Math.cos(t*r),this.Ceb*Math.sin(t*r),this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.Ceb},set:function(t){this.Ceb!==t&&this.update(t*Math.cos(this.Deb*r),t*Math.sin(this.Deb*r),this.Beb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this.Eeb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaTime",{get:function(){return this.Feb||0},set:function(t){this.Feb=t},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e,i,r,s){if(void 0===i&&(i=0),"boolean"==typeof r&&(this.Eeb=r),(0,n.isNumber)(s)&&(this.Feb=s),this.zeb!==t||this.Aeb!==e||this.Beb!==i){if(this.zeb=Math.abs(t)<1e-4?0:t,this.Aeb=Math.abs(e)<1e-4?0:e,this.Beb=Math.abs(i)<1e-4?0:i,0===this.zeb&&0===this.Aeb&&0===this.Beb)return this.Ceb=0,void(this.Deb=0);this.Ceb=Math.sqrt(this.zeb*this.zeb+this.Aeb*this.Aeb),0===this.Aeb&&this.zeb>=0?this.Deb=0:0===this.zeb&&this.Aeb>0?this.Deb=90:0===this.zeb&&this.Aeb<0?this.Deb=270:this.zeb<0&&0===this.Aeb?this.Deb=180:this.zeb>0&&this.Aeb>0?this.Deb=Math.atan(this.Aeb/this.zeb)*o:this.zeb<0&&this.Aeb>0||this.zeb<0&&this.Aeb<0?this.Deb=180+Math.atan(this.Aeb/this.zeb)*o:this.zeb>0&&this.Aeb<0?this.Deb=360+Math.atan(this.Aeb/this.zeb)*o:this.Deb=0}},t.prototype.fromVec3=function(t,e,i){this.update(t.x,t.y,t.phi,e,i)},t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=this.zeb,n=this.Aeb,r=this.Beb,o=0,s=t;o<s.length;o++){var a=s[o];i+=a.zeb,n+=a.Aeb,r+=a.Beb}this.update(i,n,r)},t.prototype.diff=function(e,i){i instanceof t?this.update(i.x-e.x,i.y-e.y,i.phi-e.phi):this.update(e.x-this.zeb,e.y-this.Aeb,e.phi-this.Beb)},t.clone=function(e,i){e instanceof t&&i instanceof t&&i.update(e.zeb,e.Aeb,e.Beb,e.Eeb,e.Feb)},t.prototype.scale=function(t){this.length=this.Ceb*t},t}();e.DisplacementVector=s},11805:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoDeviceOrientationProvider=void 0;var r=function(t){function e(){var e=t.call(this)||this;return e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){return this.defaultDeviceOrientation},e.prototype.orientationDataAvailable=function(){return!0},e.supported=function(){return!0},e}(i(16404).DeviceOrientationProvider);e.NoDeviceOrientationProvider=r},33639:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.OrientationHandler=void 0;var n,r=i(44369),o=i(3714),s=i(45698),a=i(22185),h=i(64419),u=i(76320),l=i(59324),c=i(37485);!function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.BOTH="BOTH"}(n||(n={}));var d=function(){function t(t,e,i,o,d){var p=this;this.M6=null,this.N6=null,this.O6=1,this.P6=null,this.Q6=null,this.R6=null,this.S6=null,this.T6=null,this.U6=null,this.V6=null,this.enableGyroscope=function(){p.L6.enable()},this.disableGyroscope=function(){p.L6.disable()},this.isGyroscopeEnabled=function(){return p.L6.isEnabled()},this.enableMouseControl=function(){p.Z6.enable()},this.disableMouseControl=function(){p.Z6.disable()},this.isMouseControlEnabled=function(){return p.Z6.isEnabled()},this.enableKeyboardControl=function(){p.Y6.enable()},this.disableKeyboardControl=function(){p.Y6.disable()},this.isKeyboardControlEnabled=function(){return p.Y6.isEnabled()},this.W6=t,this.X6=i,this.B7=d,this.L6=l.DeviceOrientationProviderFactory.get(),this.S6=r.Mat4.create(),this.T6=r.Mat4.create(),this.U6=r.Mat4.create(),this.P6=r.Mat4.create(),this.M6=r.Mat4.create(),this.O6=this.X6.stereo?2:1,this.R6={yaw:0,pitch:0,roll:0},this.R6.yaw=this.X6.startPosition,this.e6=new c.DisplacementVector,this.f6=new c.DisplacementVector,this.Q6={yaw:this.R6.yaw,pitch:0,roll:0},this.g6=this.X6.viewingDirectionChangeEventInterval,this.h6=this.X6.viewingDirectionChangeThreshold,this.w7=this.X6.verticalFieldOfView,this.x7=this.X6.horizontalFieldOfView,this.y7=this.w7>-1,this.z7=this.x7>-1,this.A7=1,this.s7=0,this.t7=!1,this.Y6=new a.KeyboardControl(this.X6.keyboardControl,o),this.Z6=new h.MouseControl(this.X6.mouseControl,o,e,this.W6),this.a6=new s.ApiControl(this.X6.apiControl,o,this.g6),this.c6=u.TransitionTimingFactory.get(this.X6.keyboardControl),this.b6=u.TransitionTimingFactory.get(this.X6.mouseControl),this.d6=u.TransitionTimingFactory.get(this.X6.apiControl),this.w7>-1&&this.x7>-1?this.v7=n.BOTH:this.x7>-1?this.v7=n.HORIZONTAL:this.v7=n.VERTICAL}return t.clampValue=function(t,e,i){return 0===e&&360===i?t%360:t>i?i:t<e?e:t},t.clampToWindow=function(e,i){var n={yaw:0,pitch:0,roll:e.roll};return n.yaw=t.clampValue(e.yaw,i.minYaw,i.maxYaw),n.pitch=t.clampValue(e.pitch,i.minPitch,i.maxPitch),n},t.prototype.C7=function(e){void 0===e&&(e={yaw:0,pitch:0,roll:0}),null!==this.V6&&(this.V6=t.clampToWindow(this.V6,this.X6.viewingWindow),this.R6.yaw=this.V6.yaw-e.yaw,this.R6.pitch=this.V6.pitch-e.pitch,this.R6.roll=this.V6.roll-e.roll,this.b6.reset(),this.c6.reset(),this.d6.reset()),this.V6=null,this.Q6.yaw=this.R6.yaw+e.yaw,this.Q6.pitch=this.R6.pitch+e.pitch,this.Q6.roll=this.R6.roll+e.roll,this.Q6=t.clampToWindow(this.Q6,this.X6.viewingWindow),r.Mat4.identity(this.P6),r.Mat4.rotate(this.P6,r.MathUtil.degToRad(this.Q6.yaw+180),[0,1,0]),r.Mat4.rotate(this.P6,r.MathUtil.degToRad(this.Q6.pitch),[1,0,0]),r.Mat4.rotate(this.P6,r.MathUtil.degToRad(this.Q6.roll),[0,0,1])},t.prototype.getProjectionInverse=function(){return this.M6},t.prototype.getViewingDirection=function(){return this.Q6},t.prototype.setViewingDirection=function(t){this.V6=t},t.prototype.setVerticalFieldOfView=function(t){this.y7=-1!==t,this.w7=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.v7===n.BOTH?this.v7=n.HORIZONTAL:this.v7===n.HORIZONTAL&&(this.z7?this.v7=n.BOTH:this.v7=n.VERTICAL)},t.prototype.getVerticalFieldOfView=function(){return this.w7/this.A7},t.prototype.setHorizontalFieldOfView=function(t){this.z7=-1!==t,this.x7=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.v7===n.BOTH?this.v7=n.VERTICAL:this.v7===n.VERTICAL&&(this.y7?this.v7=n.BOTH:this.v7=n.HORIZONTAL)},t.prototype.getHorizontalFieldOfView=function(){return this.x7/this.A7},t.prototype.zoom=function(t){return!!isFinite(t)&&(this.A7=Math.max(Number(t),1e-10),!0)},t.prototype.getZoom=function(){return this.A7},t.prototype.D7=function(){var t,e,i=this.L6.getFieldOfViewParams(),o=[1];this.w7<0&&(this.w7=i.upDegrees+i.downDegrees),this.x7<0&&(this.x7=i.leftDegrees+i.rightDegrees),this.v7!==n.BOTH&&this.v7!==n.HORIZONTAL||o.push(180/(this.x7/this.A7)),this.v7!==n.BOTH&&this.v7!==n.VERTICAL||o.push(180/(this.w7/this.A7)),this.A7/=Math.min.apply(null,o);var s=r.MathUtil.degToRad(this.w7/this.A7),a=r.MathUtil.degToRad(this.x7/this.A7);this.v7===n.BOTH?(t=s,e=Math.tan(.5*a)/Math.tan(.5*s)):e=this.W6.width/this.O6/this.W6.height,this.v7===n.HORIZONTAL?(t=2*Math.atan(Math.tan(a/2)/e),this.w7=r.MathUtil.radToDeg(t)*this.A7):this.v7===n.VERTICAL&&(t=s,this.x7=r.MathUtil.radToDeg(2*Math.atan(e*Math.tan(s/2)))/this.O6*this.A7),r.Mat4.perspective(this.U6,t,e,.1,10),r.Mat4.invert(this.S6,this.U6),r.Mat4.multiply(this.M6,this.P6,this.S6)},t.prototype.update=function(e){this.N6=this.N6||e;for(var i=(e-this.N6)/1e3,n=r.Mat4.create(),s=0;s<this.M6.length;s++)n[s]=this.M6[s];this.s7+=i,this.e6.update(0,0,0),i>0&&this.e6.add(this.b6.apply(this.Z6.getDisplacementVector(i)),this.c6.apply(this.Y6.getDisplacementVector(i)),this.d6.apply(this.a6.getDisplacementVector(i))),this.R6.yaw+=this.e6.x,this.R6.pitch+=this.e6.y,this.R6.roll+=this.e6.phi,this.R6=t.clampToWindow(this.R6,this.X6.viewingWindow),this.N6=e,this.L6.orientationDataAvailable()?this.C7(this.L6.getOrientation()):this.C7(),this.f6.add(this.e6);var a=Math.abs(this.f6.length)>this.h6||Math.abs(this.f6.phi)>this.h6;a||this.t7||(this.s7=0);var h=this.s7>=this.g6;for(!a||!h&&this.t7?h&&this.t7&&(this.t7=!1,this.f6.update(0,0,0),this.s7=0,this.B7.getEventFunction()(o.PlayerEvent.VRViewingDirectionChanged,{direction:this.Q6})):(this.t7=!0,this.s7=0,this.f6.update(0,0,0),this.B7.getEventFunction()(o.PlayerEvent.VRViewingDirectionChange,{direction:this.Q6})),this.D7(),s=0;s<this.M6.length;s++)if(n[s]!==this.M6[s])return!0;return!1},t.prototype.enableStereo=function(){this.O6=2},t.prototype.disableStereo=function(){this.O6=1},t.prototype.moveViewingDirection=function(t){this.a6.setTargetVector(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){this.g6=t},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.g6},t.prototype.setViewingDirectionChangeThreshold=function(t){this.h6=t},t.prototype.getViewingDirectionChangeThreshold=function(){return this.h6},t.prototype.permissionRequired=function(){return this.L6.permissionRequired()},t.prototype.requestPermission=function(){return this.L6.requestPermission()},t.prototype.destroy=function(){this.Y6.dispose(),this.Z6.dispose(),this.Y6=null,this.Z6=null},t}();e.OrientationHandler=d},72458:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.WebVRDeviceOrientationProvider=void 0;var r=i(44369),o=function(t){function e(){var e=t.call(this)||this;return e.eib=null,e.fib=null,e.gib=function(t){var i;for(i=0;i<t.length;++i)if(t[i]instanceof HMDVRDevice){e.eib=t[i];break}if(e.eib)for(i=0;i<t.length;++i)if(t[i]instanceof PositionSensorVRDevice&&t[i].hardwareUnitId===e.eib.hardwareUnitId){e.fib=t[i];break}},navigator.getVRDevices&&navigator.getVRDevices().then(e.gib),e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var t=this.fib.getState(),e=new Float32Array([0,0,0,0]);return null!==t&&t.orientation&&(e=new Float32Array([t.orientation.x,t.orientation.y,t.orientation.z,t.orientation.w])),r.Quat.toAngle(e)}return this.defaultDeviceOrientation},e.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.eib.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},e.prototype.orientationDataAvailable=function(){return null!==this.fib&&null!==this.eib},e.supported=function(){return!!navigator.getVRDevices},e}(i(16404).DeviceOrientationProvider);e.WebVRDeviceOrientationProvider=o},81116:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInOutTransitionTiming=void 0;var r=i(44369),o=i(37485),s=function(t){function e(e){var i=t.call(this,e)||this;return i.currentDisplacementVector=new o.DisplacementVector,i.intermediateDisplacementVector=new o.DisplacementVector,i.targetDisplacementVector=new o.DisplacementVector,i.normalizedTargetDisplacementVector=new o.DisplacementVector,i.normalizedDisplacementVector=new o.DisplacementVector,i.maximumLinearAcceleration=0,i.maximumAngularAcceleration=0,i}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0;return t&&e},e.prototype.apply=function(t){if(this.targetDisplacementVector.deltaTime=t.deltaTime,o.DisplacementVector.clone(t,this.normalizedDisplacementVector),o.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),o.DisplacementVector.clone(t,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return o.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var e=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),i=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>e&&(this.intermediateDisplacementVector.length=e),Math.abs(this.intermediateDisplacementVector.phi)>i&&(this.intermediateDisplacementVector.phi=r.MathUtil.sign(this.intermediateDisplacementVector.phi)*i),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},e.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},e}(i(7192).TransitionTiming);e.EaseInOutTransitionTiming=s},68801:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&i},e}(i(81116).EaseInOutTransitionTiming);e.EaseInTransitionTiming=r},95746:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseOutTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&!i},e}(i(81116).EaseInOutTransitionTiming);e.EaseOutTransitionTiming=r},4551:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.apply=function(t){return t},e.prototype.reset=function(){},e}(i(7192).TransitionTiming);e.NoTransitionTiming=r},7192:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTiming=void 0;var i=function(){return function(t){this.config=t}}();e.TransitionTiming=i},76320:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingFactory=void 0;var n=i(43948),r=i(81116),o=i(68801),s=i(95746),a=i(4551),h=function(){function t(){}return t.get=function(t){switch(t.transitionTimingType){case n.TransitionTimingType.None:return new a.NoTransitionTiming(t);case n.TransitionTimingType.EaseIn:return new o.EaseInTransitionTiming(t);case n.TransitionTimingType.EaseOut:return new s.EaseOutTransitionTiming(t);case n.TransitionTimingType.EaseInOut:return new r.EaseInOutTransitionTiming(t)}},t}();e.TransitionTimingFactory=h},70372:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigParser=void 0;var n=i(43948),r={contentType:n.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:n.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}},o=function(){function t(){}return t.getObject=function(t,e){for(var i=e.split("."),n=!0,o=t,s=r,a=0,h=i;a<h.length;a++){var u=h[a];o.hasOwnProperty(u)&&n?o=o[u]:n=!1,s.hasOwnProperty(u)&&(s=s[u])}return[n,o,s]},t.getPrimitive=function(e,i,n,r){var o=t.getObject(e,i),s=o[0],a=o[1],h=o[2],u=!0;if(r)for(var l in r){if(r.hasOwnProperty(l)&&r[l]===a){u=!0;break}u=!1}return s&&typeof a===n&&u?a:h},t.getArray=function(e,i,n){var r=t.getObject(e,i),o=r[0],s=r[1],a=r[2];return o&&"object"==typeof s&&s instanceof Array&&!s.some(function(t){return typeof t!==n})?s:a},t.getStringPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getEnumPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getBooleanPrimitive=function(e,i,n){return t.getPrimitive(e,i,"boolean",n)},t.getNumberPrimitive=function(e,i,n){return t.getPrimitive(e,i,"number",n)},t.getStringArray=function(e,i){return t.getArray(e,i,"string")},t.parseGeneralConfig=function(e,i){i.stereo=t.getBooleanPrimitive(e,"stereo"),i.restrictedInlinePlayback=t.getBooleanPrimitive(e,"restrictedInlinePlayback"),i.startPosition=t.getNumberPrimitive(e,"startPosition"),i.contentFieldOfView=t.getNumberPrimitive(e,"contentFieldOfView"),i.verticalFieldOfView=t.getNumberPrimitive(e,"verticalFieldOfView"),i.horizontalFieldOfView=t.getNumberPrimitive(e,"horizontalFieldOfView"),i.enableFrameRateMeasurements=t.getBooleanPrimitive(e,"enableFrameRateMeasurements"),i.cardboard=t.getStringPrimitive(e,"cardboard"),i.viewingDirectionChangeThreshold=t.getNumberPrimitive(e,"viewingDirectionChangeThreshold"),i.viewingDirectionChangeEventInterval=t.getNumberPrimitive(e,"viewingDirectionChangeEventInterval")},t.parseViewingWindow=function(e,i){i.viewingWindow=r.viewingWindow,e.hasOwnProperty("viewingWindow")&&"object"==typeof e.viewingWindow&&(i.viewingWindow.minYaw=t.getNumberPrimitive(e,"viewingWindow.minYaw"),i.viewingWindow.maxYaw=t.getNumberPrimitive(e,"viewingWindow.maxYaw"),i.viewingWindow.minPitch=t.getNumberPrimitive(e,"viewingWindow.minPitch"),i.viewingWindow.maxPitch=t.getNumberPrimitive(e,"viewingWindow.maxPitch"))},t.parseKeyboardControl=function(e,i){i.keyboardControl=r.keyboardControl,e.hasOwnProperty("keyboardControl")&&"object"==typeof e.keyboardControl&&(i.keyboardControl.transitionTimingType=t.getEnumPrimitive(e,"keyboardControl.transitionTimingType",n.TransitionTimingType),i.keyboardControl.transitionTime=t.getNumberPrimitive(e,"keyboardControl.transitionTime"),i.keyboardControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"keyboardControl.maxDisplacementSpeed"),e.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof e.keyboardControl.keyMap&&(i.keyboardControl.keyMap.up=t.getStringArray(e,"keyboardControl.keyMap.up"),i.keyboardControl.keyMap.right=t.getStringArray(e,"keyboardControl.keyMap.right"),i.keyboardControl.keyMap.down=t.getStringArray(e,"keyboardControl.keyMap.down"),i.keyboardControl.keyMap.left=t.getStringArray(e,"keyboardControl.keyMap.left"),i.keyboardControl.keyMap.rotateClockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateClockwise"),i.keyboardControl.keyMap.rotateCounterclockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateCounterclockwise")))},t.parseMouseControl=function(e,i){i.mouseControl=r.mouseControl,e.hasOwnProperty("mouseControl")&&"object"==typeof e.mouseControl&&(i.mouseControl.transitionTimingType=t.getEnumPrimitive(e,"mouseControl.transitionTimingType",n.TransitionTimingType),i.mouseControl.transitionTime=t.getNumberPrimitive(e,"mouseControl.transitionTime"),i.mouseControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"mouseControl.maxDisplacementSpeed"))},t.parseApiControl=function(e,i){i.apiControl=r.apiControl,e.hasOwnProperty("apiControl")&&"object"==typeof e.apiControl&&(i.apiControl.transitionTimingType=t.getEnumPrimitive(e,"apiControl.transitionTimingType",n.TransitionTimingType),i.apiControl.transitionTime=t.getNumberPrimitive(e,"apiControl.transitionTime"),i.apiControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"apiControl.maxDisplacementSpeed"))},t.parseDebugHooks=function(t){var e={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return t.debugHooks&&Object.keys(e).filter(function(e){return"function"==typeof t.debugHooks[e]}).forEach(function(i){return e[i]=t.debugHooks[i]}),e},t.parse=function(e){e=e||{};var i={contentType:t.getEnumPrimitive(e,"contentType",n.VRContentType)};return t.parseGeneralConfig(e,i),t.parseViewingWindow(e,i),t.parseKeyboardControl(e,i),t.parseMouseControl(e,i),t.parseApiControl(e,i),[i,t.parseDebugHooks(e)]},t}();e.ConfigParser=o},51629:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ElementHelper=void 0;var i=function(){function t(){}return t.addEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.addEventListener(e[r],i,n)},t.removeEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.removeEventListener(e[r],i,n)},t.addClass=function(t,e){if(t&&e){var i=t.getAttribute("class"),n=!0;i&&i.length>0&&(n=i.split(" ").indexOf(e)<0),i&&i.length>0&&n&&(e=i+" "+e),n&&t.setAttribute("class",e)}},t.removeClass=function(t,e){if(t&&e){var i=t.getAttribute("class");i&&i.indexOf(e)>-1&&(i=i.replace(new RegExp("(?:^|\\s)"+e+"(?!\\S)"),"").trim(),t.setAttribute("class",i))}},t.getNavigator=function(){return window.navigator},Object.defineProperty(t,"touchEvents",{get:function(){var e=t.getNavigator().userAgent,i=t.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(e)?i?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),t}();e.ElementHelper=i},17378:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.FrameRateMonitor=void 0;var n=i(44369),r=function(){function t(t,e){void 0===e&&(e=1e3);var i=this;this.startAnimationFrame=function(){i.tdb&&(i.pdb=window.performance.now())},this.endAnimationFrame=function(){if(!(i.pdb<0)){var t=window.performance.now()-i.pdb;i.mdb.push(t),i.vdb(),i.sdb+=t,i.sdb>i.kdb&&i.ldb&&(i.sdb=0,i.udb(i.getAverageFrameRate(),i.getTimeSpentUpdatingTexture(),i.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){i.tdb&&(i.qdb=window.performance.now())},this.endUpdateTexture=function(){i.qdb<0||i.odb.push(window.performance.now()-i.qdb)},this.startDrawScene=function(){i.tdb&&(i.rdb=window.performance.now())},this.endDrawScene=function(){i.rdb<0||i.ndb.push(window.performance.now()-i.rdb)},this.mdb=[],this.odb=[],this.ndb=[],this.pdb=-1,this.qdb=-1,this.rdb=-1,this.jdb=t,this.kdb=e,this.ldb=[],this.sdb=0,this.tdb=!1}return t.prototype.enable=function(){this.tdb=!0},t.prototype.disable=function(){this.tdb=!1,this.mdb=[],this.odb=[],this.ndb=[],this.pdb=-1,this.qdb=-1,this.rdb=-1},t.prototype.subscribe=function(t){-1===this.ldb.indexOf(t)&&this.ldb.push(t)},t.prototype.unsubscribe=function(t){this.ldb.indexOf(t)>-1&&this.ldb.splice(this.ldb.indexOf(t),1)},t.prototype.getAverageFrameRate=function(){return 1/(n.MathUtil.getAverage(this.mdb)/1e3)},t.prototype.getTimeSpentUpdatingTexture=function(){return n.MathUtil.getSum(this.odb)/n.MathUtil.getSum(this.mdb)},t.prototype.getTimeSpentDrawingScene=function(){return n.MathUtil.getSum(this.ndb)/n.MathUtil.getSum(this.mdb)},t.prototype.destroy=function(){this.disable(),this.ldb=null},t.prototype.udb=function(t,e,i){for(var n=0,r=this.ldb;n<r.length;n++)r[n].onFrameRateAvailable(t,e,i)},t.prototype.vdb=function(){for(var t=0,e=this.mdb.length-1;e>=0;e--)if((t+=this.mdb[e])>=this.jdb){this.mdb.splice(0,e+1),this.odb.splice(0,e+1),this.ndb.splice(0,e+1);break}},t}();e.FrameRateMonitor=r},70415:function(t){t.exports="precision mediump float;\n\nconst int LEFT_EYE = 0;\nconst int RIGHT_EYE = 1;\nconst int CONTENT_TYPE_MONO = 0;\nconst int CONTENT_TYPE_STEREO_SBS = 1;\nconst int CONTENT_TYPE_STEREO_TAB = 2;\nconst float PI = 3.1415926535897932384626433832795;\nconst float TwoPI = 6.283185307179586476925286766559;\n\nuniform int eyeSelector;\nuniform int contentType;\nuniform float videoWidth;\nuniform float videoHeight;\nuniform float contentFieldOfView;\nuniform sampler2D textureUnit;\nvarying vec3 viewingDirection;\n\nfloat restrictedMod(float value, float divisor, float bound) {\n return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;\n}\n\nvec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {\n float eyeOffset = 0.0;\n float textureSizeMultiplier = contentFieldOfView / 180.;\n float theta = atan(direction.x, direction.z * -1.0);\n float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);\n float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);\n float phi = atan(direction.y * -1.0, length(direction.xz));\n\n float u = mod(theta / (PI * textureSizeMultiplier), 1.0);\n float v = mod(phi / PI + 0.5, 1.0);\n\n if (eye == LEFT_EYE) {\n eyeOffset = 0.0;\n } else if (eye == RIGHT_EYE) {\n eyeOffset = 0.5;\n }\n\n if ((theta + PI) / PI > textureSizeMultiplier) {\n return vec4(0., 0., 0., 1.);\n }\n\n if (contentType == CONTENT_TYPE_STEREO_SBS) {\n u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;\n } else if (contentType == CONTENT_TYPE_STEREO_TAB) {\n v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);\n }\n\n return texture2D(textureUnit, vec2(u, v));\n}\nvoid main(void) {\n gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);\n}\n"},17913:function(t){t.exports="precision mediump float;\n\nattribute vec2 vertexPosition;\nvarying vec3 viewingDirection;\nuniform mat4 projectionInverse;\nuniform vec2 distortionFovScale;\nuniform vec2 distortionFovOffset;\nuniform float contentWidthDegrees;\nuniform float distortionMaxFovSquared;\nuniform float distortionCoefficients[12];\n\nfloat DistortionFactor(float rSquared) {\n float ret = 0.0;\n rSquared = min(distortionMaxFovSquared, rSquared);\n ret = rSquared * (ret + distortionCoefficients[11]);\n ret = rSquared * (ret + distortionCoefficients[10]);\n ret = rSquared * (ret + distortionCoefficients[9]);\n ret = rSquared * (ret + distortionCoefficients[8]);\n ret = rSquared * (ret + distortionCoefficients[7]);\n ret = rSquared * (ret + distortionCoefficients[6]);\n ret = rSquared * (ret + distortionCoefficients[5]);\n ret = rSquared * (ret + distortionCoefficients[4]);\n ret = rSquared * (ret + distortionCoefficients[3]);\n ret = rSquared * (ret + distortionCoefficients[2]);\n ret = rSquared * (ret + distortionCoefficients[1]);\n ret = rSquared * (ret + distortionCoefficients[0]);\n return ret + 1.0;\n}\n\nvec4 Distort(vec4 point) {\n vec3 pointNdc = point.xyz / point.w;\n vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;\n vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;\n float radiusSquared = dot(pointTanAngle, pointTanAngle);\n float distortionFactor = DistortionFactor(radiusSquared);\n vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;\n vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)\n / distortionFovScale;\n vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);\n return vec4(distortedPointNdc, 1.0) * point.w;\n}\n\nvoid main(void) {\n gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));\n vec4 projectiveDirection = projectionInverse * gl_Position;\n viewingDirection = projectiveDirection.xyz / projectiveDirection.w;\n }\n"}},function(t){return function(){return t(6463)}()}])});
|
|
17
|
+
"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vr=e():(t.bitmovin=t.bitmovin||{},t.bitmovin.player=t.bitmovin.player||{},t.bitmovin.player.vr=e())}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ByteBuffer=void 0;var i=function(){function t(){}return t.stringToBytes=function(t,e){e=!!e;for(var i=t.length,n=new Uint8Array(e?4*i:i),r=0,o=0;o<i;o++){var s=t.charCodeAt(o);if(e&&55296<=s&&s<=56319){if(++o>=i)throw new Error("Malformed string, low surrogate expected at position "+o);s=(55296^s)<<10|65536|56320^t.charCodeAt(o)}else if(!e&&s>>>8)throw new Error("Wide characters are not allowed.");!e||s<=127?n[r++]=s:s<=2047?(n[r++]=192|s>>6,n[r++]=128|63&s):s<=65535?(n[r++]=224|s>>12,n[r++]=128|s>>6&63,n[r++]=128|63&s):(n[r++]=240|s>>18,n[r++]=128|s>>12&63,n[r++]=128|s>>6&63,n[r++]=128|63&s)}return n.subarray(0,r)},t.bytesToHex=function(t){for(var e="",i=0;i<t.length;i++){var n=(255&t[i]).toString(16);n.length<2&&(e+="0"),e+=n}return e},t.hexToBytes=function(t){var e=t.length;1&e&&(t="0"+t,e++);for(var i=new Uint8Array(e>>1),n=0;n<e;n+=2)i[n>>1]=parseInt(t.substr(n,2),16);return i},t.base64ToBytes=function(e){return t.stringToBytes(atob(e))},t}();e.ByteBuffer=i},5357:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Cardboard=void 0;var n=i(57160),r=i(50879),o=function(){function t(){}return t.decode=function(e){return new n.ProtoBuf(r.ByteBuffer.base64ToBytes(e),t.proto).readAll()},t.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},t}();e.Cardboard=o},7247:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CardboardViewer=void 0;var n=i(67392),r=function(){return function(t){this.label=t.model,this.fov=t.left_eye_field_of_view_angles[0],this.interLensDistance=t.inter_lens_distance,this.baselineLensDistance=t.tray_to_lens_distance,this.screenLensDistance=t.screen_to_lens_distance,this.distortion=new n.Distortion(t.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}}();e.CardboardViewer=r},95433:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Device=void 0;var i=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],n=function(){function t(e){this.width=e.width||t.getScreenWidth(),this.height=e.height||t.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}return t.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},t.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},t.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},t.detect=function(e){for(var n=navigator.userAgent||navigator.vendor||window.opera,s=t.getScreenWidth(),a=t.getScreenHeight(),h=0;h<i.length;h++){var u=i[h];if(u.rules&&("ios"===u.type||"android"===u.type)&&t.isIOS()===("ios"===u.type)){for(var l=!1,c=0;c<u.rules.length;c++){var d=u.rules[c];if(t.matchRule(d,n,s,a)){l=!0;break}}if(l){var p=.0254;return new t({width:s,height:a,widthMeters:p/(u.dpi[0]||u.dpi)*s,heightMeters:p/(u.dpi[1]||u.dpi)*a,bevelMeters:.001*u.bw})}}}return t.isIOS()?o:r},t.matchRule=function(t,e,i,n){if(!t.ua&&!t.res)return!1;if(t.ua&&e.indexOf(t.ua)<0)return!1;if(t.res){if(!t.res[0]||!t.res[1])return!1;var r=t.res[0],o=t.res[1];if(Math.min(i,n)!==Math.min(r,o)||Math.max(i,n)!==Math.max(r,o))return!1}return!0},t}();e.Device=n;var r=new n({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),o=new n({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceInfo=void 0;var n=i(95433),r=i(44369),o=i(7247),s=function(){function t(t,e){this.Q6=new o.CardboardViewer(t),this.R6=n.Device.detect(e)}return t.prototype.getDevice=function(){return this.R6},t.prototype.setViewer=function(t){this.Q6=t},t.prototype.getDistortedFieldOfViewLeftEye=function(){var t=this.Q6.screenLensDistance,e=this.Q6.distortion,i=(this.R6.widthMeters-this.Q6.interLensDistance)/2,n=this.Q6.interLensDistance/2,o=this.Q6.baselineLensDistance-this.R6.bevelMeters,s=this.R6.heightMeters-o,a=r.MathUtil.radToDeg(Math.atan(e.distort(i/t))),h=r.MathUtil.radToDeg(Math.atan(e.distort(n/t))),u=r.MathUtil.radToDeg(Math.atan(e.distort(o/t))),l=r.MathUtil.radToDeg(Math.atan(e.distort(s/t)));return{leftDegrees:Math.min(a,this.Q6.fov),rightDegrees:Math.min(h,this.Q6.fov),downDegrees:Math.min(u,this.Q6.fov),upDegrees:Math.min(l,this.Q6.fov)}},t.prototype.getLeftEyeVisibleTanAngles=function(){var t=this.Q6.distortion,e=Math.tan(-r.MathUtil.degToRad(this.Q6.fov)),i=Math.tan(r.MathUtil.degToRad(this.Q6.fov)),n=Math.tan(r.MathUtil.degToRad(this.Q6.fov)),o=Math.tan(-r.MathUtil.degToRad(this.Q6.fov)),s=this.R6.widthMeters/4,a=this.R6.heightMeters/2,h=this.Q6.baselineLensDistance-this.R6.bevelMeters-a,u=this.Q6.interLensDistance/2-s,l=-h,c=this.Q6.screenLensDistance,d=t.distort((u-s)/c),p=t.distort((l+a)/c),f=t.distort((u+s)/c),y=t.distort((l-a)/c),b=new Float32Array(4);return b[0]=Math.max(e,d),b[1]=Math.min(i,p),b[2]=Math.min(n,f),b[3]=Math.max(o,y),b},t.prototype.getLeftEyeNoLensTanAngles=function(){var t=this.Q6.distortion,e=new Float32Array(4),i=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.Q6.fov))),n=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.Q6.fov))),o=t.distortInverse(Math.tan(r.MathUtil.degToRad(this.Q6.fov))),s=t.distortInverse(Math.tan(-r.MathUtil.degToRad(this.Q6.fov))),a=this.R6.widthMeters/4,h=this.R6.heightMeters/2,u=this.Q6.baselineLensDistance-this.R6.bevelMeters-h,l=this.Q6.interLensDistance/2-a,c=-u,d=this.Q6.screenLensDistance,p=(l-a)/d,f=(c+h)/d,y=(l+a)/d,b=(c-h)/d;return e[0]=Math.max(i,p),e[1]=Math.min(n,f),e[2]=Math.min(o,y),e[3]=Math.max(s,b),e},t.prototype.getLeftEyeVisibleScreenRect=function(t){var e=this.Q6.screenLensDistance,i=(this.R6.widthMeters-this.Q6.interLensDistance)/2,n=this.Q6.baselineLensDistance-this.R6.bevelMeters,r=(t[0]*e+i)/this.R6.widthMeters,o=(t[1]*e+n)/this.R6.heightMeters,s=(t[2]*e+i)/this.R6.widthMeters,a=(t[3]*e+n)/this.R6.heightMeters;return{x:r,y:a,width:s-r,height:o-a}},t.prototype.getFieldOfViewLeftEye=function(t){return t?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},t.prototype.getFieldOfViewRightEye=function(t){var e=this.getFieldOfViewLeftEye(t);return{leftDegrees:e.leftDegrees,rightDegrees:e.rightDegrees,downDegrees:e.downDegrees,upDegrees:e.upDegrees}},t.prototype.getUndistortedFieldOfViewLeftEye=function(){var t=this.getUndistortedParams_();return{leftDegrees:r.MathUtil.radToDeg(Math.atan(t.outerDist)),rightDegrees:r.MathUtil.radToDeg(Math.atan(t.innerDist)),downDegrees:r.MathUtil.radToDeg(Math.atan(t.bottomDist)),upDegrees:r.MathUtil.radToDeg(Math.atan(t.topDist))}},t.prototype.getUndistortedViewportLeftEye=function(){var t=this.getUndistortedParams_(),e=this.Q6.screenLensDistance,i=this.R6.widthMeters/e,n=this.R6.heightMeters/e,r=this.R6.width/i,o=this.R6.height/n,s=Math.round((t.eyePosX-t.outerDist)*r),a=Math.round((t.eyePosY-t.bottomDist)*o);return{x:s,y:a,width:Math.round((t.eyePosX+t.innerDist)*r)-s,height:Math.round((t.eyePosY+t.topDist)*o)-a}},t.prototype.getUndistortedParams_=function(){var t=this.Q6.distortion,e=this.Q6.screenLensDistance,i=this.Q6.interLensDistance/2/e,n=this.R6.widthMeters/e,o=this.R6.heightMeters/e,s=n/2-i,a=(this.Q6.baselineLensDistance-this.R6.bevelMeters)/e,h=this.Q6.fov,u=t.distortInverse(Math.tan(r.MathUtil.degToRad(h))),l=Math.min(s,u),c=Math.min(i,u),d=Math.min(a,u);return{outerDist:l,innerDist:c,topDist:Math.min(o-a,u),bottomDist:d,eyePosX:s,eyePosY:a}},t}();e.DeviceInfo=s},67392:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Distortion=void 0;var i=function(){function t(t){this.mfb=t}return t.prototype.distortInverse=function(t){for(var e=0,i=1,n=t-this.distort(e);Math.abs(i-e)>1e-4;){var r=t-this.distort(i),o=i-r*((i-e)/(r-n));e=i,i=o,n=r}return i},t.prototype.distort=function(t){for(var e=t*t,i=0,n=this.mfb.length-1;n>=0;n--)i=e*(i+this.mfb[n]);return(i+1)*t},t.solveLinear_=function(t,e){var i,n,r,o=t.length;for(n=0;n<o-1;++n)for(r=n+1;r<o;++r){var s=t[n][r]/t[n][n];for(i=n+1;i<o;++i)t[i][r]-=s*t[i][n];e[r]-=s*e[n]}var a=new Array(o);for(n=o-1;n>=0;--n){var h=e[n];for(i=n+1;i<o;++i)h-=t[i][n]*a[i];a[n]=h/t[n][n]}return a},t.solveLeastSquares_=function(e,i){var n,r,o,s,a=e.length,h=e[0].length;if(h!==i.length)throw new Error("Matrix / vector dimension mismatch");var u=new Array(a);for(o=0;o<a;++o)for(u[o]=new Array(a),r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*e[o][n];u[o][r]=s}var l=new Array(a);for(r=0;r<a;++r){for(s=0,n=0;n<h;++n)s+=e[r][n]*i[n];l[r]=s}return t.solveLinear_(u,l)},t.prototype.approximateInverse=function(e,i){e=e||1,i=i||100;var n,r,o=new Array(12);for(r=0;r<12;++r)o[r]=new Array(i);var s=new Array(i);for(n=0;n<i;++n){var a=e*(n+1)/i,h=this.distort(a),u=h;for(r=0;r<12;++r)u*=h*h,o[r][n]=u;s[n]=a-h}return t.solveLeastSquares_(o,s)},t}();e.Distortion=i},44369:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Quat=e.Vec3=e.Mat4=e.MathUtil=void 0;var i=function(){function t(){}return t.degToRad=function(t){return t*Math.PI/180},t.radToDeg=function(t){return 180*t/Math.PI},t.hypot=function(t,e){return Math.sqrt(t*t+e*e)},t.getSum=function(t){return t.length>0?t.reduce(function(t,e){return t+e},0):0},t.getAverage=function(e){return e.length>0?t.getSum(e)/e.length:1/0},t.sign=function(t){return Math.sign&&Math.sign(t)||(t>0?1:t<0?-1:0)},t}();e.MathUtil=i;var n=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(16):new Array(16))[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotate=function(t,e,i){var n,r,o,s,a,h,u,l,c,d,p,f,y,b,v,g,m,w,T,E,M,O,R,D,_=i[0],V=i[1],K=i[2],P=Math.sqrt(_*_+V*V+K*K);return Math.abs(P)<1e-6?null:(_*=P=1/P,V*=P,K*=P,n=Math.sin(e),o=1-(r=Math.cos(e)),s=t[0],a=t[1],h=t[2],u=t[3],l=t[4],c=t[5],d=t[6],p=t[7],f=t[8],y=t[9],b=t[10],v=t[11],g=_*_*o+r,m=V*_*o+K*n,w=K*_*o-V*n,T=_*V*o-K*n,E=V*V*o+r,M=K*V*o+_*n,O=_*K*o+V*n,R=V*K*o-_*n,D=K*K*o+r,t[0]=s*g+l*m+f*w,t[1]=a*g+c*m+y*w,t[2]=h*g+d*m+b*w,t[3]=u*g+p*m+v*w,t[4]=s*T+l*E+f*M,t[5]=a*T+c*E+y*M,t[6]=h*T+d*E+b*M,t[7]=u*T+p*E+v*M,t[8]=s*O+l*R+f*D,t[9]=a*O+c*R+y*D,t[10]=h*O+d*R+b*D,t[11]=u*O+p*R+v*D,t)},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],p=e[10],f=e[11],y=e[12],b=e[13],v=e[14],g=e[15],m=i[0],w=i[1],T=i[2],E=i[3];return t[0]=m*n+w*a+T*c+E*y,t[1]=m*r+w*h+T*d+E*b,t[2]=m*o+w*u+T*p+E*v,t[3]=m*s+w*l+T*f+E*g,m=i[4],w=i[5],T=i[6],E=i[7],t[4]=m*n+w*a+T*c+E*y,t[5]=m*r+w*h+T*d+E*b,t[6]=m*o+w*u+T*p+E*v,t[7]=m*s+w*l+T*f+E*g,m=i[8],w=i[9],T=i[10],E=i[11],t[8]=m*n+w*a+T*c+E*y,t[9]=m*r+w*h+T*d+E*b,t[10]=m*o+w*u+T*p+E*v,t[11]=m*s+w*l+T*f+E*g,m=i[12],w=i[13],T=i[14],E=i[15],t[12]=m*n+w*a+T*c+E*y,t[13]=m*r+w*h+T*d+E*b,t[14]=m*o+w*u+T*p+E*v,t[15]=m*s+w*l+T*f+E*g,t},t.perspective=function(t,e,i,n,r){var o=1/Math.tan(e/2),s=1/(n-r);return t[0]=o/i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+n)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*n*s,t[15]=0,t},t.invert=function(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],d=e[10],p=e[11],f=e[12],y=e[13],b=e[14],v=e[15],g=i*a-n*s,m=i*h-r*s,w=i*u-o*s,T=n*h-r*a,E=n*u-o*a,M=r*u-o*h,O=l*y-c*f,R=l*b-d*f,D=l*v-p*f,_=c*b-d*y,V=c*v-p*y,K=d*v-p*b,P=g*K-m*V+w*_+T*D-E*R+M*O;return P?(P=1/P,t[0]=(a*K-h*V+u*_)*P,t[1]=(r*V-n*K-o*_)*P,t[2]=(y*M-b*E+v*T)*P,t[3]=(d*E-c*M-p*T)*P,t[4]=(h*D-s*K-u*R)*P,t[5]=(i*K-r*D+o*R)*P,t[6]=(b*w-f*M-v*m)*P,t[7]=(l*M-d*w+p*m)*P,t[8]=(s*V-a*D+u*O)*P,t[9]=(n*D-i*V-o*O)*P,t[10]=(f*E-y*w+v*g)*P,t[11]=(c*w-l*E-p*g)*P,t[12]=(a*R-s*_-h*O)*P,t[13]=(i*_-n*R+r*O)*P,t[14]=(y*m-f*T-b*g)*P,t[15]=(l*T-c*m+d*g)*P,t):null},t}();e.Mat4=n;var r=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(3):new Array(3))[0]=0,t[1]=0,t[2]=0,t},t}();e.Vec3=r;var o=function(){function t(){}return t.create=function(){var t;return(t="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=0,t[1]=0,t[2]=0,t[3]=1,t},t.fromValues=function(t,e,i,n){var r;return(r="undefined"!=typeof Float32Array?new Float32Array(4):new Array(4))[0]=t,r[1]=e,r[2]=i,r[3]=n,r},t.multiply=function(t,e,i){var n=e[0],r=e[1],o=e[2],s=e[3],a=i[0],h=i[1],u=i[2],l=i[3];return t[0]=n*l+s*a+r*u-o*h,t[1]=r*l+s*h+o*a-n*u,t[2]=o*l+s*u+n*h-r*a,t[3]=s*l-n*a-r*h-o*u,t},t.toAngle=function(t){var e=r.create(),i=t[0]*t[0],n=t[1]*t[1],o=t[2]*t[2],s=t[0]*t[1]+t[2]*t[3];return s>.499?(e[2]=2*Math.atan2(t[0],t[3]),e[0]=Math.PI/2,e[1]=0):s<-.499?(e[2]=-2*Math.atan2(t[0],t[3]),e[0]=-Math.PI/2,e[1]=0):(e[2]=Math.atan2(2*t[1]*t[3]-2*t[0]*t[2],1-2*n-2*o),e[0]=Math.asin(2*s),e[1]=Math.atan2(2*t[0]*t[3]-2*t[1]*t[2],1-2*i-2*o)),{yaw:180*e[2]/Math.PI,pitch:180*e[1]/Math.PI,roll:180*e[0]/Math.PI}},t}();e.Quat=o},57160:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtoBuf=void 0;var i=function(){function t(t,e){this.Beb=t,this.Eeb=e,this.Ceb=0,this.Deb=new DataView(this.Beb.buffer,0,this.Beb.length)}return t.prototype.readVarInt=function(){var t,e=0;for(t=0;this.Ceb<this.Beb.length&&(e|=(127&this.Beb[this.Ceb])<<t,128&this.Beb[this.Ceb]);this.Ceb++)t+=7;return this.Ceb++,e},t.prototype.readHeader=function(){var t=this.readVarInt();return{tag:t>>>3,type:7&t}},t.prototype.readString=function(){for(var t=this.readVarInt(),e=new Array(t),i=0,n=this.Ceb;n<this.Ceb+t;n++){var r=this.Beb[n];if(r<128)e[i++]=r;else if(r>=192&&r<224&&n+1<t)e[i++]=(31&r)<<6|63&this.Beb[++n];else if(r>=224&&r<240&&n+2<t)e[i++]=(15&r)<<12|(63&this.Beb[++n])<<6|63&this.Beb[++n];else{if(!(r>=240&&r<248&&n+3<t))throw new Error("Malformed UTF8 character at byte offset "+n);var o=(7&r)<<18|(63&this.Beb[++n])<<12|(63&this.Beb[++n])<<6|63&this.Beb[++n];o<=65535?e[i++]=o:(o^=65536,e[i++]=55296|o>>10,e[i++]=56320|1023&o)}}var s="",a=16384;for(n=0;n<i;n+=a)s+=String.fromCharCode.apply(String,e.slice(n,n+a<=i?n+a:i));return this.Ceb+=t,s},t.prototype.readPacked=function(t){var e=this.readVarInt(),i=[];switch(t){case"float":for(var n=0;n<e/4;n++)i.push(this.Deb.getFloat32(this.Ceb,!0)),this.Ceb+=4;break;case"int":for(var r=this.Ceb;this.Ceb<r+e;)i.push(this.readVarInt())}return i},t.prototype.Feb=function(t){for(var e=0,i=0;i<t;i++)e=(e<<8)+this.Beb[this.Ceb+i],this.Ceb++;return e},t.prototype.readNum32=function(){var t=this.Deb.getFloat32(this.Ceb,!0);return this.Ceb+=4,t},t.prototype.readNum64=function(){return this.Feb(8)},t.prototype.readField=function(t){var e;switch(t){case 0:e=this.readVarInt();break;case 1:e=this.readNum64();break;case 2:e=this.readString();break;case 5:e=this.readNum32()}return e},t.prototype.readAll=function(){for(var t={};this.Ceb<this.Beb.length;){var e=this.readHeader(),i=void 0;if(this.Eeb.hasOwnProperty(e.tag))if(i=this.Eeb[e.tag],2===e.type&&i&&i.hasOwnProperty("packed")&&i.packed)t[i.name]=this.readPacked(i.type);else{var n=this.readField(e.type);"boolean"===i.type?n=!!n:"object"==typeof i.type&&(n=i.type[n]),t[i.name]=n}}if(t.length>0)for(var r in this.Eeb.defaults)this.Eeb.defaults.hasOwnProperty(r)&&void 0===t[r]&&(t[r]=this.Eeb.defaults[r]);return t},t}();e.ProtoBuf=i},43948:function(t,e){var i,n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingType=e.VRState=e.VRContentType=void 0,function(t){t.Single="single",t.TAB="tab",t.SBS="sbs"}(i||(e.VRContentType=i={})),function(t){t.Ready="ready",t.Playing="playing",t.Error="error",t.Uninitialized="uninitialized"}(n||(e.VRState=n={})),function(t){t.None="none",t.EaseIn="ease-in",t.EaseOut="ease-out",t.EaseInOut="ease-in-out"}(r||(e.TransitionTimingType=r={}))},61535:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.InternalVRHandler=void 0;var n=i(5357),r=i(3973),o=i(25926),s=i(4224),a=i(45202),h=i(3714),u=i(44468),l=i(21513),c=i(19274),d=i(43948),p=i(33639),f=i(85361),y=function(){function t(e,i,u,y,b,v,g,m){var w=this;this.iK=null,this.jK=null,this.kK=null,this.lK=null,this.mK=d.VRState.Uninitialized,this.nK=null,this.oK=!1,this.pK=!1,this.qK=null,this.rK=null,this.sK=null,this.tK=!1,this.JK=function(){w.uK=!0},this.NK=function(t){if(w.mK!==d.VRState.Playing)return w.wK&&Boolean(w.BK.onRenderingSuspended)&&w.BK.onRenderingSuspended(),void(w.wK=!1);w.KK(),w.pK!==w.oK&&(w.yK.getEventFunction()(h.PlayerEvent.VRStereoChanged,{stereo:w.oK}),w.pK=w.oK);var e=w.rK.update(t),i=!w.tK||w.uK||0===t;i||e||0===t||w.vK?(w.xK&&Boolean(w.BK.onStartRendering)&&w.BK.onStartRendering(),!w.wK&&Boolean(w.BK.onRenderingResumed)&&w.BK.onRenderingResumed(),w.qK.drawScene(w.rK.getProjectionInverse(),i),w.xK=!1,w.wK=!0):(w.wK&&Boolean(w.BK.onRenderingSuspended)&&w.BK.onRenderingSuspended(),w.wK=!1),null===w.nK&&(w.kK=requestAnimationFrame(w.NK)),w.uK=!1,w.vK=!1},this.OK=function(){w.IK().removeEventListener(c.MediaElementEvent.playing,w.OK),w.IK().removeEventListener(c.MediaElementEvent.seeked,w.OK),w.mK===d.VRState.Ready&&(w.KK(),w.mK=d.VRState.Playing,w.kK=requestAnimationFrame(w.NK))},this.PK=function(t){w.mK=d.VRState.Error,w.nK=t,w.MK(),w.kK&&(cancelAnimationFrame(w.kK),w.kK=null),w.yK.getEventFunction()(h.PlayerEvent.Warning,new o.PlayerWarning(s.WarningCode.VR_RENDERING_ERROR))},this.enableGyroscope=function(){return w.rK.enableGyroscope(),!0},this.disableGyroscope=function(){return w.rK.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return w.rK.isGyroscopeEnabled()},this.enableMouseControl=function(){return w.rK.enableMouseControl(),!0},this.disableMouseControl=function(){return w.rK.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return w.rK.isMouseControlEnabled()},this.enableKeyboardControl=function(){return w.rK.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return w.rK.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return w.rK.isKeyboardControlEnabled()},this.setViewingDirection=function(t){return!!w.rK&&(w.rK.setViewingDirection(t),!0)},this.pause=function(){w.tK=!0},this.QK=function(){var t=w.IK();4!==t.readyState?t.addEventListener(c.MediaElementEvent.playing,function(){return w.tK=!1}):w.tK=!1},this.RK=function(){w.yK.off(h.PlayerEvent.Playing,w.QK),w.yK.off(h.PlayerEvent.Paused,w.pause),w.yK.off(h.PlayerEvent.Destroy,w.RK),w.yK.off(h.PlayerEvent.SourceUnloaded,w.RK),w.yK=null;var t=w.IK();w.FK&&w.FK.removeEventListener(c.MediaElementEvent.seeked,w.JK),w.MK(),w.iK&&w.iK.parentNode&&(w.iK.parentNode.removeChild(w.iK),w.iK=null),w.jK&&w.jK.parentNode&&(w.jK.parentNode.removeChild(w.jK),w.jK=null),w.lK&&w.lK.parentNode&&(w.lK.parentNode.removeChild(w.lK),w.lK=null),w.mK=d.VRState.Uninitialized,w.kK&&(cancelAnimationFrame(w.kK),w.kK=null),w.rK&&w.rK.destroy(),w.rK=null,w.qK.destroy(),w.qK=null,t.removeEventListener(c.MediaElementEvent.playing,w.OK),t.removeEventListener(c.MediaElementEvent.seeked,w.OK)},this.yK=e.eventHandler,this.FK=e.videoElement,this.GK=y,this.zK=e.parentHtmlElement,this.id=i,this.AK=u,this.BK=m,this.CK=b,this.DK=v,this.EK=e.sourceContext.technology.streaming,this.HK=g,this.uK=!1,this.vK=!1,this.wK=!1,this.xK=!0,this.iK=document.createElement("canvas"),this.iK.setAttribute("id","bitmovinplayer-vr-canvas"),this.iK.style.display="none",this.iK.style.position="absolute";var T=this.zK.getElementsByClassName(a.Environment.idPrefix+"poster")[0];T?this.zK.insertBefore(this.iK,T):this.zK.appendChild(this.iK);var E=e.sourceContext.technology.player;if(t.isVideoTextureSupported(v,this.EK,E)||(this.jK=document.createElement("canvas"),this.jK.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.jK.style.display="none",this.jK.style.position="absolute",this.zK.insertBefore(this.jK,this.iK)),(0,l.getCapabilities)().isSafariIOS&&(this.FK.setAttribute("playsinline",""),this.FK.setAttribute("webkit-playsinline","")),this.lK=document.getElementById("bitmovinplayer-no-select-style-node"),this.lK||(this.lK=document.createElement("style"),this.lK.setAttribute("id","bitmovinplayer-no-select-style-node"),this.lK.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.lK)),this.oK=this.AK.stereo,this.pK=this.oK,this.AK.restrictedInlinePlayback||this.FK.addEventListener(c.MediaElementEvent.seeked,this.JK),"string"==typeof this.AK.cardboard){var M=n.Cardboard.decode(this.AK.cardboard);M.hasOwnProperty("distortion_coefficients")&&(this.sK=new r.DeviceInfo(M,this.CK))}this.mK=d.VRState.Ready,this.rK=new p.OrientationHandler(this.iK,this.zK,this.AK,this.BK,this.yK),this.qK=new f.Renderer(this.iK,this.jK,e,this.sK,this.PK,this.CK,this.HK,this.AK,this.BK),this.yK.on(h.PlayerEvent.Playing,this.QK),this.yK.on(h.PlayerEvent.Paused,this.pause),this.yK.on(h.PlayerEvent.Destroy,this.RK),this.yK.on(h.PlayerEvent.SourceUnloaded,this.RK),this.LK(),this.KK();var O=this.IK();4!==O.readyState&&O.paused?(O.addEventListener(c.MediaElementEvent.playing,this.OK),O.addEventListener(c.MediaElementEvent.seeked,this.OK)):this.OK()}return t.prototype.IK=function(){return this.AK.restrictedInlinePlayback&&this.GK?this.GK:this.FK},t.prototype.KK=function(){if(this.iK){var t,e,i,n;this.zK&&this.zK.clientWidth&&this.zK.clientHeight?(t=this.zK.clientWidth,e=this.zK.clientHeight):(t=window.innerWidth,e=window.innerHeight),this.FK&&this.FK.videoWidth&&this.FK.videoHeight?(i=this.FK.videoWidth,n=this.FK.videoHeight):(i=t,n=e);var r=(this.DK.devicePixelRatio||1)/this.qK.getBackingStoreRatio(),o=t*r,s=e*r,a=o/s;o>i&&(s=(o=i)/a),s>n&&(o=(s=n)*a),this.iK.width===o&&this.iK.height===s||(this.iK.width=o,this.iK.height=s),!this.jK||this.jK.width===i&&this.jK.height===n||(this.jK.width=i,this.jK.height=n)}},t.prototype.LK=function(){this.iK&&(this.iK.style.display="block"),this.jK&&(this.jK.style.display="block"),this.FK&&(this.FK.style.display="none")},t.prototype.MK=function(){this.iK&&(this.iK.style.display="none"),this.jK&&(this.jK.style.display="none"),this.FK&&this.FK.style&&(this.FK.style.display="block")},t.isVideoTextureSupported=function(t,e,i){var n=t.appName,r=t.userAgent,o=t.appVersion,s=(0,l.getCapabilities)().safariVersion,a=(s.major>10||10===s.major&&s.minor>=1)&&!(0,l.getCapabilities)().isSafariIOS,h=-1;return!(e===u.StreamType.Hls&&i===u.PlayerType.Native&&!a)&&("Microsoft Internet Explorer"===n?null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1)):"Netscape"===n&&(-1!==o.indexOf("Trident")?h=11:null!==new RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(h=parseFloat(RegExp.$1))),-1===h||h>=13)},t.prototype.setStereo=function(t){return this.vK=this.oK!==t,this.oK=t,this.oK?(this.qK.enableStereo(),this.rK.enableStereo()):(this.qK.disableStereo(),this.rK.disableStereo()),!0},t.prototype.getStereo=function(){return this.oK},t.prototype.getState=function(){return this.mK===d.VRState.Ready?d.VRState.Ready:this.mK===d.VRState.Playing?d.VRState.Playing:this.mK===d.VRState.Error?d.VRState.Error:this.mK===d.VRState.Uninitialized?null:void 0},t.prototype.getLastError=function(){return this.nK},t.prototype.getViewingDirection=function(){return this.rK?this.rK.getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.moveViewingDirection=function(t){return!!this.rK&&(this.rK.moveViewingDirection(t),!0)},t.prototype.setViewingDirectionChangeEventInterval=function(t){return!!this.rK&&(this.rK.setViewingDirectionChangeEventInterval(t),!0)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.rK?this.rK.getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){return!!this.rK&&(this.rK.setViewingDirectionChangeThreshold(t),!0)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.rK?this.rK.getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.rK&&(this.rK.setVerticalFieldOfView(t),!0)},t.prototype.getVerticalFieldOfView=function(){return this.rK?this.rK.getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.rK&&(this.rK.setHorizontalFieldOfView(t),!0)},t.prototype.getHorizontalFieldOfView=function(){return this.rK?this.rK.getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.rK&&this.rK.zoom(t)},t.prototype.getZoom=function(){return this.rK?this.rK.getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return null!==(e=null===(t=this.rK)||void 0===t?void 0:t.permissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return null!==(e=null===(t=this.rK)||void 0===t?void 0:t.requestPermission())&&void 0!==e?e:Promise.resolve()},t}();e.InternalVRHandler=y},6463:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRState=e.TransitionTimingType=e.VRContentType=e.VRModuleDefinition=void 0;var n=i(62756),r=i(43948);Object.defineProperty(e,"TransitionTimingType",{enumerable:!0,get:function(){return r.TransitionTimingType}}),Object.defineProperty(e,"VRContentType",{enumerable:!0,get:function(){return r.VRContentType}}),Object.defineProperty(e,"VRState",{enumerable:!0,get:function(){return r.VRState}});var o=i(24180);e.VRModuleDefinition={name:n.ModuleName.VR,module:{VRHandler:o.VRHandler},exports:{VRContentType:r.VRContentType,TransitionTimingType:r.TransitionTimingType,VRState:r.VRState}},e.default=e.VRModuleDefinition},85361:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Renderer=void 0;var n=i(44369),r=i(3714),o=i(44468),s=i(43948),a=i(54479),h=i(17378),u=function(){function t(){this.f5=[],this.g5=[]}return t.prototype.getVideoWidths=function(){return this.f5},t.prototype.getVideoHeights=function(){return this.g5},t.prototype.add=function(t,e){this.f5.indexOf(t)<0&&(this.f5.push(t),this.f5.sort(function(t,e){return t-e})),this.g5.indexOf(e)<0&&(this.g5.push(e),this.g5.sort(function(t,e){return t-e}))},t}(),l=function(){function t(t,e,i,n,o,s,l,c,d){var p=this;this.h5=null,this.i5=null,this.j5=a.GL_ERROR.NO_ERROR,this.l5=-1,this.m5=!1,this.n5=-1,this.o5=-1,this.p5=-1,this.q5=-1,this.r5=-1,this.s5=[-1,-1,1,-1,1,1,-1,1],this.t5=[0,1,2,0,2,3],this.u5=-1,this.v5=new RegExp("mediump","g"),this.w5=!0,this.x5=[0,0,0,0,0,0,0,0,0,0,0,0],this.y5={LEFT:0,RIGHT:1},this.z5=[0,0,0,0,0,0,0,0,0,0,0,0],this.A5=1,this.B5=[[1,1],[1,1]],this.C5=[1,1],this.H5=null,this.I5=null,this.J5=null,this.K5=null,this.L5=null,this.M5=null,this.N5=-1,this.O5=-1,this.P5=null,this.Q5=!1,this.R5=null,c.stereo?(this.m5=!0,this.l5=2):(this.m5=!1,this.l5=1),this.G5=i.eventHandler,this.H5=s,this.I5=t,this.J5=e,this.K5=i.videoElement,this.L5=o,this.M5=i.sourceContext.technology.streaming,this.R5=l,this.S5=c,this.T5=d,this.k5=[],this.G5.on(r.PlayerEvent.TimeChanged,function(){return p.w5=!1}),n&&(this.z5=this.E6(n),this.A5=this.F6(n),this.B5[this.y5.LEFT]=this.H6(n,this.y5.LEFT),this.B5[this.y5.RIGHT]=this.H6(n,this.y5.RIGHT),this.C5=this.I6(n)),this.P5=new u,this.F5=new h.FrameRateMonitor(1500,1e3),this.S5.enableFrameRateMeasurements?(this.F5.enable(),this.F5.subscribe(this)):this.F5.disable();try{this.u6(),this.t6(),this.v6(),this.w6(),this.x6(),this.y6(),this.z6(),this.A6()}catch(t){}}return t.prototype.q6=function(t){if(void 0===t&&(t=[]),null!==this.h5){var e=this.h5.getError();if(e===a.GL_ERROR.NO_ERROR)return this.j5=a.GL_ERROR.NO_ERROR,void(this.k5=[]);if(this.k5.push(e),t.indexOf(e)>-1&&this.w5)throw this.j5=a.GL_ERROR.NO_ERROR,this.k5=[],"STARTUP ERROR";if(!(this.k5.length>=this.R5.MAX_CONSECUTIVE_VR_ERRORS))return;this.j5=this.k5[this.k5.length-1]}var i="Unable to initialize WebGL";throw a.GL_ERROR_STR[this.j5]&&(i=a.GL_ERROR_STR[this.j5]),this.L5(i),i},t.prototype.r6=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=null;if(t&&"function"==typeof t[e]){try{r=t[e].apply(t,i)}catch(t){}this.q6()}return r},t.prototype.s6=function(t){throw this.j5=a.GL_ERROR.OTHER_ERROR,this.L5(t),t},t.prototype.t6=function(){this.E5=i(70415),this.D5=i(17913);var t=this.r6(this.h5,"getShaderPrecisionFormat",this.h5.FRAGMENT_SHADER,this.h5.HIGH_FLOAT);0!==t.precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.E5=this.E5.replace(this.v5,"highp")),0!==(t=this.r6(this.h5,"getShaderPrecisionFormat",this.h5.VERTEX_SHADER,this.h5.HIGH_FLOAT)).precision&&0!==t.rangeMin&&0!==t.rangeMax&&(this.D5=this.D5.replace(this.v5,"highp"))},t.prototype.u6=function(){this.J5&&(this.i5=this.J5.getContext("2d"));var t={failIfMajorPerformanceCaveat:!0};this.h5=this.I5.getContext("webgl",t)||this.I5.getContext("experimental-webgl",t),this.q6(),this.r6(this.h5,"clearColor",.5,.5,.5,1),this.r6(this.h5,"clearDepth",1),this.r6(this.h5,"disable",this.h5.DEPTH_TEST)},t.prototype.v6=function(){this.n5=this.r6(this.h5,"createShader",this.h5.VERTEX_SHADER),this.r6(this.h5,"shaderSource",this.n5,this.D5),this.r6(this.h5,"compileShader",this.n5),this.r6(this.h5,"getShaderParameter",this.n5,this.h5.COMPILE_STATUS)||this.s6("Vertex shader compilation failed ("+this.r6(this.h5,"getShaderInfoLog",this.n5)+")"),this.o5=this.r6(this.h5,"createShader",this.h5.FRAGMENT_SHADER),this.r6(this.h5,"shaderSource",this.o5,this.E5),this.r6(this.h5,"compileShader",this.o5),this.r6(this.h5,"getShaderParameter",this.o5,this.h5.COMPILE_STATUS)||this.s6("Fragment shader compilation failed ("+this.r6(this.h5,"getShaderInfoLog",this.o5)+")")},t.prototype.w6=function(){this.p5=this.r6(this.h5,"createProgram"),this.r6(this.h5,"attachShader",this.p5,this.n5),this.r6(this.h5,"attachShader",this.p5,this.o5),this.r6(this.h5,"linkProgram",this.p5),this.r6(this.h5,"getProgramParameter",this.p5,this.h5.LINK_STATUS)||this.s6("Unable to link program: "+this.r6(this.h5,"getProgramInfoLog",this.p5)),this.r6(this.h5,"useProgram",this.p5)},t.prototype.x6=function(){this.U5=new a.GLAttribute(this.h5,this.p5,"vertexPosition",null)},t.prototype.y6=function(){this.V5=new a.GLUniform(this.h5,this.p5,"eyeSelector",a.GLVariableType.UNIFORM_1I),this.W5=new a.GLUniform(this.h5,this.p5,"textureUnit",a.GLVariableType.UNIFORM_1I),this.i6=new a.GLUniform(this.h5,this.p5,"contentType",a.GLVariableType.UNIFORM_1I),this.j6=new a.GLUniform(this.h5,this.p5,"contentFieldOfView",a.GLVariableType.UNIFORM_1F),this.k6=new a.GLUniform(this.h5,this.p5,"videoWidth",a.GLVariableType.UNIFORM_1F),this.l6=new a.GLUniform(this.h5,this.p5,"videoHeight",a.GLVariableType.UNIFORM_1F),this.X5=new a.GLUniform(this.h5,this.p5,"projectionInverse",a.GLVariableType.UNIFORM_MATRIX_4FV),this.m6=new a.GLUniform(this.h5,this.p5,"distortionCoefficients",a.GLVariableType.UNIFORM_1FV),this.n6=new a.GLUniform(this.h5,this.p5,"distortionMaxFovSquared",a.GLVariableType.UNIFORM_1F),this.o6=new a.GLUniform(this.h5,this.p5,"distortionFovOffset",a.GLVariableType.UNIFORM_2FV),this.p6=new a.GLUniform(this.h5,this.p5,"distortionFovScale",a.GLVariableType.UNIFORM_2FV)},t.prototype.z6=function(){this.q5=this.r6(this.h5,"createBuffer"),this.r6(this.h5,"bindBuffer",this.h5.ARRAY_BUFFER,this.q5),this.r6(this.h5,"bufferData",this.h5.ARRAY_BUFFER,new Float32Array(this.s5),this.h5.STATIC_DRAW),this.r5=this.r6(this.h5,"createBuffer"),this.r6(this.h5,"bindBuffer",this.h5.ELEMENT_ARRAY_BUFFER,this.r5),this.r6(this.h5,"bufferData",this.h5.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.t5),this.h5.STATIC_DRAW)},t.prototype.A6=function(){this.u5=this.r6(this.h5,"createTexture"),this.r6(this.h5,"bindTexture",this.h5.TEXTURE_2D,this.u5),this.r6(this.h5,"texParameteri",this.h5.TEXTURE_2D,this.h5.TEXTURE_MAG_FILTER,this.h5.LINEAR),this.r6(this.h5,"texParameteri",this.h5.TEXTURE_2D,this.h5.TEXTURE_MIN_FILTER,this.h5.LINEAR),this.r6(this.h5,"texParameteri",this.h5.TEXTURE_2D,this.h5.TEXTURE_WRAP_S,this.h5.CLAMP_TO_EDGE),this.r6(this.h5,"texParameteri",this.h5.TEXTURE_2D,this.h5.TEXTURE_WRAP_T,this.h5.CLAMP_TO_EDGE)},t.prototype.B6=function(t,e){var i,n,r=this.r6(this.i5,"getImageData",0,0,t,e);if(r){for(var o=this.P5.getVideoWidths(),s=this.P5.getVideoHeights(),a=0;a<o.length&&r.data[4*(o[a]-1)+3]>0;a++)i=Math.min(o[a],t);for(var h=0;h<s.length&&r.data[(s[h]-1)*this.K5.videoWidth*4+3]>0;h++)n=Math.min(s[h],e);i&&n&&(i!==t||n!==e)?this.r6(this.i5,"drawImage",this.J5,0,0,i,n,0,0,this.J5.width,this.J5.height):this.Q5=!1}else this.Q5=!1},t.prototype.C6=function(){if(!this.j5||this.j5===a.GL_ERROR.NO_ERROR){var t=this.K5.videoWidth,e=this.K5.videoHeight;if(this.J5&&this.i5){var i=0;this.M5!==o.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(i=.0555555*e);var n=e-2*i;this.r6(this.i5,"drawImage",this.K5.getWrappedElement(),0,i,t,n,0,0,this.J5.width,this.J5.height),this.P5.add(t,e);var r=this.N5!==t,s=this.O5!==e;!r&&!s||/Trident/.test(navigator.userAgent)||(this.Q5=!0),this.Q5&&this.B6(t,e),this.N5=t,this.O5=e}this.r6(this.h5,"activeTexture",this.h5.TEXTURE0),this.r6(this.h5,"bindTexture",this.h5.TEXTURE_2D,this.u5);try{var h=null!==this.T5.requestFakeInput?this.T5.requestFakeInput():null;null!==h?this.r6(this.h5,"texImage2D",this.h5.TEXTURE_2D,0,this.h5.RGB,this.h5.RGB,this.h5.UNSIGNED_BYTE,h):this.J5?this.r6(this.h5,"texImage2D",this.h5.TEXTURE_2D,0,this.h5.RGB,this.h5.RGB,this.h5.UNSIGNED_BYTE,this.J5):this.r6(this.h5,"texImage2D",this.h5.TEXTURE_2D,0,this.h5.RGB,this.h5.RGB,this.h5.UNSIGNED_BYTE,this.K5.getWrappedElement())}catch(t){this.s6(t.message)}}},t.prototype.onFrameRateAvailable=function(t,e,i){},t.prototype.D6=function(t,e){if(!this.j5||this.j5===a.GL_ERROR.NO_ERROR){switch(this.r6(this.h5,"useProgram",this.p5),this.r6(this.h5,"bindBuffer",this.h5.ARRAY_BUFFER,this.q5),this.r6(this.h5,"vertexAttribPointer",this.U5.loc,2,this.h5.FLOAT,!1,0,0),this.r6(this.h5,"activeTexture",this.h5.TEXTURE0),this.r6(this.h5,"bindTexture",this.h5.TEXTURE_2D,this.u5),this.V5.setValue(t),this.W5.setValue(0),this.j6.setValue(this.S5.contentFieldOfView),isFinite(this.K5.videoWidth)&&this.K5.videoWidth>0&&isFinite(this.K5.videoHeight)&&this.K5.videoHeight>0?(this.k6.setValue(this.K5.videoWidth),this.l6.setValue(this.K5.videoHeight)):(this.k6.setValue(4096),this.l6.setValue(2048)),this.S5.contentType){case s.VRContentType.Single:this.i6.setValue(0);break;case s.VRContentType.SBS:this.i6.setValue(1);break;case s.VRContentType.TAB:this.i6.setValue(2);break;default:this.s6("Invalid content type specified ("+this.S5.contentType+")")}this.m6.setValue(this.z5),this.n6.setValue(this.A5),this.o6.setValue(this.B5[t]),this.p6.setValue(this.C5),this.X5.setValue(e),this.r6(this.h5,"viewport",this.I5.width/2*t,0,this.I5.width/this.l5,this.I5.height),this.r6(this.h5,"bindBuffer",this.h5.ELEMENT_ARRAY_BUFFER,this.r5),this.r6(this.h5,"drawElements",this.h5.TRIANGLES,6,this.h5.UNSIGNED_SHORT,0)}},t.prototype.E6=function(t){return t?t.viewer.inverseCoefficients:this.x5},t.prototype.F6=function(t){var e=this.G6(t),i=n.MathUtil.hypot(Math.tan(n.MathUtil.degToRad(Math.max(e.leftDegrees,e.rightDegrees))),Math.tan(n.MathUtil.degToRad(Math.max(e.downDegrees,e.upDegrees))));return i*i},t.prototype.G6=function(t,e){var i=e||this.y5.LEFT;return i===this.y5.LEFT?t.getFieldOfViewLeftEye(!0):i===this.y5.RIGHT?t.getFieldOfViewRightEye(!0):null},t.prototype.H6=function(t,e){var i=this.G6(t,e);return[Math.tan(n.MathUtil.degToRad(i.leftDegrees)),Math.tan(n.MathUtil.degToRad(i.downDegrees))]},t.prototype.I6=function(t){var e=this.G6(t);return[Math.tan(n.MathUtil.degToRad(e.leftDegrees))+Math.tan(n.MathUtil.degToRad(e.rightDegrees)),Math.tan(n.MathUtil.degToRad(e.upDegrees))+Math.tan(n.MathUtil.degToRad(e.downDegrees))]},t.prototype.getBackingStoreRatio=function(){var t=0;return this.j5===a.GL_ERROR.NO_ERROR&&(t=(t=(t=(t=(t=t||this.h5.webkitBackingStorePixelRatio)||this.h5.mozBackingStorePixelRatio)||this.h5.msBackingStorePixelRatio)||this.h5.oBackingStorePixelRatio)||this.h5.backingStorePixelRatio),t||1},t.prototype.enableStereo=function(){this.m5=!0,this.l5=2},t.prototype.disableStereo=function(){this.m5=!1,this.l5=1},t.prototype.drawScene=function(t,e){if((!this.j5||this.j5===a.GL_ERROR.NO_ERROR)&&this.h5&&this.K5.getWrappedElement()){this.F5.endAnimationFrame(),this.F5.startAnimationFrame(),this.F5.startDrawScene();try{this.F5.startUpdateTexture(),e&&this.C6(),this.F5.endUpdateTexture(),this.D6(this.y5.LEFT,t),this.m5&&this.D6(this.y5.RIGHT,t),null!==this.T5.onDrawScene&&this.T5.onDrawScene(this.h5),this.q6([a.GL_ERROR.INVALID_VALUE])}catch(t){}this.F5.endDrawScene()}},t.prototype.destroy=function(){this.F5.unsubscribe(this),this.F5.destroy(),this.F5=null,this.P5=null,this.h5=null,this.I5=null,this.i5=null,this.J5=null},t}();e.Renderer=l},24180:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VRHandler=void 0;var n,r=i(61535),o=i(70372),s=function(){function t(t,e,i,s,a,h,u){var l=o.ConfigParser.parse(i),c=l[0],d=l[1],p=new r.InternalVRHandler(t,e,c,s,a,h,u,d);(n=n||new window.WeakMap).set(this,p)}return t.prototype.Nf=function(){return n.has(this)&&"error"!==n.get(this).getState()},t.prototype.setStereo=function(t){var e="boolean"==typeof t;return!(!this.Nf()||!e)&&n.get(this).setStereo(t)},t.prototype.enableGyroscope=function(){return!!this.Nf()&&n.get(this).enableGyroscope()},t.prototype.disableGyroscope=function(){return!!this.Nf()&&n.get(this).disableGyroscope()},t.prototype.isGyroscopeEnabled=function(){return!!this.Nf()&&n.get(this).isGyroscopeEnabled()},t.prototype.enableMouseControl=function(){return!!this.Nf()&&n.get(this).enableMouseControl()},t.prototype.disableMouseControl=function(){return!!this.Nf()&&n.get(this).disableMouseControl()},t.prototype.isMouseControlEnabled=function(){return!!this.Nf()&&n.get(this).isMouseControlEnabled()},t.prototype.enableKeyboardControl=function(){return!!this.Nf()&&n.get(this).enableKeyboardControl()},t.prototype.disableKeyboardControl=function(){return!!this.Nf()&&n.get(this).disableKeyboardControl()},t.prototype.isKeyboardControlEnabled=function(){return!!this.Nf()&&n.get(this).isKeyboardControlEnabled()},t.prototype.getStereo=function(){return!!this.Nf()&&n.get(this).getStereo()},t.prototype.getState=function(){return n.has(this)?n.get(this).getState():null},t.prototype.getLastError=function(){return n.has(this)?n.get(this).getLastError():null},t.prototype.getViewingDirection=function(){return this.Nf()?n.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},t.prototype.setViewingDirection=function(t){var e=t&&isFinite(t.yaw)&&isFinite(t.pitch)&&isFinite(t.roll);return!(!this.Nf()||!e)&&n.get(this).setViewingDirection(t)},t.prototype.moveViewingDirection=function(t){var e=isFinite(t.x)&&isFinite(t.y)&&isFinite(t.phi);return!(!this.Nf()||!e)&&n.get(this).moveViewingDirection(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){var e=isFinite(t);return!(!this.Nf()||!e)&&n.get(this).setViewingDirectionChangeEventInterval(t)},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.Nf()?n.get(this).getViewingDirectionChangeEventInterval():-1},t.prototype.setViewingDirectionChangeThreshold=function(t){var e=isFinite(t);return!(!this.Nf()||!e)&&n.get(this).setViewingDirectionChangeThreshold(t)},t.prototype.getViewingDirectionChangeThreshold=function(){return this.Nf()?n.get(this).getViewingDirectionChangeThreshold():-1},t.prototype.setVerticalFieldOfView=function(t){return!!this.Nf()&&n.get(this).setVerticalFieldOfView(t)},t.prototype.getVerticalFieldOfView=function(){return this.Nf()?n.get(this).getVerticalFieldOfView():-1},t.prototype.setHorizontalFieldOfView=function(t){return!!this.Nf()&&n.get(this).setHorizontalFieldOfView(t)},t.prototype.getHorizontalFieldOfView=function(){return this.Nf()?n.get(this).getHorizontalFieldOfView():-1},t.prototype.zoom=function(t){return!!this.Nf()&&n.get(this).zoom(t)},t.prototype.getZoom=function(){return this.Nf()?n.get(this).getZoom():-1},t.prototype.deviceOrientationPermissionRequired=function(){var t,e;return this.Nf()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.deviceOrientationPermissionRequired())&&void 0!==e&&e},t.prototype.requestDeviceOrientationPermission=function(){var t,e;return this.Nf()&&null!==(e=null===(t=n.get(this))||void 0===t?void 0:t.requestDeviceOrientationPermission())&&void 0!==e?e:Promise.resolve()},t}();e.VRHandler=s},45698:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.ApiControl=void 0;var r=i(37485),o=function(t){function e(e,i,n){var o=t.call(this,e,i)||this;return o.setViewingDirectionChangeEventInterval(n),o.nfb=new r.DisplacementVector,o.ofb=new r.DisplacementVector,o.qfb=0,o}return n(e,t),e.prototype.getDisplacementVector=function(t){return this.qfb+=t,this.qfb>this.pfb?this.ofb.update(0,0,0,!1,t):(r.DisplacementVector.clone(this.nfb,this.ofb),this.ofb.length=this.nfb.length*t,this.ofb.phi=this.nfb.phi*t,this.ofb.update(this.ofb.x,this.ofb.y,this.ofb.phi,!0,t)),this.ofb},e.prototype.setTargetVector=function(t){this.nfb.fromVec3(t,!0),this.qfb=0},e.prototype.setViewingDirectionChangeEventInterval=function(t){this.pfb=t},e.prototype.dispose=function(){this.disable()},e}(i(67982).Control);e.ApiControl=o},67982:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Control=void 0;var i=function(){function t(t,e){this.config=t,this.debugHooks=e}return t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t}();e.Control=i},22185:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardControl=void 0;var r=i(37485),o=i(67982),s=function(){function t(t){this.setKeyCombinations(t),this.sfb=!1}return t.prototype.checkAndSetActiveState=function(t){return this.rfb.some(function(e){return!e.some(function(e){return t.indexOf(e)<0})})?(this.sfb=!0,!0):(this.sfb=!1,!1)},t.prototype.isActive=function(){return this.sfb},t.prototype.setKeyCombinations=function(t){for(var e=[],i=0,n=t;i<n.length;i++){var r=n[i].split(" ").filter(function(t){return t.length>0});r.length>0&&e.push(r)}this.rfb=e},t}(),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.Cfb=function(t){if(t&&"string"==typeof t.key){var e=t.key.replace(" ","Space"),i=n.Afb.indexOf(e);i>=0&&"keyup"===t.type?n.Afb.splice(i,1):i<0&&"keydown"===t.type&&n.Afb.push(e),n.ufb.checkAndSetActiveState(n.Afb),n.vfb.checkAndSetActiveState(n.Afb),n.wfb.checkAndSetActiveState(n.Afb),n.xfb.checkAndSetActiveState(n.Afb),n.yfb.checkAndSetActiveState(n.Afb),n.zfb.checkAndSetActiveState(n.Afb)}},n.tfb=n.config.maxDisplacementSpeed,n.ufb=new s(["w"]),n.vfb=new s(["s"]),n.wfb=new s(["a"]),n.xfb=new s(["d"]),n.yfb=new s(["e"]),n.zfb=new s(["q"]),n.Afb=[],n.Bfb=new r.DisplacementVector,n.applyKeyMap(n.config.keyMap),n.enable(),n}return n(e,t),e.prototype.getDisplacementVector=function(t){if(this.enabled){var e=0,i=0,n=0;this.debugHooks.requestKeyActiveState?(i+=this.debugHooks.requestKeyActiveState("up")?this.tfb*t:0,i-=this.debugHooks.requestKeyActiveState("down")?this.tfb*t:0,e+=this.debugHooks.requestKeyActiveState("left")?this.tfb*t:0,e-=this.debugHooks.requestKeyActiveState("right")?this.tfb*t:0,n-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.tfb*t:0,n+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.tfb*t:0):(i+=this.ufb.isActive()?this.tfb*t:0,i-=this.vfb.isActive()?this.tfb*t:0,e+=this.wfb.isActive()?this.tfb*t:0,e-=this.xfb.isActive()?this.tfb*t:0,n-=this.yfb.isActive()?this.tfb*t:0,n+=this.zfb.isActive()?this.tfb*t:0);var r=0!==e||0!==i||0!==n;this.Bfb.update(e,i,n,r,t)}else this.Bfb.update(0,0,0,!1,t);return this.Bfb},e.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.Cfb,!1),document.addEventListener("keyup",this.Cfb,!1)},e.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.Cfb,!1),document.removeEventListener("keyup",this.Cfb,!1)},e.prototype.dispose=function(){this.disable()},e.prototype.applyKeyMap=function(t){t.hasOwnProperty("up")&&this.ufb.setKeyCombinations(t.up),t.hasOwnProperty("down")&&this.vfb.setKeyCombinations(t.down),t.hasOwnProperty("left")&&this.wfb.setKeyCombinations(t.left),t.hasOwnProperty("right")&&this.xfb.setKeyCombinations(t.right),t.hasOwnProperty("rotateClockwise")&&this.yfb.setKeyCombinations(t.rotateClockwise),t.hasOwnProperty("rotateCounterclockwise")&&this.zfb.setKeyCombinations(t.rotateCounterclockwise)},e}(o.Control);e.KeyboardControl=a},64419:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.MouseControl=void 0;var r=i(37485),o=i(51629),s=function(t){function e(i,n,s,a,h){void 0===h&&(h=90);var u=t.call(this,i,n)||this;return u.Mfb=function(t){var i=e.getTouchPosition(t),n=0,r=0;u.Ffb&&(n=i.x-u.Ifb.x,r=i.y-u.Ifb.y,u.Jfb.x+=n,u.Jfb.y+=r,u.Ifb=i),Math.abs(n)+Math.abs(r)>0&&(u.Hfb=!0),t.preventDefault()},u.Nfb=function(t){t.stopPropagation(),t.preventDefault(),o.ElementHelper.removeEventListener(document,["click"],u.Nfb,!0)},u.Ofb=function(t){o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,u.Mfb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,u.Ofb,!1),o.ElementHelper.removeEventListener(u.Dfb,o.ElementHelper.touchEvents.up,u.Ofb,!1),o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),u.Ifb=null,u.Ffb=!1,u.Hfb&&u.Gfb&&t.target===u.Gfb&&o.ElementHelper.addEventListener(document,["click"],u.Nfb,!0),u.Hfb=!1,u.Gfb=null},u.Pfb=function(t){u.Ifb=e.getTouchPosition(t),u.Jfb={x:0,y:0},u.Ffb=!0,u.Hfb=!1,u.Gfb=t.target,o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.move,u.Mfb,!1),o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.up,u.Ofb,!1),o.ElementHelper.addEventListener(u.Dfb,o.ElementHelper.touchEvents.up,u.Ofb,!1),o.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},u.Dfb=s,u.Efb=a,u.Ffb=!1,u.Ifb=null,u.Jfb={x:0,y:0},u.Kfb=h,u.Lfb=new r.DisplacementVector,u.enable(),u}return n(e,t),e.prototype.getDisplacementVector=function(t){var e=this.Efb.clientWidth,i=this.Efb.clientHeight,n=Boolean(this.debugHooks.requestTraveledMouseDistance),r=this.Kfb*(i/e);if(this.Jfb=n?this.debugHooks.requestTraveledMouseDistance(t):this.Jfb,this.enabled&&isFinite(r)&&r>0){var o=this.Ffb||0!==this.Jfb.x||0!==this.Jfb.y;this.Lfb.update(this.Jfb.x/this.Efb.clientWidth*this.Kfb,this.Jfb.y/this.Efb.clientHeight*r,0,o,t),this.Jfb={x:0,y:0}}else this.Lfb.update(0,0,0,this.Ffb,t);return this.Lfb},e.prototype.enable=function(){this.enabled=!0,o.ElementHelper.addEventListener(this.Dfb,o.ElementHelper.touchEvents.down,this.Pfb,!1)},e.prototype.disable=function(){this.enabled=!1,o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,this.Mfb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,this.Ofb,!1),o.ElementHelper.removeEventListener(this.Dfb,o.ElementHelper.touchEvents.up,this.Ofb,!1),o.ElementHelper.removeEventListener(this.Dfb,o.ElementHelper.touchEvents.down,this.Pfb,!1),o.ElementHelper.removeEventListener(document,["click"],this.Nfb,!0),this.Ifb=null,this.Ffb=!1,this.Hfb=!1,this.Gfb=null,o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},e.prototype.dispose=function(){this.disable(),this.Dfb=null,this.Efb=null},e.getTouchPosition=function(t){var e={x:0,y:0};return"ms"===o.ElementHelper.touchEvents.type?(e.x=t.clientX||t.originalEvent.layerX,e.y=t.clientY||t.originalEvent.layerY):"mobile"===o.ElementHelper.touchEvents.type?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY):(e.x=t.clientX,e.y=t.clientY),e.x=e.x||0,e.y=e.y||0,e},e}(i(67982).Control);e.MouseControl=s},54479:function(t,e){var i,n,r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.GLUniform=e.GLAttribute=e.GLVariableType=e.GL_ERROR_STR=e.GL_ERROR=void 0,function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.OTHER_ERROR=1]="OTHER_ERROR",t[t.INVALID_ENUM=1280]="INVALID_ENUM",t[t.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",t[t.INVALID_OPERATION=1282]="INVALID_OPERATION",t[t.INVALID_VALUE=1281]="INVALID_VALUE"}(i||(e.GL_ERROR=i={})),e.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},function(t){t.UNIFORM_1I="uniform1i",t.UNIFORM_1F="uniform1f",t.UNIFORM_MATRIX_4FV="uniformMatrix4fv",t.UNIFORM_1FV="uniform1fv",t.UNIFORM_2FV="uniform2fv"}(n||(e.GLVariableType=n={}));var o=function(){function t(t,e,i,n){this.context=t,this.program=e,this.name=i,this.type=n}return Object.defineProperty(t.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),t}(),s=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getAttribLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){},e}(o);e.GLAttribute=s;var a=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.location=o.context.getUniformLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(e,t),e.prototype.setValue=function(t){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,t):this.context[this.type].call(this.context,this.location,t)},e}(o);e.GLUniform=a},55443:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDeviceOrientationProvider=void 0;var r,o=i(44369),s=i(16404);!function(t){t.Granted="granted",t.Denied="denied"}(r||(r={}));var a=function(t){function e(){var i=t.call(this)||this;i.bib=null,i.cib=null,i.dib=null,i.eib=0,i.fib=0,i.iib=function(t){var e=void 0!==t.alpha&&null!==t.alpha,n=void 0!==t.beta&&null!==t.beta,r=void 0!==t.gamma&&null!==t.gamma;e&&n&&r&&(i.bib=t.alpha,i.cib=t.gamma,i.dib=t.beta),t.hasOwnProperty("screenOrientation")&&(i.eib=i.hib(t))},i.jib=function(){i.iib(e.getDeviceOrientationFromWindow())},i.kib=function(t){t&&t.data&&i.iib(t.data)},window.top!==window?window.addEventListener("message",i.kib,!1):window.addEventListener("deviceorientation",i.iib);try{window.addEventListener("orientationchange",i.jib);var n=e.getDeviceOrientationFromWindow();i.iib(n)}catch(t){window.removeEventListener("orientationchange",i.jib)}return i.enable(),i}return n(e,t),e.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var t=o.MathUtil.degToRad(this.bib)/2,e=o.MathUtil.degToRad(this.dib)/2,i=o.MathUtil.degToRad(this.cib)/2,n=Math.cos(e),r=Math.cos(i),s=Math.cos(t),a=Math.sin(e),h=Math.sin(i),u=Math.sin(t),l=n*r*s-a*h*u,c=a*r*s-n*h*u,d=n*h*s+a*r*u,p=n*r*u+a*h*s,f=o.Quat.fromValues(c,d,p,l),y=o.MathUtil.degToRad(this.gib())/2,b=o.Quat.fromValues(0,0,-Math.sin(y),Math.cos(y)),v=o.Quat.create();o.Quat.multiply(v,f,b);var g=Math.sqrt(.5);return o.Quat.multiply(v,o.Quat.fromValues(-g,0,0,g),v),o.Quat.toAngle(v)},e.prototype.orientationDataAvailable=function(){return null!==this.bib},e.supported=function(){return!!window.DeviceOrientationEvent},e.prototype.gib=function(){return this.eib},e.prototype.hib=function(t){var e;switch(t.screenOrientation.type){case"landscape-primary":e=90;break;case"landscape-secondary":e=-90;break;case"portrait-secondary":e=180;break;case"portrait-primary":e=0}return!e&&isNaN(e)&&(e=isNaN(t.screenOrientation.type)?t.orientation||0:t.screenOrientation.type),window.top!==window&&e===this.fib&&t.orientation!==e&&(e=t.orientation||0),e},e.getDeviceOrientationFromWindow=function(){var t=window.screen,e=t.orientation||t.mozOrientation||t.msOrientation||{};return{screenOrientation:{type:e.type||e,angle:e.angle},orientation:window.orientation}},e.prototype.permissionRequired=function(){return"undefined"!=typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},e.prototype.requestPermission=function(){return"undefined"==typeof DeviceMotionEvent||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(t){return t===r.Granted?Promise.resolve():Promise.reject()})},e}(s.DeviceOrientationProvider);e.DefaultDeviceOrientationProvider=a},16404:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProvider=void 0;var i=function(){function t(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return t.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},t.supported=function(){return!1},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t.prototype.permissionRequired=function(){return!1},t.prototype.requestPermission=function(){return Promise.resolve()},t}();e.DeviceOrientationProvider=i},59324:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceOrientationProviderFactory=void 0;var n=i(55443),r=i(11805),o=i(72458),s=function(){function t(){}return t.get=function(){return o.WebVRDeviceOrientationProvider.supported()?new o.WebVRDeviceOrientationProvider:n.DefaultDeviceOrientationProvider.supported()?new n.DefaultDeviceOrientationProvider:new r.NoDeviceOrientationProvider},t}();e.DeviceOrientationProviderFactory=s},37485:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.DisplacementVector=void 0;var n=i(23068),r=Math.PI/180,o=180/Math.PI,s=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.Wfb=null,this.update(t,e,i,n)}return Object.defineProperty(t.prototype,"x",{get:function(){return this.Geb},set:function(t){this.Geb!==t&&this.update(t,this.Heb,this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.Heb},set:function(t){this.Heb!==t&&this.update(this.Geb,t,this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"phi",{get:function(){return this.Ieb},set:function(t){this.Ieb!==t&&this.update(this.Geb,this.Heb,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.Ufb},set:function(t){this.Ufb!==t&&this.update(this.Jeb*Math.cos(t*r),this.Jeb*Math.sin(t*r),this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.Jeb},set:function(t){this.Jeb!==t&&this.update(t*Math.cos(this.Ufb*r),t*Math.sin(this.Ufb*r),this.Ieb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this.Vfb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaTime",{get:function(){return this.Wfb||0},set:function(t){this.Wfb=t},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e,i,r,s){if(void 0===i&&(i=0),"boolean"==typeof r&&(this.Vfb=r),(0,n.isNumber)(s)&&(this.Wfb=s),this.Geb!==t||this.Heb!==e||this.Ieb!==i){if(this.Geb=Math.abs(t)<1e-4?0:t,this.Heb=Math.abs(e)<1e-4?0:e,this.Ieb=Math.abs(i)<1e-4?0:i,0===this.Geb&&0===this.Heb&&0===this.Ieb)return this.Jeb=0,void(this.Ufb=0);this.Jeb=Math.sqrt(this.Geb*this.Geb+this.Heb*this.Heb),0===this.Heb&&this.Geb>=0?this.Ufb=0:0===this.Geb&&this.Heb>0?this.Ufb=90:0===this.Geb&&this.Heb<0?this.Ufb=270:this.Geb<0&&0===this.Heb?this.Ufb=180:this.Geb>0&&this.Heb>0?this.Ufb=Math.atan(this.Heb/this.Geb)*o:this.Geb<0&&this.Heb>0||this.Geb<0&&this.Heb<0?this.Ufb=180+Math.atan(this.Heb/this.Geb)*o:this.Geb>0&&this.Heb<0?this.Ufb=360+Math.atan(this.Heb/this.Geb)*o:this.Ufb=0}},t.prototype.fromVec3=function(t,e,i){this.update(t.x,t.y,t.phi,e,i)},t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=this.Geb,n=this.Heb,r=this.Ieb,o=0,s=t;o<s.length;o++){var a=s[o];i+=a.Geb,n+=a.Heb,r+=a.Ieb}this.update(i,n,r)},t.prototype.diff=function(e,i){i instanceof t?this.update(i.x-e.x,i.y-e.y,i.phi-e.phi):this.update(e.x-this.Geb,e.y-this.Heb,e.phi-this.Ieb)},t.clone=function(e,i){e instanceof t&&i instanceof t&&i.update(e.Geb,e.Heb,e.Ieb,e.Vfb,e.Wfb)},t.prototype.scale=function(t){this.length=this.Jeb*t},t}();e.DisplacementVector=s},11805:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoDeviceOrientationProvider=void 0;var r=function(t){function e(){var e=t.call(this)||this;return e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){return this.defaultDeviceOrientation},e.prototype.orientationDataAvailable=function(){return!0},e.supported=function(){return!0},e}(i(16404).DeviceOrientationProvider);e.NoDeviceOrientationProvider=r},33639:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.OrientationHandler=void 0;var n,r=i(44369),o=i(3714),s=i(45698),a=i(22185),h=i(64419),u=i(76320),l=i(59324),c=i(37485);!function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.BOTH="BOTH"}(n||(n={}));var d=function(){function t(t,e,i,o,d){var p=this;this.T6=null,this.U6=null,this.V6=1,this.W6=null,this.X6=null,this.Y6=null,this.Z6=null,this.a6=null,this.b6=null,this.c6=null,this.enableGyroscope=function(){p.S6.enable()},this.disableGyroscope=function(){p.S6.disable()},this.isGyroscopeEnabled=function(){return p.S6.isEnabled()},this.enableMouseControl=function(){p.g6.enable()},this.disableMouseControl=function(){p.g6.disable()},this.isMouseControlEnabled=function(){return p.g6.isEnabled()},this.enableKeyboardControl=function(){p.f6.enable()},this.disableKeyboardControl=function(){p.f6.disable()},this.isKeyboardControlEnabled=function(){return p.f6.isEnabled()},this.d6=t,this.e6=i,this.I7=d,this.S6=l.DeviceOrientationProviderFactory.get(),this.Z6=r.Mat4.create(),this.a6=r.Mat4.create(),this.b6=r.Mat4.create(),this.W6=r.Mat4.create(),this.T6=r.Mat4.create(),this.V6=this.e6.stereo?2:1,this.Y6={yaw:0,pitch:0,roll:0},this.Y6.yaw=this.e6.startPosition,this.v7=new c.DisplacementVector,this.w7=new c.DisplacementVector,this.X6={yaw:this.Y6.yaw,pitch:0,roll:0},this.x7=this.e6.viewingDirectionChangeEventInterval,this.y7=this.e6.viewingDirectionChangeThreshold,this.D7=this.e6.verticalFieldOfView,this.E7=this.e6.horizontalFieldOfView,this.F7=this.D7>-1,this.G7=this.E7>-1,this.H7=1,this.z7=0,this.A7=!1,this.f6=new a.KeyboardControl(this.e6.keyboardControl,o),this.g6=new h.MouseControl(this.e6.mouseControl,o,e,this.d6),this.h6=new s.ApiControl(this.e6.apiControl,o,this.x7),this.t7=u.TransitionTimingFactory.get(this.e6.keyboardControl),this.s7=u.TransitionTimingFactory.get(this.e6.mouseControl),this.u7=u.TransitionTimingFactory.get(this.e6.apiControl),this.D7>-1&&this.E7>-1?this.C7=n.BOTH:this.E7>-1?this.C7=n.HORIZONTAL:this.C7=n.VERTICAL}return t.clampValue=function(t,e,i){return 0===e&&360===i?t%360:t>i?i:t<e?e:t},t.clampToWindow=function(e,i){var n={yaw:0,pitch:0,roll:e.roll};return n.yaw=t.clampValue(e.yaw,i.minYaw,i.maxYaw),n.pitch=t.clampValue(e.pitch,i.minPitch,i.maxPitch),n},t.prototype.J7=function(e){void 0===e&&(e={yaw:0,pitch:0,roll:0}),null!==this.c6&&(this.c6=t.clampToWindow(this.c6,this.e6.viewingWindow),this.Y6.yaw=this.c6.yaw-e.yaw,this.Y6.pitch=this.c6.pitch-e.pitch,this.Y6.roll=this.c6.roll-e.roll,this.s7.reset(),this.t7.reset(),this.u7.reset()),this.c6=null,this.X6.yaw=this.Y6.yaw+e.yaw,this.X6.pitch=this.Y6.pitch+e.pitch,this.X6.roll=this.Y6.roll+e.roll,this.X6=t.clampToWindow(this.X6,this.e6.viewingWindow),r.Mat4.identity(this.W6),r.Mat4.rotate(this.W6,r.MathUtil.degToRad(this.X6.yaw+180),[0,1,0]),r.Mat4.rotate(this.W6,r.MathUtil.degToRad(this.X6.pitch),[1,0,0]),r.Mat4.rotate(this.W6,r.MathUtil.degToRad(this.X6.roll),[0,0,1])},t.prototype.getProjectionInverse=function(){return this.T6},t.prototype.getViewingDirection=function(){return this.X6},t.prototype.setViewingDirection=function(t){this.c6=t},t.prototype.setVerticalFieldOfView=function(t){this.F7=-1!==t,this.D7=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.C7===n.BOTH?this.C7=n.HORIZONTAL:this.C7===n.HORIZONTAL&&(this.G7?this.C7=n.BOTH:this.C7=n.VERTICAL)},t.prototype.getVerticalFieldOfView=function(){return this.D7/this.H7},t.prototype.setHorizontalFieldOfView=function(t){this.G7=-1!==t,this.E7=-1===t?-1:Math.max(Math.min(180,t),0),-1===t&&this.C7===n.BOTH?this.C7=n.VERTICAL:this.C7===n.VERTICAL&&(this.F7?this.C7=n.BOTH:this.C7=n.HORIZONTAL)},t.prototype.getHorizontalFieldOfView=function(){return this.E7/this.H7},t.prototype.zoom=function(t){return!!isFinite(t)&&(this.H7=Math.max(Number(t),1e-10),!0)},t.prototype.getZoom=function(){return this.H7},t.prototype.K7=function(){var t,e,i=this.S6.getFieldOfViewParams(),o=[1];this.D7<0&&(this.D7=i.upDegrees+i.downDegrees),this.E7<0&&(this.E7=i.leftDegrees+i.rightDegrees),this.C7!==n.BOTH&&this.C7!==n.HORIZONTAL||o.push(180/(this.E7/this.H7)),this.C7!==n.BOTH&&this.C7!==n.VERTICAL||o.push(180/(this.D7/this.H7)),this.H7/=Math.min.apply(null,o);var s=r.MathUtil.degToRad(this.D7/this.H7),a=r.MathUtil.degToRad(this.E7/this.H7);this.C7===n.BOTH?(t=s,e=Math.tan(.5*a)/Math.tan(.5*s)):e=this.d6.width/this.V6/this.d6.height,this.C7===n.HORIZONTAL?(t=2*Math.atan(Math.tan(a/2)/e),this.D7=r.MathUtil.radToDeg(t)*this.H7):this.C7===n.VERTICAL&&(t=s,this.E7=r.MathUtil.radToDeg(2*Math.atan(e*Math.tan(s/2)))/this.V6*this.H7),r.Mat4.perspective(this.b6,t,e,.1,10),r.Mat4.invert(this.Z6,this.b6),r.Mat4.multiply(this.T6,this.W6,this.Z6)},t.prototype.update=function(e){this.U6=this.U6||e;for(var i=(e-this.U6)/1e3,n=r.Mat4.create(),s=0;s<this.T6.length;s++)n[s]=this.T6[s];this.z7+=i,this.v7.update(0,0,0),i>0&&this.v7.add(this.s7.apply(this.g6.getDisplacementVector(i)),this.t7.apply(this.f6.getDisplacementVector(i)),this.u7.apply(this.h6.getDisplacementVector(i))),this.Y6.yaw+=this.v7.x,this.Y6.pitch+=this.v7.y,this.Y6.roll+=this.v7.phi,this.Y6=t.clampToWindow(this.Y6,this.e6.viewingWindow),this.U6=e,this.S6.orientationDataAvailable()?this.J7(this.S6.getOrientation()):this.J7(),this.w7.add(this.v7);var a=Math.abs(this.w7.length)>this.y7||Math.abs(this.w7.phi)>this.y7;a||this.A7||(this.z7=0);var h=this.z7>=this.x7;for(!a||!h&&this.A7?h&&this.A7&&(this.A7=!1,this.w7.update(0,0,0),this.z7=0,this.I7.getEventFunction()(o.PlayerEvent.VRViewingDirectionChanged,{direction:this.X6})):(this.A7=!0,this.z7=0,this.w7.update(0,0,0),this.I7.getEventFunction()(o.PlayerEvent.VRViewingDirectionChange,{direction:this.X6})),this.K7(),s=0;s<this.T6.length;s++)if(n[s]!==this.T6[s])return!0;return!1},t.prototype.enableStereo=function(){this.V6=2},t.prototype.disableStereo=function(){this.V6=1},t.prototype.moveViewingDirection=function(t){this.h6.setTargetVector(t)},t.prototype.setViewingDirectionChangeEventInterval=function(t){this.x7=t},t.prototype.getViewingDirectionChangeEventInterval=function(){return this.x7},t.prototype.setViewingDirectionChangeThreshold=function(t){this.y7=t},t.prototype.getViewingDirectionChangeThreshold=function(){return this.y7},t.prototype.permissionRequired=function(){return this.S6.permissionRequired()},t.prototype.requestPermission=function(){return this.S6.requestPermission()},t.prototype.destroy=function(){this.f6.dispose(),this.g6.dispose(),this.f6=null,this.g6=null},t}();e.OrientationHandler=d},72458:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.WebVRDeviceOrientationProvider=void 0;var r=i(44369),o=function(t){function e(){var e=t.call(this)||this;return e.lib=null,e.mib=null,e.nib=function(t){var i;for(i=0;i<t.length;++i)if(t[i]instanceof HMDVRDevice){e.lib=t[i];break}if(e.lib)for(i=0;i<t.length;++i)if(t[i]instanceof PositionSensorVRDevice&&t[i].hardwareUnitId===e.lib.hardwareUnitId){e.mib=t[i];break}},navigator.getVRDevices&&navigator.getVRDevices().then(e.nib),e.enable(),e}return n(e,t),e.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var t=this.mib.getState(),e=new Float32Array([0,0,0,0]);return null!==t&&t.orientation&&(e=new Float32Array([t.orientation.x,t.orientation.y,t.orientation.z,t.orientation.w])),r.Quat.toAngle(e)}return this.defaultDeviceOrientation},e.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.lib.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},e.prototype.orientationDataAvailable=function(){return null!==this.mib&&null!==this.lib},e.supported=function(){return!!navigator.getVRDevices},e}(i(16404).DeviceOrientationProvider);e.WebVRDeviceOrientationProvider=o},81116:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInOutTransitionTiming=void 0;var r=i(44369),o=i(37485),s=function(t){function e(e){var i=t.call(this,e)||this;return i.currentDisplacementVector=new o.DisplacementVector,i.intermediateDisplacementVector=new o.DisplacementVector,i.targetDisplacementVector=new o.DisplacementVector,i.normalizedTargetDisplacementVector=new o.DisplacementVector,i.normalizedDisplacementVector=new o.DisplacementVector,i.maximumLinearAcceleration=0,i.maximumAngularAcceleration=0,i}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0;return t&&e},e.prototype.apply=function(t){if(this.targetDisplacementVector.deltaTime=t.deltaTime,o.DisplacementVector.clone(t,this.normalizedDisplacementVector),o.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),o.DisplacementVector.clone(t,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return o.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var e=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),i=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>e&&(this.intermediateDisplacementVector.length=e),Math.abs(this.intermediateDisplacementVector.phi)>i&&(this.intermediateDisplacementVector.phi=r.MathUtil.sign(this.intermediateDisplacementVector.phi)*i),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},e.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},e}(i(7192).TransitionTiming);e.EaseInOutTransitionTiming=s},68801:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseInTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&i},e}(i(81116).EaseInOutTransitionTiming);e.EaseInTransitionTiming=r},95746:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EaseOutTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.shouldTransitionBeApplied=function(){var t=isFinite(this.targetDisplacementVector.deltaTime),e=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return t&&e&&!i},e}(i(81116).EaseInOutTransitionTiming);e.EaseOutTransitionTiming=r},4551:function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.NoTransitionTiming=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.apply=function(t){return t},e.prototype.reset=function(){},e}(i(7192).TransitionTiming);e.NoTransitionTiming=r},7192:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTiming=void 0;var i=function(){return function(t){this.config=t}}();e.TransitionTiming=i},76320:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.TransitionTimingFactory=void 0;var n=i(43948),r=i(81116),o=i(68801),s=i(95746),a=i(4551),h=function(){function t(){}return t.get=function(t){switch(t.transitionTimingType){case n.TransitionTimingType.None:return new a.NoTransitionTiming(t);case n.TransitionTimingType.EaseIn:return new o.EaseInTransitionTiming(t);case n.TransitionTimingType.EaseOut:return new s.EaseOutTransitionTiming(t);case n.TransitionTimingType.EaseInOut:return new r.EaseInOutTransitionTiming(t)}},t}();e.TransitionTimingFactory=h},70372:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigParser=void 0;var n=i(43948),r={contentType:n.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:n.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}},o=function(){function t(){}return t.getObject=function(t,e){for(var i=e.split("."),n=!0,o=t,s=r,a=0,h=i;a<h.length;a++){var u=h[a];o.hasOwnProperty(u)&&n?o=o[u]:n=!1,s.hasOwnProperty(u)&&(s=s[u])}return[n,o,s]},t.getPrimitive=function(e,i,n,r){var o=t.getObject(e,i),s=o[0],a=o[1],h=o[2],u=!0;if(r)for(var l in r){if(r.hasOwnProperty(l)&&r[l]===a){u=!0;break}u=!1}return s&&typeof a===n&&u?a:h},t.getArray=function(e,i,n){var r=t.getObject(e,i),o=r[0],s=r[1],a=r[2];return o&&"object"==typeof s&&s instanceof Array&&!s.some(function(t){return typeof t!==n})?s:a},t.getStringPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getEnumPrimitive=function(e,i,n){return t.getPrimitive(e,i,"string",n)},t.getBooleanPrimitive=function(e,i,n){return t.getPrimitive(e,i,"boolean",n)},t.getNumberPrimitive=function(e,i,n){return t.getPrimitive(e,i,"number",n)},t.getStringArray=function(e,i){return t.getArray(e,i,"string")},t.parseGeneralConfig=function(e,i){i.stereo=t.getBooleanPrimitive(e,"stereo"),i.restrictedInlinePlayback=t.getBooleanPrimitive(e,"restrictedInlinePlayback"),i.startPosition=t.getNumberPrimitive(e,"startPosition"),i.contentFieldOfView=t.getNumberPrimitive(e,"contentFieldOfView"),i.verticalFieldOfView=t.getNumberPrimitive(e,"verticalFieldOfView"),i.horizontalFieldOfView=t.getNumberPrimitive(e,"horizontalFieldOfView"),i.enableFrameRateMeasurements=t.getBooleanPrimitive(e,"enableFrameRateMeasurements"),i.cardboard=t.getStringPrimitive(e,"cardboard"),i.viewingDirectionChangeThreshold=t.getNumberPrimitive(e,"viewingDirectionChangeThreshold"),i.viewingDirectionChangeEventInterval=t.getNumberPrimitive(e,"viewingDirectionChangeEventInterval")},t.parseViewingWindow=function(e,i){i.viewingWindow=r.viewingWindow,e.hasOwnProperty("viewingWindow")&&"object"==typeof e.viewingWindow&&(i.viewingWindow.minYaw=t.getNumberPrimitive(e,"viewingWindow.minYaw"),i.viewingWindow.maxYaw=t.getNumberPrimitive(e,"viewingWindow.maxYaw"),i.viewingWindow.minPitch=t.getNumberPrimitive(e,"viewingWindow.minPitch"),i.viewingWindow.maxPitch=t.getNumberPrimitive(e,"viewingWindow.maxPitch"))},t.parseKeyboardControl=function(e,i){i.keyboardControl=r.keyboardControl,e.hasOwnProperty("keyboardControl")&&"object"==typeof e.keyboardControl&&(i.keyboardControl.transitionTimingType=t.getEnumPrimitive(e,"keyboardControl.transitionTimingType",n.TransitionTimingType),i.keyboardControl.transitionTime=t.getNumberPrimitive(e,"keyboardControl.transitionTime"),i.keyboardControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"keyboardControl.maxDisplacementSpeed"),e.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof e.keyboardControl.keyMap&&(i.keyboardControl.keyMap.up=t.getStringArray(e,"keyboardControl.keyMap.up"),i.keyboardControl.keyMap.right=t.getStringArray(e,"keyboardControl.keyMap.right"),i.keyboardControl.keyMap.down=t.getStringArray(e,"keyboardControl.keyMap.down"),i.keyboardControl.keyMap.left=t.getStringArray(e,"keyboardControl.keyMap.left"),i.keyboardControl.keyMap.rotateClockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateClockwise"),i.keyboardControl.keyMap.rotateCounterclockwise=t.getStringArray(e,"keyboardControl.keyMap.rotateCounterclockwise")))},t.parseMouseControl=function(e,i){i.mouseControl=r.mouseControl,e.hasOwnProperty("mouseControl")&&"object"==typeof e.mouseControl&&(i.mouseControl.transitionTimingType=t.getEnumPrimitive(e,"mouseControl.transitionTimingType",n.TransitionTimingType),i.mouseControl.transitionTime=t.getNumberPrimitive(e,"mouseControl.transitionTime"),i.mouseControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"mouseControl.maxDisplacementSpeed"))},t.parseApiControl=function(e,i){i.apiControl=r.apiControl,e.hasOwnProperty("apiControl")&&"object"==typeof e.apiControl&&(i.apiControl.transitionTimingType=t.getEnumPrimitive(e,"apiControl.transitionTimingType",n.TransitionTimingType),i.apiControl.transitionTime=t.getNumberPrimitive(e,"apiControl.transitionTime"),i.apiControl.maxDisplacementSpeed=t.getNumberPrimitive(e,"apiControl.maxDisplacementSpeed"))},t.parseDebugHooks=function(t){var e={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return t.debugHooks&&Object.keys(e).filter(function(e){return"function"==typeof t.debugHooks[e]}).forEach(function(i){return e[i]=t.debugHooks[i]}),e},t.parse=function(e){e=e||{};var i={contentType:t.getEnumPrimitive(e,"contentType",n.VRContentType)};return t.parseGeneralConfig(e,i),t.parseViewingWindow(e,i),t.parseKeyboardControl(e,i),t.parseMouseControl(e,i),t.parseApiControl(e,i),[i,t.parseDebugHooks(e)]},t}();e.ConfigParser=o},51629:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ElementHelper=void 0;var i=function(){function t(){}return t.addEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.addEventListener(e[r],i,n)},t.removeEventListener=function(t,e,i,n){for(var r=0;r<e.length;r++)t.removeEventListener(e[r],i,n)},t.addClass=function(t,e){if(t&&e){var i=t.getAttribute("class"),n=!0;i&&i.length>0&&(n=i.split(" ").indexOf(e)<0),i&&i.length>0&&n&&(e=i+" "+e),n&&t.setAttribute("class",e)}},t.removeClass=function(t,e){if(t&&e){var i=t.getAttribute("class");i&&i.indexOf(e)>-1&&(i=i.replace(new RegExp("(?:^|\\s)"+e+"(?!\\S)"),"").trim(),t.setAttribute("class",i))}},t.getNavigator=function(){return window.navigator},Object.defineProperty(t,"touchEvents",{get:function(){var e=t.getNavigator().userAgent,i=t.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(e)?i?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),t}();e.ElementHelper=i},17378:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.FrameRateMonitor=void 0;var n=i(44369),r=function(){function t(t,e){void 0===e&&(e=1e3);var i=this;this.startAnimationFrame=function(){i.yeb&&(i.ueb=window.performance.now())},this.endAnimationFrame=function(){if(!(i.ueb<0)){var t=window.performance.now()-i.ueb;i.reb.push(t),i.Aeb(),i.xeb+=t,i.xeb>i.peb&&i.qeb&&(i.xeb=0,i.zeb(i.getAverageFrameRate(),i.getTimeSpentUpdatingTexture(),i.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){i.yeb&&(i.veb=window.performance.now())},this.endUpdateTexture=function(){i.veb<0||i.teb.push(window.performance.now()-i.veb)},this.startDrawScene=function(){i.yeb&&(i.web=window.performance.now())},this.endDrawScene=function(){i.web<0||i.seb.push(window.performance.now()-i.web)},this.reb=[],this.teb=[],this.seb=[],this.ueb=-1,this.veb=-1,this.web=-1,this.oeb=t,this.peb=e,this.qeb=[],this.xeb=0,this.yeb=!1}return t.prototype.enable=function(){this.yeb=!0},t.prototype.disable=function(){this.yeb=!1,this.reb=[],this.teb=[],this.seb=[],this.ueb=-1,this.veb=-1,this.web=-1},t.prototype.subscribe=function(t){-1===this.qeb.indexOf(t)&&this.qeb.push(t)},t.prototype.unsubscribe=function(t){this.qeb.indexOf(t)>-1&&this.qeb.splice(this.qeb.indexOf(t),1)},t.prototype.getAverageFrameRate=function(){return 1/(n.MathUtil.getAverage(this.reb)/1e3)},t.prototype.getTimeSpentUpdatingTexture=function(){return n.MathUtil.getSum(this.teb)/n.MathUtil.getSum(this.reb)},t.prototype.getTimeSpentDrawingScene=function(){return n.MathUtil.getSum(this.seb)/n.MathUtil.getSum(this.reb)},t.prototype.destroy=function(){this.disable(),this.qeb=null},t.prototype.zeb=function(t,e,i){for(var n=0,r=this.qeb;n<r.length;n++)r[n].onFrameRateAvailable(t,e,i)},t.prototype.Aeb=function(){for(var t=0,e=this.reb.length-1;e>=0;e--)if((t+=this.reb[e])>=this.oeb){this.reb.splice(0,e+1),this.teb.splice(0,e+1),this.seb.splice(0,e+1);break}},t}();e.FrameRateMonitor=r},70415:function(t){t.exports="precision mediump float;\n\nconst int LEFT_EYE = 0;\nconst int RIGHT_EYE = 1;\nconst int CONTENT_TYPE_MONO = 0;\nconst int CONTENT_TYPE_STEREO_SBS = 1;\nconst int CONTENT_TYPE_STEREO_TAB = 2;\nconst float PI = 3.1415926535897932384626433832795;\nconst float TwoPI = 6.283185307179586476925286766559;\n\nuniform int eyeSelector;\nuniform int contentType;\nuniform float videoWidth;\nuniform float videoHeight;\nuniform float contentFieldOfView;\nuniform sampler2D textureUnit;\nvarying vec3 viewingDirection;\n\nfloat restrictedMod(float value, float divisor, float bound) {\n return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;\n}\n\nvec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {\n float eyeOffset = 0.0;\n float textureSizeMultiplier = contentFieldOfView / 180.;\n float theta = atan(direction.x, direction.z * -1.0);\n float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);\n float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);\n float phi = atan(direction.y * -1.0, length(direction.xz));\n\n float u = mod(theta / (PI * textureSizeMultiplier), 1.0);\n float v = mod(phi / PI + 0.5, 1.0);\n\n if (eye == LEFT_EYE) {\n eyeOffset = 0.0;\n } else if (eye == RIGHT_EYE) {\n eyeOffset = 0.5;\n }\n\n if ((theta + PI) / PI > textureSizeMultiplier) {\n return vec4(0., 0., 0., 1.);\n }\n\n if (contentType == CONTENT_TYPE_STEREO_SBS) {\n u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;\n } else if (contentType == CONTENT_TYPE_STEREO_TAB) {\n v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);\n }\n\n return texture2D(textureUnit, vec2(u, v));\n}\nvoid main(void) {\n gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);\n}\n"},17913:function(t){t.exports="precision mediump float;\n\nattribute vec2 vertexPosition;\nvarying vec3 viewingDirection;\nuniform mat4 projectionInverse;\nuniform vec2 distortionFovScale;\nuniform vec2 distortionFovOffset;\nuniform float contentWidthDegrees;\nuniform float distortionMaxFovSquared;\nuniform float distortionCoefficients[12];\n\nfloat DistortionFactor(float rSquared) {\n float ret = 0.0;\n rSquared = min(distortionMaxFovSquared, rSquared);\n ret = rSquared * (ret + distortionCoefficients[11]);\n ret = rSquared * (ret + distortionCoefficients[10]);\n ret = rSquared * (ret + distortionCoefficients[9]);\n ret = rSquared * (ret + distortionCoefficients[8]);\n ret = rSquared * (ret + distortionCoefficients[7]);\n ret = rSquared * (ret + distortionCoefficients[6]);\n ret = rSquared * (ret + distortionCoefficients[5]);\n ret = rSquared * (ret + distortionCoefficients[4]);\n ret = rSquared * (ret + distortionCoefficients[3]);\n ret = rSquared * (ret + distortionCoefficients[2]);\n ret = rSquared * (ret + distortionCoefficients[1]);\n ret = rSquared * (ret + distortionCoefficients[0]);\n return ret + 1.0;\n}\n\nvec4 Distort(vec4 point) {\n vec3 pointNdc = point.xyz / point.w;\n vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;\n vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;\n float radiusSquared = dot(pointTanAngle, pointTanAngle);\n float distortionFactor = DistortionFactor(radiusSquared);\n vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;\n vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)\n / distortionFovScale;\n vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);\n return vec4(distortedPointNdc, 1.0) * point.w;\n}\n\nvoid main(void) {\n gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));\n vec4 projectiveDirection = projectionInverse * gl_Position;\n viewingDirection = projectiveDirection.xyz / projectiveDirection.w;\n }\n"}},function(t){return function(){return t(6463)}()}])});
|
|
18
18
|
})();
|